Class: MicrosoftGraph::Models::TemporaryAccessPassAuthenticationMethodConfiguration

Inherits:
AuthenticationMethodConfiguration show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/temporary_access_pass_authentication_method_configuration.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AuthenticationMethodConfiguration

#exclude_targets, #exclude_targets=, #state, #state=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new temporaryAccessPassAuthenticationMethodConfiguration and sets the default values.



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

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

Raises:

  • (StandardError)


40
41
42
43
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 40

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

Instance Method Details

#default_lengthObject

Gets the defaultLength property value. Default length in characters of a Temporary Access Pass object. Must be between 8 and 48 characters.

Returns:

  • a integer



48
49
50
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 48

def default_length
    return @default_length
end

#default_length=(value) ⇒ Object

Sets the defaultLength property value. Default length in characters of a Temporary Access Pass object. Must be between 8 and 48 characters.

Parameters:

  • value

    Value to set for the defaultLength property.

Returns:

  • a void



56
57
58
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 56

def default_length=(value)
    @default_length = value
end

#default_lifetime_in_minutesObject

Gets the defaultLifetimeInMinutes property value. Default lifetime in minutes for a Temporary Access Pass. Value can be any integer between the minimumLifetimeInMinutes and maximumLifetimeInMinutes.

Returns:

  • a integer



63
64
65
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 63

def default_lifetime_in_minutes
    return @default_lifetime_in_minutes
end

#default_lifetime_in_minutes=(value) ⇒ Object

Sets the defaultLifetimeInMinutes property value. Default lifetime in minutes for a Temporary Access Pass. Value can be any integer between the minimumLifetimeInMinutes and maximumLifetimeInMinutes.

Parameters:

  • value

    Value to set for the defaultLifetimeInMinutes property.

Returns:

  • a void



71
72
73
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 71

def default_lifetime_in_minutes=(value)
    @default_lifetime_in_minutes = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



78
79
80
81
82
83
84
85
86
87
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 78

def get_field_deserializers()
    return super.merge({
        "defaultLength" => lambda {|n| @default_length = n.get_number_value() },
        "defaultLifetimeInMinutes" => lambda {|n| @default_lifetime_in_minutes = n.get_number_value() },
        "includeTargets" => lambda {|n| @include_targets = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AuthenticationMethodTarget.create_from_discriminator_value(pn) }) },
        "isUsableOnce" => lambda {|n| @is_usable_once = n.get_boolean_value() },
        "maximumLifetimeInMinutes" => lambda {|n| @maximum_lifetime_in_minutes = n.get_number_value() },
        "minimumLifetimeInMinutes" => lambda {|n| @minimum_lifetime_in_minutes = n.get_number_value() },
    })
end

#include_targetsObject

Gets the includeTargets property value. A collection of groups that are enabled to use the authentication method.

Returns:

  • a authentication_method_target



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

def include_targets
    return @include_targets
end

#include_targets=(value) ⇒ Object

Sets the includeTargets property value. A collection of groups that are enabled to use the authentication method.

Parameters:

  • value

    Value to set for the includeTargets property.

Returns:

  • a void



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

def include_targets=(value)
    @include_targets = value
end

#is_usable_onceObject

Gets the isUsableOnce property value. If true, all the passes in the tenant will be restricted to one-time use. If false, passes in the tenant can be created to be either one-time use or reusable.

Returns:

  • a boolean



107
108
109
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 107

def is_usable_once
    return @is_usable_once
end

#is_usable_once=(value) ⇒ Object

Sets the isUsableOnce property value. If true, all the passes in the tenant will be restricted to one-time use. If false, passes in the tenant can be created to be either one-time use or reusable.

Parameters:

  • value

    Value to set for the isUsableOnce property.

Returns:

  • a void



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

def is_usable_once=(value)
    @is_usable_once = value
end

#maximum_lifetime_in_minutesObject

Gets the maximumLifetimeInMinutes property value. Maximum lifetime in minutes for any Temporary Access Pass created in the tenant. Value can be between 10 and 43200 minutes (equivalent to 30 days).

Returns:

  • a integer



122
123
124
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 122

def maximum_lifetime_in_minutes
    return @maximum_lifetime_in_minutes
end

#maximum_lifetime_in_minutes=(value) ⇒ Object

Sets the maximumLifetimeInMinutes property value. Maximum lifetime in minutes for any Temporary Access Pass created in the tenant. Value can be between 10 and 43200 minutes (equivalent to 30 days).

Parameters:

  • value

    Value to set for the maximumLifetimeInMinutes property.

Returns:

  • a void



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

def maximum_lifetime_in_minutes=(value)
    @maximum_lifetime_in_minutes = value
end

#minimum_lifetime_in_minutesObject

Gets the minimumLifetimeInMinutes property value. Minimum lifetime in minutes for any Temporary Access Pass created in the tenant. Value can be between 10 and 43200 minutes (equivalent to 30 days).

Returns:

  • a integer



137
138
139
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 137

def minimum_lifetime_in_minutes
    return @minimum_lifetime_in_minutes
end

#minimum_lifetime_in_minutes=(value) ⇒ Object

Sets the minimumLifetimeInMinutes property value. Minimum lifetime in minutes for any Temporary Access Pass created in the tenant. Value can be between 10 and 43200 minutes (equivalent to 30 days).

Parameters:

  • value

    Value to set for the minimumLifetimeInMinutes property.

Returns:

  • a void



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

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


153
154
155
156
157
158
159
160
161
162
# File 'lib/models/temporary_access_pass_authentication_method_configuration.rb', line 153

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_number_value("defaultLength", @default_length)
    writer.write_number_value("defaultLifetimeInMinutes", @default_lifetime_in_minutes)
    writer.write_collection_of_object_values("includeTargets", @include_targets)
    writer.write_boolean_value("isUsableOnce", @is_usable_once)
    writer.write_number_value("maximumLifetimeInMinutes", @maximum_lifetime_in_minutes)
    writer.write_number_value("minimumLifetimeInMinutes", @minimum_lifetime_in_minutes)
end