Class: MicrosoftGraph::Models::RiskDetection

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



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

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 risk_detection

Raises:

  • (StandardError)


139
140
141
142
# File 'lib/models/risk_detection.rb', line 139

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

Instance Method Details

#activityObject

Gets the activity property value. Indicates the activity type the detected risk is linked to. Possible values are: signin, user, unknownFutureValue.

Returns:

  • a activity_type



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

def activity
    return @activity
end

#activity=(value) ⇒ Object

Sets the activity property value. Indicates the activity type the detected risk is linked to. Possible values are: signin, user, unknownFutureValue.

Parameters:

  • value

    Value to set for the activity property.

Returns:

  • a void



79
80
81
# File 'lib/models/risk_detection.rb', line 79

def activity=(value)
    @activity = value
end

#activity_date_timeObject

Gets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset 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 look like this: 2014-01-01T00:00:00Z

Returns:

  • a date_time



86
87
88
# File 'lib/models/risk_detection.rb', line 86

def activity_date_time
    return @activity_date_time
end

#activity_date_time=(value) ⇒ Object

Sets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset 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 look like this: 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the activityDateTime property.

Returns:

  • a void



94
95
96
# File 'lib/models/risk_detection.rb', line 94

def activity_date_time=(value)
    @activity_date_time = value
end

#additional_infoObject

Gets the additionalInfo property value. Additional information associated with the risk detection in JSON format. For example, ‘[(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36/‘]’. Possible keys in the additionalInfo JSON string are: userAgent, alertUrl, relatedEventTimeInUtc, relatedUserAgent, deviceInformation, relatedLocation, requestId, correlationId, lastActivityTimeInUtc, malwareName, clientLocation, clientIp, riskReasons. For more information about riskReasons and possible values, see riskReasons values.

Returns:

  • a string



101
102
103
# File 'lib/models/risk_detection.rb', line 101

def additional_info
    return @additional_info
end

#additional_info=(value) ⇒ Object

Sets the additionalInfo property value. Additional information associated with the risk detection in JSON format. For example, ‘[(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36/‘]’. Possible keys in the additionalInfo JSON string are: userAgent, alertUrl, relatedEventTimeInUtc, relatedUserAgent, deviceInformation, relatedLocation, requestId, correlationId, lastActivityTimeInUtc, malwareName, clientLocation, clientIp, riskReasons. For more information about riskReasons and possible values, see riskReasons values.

Parameters:

  • value

    Value to set for the additionalInfo property.

Returns:

  • a void



109
110
111
# File 'lib/models/risk_detection.rb', line 109

def additional_info=(value)
    @additional_info = value
end

#correlation_idObject

Gets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.

Returns:

  • a string



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

def correlation_id
    return @correlation_id
end

#correlation_id=(value) ⇒ Object

Sets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.

Parameters:

  • value

    Value to set for the correlationId property.

Returns:

  • a void



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

def correlation_id=(value)
    @correlation_id = value
end

#detected_date_timeObject

Gets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: 2014-01-01T00:00:00Z

Returns:

  • a date_time



147
148
149
# File 'lib/models/risk_detection.rb', line 147

def detected_date_time
    return @detected_date_time
end

#detected_date_time=(value) ⇒ Object

Sets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the detectedDateTime property.

Returns:

  • a void



155
156
157
# File 'lib/models/risk_detection.rb', line 155

def detected_date_time=(value)
    @detected_date_time = value
end

#detection_timing_typeObject

Gets the detectionTimingType property value. Timing of the detected risk (real-time/offline). Possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.

Returns:

  • a risk_detection_timing_type



162
163
164
# File 'lib/models/risk_detection.rb', line 162

def detection_timing_type
    return @detection_timing_type
end

#detection_timing_type=(value) ⇒ Object

Sets the detectionTimingType property value. Timing of the detected risk (real-time/offline). Possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.

Parameters:

  • value

    Value to set for the detectionTimingType property.

Returns:

  • a void



170
171
172
# File 'lib/models/risk_detection.rb', line 170

def detection_timing_type=(value)
    @detection_timing_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/models/risk_detection.rb', line 177

def get_field_deserializers()
    return super.merge({
        "activity" => lambda {|n| @activity = n.get_enum_value(MicrosoftGraph::Models::ActivityType) },
        "activityDateTime" => lambda {|n| @activity_date_time = n.get_date_time_value() },
        "additionalInfo" => lambda {|n| @additional_info = n.get_string_value() },
        "correlationId" => lambda {|n| @correlation_id = n.get_string_value() },
        "detectedDateTime" => lambda {|n| @detected_date_time = n.get_date_time_value() },
        "detectionTimingType" => lambda {|n| @detection_timing_type = n.get_enum_value(MicrosoftGraph::Models::RiskDetectionTimingType) },
        "ipAddress" => lambda {|n| @ip_address = n.get_string_value() },
        "lastUpdatedDateTime" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },
        "location" => lambda {|n| @location = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SignInLocation.create_from_discriminator_value(pn) }) },
        "requestId" => lambda {|n| @request_id = n.get_string_value() },
        "riskDetail" => lambda {|n| @risk_detail = n.get_enum_value(MicrosoftGraph::Models::RiskDetail) },
        "riskEventType" => lambda {|n| @risk_event_type = n.get_string_value() },
        "riskLevel" => lambda {|n| @risk_level = n.get_enum_value(MicrosoftGraph::Models::RiskLevel) },
        "riskState" => lambda {|n| @risk_state = n.get_enum_value(MicrosoftGraph::Models::RiskState) },
        "source" => lambda {|n| @source = n.get_string_value() },
        "tokenIssuerType" => lambda {|n| @token_issuer_type = n.get_enum_value(MicrosoftGraph::Models::TokenIssuerType) },
        "userDisplayName" => lambda {|n| @user_display_name = n.get_string_value() },
        "userId" => lambda {|n| @user_id = n.get_string_value() },
        "userPrincipalName" => lambda {|n| @user_principal_name = n.get_string_value() },
    })
