Class: OCI::Database::Models::PdbConversionHistoryEntrySummary

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

Overview

Details of operations performed to convert a non-container database to pluggable database.

Constant Summary collapse

ACTION_ENUM =
[
  ACTION_PRECHECK = 'PRECHECK'.freeze,
  ACTION_CONVERT = 'CONVERT'.freeze,
  ACTION_SYNC = 'SYNC'.freeze,
  ACTION_SYNC_ROLLBACK = 'SYNC_ROLLBACK'.freeze,
  ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TARGET_ENUM =
[
  TARGET_NEW_DATABASE = 'NEW_DATABASE'.freeze,
  TARGET_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 = {}) ⇒ PdbConversionHistoryEntrySummary

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

  • :target (String)

    The value to assign to the #target property

  • :source_database_id (String)

    The value to assign to the #source_database_id property

  • :target_database_id (String)

    The value to assign to the #target_database_id property

  • :cdb_name (String)

    The value to assign to the #cdb_name 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

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property

  • :additional_cdb_params (String)

    The value to assign to the #additional_cdb_params property



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 140

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

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

  self.source_database_id = attributes[:'sourceDatabaseId'] if attributes[:'sourceDatabaseId']

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

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

  self.target_database_id = attributes[:'targetDatabaseId'] if attributes[:'targetDatabaseId']

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

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

  self.cdb_name = attributes[:'cdbName'] if attributes[:'cdbName']

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

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

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

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

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

Instance Attribute Details

#actionString

[Required] The operations used to convert a non-container database to a pluggable database. - Use PRECHECK to run a pre-check operation on non-container database prior to converting it into a pluggable database. - Use CONVERT to convert a non-container database into a pluggable database. - Use SYNC if the non-container database was manually converted into a pluggable database using the dbcli command-line utility. Databases may need to be converted manually if the CONVERT action fails when converting a non-container database using the API. - Use SYNC_ROLLBACK if the conversion of a non-container database into a pluggable database was manually rolled back using the dbcli command line utility. Conversions may need to be manually rolled back if the CONVERT action fails when converting a non-container database using the API.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 44

def action
  @action
end

#additional_cdb_paramsString

Additional container database parameter.

Returns:

  • (String)


83
84
85
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 83

def additional_cdb_params
  @additional_cdb_params
end

#cdb_nameString

[Required] The database name. The name must begin with an alphabetic character and can contain a maximum of 8 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy.

Returns:

  • (String)


62
63
64
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 62

def cdb_name
  @cdb_name
end

#idString

[Required] The OCID of the database conversion history.

Returns:

  • (String)


35
36
37
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 35

def id
  @id
end

#lifecycle_detailsString

Additional information about the current lifecycle state for the conversion operation.

Returns:

  • (String)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] Status of an operation performed during the conversion of a non-container database to a pluggable database.

Returns:

  • (String)


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

def lifecycle_state
  @lifecycle_state
end

#source_database_idString

[Required] The OCID of the database.

Returns:

  • (String)


54
55
56
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 54

def source_database_id
  @source_database_id
end

#targetString

The target container database of the pluggable database created by the database conversion operation. Currently, the database conversion operation only supports creating the pluggable database in a new container database. - Use NEW_DATABASE to specify that the pluggable database be created within a new container database in the same database home.

Returns:

  • (String)


50
51
52
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 50

def target
  @target
end

#target_database_idString

The OCID of the database.

Returns:

  • (String)


58
59
60
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 58

def target_database_id
  @target_database_id
end

#time_endedDateTime

The date and time when the database conversion operation ended.

Returns:

  • (DateTime)


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

def time_ended
  @time_ended
end

#time_startedDateTime

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

Returns:

  • (DateTime)


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

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 86

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'action': :'action',
    'target': :'target',
    'source_database_id': :'sourceDatabaseId',
    'target_database_id': :'targetDatabaseId',
    'cdb_name': :'cdbName',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'additional_cdb_params': :'additionalCdbParams'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 105

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'action': :'String',
    'target': :'String',
    'source_database_id': :'String',
    'target_database_id': :'String',
    'cdb_name': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'additional_cdb_params': :'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



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 247

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

  self.class == other.class &&
    id == other.id &&
    action == other.action &&
    target == other.target &&
    source_database_id == other.source_database_id &&
    target_database_id == other.target_database_id &&
    cdb_name == other.cdb_name &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    additional_cdb_params == other.additional_cdb_params
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



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 287

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


267
268
269
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 267

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



276
277
278
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 276

def hash
  [id, action, target, source_database_id, target_database_id, cdb_name, lifecycle_state, lifecycle_details, time_started, time_ended, additional_cdb_params].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



320
321
322
323
324
325
326
327
328
329
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 320

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



314
315
316
# File 'lib/oci/database/models/pdb_conversion_history_entry_summary.rb', line 314

def to_s
  to_hash.to_s
end