Class: MicrosoftGraph::Models::PasswordCredential

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/password_credential.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new passwordCredential and sets the default values.



56
57
58
# File 'lib/models/password_credential.rb', line 56

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a password_credential

Raises:

  • (StandardError)


64
65
66
67
# File 'lib/models/password_credential.rb', line 64

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return PasswordCredential.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



41
42
43
# File 'lib/models/password_credential.rb', line 41

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



49
50
51
# File 'lib/models/password_credential.rb', line 49

def additional_data=(value)
    @additional_data = value
end

#custom_key_identifierObject

Gets the customKeyIdentifier property value. Do not use.

Returns:

  • a base64url



72
73
74
# File 'lib/models/password_credential.rb', line 72

def custom_key_identifier
    return @custom_key_identifier
end

#custom_key_identifier=(value) ⇒ Object

Sets the customKeyIdentifier property value. Do not use.

Parameters:

  • value

    Value to set for the customKeyIdentifier property.

Returns:

  • a void



80
81
82
# File 'lib/models/password_credential.rb', line 80

def custom_key_identifier=(value)
    @custom_key_identifier = value
end

#display_nameObject

Gets the displayName property value. Friendly name for the password. Optional.

Returns:

  • a string



87
88
89
# File 'lib/models/password_credential.rb', line 87

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Friendly name for the password. Optional.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



95
96
97
# File 'lib/models/password_credential.rb', line 95

def display_name=(value)
    @display_name = value
end

#end_date_timeObject

Gets the endDateTime property value. The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Returns:

  • a date_time



102
103
104
# File 'lib/models/password_credential.rb', line 102

def end_date_time
    return @end_date_time
end

#end_date_time=(value) ⇒ Object

Sets the endDateTime property value. The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Parameters:

  • value

    Value to set for the endDateTime property.

Returns:

  • a void



110
111
112
# File 'lib/models/password_credential.rb', line 110

def end_date_time=(value)
    @end_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/models/password_credential.rb', line 117

def get_field_deserializers()
    return {
        "customKeyIdentifier" => lambda {|n| @custom_key_identifier = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "endDateTime" => lambda {|n| @end_date_time = n.get_date_time_value() },
        "hint" => lambda {|n| @hint = n.get_string_value() },
        "keyId" => lambda {|n| @key_id = n.get_guid_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "secretText" => lambda {|n| @secret_text = n.get_string_value() },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
    }
end

#hintObject

Gets the hint property value. Contains the first three characters of the password. Read-only.

Returns:

  • a string



133
134
135
# File 'lib/models/password_credential.rb', line 133

def hint
    return @hint
end

#hint=(value) ⇒ Object

Sets the hint property value. Contains the first three characters of the password. Read-only.

Parameters:

  • value

    Value to set for the hint property.

Returns:

  • a void



141
142
143
# File 'lib/models/password_credential.rb', line 141

def hint=(value)
    @hint = value
end

#key_idObject

Gets the keyId property value. The unique identifier for the password.

Returns:

  • a guid



148
149
150
# File 'lib/models/password_credential.rb', line 148

def key_id
    return @key_id
end

#key_id=(value) ⇒ Object

Sets the keyId property value. The unique identifier for the password.

Parameters:

  • value

    Value to set for the keyId property.

Returns:

  • a void



156
157
158
# File 'lib/models/password_credential.rb', line 156

def key_id=(value)
    @key_id = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



163
164
165
# File 'lib/models/password_credential.rb', line 163

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



171
172
173
# File 'lib/models/password_credential.rb', line 171

def odata_type=(value)
    @odata_type = value
end

#secret_textObject

Gets the secretText property value. Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future.

Returns:

  • a string



178
179
180
# File 'lib/models/password_credential.rb', line 178

def secret_text
    return @secret_text
end

#secret_text=(value) ⇒ Object

Sets the secretText property value. Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future.

Parameters:

  • value

    Value to set for the secretText property.

Returns:

  • a void



186
187
188
# File 'lib/models/password_credential.rb', line 186

def secret_text=(value)
    @secret_text = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/models/password_credential.rb', line 194

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("customKeyIdentifier", @custom_key_identifier)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("endDateTime", @end_date_time)
    writer.write_string_value("hint", @hint)
    writer.write_guid_value("keyId", @key_id)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("secretText", @secret_text)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_additional_data(@additional_data)
end

#start_date_timeObject

Gets the startDateTime property value. The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Returns:

  • a date_time



210
211
212
# File 'lib/models/password_credential.rb', line 210

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

Sets the startDateTime property value. The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional.

Parameters:

  • value

    Value to set for the startDateTime property.

Returns:

  • a void



218
219
220
# File 'lib/models/password_credential.rb', line 218

def start_date_time=(value)
    @start_date_time = value
end