Class: MicrosoftGraph::Models::AuthenticationMethodConfiguration

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/authentication_method_configuration.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 authenticationMethodConfiguration and sets the default values.



19
20
21
# File 'lib/models/authentication_method_configuration.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

Parameters:

  • parse_node

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

Returns:

  • a authentication_method_configuration

Raises:

  • (StandardError)


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/models/authentication_method_configuration.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.emailAuthenticationMethodConfiguration"
                return EmailAuthenticationMethodConfiguration.new
            when "#microsoft.graph.fido2AuthenticationMethodConfiguration"
                return Fido2AuthenticationMethodConfiguration.new
            when "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration"
                return MicrosoftAuthenticatorAuthenticationMethodConfiguration.new
            when "#microsoft.graph.smsAuthenticationMethodConfiguration"
                return SmsAuthenticationMethodConfiguration.new
            when "#microsoft.graph.softwareOathAuthenticationMethodConfiguration"
                return SoftwareOathAuthenticationMethodConfiguration.new
            when "#microsoft.graph.temporaryAccessPassAuthenticationMethodConfiguration"
                return TemporaryAccessPassAuthenticationMethodConfiguration.new
            when "#microsoft.graph.voiceAuthenticationMethodConfiguration"
                return VoiceAuthenticationMethodConfiguration.new
            when "#microsoft.graph.x509CertificateAuthenticationMethodConfiguration"
                return X509CertificateAuthenticationMethodConfiguration.new
        end
    end
    return AuthenticationMethodConfiguration.new
end

Instance Method Details

#exclude_targetsObject

Gets the excludeTargets property value. Groups of users that are excluded from a policy.

Returns:

  • a exclude_target



57
58
59
# File 'lib/models/authentication_method_configuration.rb', line 57

def exclude_targets
    return @exclude_targets
end

#exclude_targets=(value) ⇒ Object

Sets the excludeTargets property value. Groups of users that are excluded from a policy.

Parameters:

  • value

    Value to set for the excludeTargets property.

Returns:

  • a void



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

def exclude_targets=(value)
    @exclude_targets = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



72
73
74
75
76
77
# File 'lib/models/authentication_method_configuration.rb', line 72

def get_field_deserializers()
    return super.merge({
        "excludeTargets" => lambda {|n| @exclude_targets = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ExcludeTarget.create_from_discriminator_value(pn) }) },
        "state" => lambda {|n| @state = n.get_enum_value(MicrosoftGraph::Models::AuthenticationMethodState) },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


83
84
85
86
87
88
# File 'lib/models/authentication_method_configuration.rb', line 83

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("excludeTargets", @exclude_targets)
    writer.write_enum_value("state", @state)
end

#stateObject

Gets the state property value. The state of the policy. Possible values are: enabled, disabled.

Returns:

  • a authentication_method_state



93
94
95
# File 'lib/models/authentication_method_configuration.rb', line 93

def state
    return @state
end

#state=(value) ⇒ Object

Sets the state property value. The state of the policy. Possible values are: enabled, disabled.

Parameters:

  • value

    Value to set for the state property.

Returns:

  • a void



101
102
103
# File 'lib/models/authentication_method_configuration.rb', line 101

def state=(value)
    @state = value
end