Class: OCI::OsManagement::Models::CrashEventSystemInformation

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management/models/crash_event_system_information.rb

Overview

Detailed information about system at the time of the crash.

Constant Summary collapse

ARCHITECTURE_ENUM =
[
  ARCHITECTURE_IA_32 = 'IA_32'.freeze,
  ARCHITECTURE_X86_64 = 'X86_64'.freeze,
  ARCHITECTURE_AARCH64 = 'AARCH64'.freeze,
  ARCHITECTURE_SPARC = 'SPARC'.freeze,
  ARCHITECTURE_AMD64_DEBIAN = 'AMD64_DEBIAN'.freeze,
  ARCHITECTURE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
OS_FAMILY_ENUM =
[
  OS_FAMILY_LINUX = 'LINUX'.freeze,
  OS_FAMILY_WINDOWS = 'WINDOWS'.freeze,
  OS_FAMILY_ALL = 'ALL'.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 = {}) ⇒ CrashEventSystemInformation

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



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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 98

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

system architecture

Returns:

  • (String)


29
30
31
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 29

def architecture
  @architecture
end

#ksplice_effective_kernel_versionString

Active ksplice kernel version (uptrack-uname -r)

Returns:

  • (String)


33
34
35
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 33

def ksplice_effective_kernel_version
  @ksplice_effective_kernel_version
end

#os_familyString

The Operating System type of the managed instance.

Returns:

  • (String)


37
38
39
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 37

def os_family
  @os_family
end

#os_kernel_releaseString

Operating System Kernel Release (uname -v)

Returns:

  • (String)


45
46
47
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 45

def os_kernel_release
  @os_kernel_release
end

#os_kernel_versionString

Operating System Kernel Version (uname -r)

Returns:

  • (String)


49
50
51
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 49

def os_kernel_version
  @os_kernel_version
end

#os_nameString

Operating System Name (OCA value)

Returns:

  • (String)


41
42
43
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 41

def os_name
  @os_name
end

#os_system_versionString

Version of the OS (VERSION from /etc/os-release)

Returns:

  • (String)


53
54
55
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 53

def os_system_version
  @os_system_version
end

Class Method Details

.attribute_mapObject

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



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 56

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.



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 71

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



176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 176

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



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 212

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


192
193
194
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 192

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



201
202
203
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 201

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



245
246
247
248
249
250
251
252
253
254
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 245

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



239
240
241
# File 'lib/oci/os_management/models/crash_event_system_information.rb', line 239

def to_s
  to_hash.to_s
end