Class: MicrosoftGraph::Models::UserSecurityState

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new userSecurityState and sets the default values.



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

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 user_security_state

Raises:

  • (StandardError)


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

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

Instance Method Details

#aad_user_idObject

Gets the aadUserId property value. AAD User object identifier (GUID) - represents the physical/multi-account user entity.

Returns:

  • a string



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

def aad_user_id
    return @aad_user_id
end

#aad_user_id=(value) ⇒ Object

Sets the aadUserId property value. AAD User object identifier (GUID) - represents the physical/multi-account user entity.

Parameters:

  • value

    Value to set for the aadUserId property.

Returns:

  • a void



70
71
72
# File 'lib/models/user_security_state.rb', line 70

def aad_user_id=(value)
    @aad_user_id = value
end

#account_nameObject

Gets the accountName property value. Account name of user account (without Active Directory domain or DNS domain) - (also called mailNickName).

Returns:

  • a string



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

def 
    return @account_name
end

#account_name=(value) ⇒ Object

Sets the accountName property value. Account name of user account (without Active Directory domain or DNS domain) - (also called mailNickName).

Parameters:

  • value

    Value to set for the accountName property.

Returns:

  • a void



85
86
87
# File 'lib/models/user_security_state.rb', line 85

def (value)
    @account_name = value
end

#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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#domain_nameObject

Gets the domainName property value. NetBIOS/Active Directory domain of user account (that is, domain/account format).

Returns:

  • a string



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

def domain_name
    return @domain_name
end

#domain_name=(value) ⇒ Object

Sets the domainName property value. NetBIOS/Active Directory domain of user account (that is, domain/account format).

Parameters:

  • value

    Value to set for the domainName property.

Returns:

  • a void



131
132
133
# File 'lib/models/user_security_state.rb', line 131

def domain_name=(value)
    @domain_name = value
end

#email_roleObject

Gets the emailRole property value. For email-related alerts - user account’s email ‘role’. Possible values are: unknown, sender, recipient.

Returns:

  • a email_role



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

def email_role
    return @email_role
end

#email_role=(value) ⇒ Object

Sets the emailRole property value. For email-related alerts - user account’s email ‘role’. Possible values are: unknown, sender, recipient.

Parameters:

  • value

    Value to set for the emailRole property.

Returns:

  • a void



146
147
148
# File 'lib/models/user_security_state.rb', line 146

def email_role=(value)
    @email_role = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/models/user_security_state.rb', line 153

