Class: OCI::CloudGuard::Models::ResponderActivitySummary
- Inherits:
-
Object
- Object
- OCI::CloudGuard::Models::ResponderActivitySummary
- Defined in:
- lib/oci/cloud_guard/models/responder_activity_summary.rb
Overview
Responder activity summary definition.
Constant Summary collapse
- RESPONDER_TYPE_ENUM =
[ RESPONDER_TYPE_REMEDIATION = 'REMEDIATION'.freeze, RESPONDER_TYPE_NOTIFICATION = 'NOTIFICATION'.freeze, RESPONDER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- RESPONDER_ACTIVITY_TYPE_ENUM =
[ RESPONDER_ACTIVITY_TYPE_STARTED = 'STARTED'.freeze, RESPONDER_ACTIVITY_TYPE_COMPLETED = 'COMPLETED'.freeze, RESPONDER_ACTIVITY_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
Instance Attribute Summary collapse
-
#id ⇒ String
[Required] Unique ID for responder activity.
-
#message ⇒ String
[Required] Additional message related to this operation.
-
#problem_id ⇒ String
[Required] Unique ID of problem associated with responder activity.
-
#responder_activity_type ⇒ String
[Required] Responder activity type.
-
#responder_execution_status ⇒ String
[Required] Responder execution status.
-
#responder_rule_id ⇒ String
[Required] Unique ID of the responder rule associated with the problem.
-
#responder_rule_name ⇒ String
[Required] Responder rule name.
-
#responder_type ⇒ String
[Required] Responder rule type for performing the operation.
-
#time_created ⇒ DateTime
[Required] Responder activity starting time.
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 = {}) ⇒ ResponderActivitySummary
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 = {}) ⇒ ResponderActivitySummary
Initializes the object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 120 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.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.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_type = attributes[:'responderType'] if attributes[:'responderType'] raise 'You cannot provide both :responderType and :responder_type' if attributes.key?(:'responderType') && attributes.key?(:'responder_type') self.responder_type = attributes[:'responder_type'] if attributes[:'responder_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.responder_activity_type = attributes[:'responderActivityType'] if attributes[:'responderActivityType'] raise 'You cannot provide both :responderActivityType and :responder_activity_type' if attributes.key?(:'responderActivityType') && attributes.key?(:'responder_activity_type') self.responder_activity_type = attributes[:'responder_activity_type'] if attributes[:'responder_activity_type'] 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.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. = attributes[:'message'] if attributes[:'message'] end |
Instance Attribute Details
#id ⇒ String
[Required] Unique ID for responder activity
37 38 39 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 37 def id @id end |
#message ⇒ String
[Required] Additional message related to this operation
69 70 71 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 69 def @message end |
#problem_id ⇒ String
[Required] Unique ID of problem associated with responder activity
41 42 43 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 41 def problem_id @problem_id end |
#responder_activity_type ⇒ String
[Required] Responder activity type
57 58 59 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 57 def responder_activity_type @responder_activity_type end |
#responder_execution_status ⇒ String
[Required] Responder execution status
61 62 63 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 61 def responder_execution_status @responder_execution_status end |
#responder_rule_id ⇒ String
[Required] Unique ID of the responder rule associated with the problem
45 46 47 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 45 def responder_rule_id @responder_rule_id end |
#responder_rule_name ⇒ String
[Required] Responder rule name
53 54 55 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 53 def responder_rule_name @responder_rule_name end |
#responder_type ⇒ String
[Required] Responder rule type for performing the operation
49 50 51 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 49 def responder_type @responder_type end |
#time_created ⇒ DateTime
[Required] Responder activity starting time
65 66 67 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 65 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'problem_id': :'problemId', 'responder_rule_id': :'responderRuleId', 'responder_type': :'responderType', 'responder_rule_name': :'responderRuleName', 'responder_activity_type': :'responderActivityType', 'responder_execution_status': :'responderExecutionStatus', 'time_created': :'timeCreated', 'message': :'message' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'problem_id': :'String', 'responder_rule_id': :'String', 'responder_type': :'String', 'responder_rule_name': :'String', 'responder_activity_type': :'String', 'responder_execution_status': :'String', 'time_created': :'DateTime', 'message': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 219 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && problem_id == other.problem_id && responder_rule_id == other.responder_rule_id && responder_type == other.responder_type && responder_rule_name == other.responder_rule_name && responder_activity_type == other.responder_activity_type && responder_execution_status == other.responder_execution_status && time_created == other.time_created && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 257 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
237 238 239 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 237 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
246 247 248 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 246 def hash [id, problem_id, responder_rule_id, responder_type, responder_rule_name, responder_activity_type, responder_execution_status, time_created, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
290 291 292 293 294 295 296 297 298 299 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 290 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
284 285 286 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 284 def to_s to_hash.to_s end |