Class: OCI::CloudGuard::Models::ResponderExecutionSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/cloud_guard/models/responder_execution_summary.rb

Overview

Summary of the Responder Execution.

Constant Summary collapse

RESPONDER_RULE_TYPE_ENUM =
[
  RESPONDER_RULE_TYPE_REMEDIATION = 'REMEDIATION'.freeze,
  RESPONDER_RULE_TYPE_NOTIFICATION = 'NOTIFICATION'.freeze,
  RESPONDER_RULE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
RESPONDER_EXECUTION_STATUS_ENUM =
[
  RESPONDER_EXECUTION_STATUS_STARTED = 'STARTED'.freeze,
  RESPONDER_EXECUTION_STATUS_AWAITING_CONFIRMATION = 'AWAITING_CONFIRMATION'.freeze,
  RESPONDER_EXECUTION_STATUS_AWAITING_INPUT = 'AWAITING_INPUT'.freeze,
  RESPONDER_EXECUTION_STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  RESPONDER_EXECUTION_STATUS_FAILED = 'FAILED'.freeze,
  RESPONDER_EXECUTION_STATUS_SKIPPED = 'SKIPPED'.freeze,
  RESPONDER_EXECUTION_STATUS_ALL = 'ALL'.freeze,
  RESPONDER_EXECUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
RESPONDER_EXECUTION_MODE_ENUM =
[
  RESPONDER_EXECUTION_MODE_MANUAL = 'MANUAL'.freeze,
  RESPONDER_EXECUTION_MODE_AUTOMATED = 'AUTOMATED'.freeze,
  RESPONDER_EXECUTION_MODE_ALL = 'ALL'.freeze,
  RESPONDER_EXECUTION_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ResponderExecutionSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 175

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.id = attributes[:'id'] if attributes[:'id']

  self.responder_rule_id = attributes[:'responderRuleId'] if attributes[:'responderRuleId']

  raise 'You cannot provide both :responderRuleId and :responder_rule_id' if attributes.key?(:'responderRuleId') && attributes.key?(:'responder_rule_id')

  self.responder_rule_id = attributes[:'responder_rule_id'] if attributes[:'responder_rule_id']

  self.responder_rule_type = attributes[:'responderRuleType'] if attributes[:'responderRuleType']

  raise 'You cannot provide both :responderRuleType and :responder_rule_type' if attributes.key?(:'responderRuleType') && attributes.key?(:'responder_rule_type')

  self.responder_rule_type = attributes[:'responder_rule_type'] if attributes[:'responder_rule_type']

  self.responder_rule_name = attributes[:'responderRuleName'] if attributes[:'responderRuleName']

  raise 'You cannot provide both :responderRuleName and :responder_rule_name' if attributes.key?(:'responderRuleName') && attributes.key?(:'responder_rule_name')

  self.responder_rule_name = attributes[:'responder_rule_name'] if attributes[:'responder_rule_name']

  self.problem_id = attributes[:'problemId'] if attributes[:'problemId']

  raise 'You cannot provide both :problemId and :problem_id' if attributes.key?(:'problemId') && attributes.key?(:'problem_id')

  self.problem_id = attributes[:'problem_id'] if attributes[:'problem_id']

  self.problem_name = attributes[:'problemName'] if attributes[:'problemName']

  raise 'You cannot provide both :problemName and :problem_name' if attributes.key?(:'problemName') && attributes.key?(:'problem_name')

  self.problem_name = attributes[:'problem_name'] if attributes[:'problem_name']

  self.region = attributes[:'region'] if attributes[:'region']

  self.target_id = attributes[:'targetId'] if attributes[:'targetId']

  raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id')

  self.target_id = attributes[:'target_id'] if attributes[:'target_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType']

  raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type')

  self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type']

  self.resource_name = attributes[:'resourceName'] if attributes[:'resourceName']

  raise 'You cannot provide both :resourceName and :resource_name' if attributes.key?(:'resourceName') && attributes.key?(:'resource_name')

  self.resource_name = attributes[:'resource_name'] if attributes[:'resource_name']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.time_completed = attributes[:'timeCompleted'] if attributes[:'timeCompleted']

  raise 'You cannot provide both :timeCompleted and :time_completed' if attributes.key?(:'timeCompleted') && attributes.key?(:'time_completed')

  self.time_completed = attributes[:'time_completed'] if attributes[:'time_completed']

  self.responder_execution_status = attributes[:'responderExecutionStatus'] if attributes[:'responderExecutionStatus']

  raise 'You cannot provide both :responderExecutionStatus and :responder_execution_status' if attributes.key?(:'responderExecutionStatus') && attributes.key?(:'responder_execution_status')

  self.responder_execution_status = attributes[:'responder_execution_status'] if attributes[:'responder_execution_status']

  self.responder_execution_mode = attributes[:'responderExecutionMode'] if attributes[:'responderExecutionMode']

  raise 'You cannot provide both :responderExecutionMode and :responder_execution_mode' if attributes.key?(:'responderExecutionMode') && attributes.key?(:'responder_execution_mode')

  self.responder_execution_mode = attributes[:'responder_execution_mode'] if attributes[:'responder_execution_mode']

  self.message = attributes[:'message'] if attributes[:'message']

  self.responder_rule_execution_details = attributes[:'responderRuleExecutionDetails'] if attributes[:'responderRuleExecutionDetails']

  raise 'You cannot provide both :responderRuleExecutionDetails and :responder_rule_execution_details' if attributes.key?(:'responderRuleExecutionDetails') && attributes.key?(:'responder_rule_execution_details')

  self.responder_rule_execution_details = attributes[:'responder_rule_execution_details'] if attributes[:'responder_rule_execution_details']
end

Instance Attribute Details

#compartment_idString

[Required] compartment id of the problem for the responder execution

Returns:

  • (String)


69
70
71
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 69

def compartment_id
  @compartment_id
end

#idString

[Required] The unique identifier of the responder execution

Returns:

  • (String)


37
38
39
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 37

def id
  @id
end

#messageString

Message about the responder execution.

Returns:

  • (String)


97
98
99
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 97

def message
  @message
end

#problem_idString

[Required] Problem id associated with the responder execution

Returns:

  • (String)


53
54
55
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 53

def problem_id
  @problem_id
end

#problem_nameString

[Required] Problem name associated with the responder execution

Returns:

  • (String)


57
58
59
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 57

def problem_name
  @problem_name
end

#regionString

[Required] Region where the problem is found

Returns:

  • (String)


61
62
63
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 61

def region
  @region
end

#resource_nameString

[Required] resource name of the problem for the responder execution. TODO-DOC link to resource definition doc

Returns:

  • (String)


77
78
79
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 77

def resource_name
  @resource_name
end

#resource_typeString

[Required] resource type of the problem for the responder execution

Returns:

  • (String)


73
74
75
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 73

def resource_type
  @resource_type
end

#responder_execution_modeString

[Required] possible type of responder execution modes

Returns:

  • (String)


93
94
95
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 93

def responder_execution_mode
  @responder_execution_mode
end

#responder_execution_statusString

[Required] current execution status of the responder

Returns:

  • (String)


89
90
91
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 89

def responder_execution_status
  @responder_execution_status
end

#responder_rule_execution_detailsOCI::CloudGuard::Models::ResponderRuleExecutionDetails



100
101
102
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 100

def responder_rule_execution_details
  @responder_rule_execution_details
end

#responder_rule_idString

[Required] Responder Rule id for the responder execution

Returns:

  • (String)


41
42
43
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 41

def responder_rule_id
  @responder_rule_id
end

#responder_rule_nameString

[Required] Rule name for the responder execution

Returns:

  • (String)


49
50
51
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 49

def responder_rule_name
  @responder_rule_name
end

#responder_rule_typeString

[Required] Rule Type for the responder execution

Returns:

  • (String)


45
46
47
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 45

def responder_rule_type
  @responder_rule_type
end

#target_idString

[Required] Target Id of the problem for the responder execution

Returns:

  • (String)


65
66
67
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 65

def target_id
  @target_id
end

#time_completedDateTime

The date and time the responder execution was updated. Format defined by RFC3339.

Returns:

  • (DateTime)


85
86
87
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 85

def time_completed
  @time_completed
end

#time_createdDateTime

[Required] The date and time the responder execution was created. Format defined by RFC3339.

Returns:

  • (DateTime)


81
82
83
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 81

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 103

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'responder_rule_id': :'responderRuleId',
    'responder_rule_type': :'responderRuleType',
    'responder_rule_name': :'responderRuleName',
    'problem_id': :'problemId',
    'problem_name': :'problemName',
    'region': :'region',
    'target_id': :'targetId',
    'compartment_id': :'compartmentId',
    'resource_type': :'resourceType',
    'resource_name': :'resourceName',
    'time_created': :'timeCreated',
    'time_completed': :'timeCompleted',
    'responder_execution_status': :'responderExecutionStatus',
    'responder_execution_mode': :'responderExecutionMode',
    'message': :'message',
    'responder_rule_execution_details': :'responderRuleExecutionDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 128

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'responder_rule_id': :'String',
    'responder_rule_type': :'String',
    'responder_rule_name': :'String',
    'problem_id': :'String',
    'problem_name': :'String',
    'region': :'String',
    'target_id': :'String',
    'compartment_id': :'String',
    'resource_type': :'String',
    'resource_name': :'String',
    'time_created': :'DateTime',
    'time_completed': :'DateTime',
    'responder_execution_status': :'String',
    'responder_execution_mode': :'String',
    'message': :'String',
    'responder_rule_execution_details': :'OCI::CloudGuard::Models::ResponderRuleExecutionDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 318

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    responder_rule_id == other.responder_rule_id &&
    responder_rule_type == other.responder_rule_type &&
    responder_rule_name == other.responder_rule_name &&
    problem_id == other.problem_id &&
    problem_name == other.problem_name &&
    region == other.region &&
    target_id == other.target_id &&
    compartment_id == other.compartment_id &&
    resource_type == other.resource_type &&
    resource_name == other.resource_name &&
    time_created == other.time_created &&
    time_completed == other.time_completed &&
    responder_execution_status == other.responder_execution_status &&
    responder_execution_mode == other.responder_execution_mode &&
    message == other.message &&
    responder_rule_execution_details == other.responder_rule_execution_details
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 364

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


344
345
346
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 344

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



353
354
355
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 353

def hash
  [id, responder_rule_id, responder_rule_type, responder_rule_name, problem_id, problem_name, region, target_id, compartment_id, resource_type, resource_name, time_created, time_completed, responder_execution_status, responder_execution_mode, message, responder_rule_execution_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



397
398
399
400
401
402
403
404
405
406
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 397

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



391
392
393
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 391

def to_s
  to_hash.to_s
end