Class: OCI::DatabaseManagement::Models::AttentionLogSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::AttentionLogSummary
- Defined in:
- lib/oci/database_management/models/attention_log_summary.rb
Overview
The details for one attention log entry.
Constant Summary collapse
- MESSAGE_URGENCY_ENUM =
[ MESSAGE_URGENCY_IMMEDIATE = 'IMMEDIATE'.freeze, MESSAGE_URGENCY_SOON = 'SOON'.freeze, MESSAGE_URGENCY_DEFERRABLE = 'DEFERRABLE'.freeze, MESSAGE_URGENCY_INFO = 'INFO'.freeze, MESSAGE_URGENCY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MESSAGE_TYPE_ENUM =
[ MESSAGE_TYPE_UNKNOWN = 'UNKNOWN'.freeze, MESSAGE_TYPE_INCIDENT_ERROR = 'INCIDENT_ERROR'.freeze, MESSAGE_TYPE_ERROR = 'ERROR'.freeze, MESSAGE_TYPE_WARNING = 'WARNING'.freeze, MESSAGE_TYPE_NOTIFICATION = 'NOTIFICATION'.freeze, MESSAGE_TYPE_TRACE = 'TRACE'.freeze, MESSAGE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#action ⇒ String
The recommended action to handle the attention log.
-
#cause ⇒ String
The cause of the attention log.
-
#file_location ⇒ String
The attention log file location.
-
#message_content ⇒ String
The contents of the attention log message.
-
#message_type ⇒ String
[Required] The type of attention log message.
-
#message_urgency ⇒ String
[Required] The urgency of the attention log.
-
#scope ⇒ String
The database scope for the attention log.
-
#supplemental_detail ⇒ String
The supplemental details of the attention log.
-
#target_user ⇒ String
The user who must act on the attention log message.
-
#timestamp ⇒ DateTime
The date and time the attention log 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 = {}) ⇒ AttentionLogSummary
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 = {}) ⇒ AttentionLogSummary
Initializes the object
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 172 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 123 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. = attributes[:'messageUrgency'] if attributes[:'messageUrgency'] raise 'You cannot provide both :messageUrgency and :message_urgency' if attributes.key?(:'messageUrgency') && attributes.key?(:'message_urgency') self. = attributes[:'message_urgency'] if attributes[:'message_urgency'] self. = attributes[:'messageType'] if attributes[:'messageType'] raise 'You cannot provide both :messageType and :message_type' if attributes.key?(:'messageType') && attributes.key?(:'message_type') self. = attributes[:'message_type'] if attributes[:'message_type'] self. = attributes[:'messageContent'] if attributes[:'messageContent'] raise 'You cannot provide both :messageContent and :message_content' if attributes.key?(:'messageContent') && attributes.key?(:'message_content') self. = attributes[:'message_content'] if attributes[:'message_content'] self. = attributes[:'timestamp'] if attributes[:'timestamp'] self.scope = attributes[:'scope'] if attributes[:'scope'] self.target_user = attributes[:'targetUser'] if attributes[:'targetUser'] raise 'You cannot provide both :targetUser and :target_user' if attributes.key?(:'targetUser') && attributes.key?(:'target_user') self.target_user = attributes[:'target_user'] if attributes[:'target_user'] self.cause = attributes[:'cause'] if attributes[:'cause'] self.action = attributes[:'action'] if attributes[:'action'] self.supplemental_detail = attributes[:'supplementalDetail'] if attributes[:'supplementalDetail'] raise 'You cannot provide both :supplementalDetail and :supplemental_detail' if attributes.key?(:'supplementalDetail') && attributes.key?(:'supplemental_detail') self.supplemental_detail = attributes[:'supplemental_detail'] if attributes[:'supplemental_detail'] self.file_location = attributes[:'fileLocation'] if attributes[:'fileLocation'] raise 'You cannot provide both :fileLocation and :file_location' if attributes.key?(:'fileLocation') && attributes.key?(:'file_location') self.file_location = attributes[:'file_location'] if attributes[:'file_location'] end |
Instance Attribute Details
#action ⇒ String
The recommended action to handle the attention log.
61 62 63 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 61 def action @action end |
#cause ⇒ String
The cause of the attention log.
57 58 59 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 57 def cause @cause end |
#file_location ⇒ String
The attention log file location.
69 70 71 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 69 def file_location @file_location end |
#message_content ⇒ String
The contents of the attention log message.
41 42 43 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 41 def @message_content end |
#message_type ⇒ String
[Required] The type of attention log message.
37 38 39 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 37 def @message_type end |
#message_urgency ⇒ String
[Required] The urgency of the attention log.
33 34 35 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 33 def @message_urgency end |
#scope ⇒ String
The database scope for the attention log.
49 50 51 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 49 def scope @scope end |
#supplemental_detail ⇒ String
The supplemental details of the attention log.
65 66 67 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 65 def supplemental_detail @supplemental_detail end |
#target_user ⇒ String
The user who must act on the attention log message.
53 54 55 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 53 def target_user @target_user end |
#timestamp ⇒ DateTime
The date and time the attention log was created.
45 46 47 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 45 def @timestamp 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 87 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'message_urgency': :'messageUrgency', 'message_type': :'messageType', 'message_content': :'messageContent', 'timestamp': :'timestamp', 'scope': :'scope', 'target_user': :'targetUser', 'cause': :'cause', 'action': :'action', 'supplemental_detail': :'supplementalDetail', 'file_location': :'fileLocation' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'message_urgency': :'String', 'message_type': :'String', 'message_content': :'String', 'timestamp': :'DateTime', 'scope': :'String', 'target_user': :'String', 'cause': :'String', 'action': :'String', 'supplemental_detail': :'String', 'file_location': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 207 def ==(other) return true if equal?(other) self.class == other.class && == other. && == other. && == other. && == other. && scope == other.scope && target_user == other.target_user && cause == other.cause && action == other.action && supplemental_detail == other.supplemental_detail && file_location == other.file_location end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 246 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
226 227 228 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 226 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
235 236 237 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 235 def hash [, , , , scope, target_user, cause, action, supplemental_detail, file_location].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 279 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
273 274 275 |
# File 'lib/oci/database_management/models/attention_log_summary.rb', line 273 def to_s to_hash.to_s end |