Class: MicrosoftGraph::Models::SignInActivity

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/sign_in_activity.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new signInActivity and sets the default values.



47
48
49
# File 'lib/models/sign_in_activity.rb', line 47

def initialize()
    @additional_data = Hash.new
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 sign_in_activity

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



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

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



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

def additional_data=(value)
    @additional_data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



63
64
65
66
67
68
69
70
71
# File 'lib/models/sign_in_activity.rb', line 63

def get_field_deserializers()
    return {
        "lastNonInteractiveSignInDateTime" => lambda {|n| @last_non_interactive_sign_in_date_time = n.get_date_time_value() },
        "lastNonInteractiveSignInRequestId" => lambda {|n| @last_non_interactive_sign_in_request_id = n.get_string_value() },
        "lastSignInDateTime" => lambda {|n| @last_sign_in_date_time = n.get_date_time_value() },
        "lastSignInRequestId" => lambda {|n| @last_sign_in_request_id = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
    }
end

#last_non_interactive_sign_in_date_timeObject

Gets the lastNonInteractiveSignInDateTime property value. The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: ‘2014-01-01T00:00:00Z’. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD.

Returns:

  • a date_time



76
77
78
# File 'lib/models/sign_in_activity.rb', line 76

def 
    return @last_non_interactive_sign_in_date_time
end

#last_non_interactive_sign_in_date_time=(value) ⇒ Object

Sets the lastNonInteractiveSignInDateTime property value. The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: ‘2014-01-01T00:00:00Z’. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD.

Parameters:

  • value

    Value to set for the lastNonInteractiveSignInDateTime property.

Returns:

  • a void



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

def (value)
    @last_non_interactive_sign_in_date_time = value
end

#last_non_interactive_sign_in_request_idObject

Gets the lastNonInteractiveSignInRequestId property value. Request identifier of the last non-interactive sign-in performed by this user.

Returns:

  • a string



91
92
93
# File 'lib/models/sign_in_activity.rb', line 91

def 
    return @last_non_interactive_sign_in_request_id
end

#last_non_interactive_sign_in_request_id=(value) ⇒ Object

Sets the lastNonInteractiveSignInRequestId property value. Request identifier of the last non-interactive sign-in performed by this user.

Parameters:

  • value

    Value to set for the lastNonInteractiveSignInRequestId property.

Returns:

  • a void



99
100
101
# File 'lib/models/sign_in_activity.rb', line 99

def (value)
    @last_non_interactive_sign_in_request_id = value
end

#last_sign_in_date_timeObject

Gets the lastSignInDateTime property value. The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: ‘2014-01-01T00:00:00Z’. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD.

Returns:

  • a date_time



106
107
108
# File 'lib/models/sign_in_activity.rb', line 106

def 
    return @last_sign_in_date_time
end

#last_sign_in_date_time=(value) ⇒ Object

Sets the lastSignInDateTime property value. The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: ‘2014-01-01T00:00:00Z’. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD.

Parameters:

  • value

    Value to set for the lastSignInDateTime property.

Returns:

  • a void



114
115
116
# File 'lib/models/sign_in_activity.rb', line 114

def (value)
    @last_sign_in_date_time = value
end

#last_sign_in_request_idObject

Gets the lastSignInRequestId property value. Request identifier of the last interactive sign-in performed by this user.

Returns:

  • a string



121
122
123
# File 'lib/models/sign_in_activity.rb', line 121

def 
    return @last_sign_in_request_id
end

#last_sign_in_request_id=(value) ⇒ Object

Sets the lastSignInRequestId property value. Request identifier of the last interactive sign-in performed by this user.

Parameters:

  • value

    Value to set for the lastSignInRequestId property.

Returns:

  • a void



129
130
131
# File 'lib/models/sign_in_activity.rb', line 129

def (value)
    @last_sign_in_request_id = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



136
137
138
# File 'lib/models/sign_in_activity.rb', line 136

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



144
145
146
# File 'lib/models/sign_in_activity.rb', line 144

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


152
153
154
155
156
157
158
159
160
# File 'lib/models/sign_in_activity.rb', line 152

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_date_time_value("lastNonInteractiveSignInDateTime", @last_non_interactive_sign_in_date_time)
    writer.write_string_value("lastNonInteractiveSignInRequestId", @last_non_interactive_sign_in_request_id)
    writer.write_date_time_value("lastSignInDateTime", @last_sign_in_date_time)
    writer.write_string_value("lastSignInRequestId", @last_sign_in_request_id)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_additional_data(@additional_data)
end