Class: MicrosoftGraph::Models::Simulation

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



119
120
121
# File 'lib/models/simulation.rb', line 119

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 simulation

Raises:

  • (StandardError)


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

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

Instance Method Details

#attack_techniqueObject

Gets the attackTechnique property value. The social engineering technique used in the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, credentialHarvesting, attachmentMalware, driveByUrl, linkInAttachment, linkToMalwareFile, unknownFutureValue. For more information on the types of social engineering attack techniques, see simulations.

Returns:

  • a simulation_attack_technique



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

def attack_technique
    return @attack_technique
end

#attack_technique=(value) ⇒ Object

Sets the attackTechnique property value. The social engineering technique used in the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, credentialHarvesting, attachmentMalware, driveByUrl, linkInAttachment, linkToMalwareFile, unknownFutureValue. For more information on the types of social engineering attack techniques, see simulations.

Parameters:

  • value

    Value to set for the attackTechnique property.

Returns:

  • a void



67
68
69
# File 'lib/models/simulation.rb', line 67

def attack_technique=(value)
    @attack_technique = value
end

#attack_typeObject

Gets the attackType property value. Attack type of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, social, cloud, endpoint, unknownFutureValue.

Returns:

  • a simulation_attack_type



74
75
76
# File 'lib/models/simulation.rb', line 74

def attack_type
    return @attack_type
end

#attack_type=(value) ⇒ Object

Sets the attackType property value. Attack type of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, social, cloud, endpoint, unknownFutureValue.

Parameters:

  • value

    Value to set for the attackType property.

Returns:

  • a void



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

def attack_type=(value)
    @attack_type = value
end

#automation_idObject

Gets the automationId property value. Unique identifier for the attack simulation automation.

Returns:

  • a string



89
90
91
# File 'lib/models/simulation.rb', line 89

def automation_id
    return @automation_id
end

#automation_id=(value) ⇒ Object

Sets the automationId property value. Unique identifier for the attack simulation automation.

Parameters:

  • value

    Value to set for the automationId property.

Returns:

  • a void



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

def automation_id=(value)
    @automation_id = value
end

#completion_date_timeObject

Gets the completionDateTime property value. Date and time of completion of the attack simulation and training campaign. Supports $filter and $orderby.

Returns:

  • a date_time



104
105
106
# File 'lib/models/simulation.rb', line 104

def completion_date_time
    return @completion_date_time
end

#completion_date_time=(value) ⇒ Object

Sets the completionDateTime property value. Date and time of completion of the attack simulation and training campaign. Supports $filter and $orderby.

Parameters:

  • value

    Value to set for the completionDateTime property.

Returns:

  • a void



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

def completion_date_time=(value)
    @completion_date_time = value
end

#created_byObject

Gets the createdBy property value. Identity of the user who created the attack simulation and training campaign.

Returns:

  • a email_identity



126
127
128
# File 'lib/models/simulation.rb', line 126

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. Identity of the user who created the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



134
135
136
# File 'lib/models/simulation.rb', line 134

def created_by=(value)
    @created_by = value
end

#created_date_timeObject

Gets the createdDateTime property value. Date and time of creation of the attack simulation and training campaign.

Returns:

  • a date_time



141
142
143
# File 'lib/models/simulation.rb', line 141

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. Date and time of creation of the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



149
150
151
# File 'lib/models/simulation.rb', line 149

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. Description of the attack simulation and training campaign.

Returns:

  • a string



165
166
167
# File 'lib/models/simulation.rb', line 165

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Description of the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Display name of the attack simulation and training campaign. Supports $filter and $orderby.

Returns:

  • a string



180
181
182
# File 'lib/models/simulation.rb', line 180

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name of the attack simulation and training campaign. Supports $filter and $orderby.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



188
189
190
# File 'lib/models/simulation.rb', line 188

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/models/simulation.rb', line 195

def get_field_deserializers()
    return super.merge({
        "attackTechnique" => lambda {|n| @attack_technique = n.get_enum_value(MicrosoftGraph::Models::SimulationAttackTechnique) },
        "attackType" => lambda {|n| @attack_type = n.get_enum_value(MicrosoftGraph::Models::SimulationAttackType) },
        "automationId" => lambda {|n| @automation_id = n.get_string_value() },
        "completionDateTime" => lambda {|n| @completion_date_time = n.get_date_time_value() },
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EmailIdentity.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "isAutomated" => lambda {|n| @is_automated = n.get_boolean_value() },
        "lastModifiedBy" => lambda {|n| @last_modified_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::EmailIdentity.create_from_discriminator_value(pn) }) },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "launchDateTime" => lambda {|n| @launch_date_time = n.get_date_time_value() },
        "payloadDeliveryPlatform" => lambda {|n| @payload_delivery_platform = n.get_enum_value(MicrosoftGraph::Models::PayloadDeliveryPlatform) },
        "report" => lambda {|n| @report = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SimulationReport.create_from_discriminator_value(pn) }) },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::SimulationStatus) },
    })
