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
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 179 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 130 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
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] Actor type 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] Problem Lifecycle Detail Status
60 61 62 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 60 def lifecycle_detail @lifecycle_detail end |
#problem_id ⇒ String
[Required] problemId for which history is associated to.
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] Type of the Entity
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.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 79 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.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 97 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.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 227 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
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 266 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
246 247 248 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 246 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
255 256 257 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 255 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
299 300 301 302 303 304 305 306 307 308 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 299 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
293 294 295 |
# File 'lib/oci/cloud_guard/models/problem_history_summary.rb', line 293 def to_s to_hash.to_s end |