end

#ip_addressObject

Gets the ipAddress property value. Provides the IP address of the client from where the risk occurred.

Returns:

  • a string



204
205
206
# File 'lib/models/risk_detection.rb', line 204

def ip_address
    return @ip_address
end

#ip_address=(value) ⇒ Object

Sets the ipAddress property value. Provides the IP address of the client from where the risk occurred.

Parameters:

  • value

    Value to set for the ipAddress property.

Returns:

  • a void



212
213
214
# File 'lib/models/risk_detection.rb', line 212

def ip_address=(value)
    @ip_address = value
end

#last_updated_date_timeObject

Gets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. The DateTimeOffset 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 look like this: 2014-01-01T00:00:00Z

Returns:

  • a date_time



219
220
221
# File 'lib/models/risk_detection.rb', line 219

def last_updated_date_time
    return @last_updated_date_time
end

#last_updated_date_time=(value) ⇒ Object

Sets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. The DateTimeOffset 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 look like this: 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the lastUpdatedDateTime property.

Returns:

  • a void



227
228
229
# File 'lib/models/risk_detection.rb', line 227

def last_updated_date_time=(value)
    @last_updated_date_time = value
end

#locationObject

Gets the location property value. Location of the sign-in.

Returns:

  • a sign_in_location



234
235
236
# File 'lib/models/risk_detection.rb', line 234

def location
    return @location
end

#location=(value) ⇒ Object

Sets the location property value. Location of the sign-in.

Parameters:

  • value

    Value to set for the location property.

Returns:

  • a void



242
243
244
# File 'lib/models/risk_detection.rb', line 242

def location=(value)
    @location = value
end

#request_idObject

Gets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.

Returns:

  • a string



249
250
251
# File 'lib/models/risk_detection.rb', line 249

def request_id
    return @request_id
end

#request_id=(value) ⇒ Object

Sets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.

Parameters:

  • value

    Value to set for the requestId property.

Returns:

  • a void



257
258
259
# File 'lib/models/risk_detection.rb', line 257

def request_id=(value)
    @request_id = value
end

#risk_detailObject

Gets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: m365DAdminDismissedDetection.

Returns:

  • a risk_detail



264
265
266
# File 'lib/models/risk_detection.rb', line 264

def risk_detail
    return @risk_detail
end

#risk_detail=(value) ⇒ Object

Sets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: m365DAdminDismissedDetection.

Parameters:

  • value

    Value to set for the riskDetail property.

Returns:

  • a void



272
273
274
# File 'lib/models/risk_detection.rb', line 272

def risk_detail=(value)
    @risk_detail = value
end

#risk_event_typeObject

Gets the riskEventType property value. The type of risk event detected. The possible values are unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic,adminConfirmedUserCompromised, passwordSpray, impossibleTravel, newCountry, anomalousToken, tokenIssuerAnomaly,suspiciousBrowser, riskyIPAddress, mcasSuspiciousInboxManipulationRules, suspiciousInboxForwarding, and anomalousUserActivity. If the risk detection is a premium detection, will show generic. For more information about each value, see riskEventType values.

Returns:

  • a string



279
280
281
# File 'lib/models/risk_detection.rb', line 279

def risk_event_type
    return @risk_event_type
end

#risk_event_type=(value) ⇒ Object

Sets the riskEventType property value. The type of risk event detected. The possible values are unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic,adminConfirmedUserCompromised, passwordSpray, impossibleTravel, newCountry, anomalousToken, tokenIssuerAnomaly,suspiciousBrowser, riskyIPAddress, mcasSuspiciousInboxManipulationRules, suspiciousInboxForwarding, and anomalousUserActivity. If the risk detection is a premium detection, will show generic. For more information about each value, see riskEventType values.

Parameters:

  • value

    Value to set for the riskEventType property.

Returns:

  • a void



287
288
289
# File 'lib/models/risk_detection.rb', line 287

def risk_event_type=(value)
    @risk_event_type = value
end

#risk_levelObject

Gets the riskLevel property value. Level of the detected risk. Possible values are: low, medium, high, hidden, none, unknownFutureValue.

