Class: OCI::OsManagementHub::Models::SystemDetails
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::SystemDetails
- Defined in:
- lib/oci/os_management_hub/models/system_details.rb
Overview
Provides information about the system architecture and operating system.
Constant Summary collapse
- ARCHITECTURE_ENUM =
[ ARCHITECTURE_X86_64 = 'X86_64'.freeze, ARCHITECTURE_AARCH64 = 'AARCH64'.freeze, ARCHITECTURE_I686 = 'I686'.freeze, ARCHITECTURE_NOARCH = 'NOARCH'.freeze, ARCHITECTURE_SRC = 'SRC'.freeze, ARCHITECTURE_I386 = 'I386'.freeze, ARCHITECTURE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OS_FAMILY_ENUM =
[ OS_FAMILY_ORACLE_LINUX_9 = 'ORACLE_LINUX_9'.freeze, OS_FAMILY_ORACLE_LINUX_8 = 'ORACLE_LINUX_8'.freeze, OS_FAMILY_ORACLE_LINUX_7 = 'ORACLE_LINUX_7'.freeze, OS_FAMILY_ORACLE_LINUX_6 = 'ORACLE_LINUX_6'.freeze, OS_FAMILY_WINDOWS_SERVER_2016 = 'WINDOWS_SERVER_2016'.freeze, OS_FAMILY_WINDOWS_SERVER_2019 = 'WINDOWS_SERVER_2019'.freeze, OS_FAMILY_WINDOWS_SERVER_2022 = 'WINDOWS_SERVER_2022'.freeze, OS_FAMILY_ALL = 'ALL'.freeze, OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#architecture ⇒ String
[Required] Architecture type.
-
#ksplice_effective_kernel_version ⇒ String
Version of the Ksplice effective kernel.
-
#os_family ⇒ String
[Required] Operating system type.
-
#os_kernel_release ⇒ String
Release of the kernel.
-
#os_kernel_version ⇒ String
Version of the kernel.
-
#os_name ⇒ String
[Required] Name of the operating system.
-
#os_system_version ⇒ String
[Required] Version of the operating system.
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 = {}) ⇒ SystemDetails
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 = {}) ⇒ SystemDetails
Initializes the object
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 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 105 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.architecture = attributes[:'architecture'] if attributes[:'architecture'] self.ksplice_effective_kernel_version = attributes[:'kspliceEffectiveKernelVersion'] if attributes[:'kspliceEffectiveKernelVersion'] raise 'You cannot provide both :kspliceEffectiveKernelVersion and :ksplice_effective_kernel_version' if attributes.key?(:'kspliceEffectiveKernelVersion') && attributes.key?(:'ksplice_effective_kernel_version') self.ksplice_effective_kernel_version = attributes[:'ksplice_effective_kernel_version'] if attributes[:'ksplice_effective_kernel_version'] self.os_family = attributes[:'osFamily'] if attributes[:'osFamily'] raise 'You cannot provide both :osFamily and :os_family' if attributes.key?(:'osFamily') && attributes.key?(:'os_family') self.os_family = attributes[:'os_family'] if attributes[:'os_family'] self.os_name = attributes[:'osName'] if attributes[:'osName'] raise 'You cannot provide both :osName and :os_name' if attributes.key?(:'osName') && attributes.key?(:'os_name') self.os_name = attributes[:'os_name'] if attributes[:'os_name'] self.os_kernel_release = attributes[:'osKernelRelease'] if attributes[:'osKernelRelease'] raise 'You cannot provide both :osKernelRelease and :os_kernel_release' if attributes.key?(:'osKernelRelease') && attributes.key?(:'os_kernel_release') self.os_kernel_release = attributes[:'os_kernel_release'] if attributes[:'os_kernel_release'] self.os_kernel_version = attributes[:'osKernelVersion'] if attributes[:'osKernelVersion'] raise 'You cannot provide both :osKernelVersion and :os_kernel_version' if attributes.key?(:'osKernelVersion') && attributes.key?(:'os_kernel_version') self.os_kernel_version = attributes[:'os_kernel_version'] if attributes[:'os_kernel_version'] self.os_system_version = attributes[:'osSystemVersion'] if attributes[:'osSystemVersion'] raise 'You cannot provide both :osSystemVersion and :os_system_version' if attributes.key?(:'osSystemVersion') && attributes.key?(:'os_system_version') self.os_system_version = attributes[:'os_system_version'] if attributes[:'os_system_version'] end |
Instance Attribute Details
#architecture ⇒ String
[Required] Architecture type.
36 37 38 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 36 def architecture @architecture end |
#ksplice_effective_kernel_version ⇒ String
Version of the Ksplice effective kernel.
40 41 42 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 40 def ksplice_effective_kernel_version @ksplice_effective_kernel_version end |
#os_family ⇒ String
[Required] Operating system type.
44 45 46 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 44 def os_family @os_family end |
#os_kernel_release ⇒ String
Release of the kernel.
52 53 54 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 52 def os_kernel_release @os_kernel_release end |
#os_kernel_version ⇒ String
Version of the kernel.
56 57 58 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 56 def os_kernel_version @os_kernel_version end |
#os_name ⇒ String
[Required] Name of the operating system.
48 49 50 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 48 def os_name @os_name end |
#os_system_version ⇒ String
[Required] Version of the operating system.
60 61 62 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 60 def os_system_version @os_system_version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'architecture': :'architecture', 'ksplice_effective_kernel_version': :'kspliceEffectiveKernelVersion', 'os_family': :'osFamily', 'os_name': :'osName', 'os_kernel_release': :'osKernelRelease', 'os_kernel_version': :'osKernelVersion', 'os_system_version': :'osSystemVersion' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 78 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'architecture': :'String', 'ksplice_effective_kernel_version': :'String', 'os_family': :'String', 'os_name': :'String', 'os_kernel_release': :'String', 'os_kernel_version': :'String', 'os_system_version': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 183 def ==(other) return true if equal?(other) self.class == other.class && architecture == other.architecture && ksplice_effective_kernel_version == other.ksplice_effective_kernel_version && os_family == other.os_family && os_name == other.os_name && os_kernel_release == other.os_kernel_release && os_kernel_version == other.os_kernel_version && os_system_version == other.os_system_version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 219 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
199 200 201 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 199 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
208 209 210 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 208 def hash [architecture, ksplice_effective_kernel_version, os_family, os_name, os_kernel_release, os_kernel_version, os_system_version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
252 253 254 255 256 257 258 259 260 261 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 252 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
246 247 248 |
# File 'lib/oci/os_management_hub/models/system_details.rb', line 246 def to_s to_hash.to_s end |