Class: OCI::OsManagementHub::Models::KernelEventContent
- Inherits:
-
EventContent
- Object
- EventContent
- OCI::OsManagementHub::Models::KernelEventContent
- Defined in:
- lib/oci/os_management_hub/models/kernel_event_content.rb
Overview
Provides information collected for the kernel event.
Constant Summary collapse
- CONTENT_AVAILABILITY_ENUM =
[ CONTENT_AVAILABILITY_NOT_AVAILABLE = 'NOT_AVAILABLE'.freeze, CONTENT_AVAILABILITY_AVAILABLE_ON_INSTANCE = 'AVAILABLE_ON_INSTANCE'.freeze, CONTENT_AVAILABILITY_AVAILABLE_ON_SERVICE = 'AVAILABLE_ON_SERVICE'.freeze, CONTENT_AVAILABILITY_AVAILABLE_ON_INSTANCE_AND_SERVICE = 'AVAILABLE_ON_INSTANCE_AND_SERVICE'.freeze, CONTENT_AVAILABILITY_AVAILABLE_ON_INSTANCE_UPLOAD_IN_PROGRESS = 'AVAILABLE_ON_INSTANCE_UPLOAD_IN_PROGRESS'.freeze, CONTENT_AVAILABILITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from EventContent
Instance Attribute Summary collapse
-
#content_availability ⇒ String
[Required] Crash content availability status: * 'NOT_AVAILABLE' indicates the content is not available on the instance nor in the service * 'AVAILABLE_ON_INSTANCE' indicates the content is only available on the instance.
-
#content_location ⇒ String
[Required] Location of the Kernel event content.
-
#size ⇒ Integer
Size of the event content.
Attributes inherited from EventContent
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 = {}) ⇒ KernelEventContent
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 EventContent
Constructor Details
#initialize(attributes = {}) ⇒ KernelEventContent
Initializes the object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 73 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'KERNEL' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.content_availability = attributes[:'contentAvailability'] if attributes[:'contentAvailability'] raise 'You cannot provide both :contentAvailability and :content_availability' if attributes.key?(:'contentAvailability') && attributes.key?(:'content_availability') self.content_availability = attributes[:'content_availability'] if attributes[:'content_availability'] self.content_location = attributes[:'contentLocation'] if attributes[:'contentLocation'] raise 'You cannot provide both :contentLocation and :content_location' if attributes.key?(:'contentLocation') && attributes.key?(:'content_location') self.content_location = attributes[:'content_location'] if attributes[:'content_location'] self.size = attributes[:'size'] if attributes[:'size'] end |
Instance Attribute Details
#content_availability ⇒ String
[Required] Crash content availability status: * 'NOT_AVAILABLE' indicates the content is not available on the instance nor in the service * 'AVAILABLE_ON_INSTANCE' indicates the content is only available on the instance. * 'AVAILABLE_ON_SERVICE' indicates the content is only available on the service. * 'AVAILABLE_ON_INSTANCE_AND_SERVICE' indicates the content is available both on the instance and the service * 'AVAILABLE_ON_INSTANCE_UPLOAD_IN_PROGRESS' indicates the content is available on the instance and its upload to the service is in progress.
30 31 32 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 30 def content_availability @content_availability end |
#content_location ⇒ String
[Required] Location of the Kernel event content.
34 35 36 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 34 def content_location @content_location end |
#size ⇒ Integer
Size of the event content.
38 39 40 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 38 def size @size end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'content_availability': :'contentAvailability', 'content_location': :'contentLocation', 'size': :'size' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'content_availability': :'String', 'content_location': :'String', 'size': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 118 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && content_availability == other.content_availability && content_location == other.content_location && size == other.size end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 151 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
131 132 133 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 131 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
140 141 142 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 140 def hash [type, content_availability, content_location, size].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 184 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
178 179 180 |
# File 'lib/oci/os_management_hub/models/kernel_event_content.rb', line 178 def to_s to_hash.to_s end |