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 activity.
-
#actor_type ⇒ String
[Required] Actor type 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] Problem Lifecycle Detail Status.
-
#problem_id ⇒ String
[Required] problemId for which history is associated to.
-
#time_created ⇒ DateTime
[Required] Type of the Entity.
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
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 172 173 174 175 176 177 178 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 129 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'] end |
Instance Attribute Details
#actor_name ⇒ String
[Required] Resource Name who performed activity
51 52 53 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 51 def actor_name @actor_name end |
#actor_type ⇒ String
[Required] Actor type who performed the operation
47 48 49 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 47 def actor_type @actor_type end |
#comment ⇒ String
User Defined Comments
75 76 77 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 75 def comment @comment end |
#delta ⇒ String
[Required] Impacted Resource Names in a comma-separated string.
71 72 73 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 71 def delta @delta end |
#event_status ⇒ String
Event status
63 64 65 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 63 def event_status @event_status end |
#explanation ⇒ String
[Required] Activity explanation details
55 56 57 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 55 def explanation @explanation end |
#id ⇒ String
[Required] Unique identifier for the history record
39 40 41 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 39 def id @id end |
#lifecycle_detail ⇒ String
[Required] Problem Lifecycle Detail Status
59 60 61 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 59 def lifecycle_detail @lifecycle_detail end |
#problem_id ⇒ String
[Required] problemId for which history is associated to.
43 44 45 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 43 def problem_id @problem_id end |
#time_created ⇒ DateTime
[Required] Type of the Entity
67 68 69 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 67 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 78 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 96 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 226 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 265 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
245 246 247 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 245 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
254 255 256 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 254 def hash [id, problem_id, actor_type, actor_name, explanation, lifecycle_detail, event_status, time_created, delta, comment].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
298 299 300 301 302 303 304 305 306 307 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 298 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
292 293 294 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 292 def to_s to_hash.to_s end |