def get_field_deserializers()
    return {
        "aadUserId" => lambda {|n| @aad_user_id = n.get_string_value() },
        "accountName" => lambda {|n| @account_name = n.get_string_value() },
        "domainName" => lambda {|n| @domain_name = n.get_string_value() },
        "emailRole" => lambda {|n| @email_role = n.get_enum_value(MicrosoftGraph::Models::EmailRole) },
        "isVpn" => lambda {|n| @is_vpn = n.get_boolean_value() },
        "logonDateTime" => lambda {|n| @logon_date_time = n.get_date_time_value() },
        "logonId" => lambda {|n| @logon_id = n.get_string_value() },
        "logonIp" => lambda {|n| @logon_ip = n.get_string_value() },
        "logonLocation" => lambda {|n| @logon_location = n.get_string_value() },
        "logonType" => lambda {|n| @logon_type = n.get_enum_value(MicrosoftGraph::Models::LogonType) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "onPremisesSecurityIdentifier" => lambda {|n| @on_premises_security_identifier = n.get_string_value() },
        "riskScore" => lambda {|n| @risk_score = n.get_string_value() },
        "userAccountType" => lambda {|n| @user_account_type = n.get_enum_value(MicrosoftGraph::Models::UserAccountSecurityType) },
        "userPrincipalName" => lambda {|n| @user_principal_name = n.get_string_value() },
    }
end

#is_vpnObject

Gets the isVpn property value. Indicates whether the user logged on through a VPN.

Returns:

  • a boolean



176
177
178
# File 'lib/models/user_security_state.rb', line 176

def is_vpn
    return @is_vpn
end

#is_vpn=(value) ⇒ Object

Sets the isVpn property value. Indicates whether the user logged on through a VPN.

Parameters:

  • value

    Value to set for the isVpn property.

Returns:

  • a void



184
185
186
# File 'lib/models/user_security_state.rb', line 184

def is_vpn=(value)
    @is_vpn = value
end

#logon_date_timeObject

Gets the logonDateTime property value. Time at which the sign-in occurred. The Timestamp type 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.

Returns:

  • a date_time



191
192
193
# File 'lib/models/user_security_state.rb', line 191

def logon_date_time
    return @logon_date_time
end

#logon_date_time=(value) ⇒ Object

Sets the logonDateTime property value. Time at which the sign-in occurred. The Timestamp type 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.

Parameters:

  • value

    Value to set for the logonDateTime property.

Returns:

  • a void



199
200
201
# File 'lib/models/user_security_state.rb', line 199

def logon_date_time=(value)
    @logon_date_time = value
end

#logon_idObject

Gets the logonId property value. User sign-in ID.

Returns:

  • a string



206
207
208
# File 'lib/models/user_security_state.rb', line 206

def logon_id
    return @logon_id
end

#logon_id=(value) ⇒ Object

Sets the logonId property value. User sign-in ID.

Parameters:

  • value

    Value to set for the logonId property.

Returns:

  • a void



214
215
216
# File 'lib/models/user_security_state.rb', line 214

def logon_id=(value)
    @logon_id = value
end

#logon_ipObject

Gets the logonIp property value. IP Address the sign-in request originated from.

Returns:

  • a string



221
222
223
# File 'lib/models/user_security_state.rb', line 221

def logon_ip
    return @logon_ip
end

#logon_ip=(value) ⇒ Object

Sets the logonIp property value. IP Address the sign-in request originated from.

Parameters:

  • value

    Value to set for the logonIp property.

Returns:

  • a void



229
230
231
# File 'lib/models/user_security_state.rb', line 229

def logon_ip=(value)
    @logon_ip = value
end

#logon_locationObject

Gets the logonLocation property value. Location (by IP address mapping) associated with a user sign-in event by this user.

Returns:

  • a string



236
237
238
# File 'lib/models/user_security_state.rb', line 236

def logon_location
    return @logon_location
end

#logon_location=(value) ⇒ Object

Sets the logonLocation property value. Location (by IP address mapping) associated with a user sign-in event by this user.

Parameters:

  • value

    Value to set for the logonLocation property.

Returns:

  • a void



244
245
246
# File 'lib/models/user_security_state.rb', line 244

def logon_location=(value)
    @logon_location = value
end

#logon_typeObject

Gets the logonType property value. Method of user sign in. Possible values are: unknown, interactive, remoteInteractive, network, batch, service.

Returns:

  • a logon_type



251
252
253
# File 'lib/models/user_security_state.rb', line 251

def logon_type
    return @logon_type
end

#logon_type=(value) ⇒ Object

Sets the logonType property value. Method of user sign in. Possible values are: unknown, interactive, remoteInteractive, network, batch, service.

Parameters:

  • value

    Value to set for the logonType property.

Returns:

  • a void



259
260
261
# File 'lib/models/user_security_state.rb', line 259

def logon_type=(value)
    @logon_type = value
end

#odata_typeObject

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

Returns:

  • a string



266
267
268
# File 'lib/models/user_security_state.rb', line 266

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



274
275
276
# File 'lib/models/user_security_state.rb', line 274

def odata_type=(value)
    @odata_type = value
end

#on_premises_security_identifierObject

Gets the onPremisesSecurityIdentifier property value. Active Directory (on-premises) Security Identifier (SID) of the user.

Returns:

  • a string



281
282
283
# File 'lib/models/user_security_state.rb', line 281

def on_premises_security_identifier
    return @on_premises_security_identifier
end

#on_premises_security_identifier=(value) ⇒ Object

Sets the onPremisesSecurityIdentifier property value. Active Directory (on-premises) Security Identifier (SID) of the user.

Parameters:

  • value

    Value to set for the onPremisesSecurityIdentifier property.

Returns:

  • a void



289
290
291
# File 'lib/models/user_security_state.rb', line 289

def on_premises_security_identifier=(value)
    @on_premises_security_identifier = value
end

#risk_scoreObject

Gets the riskScore property value. Provider-generated/calculated risk score of the user account. Recommended value range of 0-1, which equates to a percentage.

Returns:

  • a string



296
297
298
# File 'lib/models/user_security_state.rb', line 296

def risk_score
    return @risk_score
end

#risk_score=(value) ⇒ Object

Sets the riskScore property value. Provider-generated/calculated risk score of the user account. Recommended value range of 0-1, which equates to a percentage.

Parameters:

  • value

    Value to set for the riskScore property.

Returns:

  • a void



304
305
306
# File 'lib/models/user_security_state.rb', line 304

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


312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/models/user_security_state.rb', line 312

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("aadUserId", @aad_user_id)
    writer.write_string_value("accountName", @account_name)
    writer.write_string_value("domainName", @domain_name)
    writer.write_enum_value("emailRole", @email_role)
    writer.write_boolean_value("isVpn", @is_vpn)
    writer.write_date_time_value("logonDateTime", @logon_date_time)
    writer.write_string_value("logonId", @logon_id)
    writer.write_string_value("logonIp", @logon_ip)
    writer.write_string_value("logonLocation", @logon_location)
    writer.write_enum_value("logonType", @logon_type)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("onPremisesSecurityIdentifier", @on_premises_security_identifier)
    writer.write_string_value("riskScore", @risk_score)
    writer.write_enum_value("userAccountType", @user_account_type)
    writer.write_string_value("userPrincipalName", @user_principal_name)
    writer.write_additional_data(@additional_data)
end

#user_account_typeObject

Gets the userAccountType property value. User account type (group membership), per Windows definition. Possible values are: unknown, standard, power, administrator.

Returns:

  • a user_account_security_type



335
336
337
# File 'lib/models/user_security_state.rb', line 335

def 
    return @user_account_type
end

#user_account_type=(value) ⇒ Object

Sets the userAccountType property value. User account type (group membership), per Windows definition. Possible values are: unknown, standard, power, administrator.

Parameters:

  • value

    Value to set for the userAccountType property.

Returns:

  • a void



343
344
345
# File 'lib/models/user_security_state.rb', line 343

def (value)
    @user_account_type = value
end

#user_principal_nameObject

Gets the userPrincipalName property value. User sign-in name - internet format: (user account name)@(user account DNS domain name).

Returns:

  • a string



350
351
352
# File 'lib/models/user_security_state.rb', line 350

def user_principal_name
    return @user_principal_name
end

#user_principal_name=(value) ⇒ Object

Sets the userPrincipalName property value. User sign-in name - internet format: (user account name)@(user account DNS domain name).

Parameters:

  • value

    Value to set for the userPrincipalName property.

Returns:

  • a void



358
359
360
# File 'lib/models/user_security_state.rb', line 358

def user_principal_name=(value)
    @user_principal_name = value
end