Class: MicrosoftGraph::Models::UserSimulationDetails

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new userSimulationDetails and sets the default values.



107
108
109
# File 'lib/models/user_simulation_details.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_simulation_details

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UserSimulationDetails.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



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

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



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

def additional_data=(value)
    @additional_data = value
end

#assigned_trainings_countObject

Gets the assignedTrainingsCount property value. Number of trainings assigned to a user in an attack simulation and training campaign.

Returns:

  • a integer



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

def assigned_trainings_count
    return @assigned_trainings_count
end

#assigned_trainings_count=(value) ⇒ Object

Sets the assignedTrainingsCount property value. Number of trainings assigned to a user in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the assignedTrainingsCount property.

Returns:

  • a void



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

def assigned_trainings_count=(value)
    @assigned_trainings_count = value
end

#completed_trainings_countObject

Gets the completedTrainingsCount property value. Number of trainings completed by a user in an attack simulation and training campaign.

Returns:

  • a integer



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

def completed_trainings_count
    return @completed_trainings_count
end

#completed_trainings_count=(value) ⇒ Object

Sets the completedTrainingsCount property value. Number of trainings completed by a user in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the completedTrainingsCount property.

Returns:

  • a void



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

def completed_trainings_count=(value)
    @completed_trainings_count = value
end

#compromised_date_timeObject

Gets the compromisedDateTime property value. Date and time of the compromising online action by a user in an attack simulation and training campaign.

Returns:

  • a date_time



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

def compromised_date_time
    return @compromised_date_time
end

#compromised_date_time=(value) ⇒ Object

Sets the compromisedDateTime property value. Date and time of the compromising online action by a user in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the compromisedDateTime property.

Returns:

  • a void



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

def compromised_date_time=(value)
    @compromised_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/models/user_simulation_details.rb', line 123

def get_field_deserializers()
    return {
        "assignedTrainingsCount" => lambda {|n| @assigned_trainings_count = n.get_number_value() },
        "completedTrainingsCount" => lambda {|n| @completed_trainings_count = n.get_number_value() },
        "compromisedDateTime" => lambda {|n| @compromised_date_time = n.get_date_time_value() },
        "inProgressTrainingsCount" => lambda {|n| @in_progress_trainings_count = n.get_number_value() },
        "isCompromised" => lambda {|n| @is_compromised = n.get_boolean_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "reportedPhishDateTime" => lambda {|n| @reported_phish_date_time = n.get_date_time_value() },
        "simulationEvents" => lambda {|n| @simulation_events = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UserSimulationEventInfo.create_from_discriminator_value(pn) }) },
        "simulationUser" => lambda {|n| @simulation_user = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AttackSimulationUser.create_from_discriminator_value(pn) }) },
        "trainingEvents" => lambda {|n| @training_events = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UserTrainingEventInfo.create_from_discriminator_value(pn) }) },
    }
end

#in_progress_trainings_countObject

Gets the inProgressTrainingsCount property value. Number of trainings in progress by a user in an attack simulation and training campaign.

Returns:

  • a integer



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

def in_progress_trainings_count
    return @in_progress_trainings_count
end

#in_progress_trainings_count=(value) ⇒ Object

Sets the inProgressTrainingsCount property value. Number of trainings in progress by a user in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the inProgressTrainingsCount property.

Returns:

  • a void



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

def in_progress_trainings_count=(value)
    @in_progress_trainings_count = value
end

#is_compromisedObject

Gets the isCompromised property value. Indicates whether a user was compromised in an attack simulation and training campaign.

Returns:

  • a boolean



156
157
158
# File 'lib/models/user_simulation_details.rb', line 156

def is_compromised
    return @is_compromised
end

#is_compromised=(value) ⇒ Object

Sets the isCompromised property value. Indicates whether a user was compromised in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the isCompromised property.

Returns:

  • a void



164
165
166
# File 'lib/models/user_simulation_details.rb', line 164

def is_compromised=(value)
    @is_compromised = value
end

#odata_typeObject

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

Returns:

  • a string



171
172
173
# File 'lib/models/user_simulation_details.rb', line 171

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



179
180
181
# File 'lib/models/user_simulation_details.rb', line 179

def odata_type=(value)
    @odata_type = value
end

#reported_phish_date_timeObject

Gets the reportedPhishDateTime property value. Date and time when a user reported the delivered payload as phishing in the attack simulation and training campaign.

Returns:

  • a date_time



186
187
188
# File 'lib/models/user_simulation_details.rb', line 186

def reported_phish_date_time
    return @reported_phish_date_time
end

#reported_phish_date_time=(value) ⇒ Object

Sets the reportedPhishDateTime property value. Date and time when a user reported the delivered payload as phishing in the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the reportedPhishDateTime property.

Returns:

  • a void



194
195
196
# File 'lib/models/user_simulation_details.rb', line 194

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


202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/models/user_simulation_details.rb', line 202

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("assignedTrainingsCount", @assigned_trainings_count)
    writer.write_number_value("completedTrainingsCount", @completed_trainings_count)
    writer.write_date_time_value("compromisedDateTime", @compromised_date_time)
    writer.write_number_value("inProgressTrainingsCount", @in_progress_trainings_count)
    writer.write_boolean_value("isCompromised", @is_compromised)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_date_time_value("reportedPhishDateTime", @reported_phish_date_time)
    writer.write_collection_of_object_values("simulationEvents", @simulation_events)
    writer.write_object_value("simulationUser", @simulation_user)
    writer.write_collection_of_object_values("trainingEvents", @training_events)
    writer.write_additional_data(@additional_data)
end

#simulation_eventsObject

Gets the simulationEvents property value. List of simulation events of a user in the attack simulation and training campaign.

Returns:

  • a user_simulation_event_info



220
221
222
# File 'lib/models/user_simulation_details.rb', line 220

def simulation_events
    return @simulation_events
end

#simulation_events=(value) ⇒ Object

Sets the simulationEvents property value. List of simulation events of a user in the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the simulationEvents property.

Returns:

  • a void



228
229
230
# File 'lib/models/user_simulation_details.rb', line 228

def simulation_events=(value)
    @simulation_events = value
end

#simulation_userObject

Gets the simulationUser property value. User in an attack simulation and training campaign.

Returns:

  • a attack_simulation_user



235
236
237
# File 'lib/models/user_simulation_details.rb', line 235

def simulation_user
    return @simulation_user
end

#simulation_user=(value) ⇒ Object

Sets the simulationUser property value. User in an attack simulation and training campaign.

Parameters:

  • value

    Value to set for the simulationUser property.

Returns:

  • a void



243
244
245
# File 'lib/models/user_simulation_details.rb', line 243

def simulation_user=(value)
    @simulation_user = value
end

#training_eventsObject

Gets the trainingEvents property value. List of training events of a user in the attack simulation and training campaign.

Returns:

  • a user_training_event_info



250
251
252
# File 'lib/models/user_simulation_details.rb', line 250

def training_events
    return @training_events
end

#training_events=(value) ⇒ Object

Sets the trainingEvents property value. List of training events of a user in the attack simulation and training campaign.

Parameters:

  • value

    Value to set for the trainingEvents property.

Returns:

  • a void



258
259
260
# File 'lib/models/user_simulation_details.rb', line 258

def training_events=(value)
    @training_events = value
end