Returns:

  • a risk_level



294
295
296
# File 'lib/models/risk_detection.rb', line 294

def risk_level
    return @risk_level
end

#risk_level=(value) ⇒ Object

Sets the riskLevel property value. Level of the detected risk. Possible values are: low, medium, high, hidden, none, unknownFutureValue.

Parameters:

  • value

    Value to set for the riskLevel property.

Returns:

  • a void



302
303
304
# File 'lib/models/risk_detection.rb', line 302

def risk_level=(value)
    @risk_level = value
end

#risk_stateObject

Gets the riskState property value. The state of a detected risky user or sign-in. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.

Returns:

  • a risk_state



309
310
311
# File 'lib/models/risk_detection.rb', line 309

def risk_state
    return @risk_state
end

#risk_state=(value) ⇒ Object

Sets the riskState property value. The state of a detected risky user or sign-in. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.

Parameters:

  • value

    Value to set for the riskState property.

Returns:

  • a void



317
318
319
# File 'lib/models/risk_detection.rb', line 317

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


325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/models/risk_detection.rb', line 325

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("activity", @activity)
    writer.write_date_time_value("activityDateTime", @activity_date_time)
    writer.write_string_value("additionalInfo", @additional_info)
    writer.write_string_value("correlationId", @correlation_id)
    writer.write_date_time_value("detectedDateTime", @detected_date_time)
    writer.write_enum_value("detectionTimingType", @detection_timing_type)
    writer.write_string_value("ipAddress", @ip_address)
    writer.write_date_time_value("lastUpdatedDateTime", @last_updated_date_time)
    writer.write_object_value("location", @location)
    writer.write_string_value("requestId", @request_id)
    writer.write_enum_value("riskDetail", @risk_detail)
    writer.write_string_value("riskEventType", @risk_event_type)
    writer.write_enum_value("riskLevel", @risk_level)
    writer.write_enum_value("riskState", @risk_state)
    writer.write_string_value("source", @source)
    writer.write_enum_value("tokenIssuerType", @token_issuer_type)
    writer.write_string_value("userDisplayName", @user_display_name)
    writer.write_string_value("userId", @user_id)
    writer.write_string_value("userPrincipalName", @user_principal_name)
end

#sourceObject

Gets the source property value. Source of the risk detection. For example, activeDirectory.

Returns:

  • a string



352
353
354
# File 'lib/models/risk_detection.rb', line 352

def source
    return @source
end

#source=(value) ⇒ Object

Sets the source property value. Source of the risk detection. For example, activeDirectory.

Parameters:

  • value

    Value to set for the source property.

Returns:

  • a void



360
361
362
# File 'lib/models/risk_detection.rb', line 360

def source=(value)
    @source = value
end

#token_issuer_typeObject

Gets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. Possible values are: AzureAD, ADFederationServices, UnknownFutureValue.

Returns:

  • a token_issuer_type



367
368
369
# File 'lib/models/risk_detection.rb', line 367

def token_issuer_type
    return @token_issuer_type
end

#token_issuer_type=(value) ⇒ Object

Sets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. Possible values are: AzureAD, ADFederationServices, UnknownFutureValue.

Parameters:

  • value

    Value to set for the tokenIssuerType property.

Returns:

  • a void



375
376
377
# File 'lib/models/risk_detection.rb', line 375

def token_issuer_type=(value)
    @token_issuer_type = value
end

#user_display_nameObject

Gets the userDisplayName property value. The user principal name (UPN) of the user.

Returns:

  • a string



382
383
384
# File 'lib/models/risk_detection.rb', line 382

def user_display_name
    return @user_display_name
end

#user_display_name=(value) ⇒ Object

Sets the userDisplayName property value. The user principal name (UPN) of the user.

Parameters:

  • value

    Value to set for the userDisplayName property.

Returns:

  • a void



390
391
392
# File 'lib/models/risk_detection.rb', line 390

def user_display_name=(value)
    @user_display_name = value
end

#user_idObject

Gets the userId property value. Unique ID of the user.

Returns:

  • a string



397
398
399
# File 'lib/models/risk_detection.rb', line 397

def user_id
    return @user_id
end

#user_id=(value) ⇒ Object

Sets the userId property value. Unique ID of the user.

Parameters:

  • value

    Value to set for the userId property.

Returns:

  • a void



405
406
407
# File 'lib/models/risk_detection.rb', line 405

def user_id=(value)
    @user_id = value
end

#user_principal_nameObject

Gets the userPrincipalName property value. The user principal name (UPN) of the user.

Returns:

  • a string



412
413
414
# File 'lib/models/risk_detection.rb', line 412

def user_principal_name
    return @user_principal_name
end

#user_principal_name=(value) ⇒ Object

Sets the userPrincipalName property value. The user principal name (UPN) of the user.

Parameters:

  • value

    Value to set for the userPrincipalName property.

Returns:

  • a void



420
421
422
# File 'lib/models/risk_detection.rb', line 420

def user_principal_name=(value)
    @user_principal_name = value
end