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):



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
271
# File 'lib/oci/cloud_guard/models/responder_execution_summary.rb', line 176

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)


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

def compartment_id
  @compartment_id
end

#idString

[Required] The unique identifier of the responder execution

Returns:

  • (String)


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

def id
  @id
end

#messageString

Message about the responder execution.

Returns:

  • (String)


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

def message
  @message
end

#problem_idString

[Required] Problem id associated with the responder execution

Returns:

  • (String)


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

def problem_id
  @problem_id
end

#problem_nameString

[Required] Problem name associated with the responder execution

Returns:

  • (String)


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

def problem_name
  @problem_name
end

#regionString

[Required] Region where the problem is found

Returns:

  • (String)


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

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)


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

def resource_name
  @resource_name
end

#resource_typeString

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

Returns:

  • (String)


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

def resource_type
  @resource_type
end

#responder_execution_modeString

[Required] possible type of responder execution modes

Returns:

  • (String)


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

def responder_execution_mode
  @responder_execution_mode
end

#responder_execution_statusString

[Required] current execution status of the responder

Returns:

  • (String)


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

def responder_execution_status
  @responder_execution_status
end

#responder_rule_execution_detailsOCI::CloudGuard::Models::ResponderRuleExecutionDetails



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

def responder_rule_execution_details
  @responder_rule_execution_details
end

#responder_rule_idString

[Required] Responder Rule id for the responder execution

Returns:

  • (String)


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

def responder_rule_id
  @responder_rule_id
end

#responder_rule_nameString

[Required] Rule name for the responder execution

Returns:

  • (String)


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

def responder_rule_name
  @responder_rule_name
end

#responder_rule_typeString

[Required] Rule Type for the responder execution

Returns:

  • (String)


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

def responder_rule_type
  @responder_rule_type
end

#target_idString

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

Returns:

  • (String)


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

def target_id
  @target_id
end

#time_completedDateTime

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

Returns:

  • (DateTime)


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

def time_completed
  @time_completed
end

#time_createdDateTime

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

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

Class Method Details

.attribute_mapObject

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



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

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.



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

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



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

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



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

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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

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



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

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



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

def to_s
  to_hash.to_s
end