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]** problemId for which Responder activity is associated to.
-
#responder_activity_type ⇒ String
**[Required]** Responder activity types.
-
#responder_execution_status ⇒ String
**[Required]** the responder execution status.
-
#responder_rule_id ⇒ String
**[Required]** Id of the responder rule for 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
119 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 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 119 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.
36 37 38 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 36 def id @id end |
#message ⇒ String
**[Required]** additional message related to this operation
68 69 70 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 68 def @message end |
#problem_id ⇒ String
**[Required]** problemId for which Responder activity is associated to.
40 41 42 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 40 def problem_id @problem_id end |
#responder_activity_type ⇒ String
**[Required]** Responder activity types
56 57 58 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 56 def responder_activity_type @responder_activity_type end |
#responder_execution_status ⇒ String
**[Required]** the responder execution status
60 61 62 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 60 def responder_execution_status @responder_execution_status end |
#responder_rule_id ⇒ String
**[Required]** Id of the responder rule for the problem
44 45 46 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 44 def responder_rule_id @responder_rule_id end |
#responder_rule_name ⇒ String
**[Required]** responder rule name
52 53 54 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 52 def responder_rule_name @responder_rule_name end |
#responder_type ⇒ String
**[Required]** responder rule type for performing the operation
48 49 50 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 48 def responder_type @responder_type end |
#time_created ⇒ DateTime
**[Required]** responder activity starting time
64 65 66 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 64 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 71 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.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 88 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.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 218 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
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 256 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
236 237 238 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 236 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
245 246 247 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 245 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
289 290 291 292 293 294 295 296 297 298 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 289 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
283 284 285 |
# File 'lib/oci/cloud_guard/models/responder_activity_summary.rb', line 283 def to_s to_hash.to_s end |