Class: MicrosoftGraph::Models::AuthenticationMethodTarget
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/authentication_method_target.rb
Direct Known Subclasses
MicrosoftAuthenticatorAuthenticationMethodTarget, SmsAuthenticationMethodTarget
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 authenticationMethodTarget and sets the default values.
-
#is_registration_required ⇒ Object
Gets the isRegistrationRequired property value.
-
#is_registration_required=(value) ⇒ Object
Sets the isRegistrationRequired property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#target_type ⇒ Object
Gets the targetType property value.
-
#target_type=(value) ⇒ Object
Sets the targetType property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new authenticationMethodTarget and sets the default values.
19 20 21 |
# File 'lib/models/authentication_method_target.rb', line 19 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/models/authentication_method_target.rb', line 27 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodTarget" return MicrosoftAuthenticatorAuthenticationMethodTarget.new when "#microsoft.graph.smsAuthenticationMethodTarget" return SmsAuthenticationMethodTarget.new end end return AuthenticationMethodTarget.new end |
Instance Method Details
#get_field_deserializers ⇒ Object
The deserialization information for the current model
45 46 47 48 49 50 |
# File 'lib/models/authentication_method_target.rb', line 45 def get_field_deserializers() return super.merge({ "isRegistrationRequired" => lambda {|n| @is_registration_required = n.get_boolean_value() }, "targetType" => lambda {|n| @target_type = n.get_enum_value(MicrosoftGraph::Models::AuthenticationMethodTargetType) }, }) end |
#is_registration_required ⇒ Object
Gets the isRegistrationRequired property value. Determines if the user is enforced to register the authentication method.
55 56 57 |
# File 'lib/models/authentication_method_target.rb', line 55 def is_registration_required return @is_registration_required end |
#is_registration_required=(value) ⇒ Object
Sets the isRegistrationRequired property value. Determines if the user is enforced to register the authentication method.
63 64 65 |
# File 'lib/models/authentication_method_target.rb', line 63 def is_registration_required=(value) @is_registration_required = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
71 72 73 74 75 76 |
# File 'lib/models/authentication_method_target.rb', line 71 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_boolean_value("isRegistrationRequired", @is_registration_required) writer.write_enum_value("targetType", @target_type) end |
#target_type ⇒ Object
Gets the targetType property value. The targetType property
81 82 83 |
# File 'lib/models/authentication_method_target.rb', line 81 def target_type return @target_type end |
#target_type=(value) ⇒ Object
Sets the targetType property value. The targetType property
89 90 91 |
# File 'lib/models/authentication_method_target.rb', line 89 def target_type=(value) @target_type = value end |