Class: MicrosoftGraph::Models::TemporaryAccessPassAuthenticationMethod

Inherits:
AuthenticationMethod show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/temporary_access_pass_authentication_method.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 temporaryAccessPassAuthenticationMethod and sets the default values.



35
36
37
38
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 35

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

Raises:

  • (StandardError)


59
60
61
62
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 59

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

Instance Method Details

#created_date_timeObject

Gets the createdDateTime property value. The date and time when the Temporary Access Pass was created.

Returns:

  • a date_time



43
44
45
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 43

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time when the Temporary Access Pass was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



51
52
53
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 51

def created_date_time=(value)
    @created_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



67
68
69
70
71
72
73
74
75
76
77
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 67

def get_field_deserializers()
    return super.merge({
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "isUsable" => lambda {|n| @is_usable = n.get_boolean_value() },
        "isUsableOnce" => lambda {|n| @is_usable_once = n.get_boolean_value() },
        "lifetimeInMinutes" => lambda {|n| @lifetime_in_minutes = n.get_number_value() },
        "methodUsabilityReason" => lambda {|n| @method_usability_reason = n.get_string_value() },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
        "temporaryAccessPass" => lambda {|n| @temporary_access_pass = n.get_string_value() },
    })
end

#is_usableObject

Gets the isUsable property value. The state of the authentication method that indicates whether it’s currently usable by the user.

Returns:

  • a boolean



82
83
84
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 82

def is_usable
    return @is_usable
end

#is_usable=(value) ⇒ Object

Sets the isUsable property value. The state of the authentication method that indicates whether it’s currently usable by the user.

Parameters:

  • value

    Value to set for the isUsable property.

Returns:

  • a void



90
91
92
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 90

def is_usable=(value)
    @is_usable = value
end

#is_usable_onceObject

Gets the isUsableOnce property value. Determines whether the pass is limited to a one-time use. If true, the pass can be used once; if false, the pass can be used multiple times within the Temporary Access Pass lifetime.

Returns:

  • a boolean



97
98
99
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 97

def is_usable_once
    return @is_usable_once
end

#is_usable_once=(value) ⇒ Object

Sets the isUsableOnce property value. Determines whether the pass is limited to a one-time use. If true, the pass can be used once; if false, the pass can be used multiple times within the Temporary Access Pass lifetime.

Parameters:

  • value

    Value to set for the isUsableOnce property.

Returns:

  • a void



105
106
107
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 105

def is_usable_once=(value)
    @is_usable_once = value
end

#lifetime_in_minutesObject

Gets the lifetimeInMinutes property value. The lifetime of the Temporary Access Pass in minutes starting at startDateTime. Must be between 10 and 43200 inclusive (equivalent to 30 days).

Returns:

  • a integer



112
113
114
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 112

def lifetime_in_minutes
    return @lifetime_in_minutes
end

#lifetime_in_minutes=(value) ⇒ Object

Sets the lifetimeInMinutes property value. The lifetime of the Temporary Access Pass in minutes starting at startDateTime. Must be between 10 and 43200 inclusive (equivalent to 30 days).

Parameters:

  • value

    Value to set for the lifetimeInMinutes property.

Returns:

  • a void



120
121
122
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 120

def lifetime_in_minutes=(value)
    @lifetime_in_minutes = value
end

#method_usability_reasonObject

Gets the methodUsabilityReason property value. Details about the usability state (isUsable). Reasons can include: EnabledByPolicy, DisabledByPolicy, Expired, NotYetValid, OneTimeUsed.

Returns:

  • a string



127
128
129
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 127

def method_usability_reason
    return @method_usability_reason
end

#method_usability_reason=(value) ⇒ Object

Sets the methodUsabilityReason property value. Details about the usability state (isUsable). Reasons can include: EnabledByPolicy, DisabledByPolicy, Expired, NotYetValid, OneTimeUsed.

Parameters:

  • value

    Value to set for the methodUsabilityReason property.

Returns:

  • a void



135
136
137
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 135

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


143
144
145
146
147
148
149
150
151
152
153
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 143

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_boolean_value("isUsable", @is_usable)
    writer.write_boolean_value("isUsableOnce", @is_usable_once)
    writer.write_number_value("lifetimeInMinutes", @lifetime_in_minutes)
    writer.write_string_value("methodUsabilityReason", @method_usability_reason)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_string_value("temporaryAccessPass", @temporary_access_pass)
end

#start_date_timeObject

Gets the startDateTime property value. The date and time when the Temporary Access Pass becomes available to use and when isUsable is true is enforced.

Returns:

  • a date_time



158
159
160
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 158

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

Sets the startDateTime property value. The date and time when the Temporary Access Pass becomes available to use and when isUsable is true is enforced.

Parameters:

  • value

    Value to set for the startDateTime property.

Returns:

  • a void



166
167
168
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 166

def start_date_time=(value)
    @start_date_time = value
end

#temporary_access_passObject

Gets the temporaryAccessPass property value. The Temporary Access Pass used to authenticate. Returned only on creation of a new temporaryAccessPassAuthenticationMethod object; Hidden in subsequent read operations and returned as null with GET.

Returns:

  • a string



173
174
175
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 173

def temporary_access_pass
    return @temporary_access_pass
end

#temporary_access_pass=(value) ⇒ Object

Sets the temporaryAccessPass property value. The Temporary Access Pass used to authenticate. Returned only on creation of a new temporaryAccessPassAuthenticationMethod object; Hidden in subsequent read operations and returned as null with GET.

Parameters:

  • value

    Value to set for the temporaryAccessPass property.

Returns:

  • a void



181
182
183
# File 'lib/models/temporary_access_pass_authentication_method.rb', line 181

def temporary_access_pass=(value)
    @temporary_access_pass = value
end