Class: MicrosoftGraph::Models::PhoneAuthenticationMethod
- Inherits:
-
AuthenticationMethod
- Object
- Entity
- AuthenticationMethod
- MicrosoftGraph::Models::PhoneAuthenticationMethod
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/phone_authentication_method.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new phoneAuthenticationMethod and sets the default values.
-
#phone_number ⇒ Object
Gets the phoneNumber property value.
-
#phone_number=(value) ⇒ Object
Sets the phoneNumber property value.
-
#phone_type ⇒ Object
Gets the phoneType property value.
-
#phone_type=(value) ⇒ Object
Sets the phoneType property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#sms_sign_in_state ⇒ Object
Gets the smsSignInState property value.
-
#sms_sign_in_state=(value) ⇒ Object
Sets the smsSignInState property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
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
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_deserializers ⇒ Object
The deserialization information for the current model
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| @sms_sign_in_state = n.get_enum_value(MicrosoftGraph::Models::AuthenticationMethodSignInState) }, }) end |
#phone_number ⇒ Object
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.
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.
58 59 60 |
# File 'lib/models/phone_authentication_method.rb', line 58 def phone_number=(value) @phone_number = value end |
#phone_type ⇒ Object
Gets the phoneType property value. The type of this phone. Possible values are: mobile, alternateMobile, or office.
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.
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
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", @sms_sign_in_state) end |
#sms_sign_in_state ⇒ Object
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.
92 93 94 |
# File 'lib/models/phone_authentication_method.rb', line 92 def sms_sign_in_state return @sms_sign_in_state 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.
100 101 102 |
# File 'lib/models/phone_authentication_method.rb', line 100 def sms_sign_in_state=(value) @sms_sign_in_state = value end |