Class: OCI::OsManagementHub::Models::SystemDetails

Inherits:
Object
  • Object
show all
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_AMD64 = 'AMD64'.freeze,
  ARCHITECTURE_ARM64 = 'ARM64'.freeze,
  ARCHITECTURE_ALL = 'ALL'.freeze,
  ARCHITECTURE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
OS_FAMILY_ENUM =
[
  OS_FAMILY_ORACLE_LINUX_10 = 'ORACLE_LINUX_10'.freeze,
  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_WINDOWS_SERVER_2025 = 'WINDOWS_SERVER_2025'.freeze,
  OS_FAMILY_WINDOWS_11 = 'WINDOWS_11'.freeze,
  OS_FAMILY_ALL = 'ALL'.freeze,
  OS_FAMILY_UBUNTU_20_04 = 'UBUNTU_20_04'.freeze,
  OS_FAMILY_UBUNTU_22_04 = 'UBUNTU_22_04'.freeze,
  OS_FAMILY_UBUNTU_24_04 = 'UBUNTU_24_04'.freeze,
  OS_FAMILY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SystemDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :architecture (String)

    The value to assign to the #architecture property

  • :ksplice_effective_kernel_version (String)

    The value to assign to the #ksplice_effective_kernel_version property

  • :os_family (String)

    The value to assign to the #os_family property

  • :os_name (String)

    The value to assign to the #os_name property

  • :os_kernel_release (String)

    The value to assign to the #os_kernel_release property

  • :os_kernel_version (String)

    The value to assign to the #os_kernel_version property

  • :os_system_version (String)

    The value to assign to the #os_system_version property



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
149
150
151
152
153
154
155
156
157
# File 'lib/oci/os_management_hub/models/system_details.rb', line 114

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

#architectureString

[Required] Architecture type.

Returns:

  • (String)


45
46
47
# File 'lib/oci/os_management_hub/models/system_details.rb', line 45

def architecture
  @architecture
end

#ksplice_effective_kernel_versionString

Version of the Ksplice effective kernel.

Returns:

  • (String)


49
50
51
# File 'lib/oci/os_management_hub/models/system_details.rb', line 49

def ksplice_effective_kernel_version
  @ksplice_effective_kernel_version
end

#os_familyString

[Required] Operating system type.

Returns:

  • (String)


53
54
55
# File 'lib/oci/os_management_hub/models/system_details.rb', line 53

def os_family
  @os_family
end

#os_kernel_releaseString

Release of the kernel.

Returns:

  • (String)


61
62
63
# File 'lib/oci/os_management_hub/models/system_details.rb', line 61

def os_kernel_release
  @os_kernel_release
end

#os_kernel_versionString

Version of the kernel.

Returns:

  • (String)


65
66
67
# File 'lib/oci/os_management_hub/models/system_details.rb', line 65

def os_kernel_version
  @os_kernel_version
end

#os_nameString

[Required] Name of the operating system.

Returns:

  • (String)


57
58
59
# File 'lib/oci/os_management_hub/models/system_details.rb', line 57

def os_name
  @os_name
end

#os_system_versionString

[Required] Version of the operating system.

Returns:

  • (String)


69
70
71
# File 'lib/oci/os_management_hub/models/system_details.rb', line 69

def os_system_version
  @os_system_version
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/os_management_hub/models/system_details.rb', line 72

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_typesObject

Attribute type mapping.



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/oci/os_management_hub/models/system_details.rb', line 87

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.

Parameters:

  • other (Object)

    the other object to be compared



192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/oci/os_management_hub/models/system_details.rb', line 192

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/os_management_hub/models/system_details.rb', line 228

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


208
209
210
# File 'lib/oci/os_management_hub/models/system_details.rb', line 208

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



217
218
219
# File 'lib/oci/os_management_hub/models/system_details.rb', line 217

def hash
  [architecture, ksplice_effective_kernel_version, os_family, os_name, os_kernel_release, os_kernel_version, os_system_version].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



261
262
263
264
265
266
267
268
269
270
# File 'lib/oci/os_management_hub/models/system_details.rb', line 261

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



255
256
257
# File 'lib/oci/os_management_hub/models/system_details.rb', line 255

def to_s
  to_hash.to_s
end