Class: MicrosoftGraph::Models::AuthenticationMethodsPolicy

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



53
54
55
# File 'lib/models/authentication_methods_policy.rb', line 53

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_methods_policy

Raises:

  • (StandardError)


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

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

Instance Method Details

#authentication_method_configurationsObject

Gets the authenticationMethodConfigurations property value. Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy.

Returns:

  • a authentication_method_configuration



38
39
40
# File 'lib/models/authentication_methods_policy.rb', line 38

def authentication_method_configurations
    return @authentication_method_configurations
end

#authentication_method_configurations=(value) ⇒ Object

Sets the authenticationMethodConfigurations property value. Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy.

Parameters:

  • value

    Value to set for the authenticationMethodConfigurations property.

Returns:

  • a void



46
47
48
# File 'lib/models/authentication_methods_policy.rb', line 46

def authentication_method_configurations=(value)
    @authentication_method_configurations = value
end

#descriptionObject

Gets the description property value. A description of the policy. Read-only.

Returns:

  • a string



69
70
71
# File 'lib/models/authentication_methods_policy.rb', line 69

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. A description of the policy. Read-only.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



77
78
79
# File 'lib/models/authentication_methods_policy.rb', line 77

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. The name of the policy. Read-only.

Returns:

  • a string



84
85
86
# File 'lib/models/authentication_methods_policy.rb', line 84

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the policy. Read-only.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/models/authentication_methods_policy.rb', line 99

def get_field_deserializers()
    return super.merge({
        "authenticationMethodConfigurations" => lambda {|n| @authentication_method_configurations = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodConfiguration.create_from_discriminator_value(pn) }) },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "policyMigrationState" => lambda {|n| @policy_migration_state = n.get_enum_value(MicrosoftGraph::Models::AuthenticationMethodsPolicyMigrationState) },
        "policyVersion" => lambda {|n| @policy_version = n.get_string_value() },
        "reconfirmationInDays" => lambda {|n| @reconfirmation_in_days = n.get_number_value() },
        "registrationEnforcement" => lambda {|n| @registration_enforcement = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::RegistrationEnforcement.create_from_discriminator_value(pn) }) },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. The date and time of the last update to the policy. Read-only.

Returns:

  • a date_time



115
116
117
# File 'lib/models/authentication_methods_policy.rb', line 115

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. The date and time of the last update to the policy. Read-only.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



123
124
125
# File 'lib/models/authentication_methods_policy.rb', line 123

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#policy_migration_stateObject

Gets the policyMigrationState property value. The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authentication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use.

Returns:

  • a authentication_methods_policy_migration_state



130
131
132
# File 'lib/models/authentication_methods_policy.rb', line 130

def policy_migration_state
    return @policy_migration_state
end

#policy_migration_state=(value) ⇒ Object

Sets the policyMigrationState property value. The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authentication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use.

Parameters:

  • value

    Value to set for the policyMigrationState property.

Returns:

  • a void



138
139
140
# File 'lib/models/authentication_methods_policy.rb', line 138

def policy_migration_state=(value)
    @policy_migration_state = value
end

#policy_versionObject

Gets the policyVersion property value. The version of the policy in use. Read-only.

Returns:

  • a string



145
146
147
# File 'lib/models/authentication_methods_policy.rb', line 145

def policy_version
    return @policy_version
end

#policy_version=(value) ⇒ Object

Sets the policyVersion property value. The version of the policy in use. Read-only.

Parameters:

  • value

    Value to set for the policyVersion property.

Returns:

  • a void



153
154
155
# File 'lib/models/authentication_methods_policy.rb', line 153

def policy_version=(value)
    @policy_version = value
end

#reconfirmation_in_daysObject

Gets the reconfirmationInDays property value. The reconfirmationInDays property

Returns:

  • a integer



160
161
162
# File 'lib/models/authentication_methods_policy.rb', line 160

def reconfirmation_in_days
    return @reconfirmation_in_days
end

#reconfirmation_in_days=(value) ⇒ Object

Sets the reconfirmationInDays property value. The reconfirmationInDays property

Parameters:

  • value

    Value to set for the reconfirmationInDays property.

Returns:

  • a void



168
169
170
# File 'lib/models/authentication_methods_policy.rb', line 168

def reconfirmation_in_days=(value)
    @reconfirmation_in_days = value
end

#registration_enforcementObject

Gets the registrationEnforcement property value. Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods.

Returns:

  • a registration_enforcement



175
176
177
# File 'lib/models/authentication_methods_policy.rb', line 175

def registration_enforcement
    return @registration_enforcement
end

#registration_enforcement=(value) ⇒ Object

Sets the registrationEnforcement property value. Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods.

Parameters:

  • value

    Value to set for the registrationEnforcement property.

Returns:

  • a void



183
184
185
# File 'lib/models/authentication_methods_policy.rb', line 183

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


191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/models/authentication_methods_policy.rb', line 191

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("authenticationMethodConfigurations", @authentication_method_configurations)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_enum_value("policyMigrationState", @policy_migration_state)
    writer.write_string_value("policyVersion", @policy_version)
    writer.write_number_value("reconfirmationInDays", @reconfirmation_in_days)
    writer.write_object_value("registrationEnforcement", @registration_enforcement)
end