Class: OCI::Database::Models::DatabaseUpgradeHistoryEntry

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

Overview

The Database service supports the upgrade history of databases.

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

For information about access control and compartments, see Overview of the Identity Service.

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

Constant Summary collapse

ACTION_ENUM =
[
  ACTION_PRECHECK = 'PRECHECK'.freeze,
  ACTION_UPGRADE = 'UPGRADE'.freeze,
  ACTION_ROLLBACK = 'ROLLBACK'.freeze,
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SOURCE_ENUM =
[
  SOURCE_DB_HOME = 'DB_HOME'.freeze,
  SOURCE_DB_VERSION = 'DB_VERSION'.freeze,
  SOURCE_DB_SOFTWARE_IMAGE = 'DB_SOFTWARE_IMAGE'.freeze,
  SOURCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.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 = {}) ⇒ DatabaseUpgradeHistoryEntry

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

  • :action (String)

    The value to assign to the #action property

  • :source (String)

    The value to assign to the #source property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :target_db_version (String)

    The value to assign to the #target_db_version property

  • :target_database_software_image_id (String)

    The value to assign to the #target_database_software_image_id property

  • :target_db_home_id (String)

    The value to assign to the #target_db_home_id property

  • :source_db_home_id (String)

    The value to assign to the #source_db_home_id property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property

  • :options (String)

    The value to assign to the #options property



156
157
158
159
160
161
162
163
164
165
166
167
168
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
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 156

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

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

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

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

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

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

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

  self.target_database_software_image_id = attributes[:'targetDatabaseSoftwareImageId'] if attributes[:'targetDatabaseSoftwareImageId']

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

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

  self.target_db_home_id = attributes[:'targetDbHomeId'] if attributes[:'targetDbHomeId']

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

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

  self.source_db_home_id = attributes[:'sourceDbHomeId'] if attributes[:'sourceDbHomeId']

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

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

  self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']

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

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

  self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded']

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

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

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

Instance Attribute Details

#actionString

[Required] The database upgrade action.

Returns:

  • (String)


47
48
49
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 47

def action
  @action
end

#idString

[Required] The OCID of the database upgrade history.

Returns:

  • (String)


43
44
45
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 43

def id
  @id
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


63
64
65
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 63

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] Status of database upgrade history SUCCEEDED|IN_PROGRESS|FAILED.

Returns:

  • (String)


59
60
61
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 59

def lifecycle_state
  @lifecycle_state
end

#optionsString

Additional upgrade options supported by DBUA(Database Upgrade Assistant). Example: "-upgradeTimezone false -keepEvents"

Returns:

  • (String)


96
97
98
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 96

def options
  @options
end

#sourceString

The source of the Oracle Database software to be used for the upgrade. - Use DB_HOME to specify an existing Database Home to upgrade the database. The database is moved to the target Database Home and makes use of the Oracle Database software version of the target Database Home. - Use DB_VERSION to specify a generally-available Oracle Database software version to upgrade the database. - Use DB_SOFTWARE_IMAGE to specify a database software image to upgrade the database.

Returns:

  • (String)


55
56
57
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 55

def source
  @source
end

#source_db_home_idString

The OCID of the Database Home.

Returns:

  • (String)


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

def source_db_home_id
  @source_db_home_id
end

#target_database_software_image_idString

the database software image used for upgrading database.

Returns:

  • (String)


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

def target_database_software_image_id
  @target_database_software_image_id
end

#target_db_home_idString

The OCID of the Database Home.

Returns:

  • (String)


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

def target_db_home_id
  @target_db_home_id
end

#target_db_versionString

A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation.

This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, openMode, permissionLevel, dbWorkload, privateEndpointLabel, nsgIds, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier.

Returns:

  • (String)


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

def target_db_version
  @target_db_version
end

#time_endedDateTime

The date and time when the database upgrade ended.

Returns:

  • (DateTime)


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

def time_ended
  @time_ended
end

#time_startedDateTime

[Required] The date and time when the database upgrade started.

Returns:

  • (DateTime)


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

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 99

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'action': :'action',
    'source': :'source',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'target_db_version': :'targetDBVersion',
    'target_database_software_image_id': :'targetDatabaseSoftwareImageId',
    'target_db_home_id': :'targetDbHomeId',
    'source_db_home_id': :'sourceDbHomeId',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'options': :'options'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 119

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'action': :'String',
    'source': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'target_db_version': :'String',
    'target_database_software_image_id': :'String',
    'target_db_home_id': :'String',
    'source_db_home_id': :'String',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'options': :'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



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 262

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

  self.class == other.class &&
    id == other.id &&
    action == other.action &&
    source == other.source &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    target_db_version == other.target_db_version &&
    target_database_software_image_id == other.target_database_software_image_id &&
    target_db_home_id == other.target_db_home_id &&
    source_db_home_id == other.source_db_home_id &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    options == other.options
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



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

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


283
284
285
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 283

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



292
293
294
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 292

def hash
  [id, action, source, lifecycle_state, lifecycle_details, target_db_version, target_database_software_image_id, target_db_home_id, source_db_home_id, time_started, time_ended, options].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



336
337
338
339
340
341
342
343
344
345
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 336

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



330
331
332
# File 'lib/oci/database/models/database_upgrade_history_entry.rb', line 330

def to_s
  to_hash.to_s
end