Class: OCI::CloudBridge::Models::OlvmOperatingSystem
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::OlvmOperatingSystem
- Defined in:
- lib/oci/cloud_bridge/models/olvm_operating_system.rb
Overview
Information describing the operating system. This is used for both virtual machines and hosts.
Instance Attribute Summary collapse
-
#boot ⇒ Array<OCI::CloudBridge::Models::OlvmBootDevice>
Configuration of the boot sequence of a virtual machine.
-
#cmd_line ⇒ String
Custom kernel parameters for starting the virtual machine if Linux operating system is used.
-
#custom_kernel_cmd_line ⇒ String
A custom part of the host kernel command line.
-
#init_rd ⇒ String
Path to custom initial ramdisk on ISO storage domain if Linux operating system is used.
-
#kernel ⇒ String
Path to custom kernel on ISO storage domain if Linux operating system is used.
-
#reported_kernel_cmd_line ⇒ String
The host kernel command line as reported by a running host.
-
#type ⇒ String
Operating system name in human readable form.
- #version ⇒ OCI::CloudBridge::Models::OlvmVersion
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 = {}) ⇒ OlvmOperatingSystem
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 = {}) ⇒ OlvmOperatingSystem
Initializes the object
88 89 90 91 92 93 94 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 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 88 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.boot = attributes[:'boot'] if attributes[:'boot'] self.cmd_line = attributes[:'cmdLine'] if attributes[:'cmdLine'] raise 'You cannot provide both :cmdLine and :cmd_line' if attributes.key?(:'cmdLine') && attributes.key?(:'cmd_line') self.cmd_line = attributes[:'cmd_line'] if attributes[:'cmd_line'] self.custom_kernel_cmd_line = attributes[:'customKernelCmdLine'] if attributes[:'customKernelCmdLine'] raise 'You cannot provide both :customKernelCmdLine and :custom_kernel_cmd_line' if attributes.key?(:'customKernelCmdLine') && attributes.key?(:'custom_kernel_cmd_line') self.custom_kernel_cmd_line = attributes[:'custom_kernel_cmd_line'] if attributes[:'custom_kernel_cmd_line'] self.init_rd = attributes[:'initRd'] if attributes[:'initRd'] raise 'You cannot provide both :initRd and :init_rd' if attributes.key?(:'initRd') && attributes.key?(:'init_rd') self.init_rd = attributes[:'init_rd'] if attributes[:'init_rd'] self.kernel = attributes[:'kernel'] if attributes[:'kernel'] self.reported_kernel_cmd_line = attributes[:'reportedKernelCmdLine'] if attributes[:'reportedKernelCmdLine'] raise 'You cannot provide both :reportedKernelCmdLine and :reported_kernel_cmd_line' if attributes.key?(:'reportedKernelCmdLine') && attributes.key?(:'reported_kernel_cmd_line') self.reported_kernel_cmd_line = attributes[:'reported_kernel_cmd_line'] if attributes[:'reported_kernel_cmd_line'] self.type = attributes[:'type'] if attributes[:'type'] self.version = attributes[:'version'] if attributes[:'version'] end |
Instance Attribute Details
#boot ⇒ Array<OCI::CloudBridge::Models::OlvmBootDevice>
Configuration of the boot sequence of a virtual machine.
13 14 15 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 13 def boot @boot end |
#cmd_line ⇒ String
Custom kernel parameters for starting the virtual machine if Linux operating system is used.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 17 def cmd_line @cmd_line end |
#custom_kernel_cmd_line ⇒ String
A custom part of the host kernel command line.
21 22 23 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 21 def custom_kernel_cmd_line @custom_kernel_cmd_line end |
#init_rd ⇒ String
Path to custom initial ramdisk on ISO storage domain if Linux operating system is used.
25 26 27 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 25 def init_rd @init_rd end |
#kernel ⇒ String
Path to custom kernel on ISO storage domain if Linux operating system is used.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 29 def kernel @kernel end |
#reported_kernel_cmd_line ⇒ String
The host kernel command line as reported by a running host.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 33 def reported_kernel_cmd_line @reported_kernel_cmd_line end |
#type ⇒ String
Operating system name in human readable form
37 38 39 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 37 def type @type end |
#version ⇒ OCI::CloudBridge::Models::OlvmVersion
40 41 42 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 40 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'boot': :'boot', 'cmd_line': :'cmdLine', 'custom_kernel_cmd_line': :'customKernelCmdLine', 'init_rd': :'initRd', 'kernel': :'kernel', 'reported_kernel_cmd_line': :'reportedKernelCmdLine', 'type': :'type', 'version': :'version' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'boot': :'Array<OCI::CloudBridge::Models::OlvmBootDevice>', 'cmd_line': :'String', 'custom_kernel_cmd_line': :'String', 'init_rd': :'String', 'kernel': :'String', 'reported_kernel_cmd_line': :'String', 'type': :'String', 'version': :'OCI::CloudBridge::Models::OlvmVersion' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 134 def ==(other) return true if equal?(other) self.class == other.class && boot == other.boot && cmd_line == other.cmd_line && custom_kernel_cmd_line == other.custom_kernel_cmd_line && init_rd == other.init_rd && kernel == other.kernel && reported_kernel_cmd_line == other.reported_kernel_cmd_line && type == other.type && version == other.version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 171 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
151 152 153 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 151 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
160 161 162 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 160 def hash [boot, cmd_line, custom_kernel_cmd_line, init_rd, kernel, reported_kernel_cmd_line, type, version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 204 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
198 199 200 |
# File 'lib/oci/cloud_bridge/models/olvm_operating_system.rb', line 198 def to_s to_hash.to_s end |