Class: OCI::OsManagementHub::Models::ManagedInstanceSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/os_management_hub/models/managed_instance_summary.rb

Overview

Summary of the ManagedInstance.

Constant Summary collapse

LOCATION_ENUM =
[
  LOCATION_ON_PREMISE = 'ON_PREMISE'.freeze,
  LOCATION_OCI_COMPUTE = 'OCI_COMPUTE'.freeze,
  LOCATION_AZURE = 'AZURE'.freeze,
  LOCATION_EC2 = 'EC2'.freeze,
  LOCATION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
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_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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
STATUS_ENUM =
[
  STATUS_NORMAL = 'NORMAL'.freeze,
  STATUS_UNREACHABLE = 'UNREACHABLE'.freeze,
  STATUS_ERROR = 'ERROR'.freeze,
  STATUS_WARNING = 'WARNING'.freeze,
  STATUS_REGISTRATION_ERROR = 'REGISTRATION_ERROR'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ManagedInstanceSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 169

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.id = attributes[:'id'] if attributes[:'id']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.description = attributes[:'description'] if attributes[:'description']

  self.tenancy_id = attributes[:'tenancyId'] if attributes[:'tenancyId']

  raise 'You cannot provide both :tenancyId and :tenancy_id' if attributes.key?(:'tenancyId') && attributes.key?(:'tenancy_id')

  self.tenancy_id = attributes[:'tenancy_id'] if attributes[:'tenancy_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.location = attributes[:'location'] if attributes[:'location']

  self.architecture = attributes[:'architecture'] if attributes[:'architecture']

  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.status = attributes[:'status'] if attributes[:'status']

  self.managed_instance_group = attributes[:'managedInstanceGroup'] if attributes[:'managedInstanceGroup']

  raise 'You cannot provide both :managedInstanceGroup and :managed_instance_group' if attributes.key?(:'managedInstanceGroup') && attributes.key?(:'managed_instance_group')

  self.managed_instance_group = attributes[:'managed_instance_group'] if attributes[:'managed_instance_group']

  self.lifecycle_environment = attributes[:'lifecycleEnvironment'] if attributes[:'lifecycleEnvironment']

  raise 'You cannot provide both :lifecycleEnvironment and :lifecycle_environment' if attributes.key?(:'lifecycleEnvironment') && attributes.key?(:'lifecycle_environment')

  self.lifecycle_environment = attributes[:'lifecycle_environment'] if attributes[:'lifecycle_environment']

  self.lifecycle_stage = attributes[:'lifecycleStage'] if attributes[:'lifecycleStage']

  raise 'You cannot provide both :lifecycleStage and :lifecycle_stage' if attributes.key?(:'lifecycleStage') && attributes.key?(:'lifecycle_stage')

  self.lifecycle_stage = attributes[:'lifecycle_stage'] if attributes[:'lifecycle_stage']

  self.is_reboot_required = attributes[:'isRebootRequired'] unless attributes[:'isRebootRequired'].nil?

  raise 'You cannot provide both :isRebootRequired and :is_reboot_required' if attributes.key?(:'isRebootRequired') && attributes.key?(:'is_reboot_required')

  self.is_reboot_required = attributes[:'is_reboot_required'] unless attributes[:'is_reboot_required'].nil?

  self.updates_available = attributes[:'updatesAvailable'] if attributes[:'updatesAvailable']

  raise 'You cannot provide both :updatesAvailable and :updates_available' if attributes.key?(:'updatesAvailable') && attributes.key?(:'updates_available')

  self.updates_available = attributes[:'updates_available'] if attributes[:'updates_available']

  self.is_management_station = attributes[:'isManagementStation'] unless attributes[:'isManagementStation'].nil?

  raise 'You cannot provide both :isManagementStation and :is_management_station' if attributes.key?(:'isManagementStation') && attributes.key?(:'is_management_station')

  self.is_management_station = attributes[:'is_management_station'] unless attributes[:'is_management_station'].nil?
end

Instance Attribute Details

#architectureString

The CPU architecture type of the managed instance.

Returns:

  • (String)


71
72
73
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 71

def architecture
  @architecture
end

#compartment_idString

[Required] The OCID for the compartment this managed instance resides in.

Returns:

  • (String)


63
64
65
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 63

def compartment_id
  @compartment_id
end

#descriptionString

Information specified by the user about the managed instance.

Returns:

  • (String)


55
56
57
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 55

def description
  @description
end

#display_nameString

[Required] Managed instance identifier.

Returns:

  • (String)


51
52
53
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 51

def display_name
  @display_name
end

#idString

[Required] The OCID for the managed instance.

Returns:

  • (String)


47
48
49
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 47

def id
  @id
end

#is_management_stationBOOLEAN

Whether this managed instance is acting as an on-premise management station.

Returns:

  • (BOOLEAN)


100
101
102
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 100

def is_management_station
  @is_management_station
end

#is_reboot_requiredBOOLEAN

Indicates whether a reboot is required to complete installation of updates.

Returns:

  • (BOOLEAN)


92
93
94
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 92

def is_reboot_required
  @is_reboot_required
end

#lifecycle_environmentOCI::OsManagementHub::Models::Id



85
86
87
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 85

def lifecycle_environment
  @lifecycle_environment
end

#lifecycle_stageOCI::OsManagementHub::Models::Id



88
89
90
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 88

def lifecycle_stage
  @lifecycle_stage
end

#locationString

Location of the managed instance.

Returns:

  • (String)


67
68
69
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 67

def location
  @location
end

#managed_instance_groupOCI::OsManagementHub::Models::Id



82
83
84
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 82

def managed_instance_group
  @managed_instance_group
end

#os_familyString

The Operating System type of the managed instance.

Returns:

  • (String)


75
76
77
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 75

def os_family
  @os_family
end

#statusString

[Required] status of the managed instance.

Returns:

  • (String)


79
80
81
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 79

def status
  @status
end

#tenancy_idString

[Required] The OCID for the tenancy this managed instance resides in.

Returns:

  • (String)


59
60
61
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 59

def tenancy_id
  @tenancy_id
end

#updates_availableInteger

Number of updates available to be installed.

Returns:

  • (Integer)


96
97
98
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 96

def updates_available
  @updates_available
end

Class Method Details

.attribute_mapObject

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



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 103

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'description': :'description',
    'tenancy_id': :'tenancyId',
    'compartment_id': :'compartmentId',
    'location': :'location',
    'architecture': :'architecture',
    'os_family': :'osFamily',
    'status': :'status',
    'managed_instance_group': :'managedInstanceGroup',
    'lifecycle_environment': :'lifecycleEnvironment',
    'lifecycle_stage': :'lifecycleStage',
    'is_reboot_required': :'isRebootRequired',
    'updates_available': :'updatesAvailable',
    'is_management_station': :'isManagementStation'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 126

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'description': :'String',
    'tenancy_id': :'String',
    'compartment_id': :'String',
    'location': :'String',
    'architecture': :'String',
    'os_family': :'String',
    'status': :'String',
    'managed_instance_group': :'OCI::OsManagementHub::Models::Id',
    'lifecycle_environment': :'OCI::OsManagementHub::Models::Id',
    'lifecycle_stage': :'OCI::OsManagementHub::Models::Id',
    'is_reboot_required': :'BOOLEAN',
    'updates_available': :'Integer',
    'is_management_station': :'BOOLEAN'
    # 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



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 305

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    description == other.description &&
    tenancy_id == other.tenancy_id &&
    compartment_id == other.compartment_id &&
    location == other.location &&
    architecture == other.architecture &&
    os_family == other.os_family &&
    status == other.status &&
    managed_instance_group == other.managed_instance_group &&
    lifecycle_environment == other.lifecycle_environment &&
    lifecycle_stage == other.lifecycle_stage &&
    is_reboot_required == other.is_reboot_required &&
    updates_available == other.updates_available &&
    is_management_station == other.is_management_station
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



349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 349

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


329
330
331
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 329

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



338
339
340
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 338

def hash
  [id, display_name, description, tenancy_id, compartment_id, location, architecture, os_family, status, managed_instance_group, lifecycle_environment, lifecycle_stage, is_reboot_required, updates_available, is_management_station].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



382
383
384
385
386
387
388
389
390
391
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 382

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



376
377
378
# File 'lib/oci/os_management_hub/models/managed_instance_summary.rb', line 376

def to_s
  to_hash.to_s
end