Class: MicrosoftGraph::Models::PasswordAuthenticationMethod

Inherits:
AuthenticationMethod show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/password_authentication_method.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new passwordAuthenticationMethod and sets the default values.



20
21
22
23
# File 'lib/models/password_authentication_method.rb', line 20

def initialize()
    super
    @odata_type = "#microsoft.graph.passwordAuthenticationMethod"
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_authentication_method

Raises:

  • (StandardError)


44
45
46
47
# File 'lib/models/password_authentication_method.rb', line 44

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

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. The date and time when this password was last updated. This property is currently not populated. Read-only. 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.

Returns:

  • a date_time



28
29
30
# File 'lib/models/password_authentication_method.rb', line 28

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when this password was last updated. This property is currently not populated. Read-only. 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.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



36
37
38
# File 'lib/models/password_authentication_method.rb', line 36

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



52
53
54
55
56
57
# File 'lib/models/password_authentication_method.rb', line 52

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "password" => lambda {|n| @password = n.get_string_value() },
    })
end

#passwordObject

Gets the password property value. For security, the password is always returned as null from a LIST or GET operation.

Returns:

  • a string



62
63
64
# File 'lib/models/password_authentication_method.rb', line 62

def password
    return @password
end

#password=(value) ⇒ Object

Sets the password property value. For security, the password is always returned as null from a LIST or GET operation.

Parameters:

  • value

    Value to set for the password property.

Returns:

  • a void



70
71
72
# File 'lib/models/password_authentication_method.rb', line 70

def password=(value)
    @password = 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)


78
79
80
81
82
83
# File 'lib/models/password_authentication_method.rb', line 78

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("password", @password)
end