Class: OCI::OsManagement::Models::KernelCrashEvent
- Defined in:
- lib/oci/os_management/models/kernel_crash_event.rb
Overview
Information about a Kernel Crash.
Constant Summary
Constants inherited from Event
Instance Attribute Summary collapse
- #content ⇒ OCI::OsManagement::Models::EventContent
-
#reason ⇒ String
reason of the crash.
- #system ⇒ OCI::OsManagement::Models::CrashEventSystemInformation
-
#time_first_occurred ⇒ DateTime
First occurrence time of the event.
- #vmcore ⇒ OCI::OsManagement::Models::KernelVmCoreInformation
Attributes inherited from Event
#compartment_id, #count, #defined_tags, #event_fingerprint, #event_type, #freeform_tags, #id, #instance_id, #summary, #system_tags, #tenancy_id, #timestamp
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 = {}) ⇒ KernelCrashEvent
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.
Methods inherited from Event
Constructor Details
#initialize(attributes = {}) ⇒ KernelCrashEvent
Initializes the object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 101 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['eventType'] = 'KERNEL_CRASH' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.reason = attributes[:'reason'] if attributes[:'reason'] self.time_first_occurred = attributes[:'timeFirstOccurred'] if attributes[:'timeFirstOccurred'] raise 'You cannot provide both :timeFirstOccurred and :time_first_occurred' if attributes.key?(:'timeFirstOccurred') && attributes.key?(:'time_first_occurred') self.time_first_occurred = attributes[:'time_first_occurred'] if attributes[:'time_first_occurred'] self.vmcore = attributes[:'vmcore'] if attributes[:'vmcore'] self.content = attributes[:'content'] if attributes[:'content'] self.system = attributes[:'system'] if attributes[:'system'] end |
Instance Attribute Details
#content ⇒ OCI::OsManagement::Models::EventContent
24 25 26 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 24 def content @content end |
#reason ⇒ String
reason of the crash
14 15 16 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 14 def reason @reason end |
#system ⇒ OCI::OsManagement::Models::CrashEventSystemInformation
27 28 29 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 27 def system @system end |
#time_first_occurred ⇒ DateTime
First occurrence time of the event
18 19 20 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 18 def time_first_occurred @time_first_occurred end |
#vmcore ⇒ OCI::OsManagement::Models::KernelVmCoreInformation
21 22 23 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 21 def vmcore @vmcore end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 30 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'instance_id': :'instanceId', 'compartment_id': :'compartmentId', 'tenancy_id': :'tenancyId', 'summary': :'summary', 'timestamp': :'timestamp', 'event_fingerprint': :'eventFingerprint', 'count': :'count', 'event_type': :'eventType', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'reason': :'reason', 'time_first_occurred': :'timeFirstOccurred', 'vmcore': :'vmcore', 'content': :'content', 'system': :'system' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'instance_id': :'String', 'compartment_id': :'String', 'tenancy_id': :'String', 'summary': :'String', 'timestamp': :'DateTime', 'event_fingerprint': :'String', 'count': :'Integer', 'event_type': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'reason': :'String', 'time_first_occurred': :'DateTime', 'vmcore': :'OCI::OsManagement::Models::KernelVmCoreInformation', 'content': :'OCI::OsManagement::Models::EventContent', 'system': :'OCI::OsManagement::Models::CrashEventSystemInformation' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 133 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && instance_id == other.instance_id && compartment_id == other.compartment_id && tenancy_id == other.tenancy_id && summary == other.summary && == other. && event_fingerprint == other.event_fingerprint && count == other.count && event_type == other.event_type && == other. && == other. && == other. && reason == other.reason && time_first_occurred == other.time_first_occurred && vmcore == other.vmcore && content == other.content && system == other.system end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 179 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
159 160 161 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 168 def hash [id, instance_id, compartment_id, tenancy_id, summary, , event_fingerprint, count, event_type, , , , reason, time_first_occurred, vmcore, content, system].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 212 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
206 207 208 |
# File 'lib/oci/os_management/models/kernel_crash_event.rb', line 206 def to_s to_hash.to_s end |