Class: OCI::DatabaseManagement::Models::AlertLogSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::AlertLogSummary
- Defined in:
- lib/oci/database_management/models/alert_log_summary.rb
Overview
The detail for one alert log entry.
Constant Summary collapse
- MESSAGE_LEVEL_ENUM =
[ MESSAGE_LEVEL_CRITICAL = 'CRITICAL'.freeze, MESSAGE_LEVEL_SEVERE = 'SEVERE'.freeze, MESSAGE_LEVEL_IMPORTANT = 'IMPORTANT'.freeze, MESSAGE_LEVEL_NORMAL = 'NORMAL'.freeze, MESSAGE_LEVEL_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
-
#file_location ⇒ String
The alert log file location.
-
#message_content ⇒ String
The contents of the alert log message.
-
#message_level ⇒ String
[Required] The level of the alert log.
-
#message_type ⇒ String
[Required] The type of alert log message.
-
#supplemental_detail ⇒ String
The supplemental details of the alert log.
-
#timestamp ⇒ DateTime
The date and time the alert 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 = {}) ⇒ AlertLogSummary
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 = {}) ⇒ AlertLogSummary
Initializes the object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 95 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[:'messageLevel'] if attributes[:'messageLevel'] raise 'You cannot provide both :messageLevel and :message_level' if attributes.key?(:'messageLevel') && attributes.key?(:'message_level') self. = attributes[:'message_level'] if attributes[:'message_level'] 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.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
#file_location ⇒ String
The alert log file location.
53 54 55 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 53 def file_location @file_location end |
#message_content ⇒ String
The contents of the alert log message.
41 42 43 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 41 def @message_content end |
#message_level ⇒ String
[Required] The level of the alert log.
33 34 35 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 33 def @message_level end |
#message_type ⇒ String
[Required] The type of alert log message.
37 38 39 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 37 def @message_type end |
#supplemental_detail ⇒ String
The supplemental details of the alert log.
49 50 51 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 49 def supplemental_detail @supplemental_detail end |
#timestamp ⇒ DateTime
The date and time the alert log was created.
45 46 47 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 45 def @timestamp end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'message_level': :'messageLevel', 'message_type': :'messageType', 'message_content': :'messageContent', 'timestamp': :'timestamp', 'supplemental_detail': :'supplementalDetail', 'file_location': :'fileLocation' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 70 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'message_level': :'String', 'message_type': :'String', 'message_content': :'String', 'timestamp': :'DateTime', 'supplemental_detail': :'String', 'file_location': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 167 def ==(other) return true if equal?(other) self.class == other.class && == other. && == other. && == other. && == other. && supplemental_detail == other.supplemental_detail && file_location == other.file_location end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 202 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
182 183 184 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 182 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
191 192 193 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 191 def hash [, , , , supplemental_detail, file_location].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 235 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
229 230 231 |
# File 'lib/oci/database_management/models/alert_log_summary.rb', line 229 def to_s to_hash.to_s end |