Class: OCI::CloudGuard::Models::ResponderExecution
- Inherits:
-
Object
- Object
- OCI::CloudGuard::Models::ResponderExecution
- Defined in:
- lib/oci/cloud_guard/models/responder_execution.rb
Overview
Responder Execution Object.
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
-
#compartment_id ⇒ String
[Required] compartment id of the responder execution for the problem.
-
#id ⇒ String
[Required] The unique identifier of the responder execution.
-
#message ⇒ String
Message about the responder execution.
-
#problem_id ⇒ String
[Required] Problem id associated with the responder execution.
-
#region ⇒ String
[Required] region where the problem is found.
-
#resource_name ⇒ String
[Required] resource name of the problem for the responder execution.
-
#resource_type ⇒ String
[Required] resource type of the problem for the responder execution.
-
#responder_execution_mode ⇒ String
[Required] execution mode of the responder.
-
#responder_execution_status ⇒ String
[Required] current execution status of the responder.
- #responder_rule_execution_details ⇒ OCI::CloudGuard::Models::ResponderRuleExecutionDetails
-
#responder_rule_id ⇒ String
[Required] Responder Rule id for the responder execution.
-
#responder_rule_name ⇒ String
[Required] Rule name for the responder execution.
-
#responder_rule_type ⇒ String
[Required] Rule Type for the responder execution.
-
#target_id ⇒ String
[Required] targetId of the problem for the responder execution.
-
#time_completed ⇒ DateTime
The date and time the responder execution was updated.
-
#time_created ⇒ DateTime
[Required] The date and time the responder execution was created.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ResponderExecution
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ResponderExecution
Initializes the object
169 170 171 172 173 174 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 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 169 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.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. = 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_id ⇒ String
[Required] compartment id of the responder execution for the problem
66 67 68 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 66 def compartment_id @compartment_id end |
#id ⇒ String
[Required] The unique identifier of the responder execution
38 39 40 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 38 def id @id end |
#message ⇒ String
Message about the responder execution.
94 95 96 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 94 def @message end |
#problem_id ⇒ String
[Required] Problem id associated with the responder execution
54 55 56 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 54 def problem_id @problem_id end |
#region ⇒ String
[Required] region where the problem is found
58 59 60 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 58 def region @region end |
#resource_name ⇒ String
[Required] resource name of the problem for the responder execution. TODO-DOC link to resource definition doc
74 75 76 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 74 def resource_name @resource_name end |
#resource_type ⇒ String
[Required] resource type of the problem for the responder execution
70 71 72 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 70 def resource_type @resource_type end |
#responder_execution_mode ⇒ String
[Required] execution mode of the responder
90 91 92 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 90 def responder_execution_mode @responder_execution_mode end |
#responder_execution_status ⇒ String
[Required] current execution status of the responder
86 87 88 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 86 def responder_execution_status @responder_execution_status end |
#responder_rule_execution_details ⇒ OCI::CloudGuard::Models::ResponderRuleExecutionDetails
97 98 99 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 97 def responder_rule_execution_details @responder_rule_execution_details end |
#responder_rule_id ⇒ String
[Required] Responder Rule id for the responder execution
42 43 44 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 42 def responder_rule_id @responder_rule_id end |
#responder_rule_name ⇒ String
[Required] Rule name for the responder execution
50 51 52 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 50 def responder_rule_name @responder_rule_name end |
#responder_rule_type ⇒ String
[Required] Rule Type for the responder execution
46 47 48 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 46 def responder_rule_type @responder_rule_type end |
#target_id ⇒ String
[Required] targetId of the problem for the responder execution
62 63 64 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 62 def target_id @target_id end |
#time_completed ⇒ DateTime
The date and time the responder execution was updated. Format defined by RFC3339.
82 83 84 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 82 def time_completed @time_completed end |
#time_created ⇒ DateTime
[Required] The date and time the responder execution was created. Format defined by RFC3339.
78 79 80 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 78 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 100 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', '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_types ⇒ Object
Attribute type mapping.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 124 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', '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.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 306 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 && 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 && == other. && responder_rule_execution_details == other.responder_rule_execution_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 351 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
331 332 333 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 331 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
340 341 342 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 340 def hash [id, responder_rule_id, responder_rule_type, responder_rule_name, problem_id, region, target_id, compartment_id, resource_type, resource_name, time_created, time_completed, responder_execution_status, responder_execution_mode, , responder_rule_execution_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
384 385 386 387 388 389 390 391 392 393 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 384 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_s ⇒ String
Returns the string representation of the object
378 379 380 |
# File 'lib/oci/cloud_guard/models/responder_execution.rb', line 378 def to_s to_hash.to_s end |