Class: OCI::CloudGuard::Models::ProblemHistorySummary
- Inherits:
-
Object
- Object
- OCI::CloudGuard::Models::ProblemHistorySummary
- Defined in:
- lib/oci/cloud_guard/models/problem_history_summary.rb
Overview
Problem history definition.
Constant Summary collapse
- ACTOR_TYPE_ENUM =
[ ACTOR_TYPE_CLOUD_GUARD_SERVICE = 'CLOUD_GUARD_SERVICE'.freeze, ACTOR_TYPE_CORRELATION = 'CORRELATION'.freeze, ACTOR_TYPE_RESPONDER = 'RESPONDER'.freeze, ACTOR_TYPE_USER = 'USER'.freeze, ACTOR_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_DETAIL_ENUM =
[ LIFECYCLE_DETAIL_OPEN = 'OPEN'.freeze, LIFECYCLE_DETAIL_RESOLVED = 'RESOLVED'.freeze, LIFECYCLE_DETAIL_DISMISSED = 'DISMISSED'.freeze, LIFECYCLE_DETAIL_DELETED = 'DELETED'.freeze, LIFECYCLE_DETAIL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- EVENT_STATUS_ENUM =
[ EVENT_STATUS_REOPEN = 'REOPEN'.freeze, EVENT_STATUS_OPEN = 'OPEN'.freeze, EVENT_STATUS_UPDATE = 'UPDATE'.freeze, EVENT_STATUS_RESOLVE = 'RESOLVE'.freeze, EVENT_STATUS_DISMISS = 'DISMISS'.freeze, EVENT_STATUS_DELETE = 'DELETE'.freeze, EVENT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#actor_name ⇒ String
[Required] Resource name who performed the activity.
-
#actor_type ⇒ String
[Required] Type of actor who performed the operation.
-
#comment ⇒ String
User-defined comments.
-
#delta ⇒ String
[Required] Impacted resource names in a comma-separated string.
-
#event_status ⇒ String
Event status.
-
#explanation ⇒ String
[Required] Activity explanation details.
-
#id ⇒ String
[Required] Unique identifier for the history record.
-
#lifecycle_detail ⇒ String
[Required] Additional details on the substate of the lifecycle state.
-
#locks ⇒ Array<OCI::CloudGuard::Models::ResourceLock>
Locks associated with this resource.
-
#problem_id ⇒ String
[Required] Problem ID with which history is associated.
-
#time_created ⇒ DateTime
[Required] Date and time the problem 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 = {}) ⇒ ProblemHistorySummary
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 = {}) ⇒ ProblemHistorySummary
Initializes the object
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 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 137 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.actor_type = attributes[:'actorType'] if attributes[:'actorType'] raise 'You cannot provide both :actorType and :actor_type' if attributes.key?(:'actorType') && attributes.key?(:'actor_type') self.actor_type = attributes[:'actor_type'] if attributes[:'actor_type'] self.actor_name = attributes[:'actorName'] if attributes[:'actorName'] raise 'You cannot provide both :actorName and :actor_name' if attributes.key?(:'actorName') && attributes.key?(:'actor_name') self.actor_name = attributes[:'actor_name'] if attributes[:'actor_name'] self.explanation = attributes[:'explanation'] if attributes[:'explanation'] self.lifecycle_detail = attributes[:'lifecycleDetail'] if attributes[:'lifecycleDetail'] raise 'You cannot provide both :lifecycleDetail and :lifecycle_detail' if attributes.key?(:'lifecycleDetail') && attributes.key?(:'lifecycle_detail') self.lifecycle_detail = attributes[:'lifecycle_detail'] if attributes[:'lifecycle_detail'] self.event_status = attributes[:'eventStatus'] if attributes[:'eventStatus'] raise 'You cannot provide both :eventStatus and :event_status' if attributes.key?(:'eventStatus') && attributes.key?(:'event_status') self.event_status = attributes[:'event_status'] if attributes[:'event_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.delta = attributes[:'delta'] if attributes[:'delta'] self.comment = attributes[:'comment'] if attributes[:'comment'] self.locks = attributes[:'locks'] if attributes[:'locks'] end |
Instance Attribute Details
#actor_name ⇒ String
[Required] Resource name who performed the activity
52 53 54 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 52 def actor_name @actor_name end |
#actor_type ⇒ String
[Required] Type of actor who performed the operation
48 49 50 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 48 def actor_type @actor_type end |
#comment ⇒ String
User-defined comments
76 77 78 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 76 def comment @comment end |
#delta ⇒ String
[Required] Impacted resource names in a comma-separated string
72 73 74 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 72 def delta @delta end |
#event_status ⇒ String
Event status
64 65 66 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 64 def event_status @event_status end |
#explanation ⇒ String
[Required] Activity explanation details
56 57 58 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 56 def explanation @explanation end |
#id ⇒ String
[Required] Unique identifier for the history record
40 41 42 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 40 def id @id end |
#lifecycle_detail ⇒ String
[Required] Additional details on the substate of the lifecycle state
60 61 62 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 60 def lifecycle_detail @lifecycle_detail end |
#locks ⇒ Array<OCI::CloudGuard::Models::ResourceLock>
Locks associated with this resource.
80 81 82 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 80 def locks @locks end |
#problem_id ⇒ String
[Required] Problem ID with which history is associated
44 45 46 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 44 def problem_id @problem_id end |
#time_created ⇒ DateTime
[Required] Date and time the problem was created
68 69 70 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 68 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 83 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'problem_id': :'problemId', 'actor_type': :'actorType', 'actor_name': :'actorName', 'explanation': :'explanation', 'lifecycle_detail': :'lifecycleDetail', 'event_status': :'eventStatus', 'time_created': :'timeCreated', 'delta': :'delta', 'comment': :'comment', 'locks': :'locks' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'problem_id': :'String', 'actor_type': :'String', 'actor_name': :'String', 'explanation': :'String', 'lifecycle_detail': :'String', 'event_status': :'String', 'time_created': :'DateTime', 'delta': :'String', 'comment': :'String', 'locks': :'Array<OCI::CloudGuard::Models::ResourceLock>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && problem_id == other.problem_id && actor_type == other.actor_type && actor_name == other.actor_name && explanation == other.explanation && lifecycle_detail == other.lifecycle_detail && event_status == other.event_status && time_created == other.time_created && delta == other.delta && comment == other.comment && locks == other.locks end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 276 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
256 257 258 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 256 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
265 266 267 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 265 def hash [id, problem_id, actor_type, actor_name, explanation, lifecycle_detail, event_status, time_created, delta, comment, locks].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
309 310 311 312 313 314 315 316 317 318 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 309 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
303 304 305 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 303 def to_s to_hash.to_s end |