Class: MicrosoftGraph::Models::PhoneAuthenticationMethod

Inherits:
AuthenticationMethod show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/phone_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 phoneAuthenticationMethod and sets the default values.



22
23
24
25
# File 'lib/models/phone_authentication_method.rb', line 22

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

Raises:

  • (StandardError)


31
32
33
34
# File 'lib/models/phone_authentication_method.rb', line 31

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



39
40
41
42
43
44
45
# File 'lib/models/phone_authentication_method.rb', line 39

def get_field_deserializers()
    return super.merge({
        "phoneNumber" => lambda {|n| @phone_number = n.get_string_value() },
        "phoneType" => lambda {|n| @phone_type = n.get_enum_value(MicrosoftGraph::Models::AuthenticationPhoneType) },
        "smsSignInState" => lambda {|n|  = n.get_enum_value(MicrosoftGraph::Models::AuthenticationMethodSignInState) },
    })
end

#phone_numberObject

Gets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format {country code} {number}x{extension}, with extension optional. For example, 1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating or updating if they do not match the required format.

Returns:

  • a string



50
51
52
# File 'lib/models/phone_authentication_method.rb', line 50

def phone_number
    return @phone_number
end

#phone_number=(value) ⇒ Object

Sets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format {country code} {number}x{extension}, with extension optional. For example, 1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating or updating if they do not match the required format.

Parameters:

  • value

    Value to set for the phoneNumber property.

Returns:

  • a void



58
59
60
# File 'lib/models/phone_authentication_method.rb', line 58

def phone_number=(value)
    @phone_number = value
end

#phone_typeObject

Gets the phoneType property value. The type of this phone. Possible values are: mobile, alternateMobile, or office.

Returns:

  • a authentication_phone_type



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

def phone_type
    return @phone_type
end

#phone_type=(value) ⇒ Object

Sets the phoneType property value. The type of this phone. Possible values are: mobile, alternateMobile, or office.

Parameters:

  • value

    Value to set for the phoneType property.

Returns:

  • a void



73
74
75
# File 'lib/models/phone_authentication_method.rb', line 73

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


81
82
83
84
85
86
87
# File 'lib/models/phone_authentication_method.rb', line 81

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("phoneNumber", @phone_number)
    writer.write_enum_value("phoneType", @phone_type)
    writer.write_enum_value("smsSignInState", )
end

#sms_sign_in_stateObject

Gets the smsSignInState property value. Whether a phone is ready to be used for SMS sign-in or not. Possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue.

Returns:

  • a authentication_method_sign_in_state



92
93
94
# File 'lib/models/phone_authentication_method.rb', line 92

def 
    return 
end

#sms_sign_in_state=(value) ⇒ Object

Sets the smsSignInState property value. Whether a phone is ready to be used for SMS sign-in or not. Possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue.

Parameters:

  • value

    Value to set for the smsSignInState property.

Returns:

  • a void



100
101
102
# File 'lib/models/phone_authentication_method.rb', line 100

def (value)
     = value
end