Class: OCI::Database::Models::VmClusterUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/vm_cluster_update.rb

Overview

A maintenance update for a VM cluster. Applies to Exadata Cloud@Customer instances only.

To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.

Constant Summary collapse

LAST_ACTION_ENUM =
[
  LAST_ACTION_ROLLING_APPLY = 'ROLLING_APPLY'.freeze,
  LAST_ACTION_PRECHECK = 'PRECHECK'.freeze,
  LAST_ACTION_ROLLBACK = 'ROLLBACK'.freeze,
  LAST_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LAST_UPDATE_MODE_ENUM =
[
  LAST_UPDATE_MODE_ONLINE_HIGHCVSS = 'ONLINE_HIGHCVSS'.freeze,
  LAST_UPDATE_MODE_ONLINE_ALLCVSS = 'ONLINE_ALLCVSS'.freeze,
  LAST_UPDATE_MODE_ONLINE_ALL_UPDATES = 'ONLINE_ALL_UPDATES'.freeze,
  LAST_UPDATE_MODE_PENDING_UPDATES = 'PENDING_UPDATES'.freeze,
  LAST_UPDATE_MODE_FULL_UPDATE = 'FULL_UPDATE'.freeze,
  LAST_UPDATE_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
AVAILABLE_UPDATE_MODES_ENUM =
[
  AVAILABLE_UPDATE_MODES_ONLINE_HIGHCVSS = 'ONLINE_HIGHCVSS'.freeze,
  AVAILABLE_UPDATE_MODES_ONLINE_ALLCVSS = 'ONLINE_ALLCVSS'.freeze,
  AVAILABLE_UPDATE_MODES_ONLINE_ALL_UPDATES = 'ONLINE_ALL_UPDATES'.freeze,
  AVAILABLE_UPDATE_MODES_PENDING_UPDATES = 'PENDING_UPDATES'.freeze,
  AVAILABLE_UPDATE_MODES_FULL_UPDATE = 'FULL_UPDATE'.freeze,
  AVAILABLE_UPDATE_MODES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
AVAILABLE_ACTIONS_ENUM =
[
  AVAILABLE_ACTIONS_ROLLING_APPLY = 'ROLLING_APPLY'.freeze,
  AVAILABLE_ACTIONS_PRECHECK = 'PRECHECK'.freeze,
  AVAILABLE_ACTIONS_ROLLBACK = 'ROLLBACK'.freeze,
  AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
UPDATE_TYPE_ENUM =
[
  UPDATE_TYPE_GI_UPGRADE = 'GI_UPGRADE'.freeze,
  UPDATE_TYPE_GI_PATCH = 'GI_PATCH'.freeze,
  UPDATE_TYPE_OS_UPDATE = 'OS_UPDATE'.freeze,
  UPDATE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_SUCCESS = 'SUCCESS'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VmClusterUpdate

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :description (String)

    The value to assign to the #description property

  • :last_action (String)

    The value to assign to the #last_action property

  • :last_update_mode (String)

    The value to assign to the #last_update_mode property

  • :available_update_modes (Array<String>)

    The value to assign to the #available_update_modes property

  • :oracle_linux_version (String)

    The value to assign to the #oracle_linux_version property

  • :available_actions (Array<String>)

    The value to assign to the #available_actions property

  • :update_type (String)

    The value to assign to the #update_type property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :time_released (DateTime)

    The value to assign to the #time_released property

  • :version (String)

    The value to assign to the #version property



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
# File 'lib/oci/database/models/vm_cluster_update.rb', line 171

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

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

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

  self.last_action = attributes[:'lastAction'] if attributes[:'lastAction']

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

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

  self.last_update_mode = attributes[:'lastUpdateMode'] if attributes[:'lastUpdateMode']

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

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

  self.available_update_modes = attributes[:'availableUpdateModes'] if attributes[:'availableUpdateModes']

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

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

  self.oracle_linux_version = attributes[:'oracleLinuxVersion'] if attributes[:'oracleLinuxVersion']

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

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

  self.available_actions = attributes[:'availableActions'] if attributes[:'availableActions']

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

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

  self.update_type = attributes[:'updateType'] if attributes[:'updateType']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.time_released = attributes[:'timeReleased'] if attributes[:'timeReleased']

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

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

  self.version = attributes[:'version'] if attributes[:'version']
end

Instance Attribute Details

#available_actionsArray<String>

The possible actions that can be performed using this maintenance update.

Returns:

  • (Array<String>)


90
91
92
# File 'lib/oci/database/models/vm_cluster_update.rb', line 90

def available_actions
  @available_actions
end

#available_update_modesArray<String>

The possible update options that can be performed using this maintenance update (only valid for OS Update).

Returns:

  • (Array<String>)


82
83
84
# File 'lib/oci/database/models/vm_cluster_update.rb', line 82

def available_update_modes
  @available_update_modes
end

#descriptionString

[Required] Details of the maintenance update package.

Returns:

  • (String)


70
71
72
# File 'lib/oci/database/models/vm_cluster_update.rb', line 70

def description
  @description
end

#idString

[Required] The OCID of the maintenance update.

Returns:

  • (String)


66
67
68
# File 'lib/oci/database/models/vm_cluster_update.rb', line 66

def id
  @id
end

#last_actionString

The update action performed most recently using this maintenance update.

Returns:

  • (String)


74
75
76
# File 'lib/oci/database/models/vm_cluster_update.rb', line 74

def last_action
  @last_action
end

#last_update_modeString

The update mode performed most recently using this maintenance update (only valid for OS Update).

Returns:

  • (String)


78
79
80
# File 'lib/oci/database/models/vm_cluster_update.rb', line 78

def last_update_mode
  @last_update_mode
end

#lifecycle_detailsString

Descriptive text providing additional details about the lifecycle state.

Returns:

  • (String)


99
100
101
# File 'lib/oci/database/models/vm_cluster_update.rb', line 99

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

The current state of the maintenance update. Dependent on value of lastAction.

Returns:

  • (String)


103
104
105
# File 'lib/oci/database/models/vm_cluster_update.rb', line 103

def lifecycle_state
  @lifecycle_state
end

#oracle_linux_versionString

Oracle Linux version for the respective Exadata Image.

Returns:

  • (String)


86
87
88
# File 'lib/oci/database/models/vm_cluster_update.rb', line 86

def oracle_linux_version
  @oracle_linux_version
end

#time_releasedDateTime

[Required] The date and time the maintenance update was released.

Returns:

  • (DateTime)


107
108
109
# File 'lib/oci/database/models/vm_cluster_update.rb', line 107

def time_released
  @time_released
end

#update_typeString

[Required] The type of VM cluster maintenance update.

Returns:

  • (String)


94
95
96
# File 'lib/oci/database/models/vm_cluster_update.rb', line 94

def update_type
  @update_type
end

#versionString

[Required] The version of the maintenance update package.

Returns:

  • (String)


111
112
113
# File 'lib/oci/database/models/vm_cluster_update.rb', line 111

def version
  @version
end

Class Method Details

.attribute_mapObject

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



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/database/models/vm_cluster_update.rb', line 114

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'description': :'description',
    'last_action': :'lastAction',
    'last_update_mode': :'lastUpdateMode',
    'available_update_modes': :'availableUpdateModes',
    'oracle_linux_version': :'oracleLinuxVersion',
    'available_actions': :'availableActions',
    'update_type': :'updateType',
    'lifecycle_details': :'lifecycleDetails',
    'lifecycle_state': :'lifecycleState',
    'time_released': :'timeReleased',
    'version': :'version'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/oci/database/models/vm_cluster_update.rb', line 134

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'description': :'String',
    'last_action': :'String',
    'last_update_mode': :'String',
    'available_update_modes': :'Array<String>',
    'oracle_linux_version': :'String',
    'available_actions': :'Array<String>',
    'update_type': :'String',
    'lifecycle_details': :'String',
    'lifecycle_state': :'String',
    'time_released': :'DateTime',
    '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



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# File 'lib/oci/database/models/vm_cluster_update.rb', line 334

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

  self.class == other.class &&
    id == other.id &&
    description == other.description &&
    last_action == other.last_action &&
    last_update_mode == other.last_update_mode &&
    available_update_modes == other.available_update_modes &&
    oracle_linux_version == other.oracle_linux_version &&
    available_actions == other.available_actions &&
    update_type == other.update_type &&
    lifecycle_details == other.lifecycle_details &&
    lifecycle_state == other.lifecycle_state &&
    time_released == other.time_released &&
    version == other.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



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/oci/database/models/vm_cluster_update.rb', line 375

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


355
356
357
# File 'lib/oci/database/models/vm_cluster_update.rb', line 355

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



364
365
366
# File 'lib/oci/database/models/vm_cluster_update.rb', line 364

def hash
  [id, description, last_action, last_update_mode, available_update_modes, oracle_linux_version, available_actions, update_type, lifecycle_details, lifecycle_state, time_released, version].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



408
409
410
411
412
413
414
415
416
417
# File 'lib/oci/database/models/vm_cluster_update.rb', line 408

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



402
403
404
# File 'lib/oci/database/models/vm_cluster_update.rb', line 402

def to_s
  to_hash.to_s
end