end

#is_automatedObject

Gets the isAutomated property value. Flag that represents if the attack simulation and training campaign was created from a simulation automation flow. Supports $filter and $orderby.

Returns:

  • a boolean



218
219
220
# File 'lib/models/simulation.rb', line 218

def is_automated
    return @is_automated
end

#is_automated=(value) ⇒ Object

Sets the isAutomated property value. Flag that represents if the attack simulation and training campaign was created from a simulation automation flow. Supports $filter and $orderby.

Parameters:

  • value

    Value to set for the isAutomated property.

Returns:

  • a void



226
227
228
# File 'lib/models/simulation.rb', line 226

def is_automated=(value)
    @is_automated = value
end

#last_modified_byObject

Gets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation and training campaign.

Returns:

  • a email_identity



233
234
235
# File 'lib/models/simulation.rb', line 233

def last_modified_by
    return @last_modified_by
end

#last_modified_by=(value) ⇒ Object

Sets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the lastModifiedBy property.

Returns:

  • a void



241
242
243
# File 'lib/models/simulation.rb', line 241

def last_modified_by=(value)
    @last_modified_by = value
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. Date and time of the most recent modification of the attack simulation and training campaign.

Returns:

  • a date_time



248
249
250
# File 'lib/models/simulation.rb', line 248

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. Date and time of the most recent modification of the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



256
257
258
# File 'lib/models/simulation.rb', line 256

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#launch_date_timeObject

Gets the launchDateTime property value. Date and time of the launch/start of the attack simulation and training campaign. Supports $filter and $orderby.

Returns:

  • a date_time



263
264
265
# File 'lib/models/simulation.rb', line 263

def launch_date_time
    return @launch_date_time
end

#launch_date_time=(value) ⇒ Object

Sets the launchDateTime property value. Date and time of the launch/start of the attack simulation and training campaign. Supports $filter and $orderby.

Parameters:

  • value

    Value to set for the launchDateTime property.

Returns:

  • a void



271
272
273
# File 'lib/models/simulation.rb', line 271

def launch_date_time=(value)
    @launch_date_time = value
end

#payload_delivery_platformObject

Gets the payloadDeliveryPlatform property value. Method of delivery of the phishing payload used in the attack simulation and training campaign. Possible values are: unknown, sms, email, teams, unknownFutureValue.

Returns:

  • a payload_delivery_platform



278
279
280
# File 'lib/models/simulation.rb', line 278

def payload_delivery_platform
    return @payload_delivery_platform
end

#payload_delivery_platform=(value) ⇒ Object

Sets the payloadDeliveryPlatform property value. Method of delivery of the phishing payload used in the attack simulation and training campaign. Possible values are: unknown, sms, email, teams, unknownFutureValue.

Parameters:

  • value

    Value to set for the payloadDeliveryPlatform property.

Returns:

  • a void



286
287
288
# File 'lib/models/simulation.rb', line 286

def payload_delivery_platform=(value)
    @payload_delivery_platform = value
end

#reportObject

Gets the report property value. Report of the attack simulation and training campaign.

Returns:

  • a simulation_report



293
294
295
# File 'lib/models/simulation.rb', line 293

def report
    return @report
end

#report=(value) ⇒ Object

Sets the report property value. Report of the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the report property.

Returns:

  • a void



301
302
303
# File 'lib/models/simulation.rb', line 301

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


309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/models/simulation.rb', line 309

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("attackTechnique", @attack_technique)
    writer.write_enum_value("attackType", @attack_type)
    writer.write_string_value("automationId", @automation_id)
    writer.write_date_time_value("completionDateTime", @completion_date_time)
    writer.write_object_value("createdBy", @created_by)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_boolean_value("isAutomated", @is_automated)
    writer.write_object_value("lastModifiedBy", @last_modified_by)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_date_time_value("launchDateTime", @launch_date_time)
    writer.write_enum_value("payloadDeliveryPlatform", @payload_delivery_platform)
    writer.write_object_value("report", @report)
    writer.write_enum_value("status", @status)
end

#statusObject

Gets the status property value. Status of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, draft, running, scheduled, succeeded, failed, cancelled, excluded, unknownFutureValue.

Returns:

  • a simulation_status



332
333
334
# File 'lib/models/simulation.rb', line 332

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Status of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, draft, running, scheduled, succeeded, failed, cancelled, excluded, unknownFutureValue.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



340
341
342
# File 'lib/models/simulation.rb', line 340

def status=(value)
    @status = value
end