Class: OCI::Database::Models::ExternalContainerDatabase

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

Overview

An Oracle Cloud Infrastructure resource that allows you to manage an external container database.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_NOT_CONNECTED = 'NOT_CONNECTED'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
DATABASE_EDITION_ENUM =
[
  DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = 'ENTERPRISE_EDITION_HIGH_PERFORMANCE'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE'.freeze,
  DATABASE_EDITION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExternalContainerDatabase

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :display_name (String)

    The value to assign to the #display_name property

  • :id (String)

    The value to assign to the #id 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_created (DateTime)

    The value to assign to the #time_created property

  • :db_unique_name (String)

    The value to assign to the #db_unique_name property

  • :db_id (String)

    The value to assign to the #db_id property

  • :database_version (String)

    The value to assign to the #database_version property

  • :database_edition (String)

    The value to assign to the #database_edition property

  • :time_zone (String)

    The value to assign to the #time_zone property

  • :character_set (String)

    The value to assign to the #character_set property

  • :ncharacter_set (String)

    The value to assign to the #ncharacter_set property

  • :db_packs (String)

    The value to assign to the #db_packs property

  • :database_management_config (OCI::Database::Models::DatabaseManagementConfig)

    The value to assign to the #database_management_config property



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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/oci/database/models/external_container_database.rb', line 183

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

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

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

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

  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_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName']

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

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

  self.db_id = attributes[:'dbId'] if attributes[:'dbId']

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

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

  self.database_version = attributes[:'databaseVersion'] if attributes[:'databaseVersion']

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

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

  self.database_edition = attributes[:'databaseEdition'] if attributes[:'databaseEdition']

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

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

  self.time_zone = attributes[:'timeZone'] if attributes[:'timeZone']

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

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

  self.character_set = attributes[:'characterSet'] if attributes[:'characterSet']

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

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

  self.ncharacter_set = attributes[:'ncharacterSet'] if attributes[:'ncharacterSet']

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

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

  self.db_packs = attributes[:'dbPacks'] if attributes[:'dbPacks']

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

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

  self.database_management_config = attributes[:'databaseManagementConfig'] if attributes[:'databaseManagementConfig']

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

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

Instance Attribute Details

#character_setString

The character set of the external database.

Returns:

  • (String)


97
98
99
# File 'lib/oci/database/models/external_container_database.rb', line 97

def character_set
  @character_set
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


33
34
35
# File 'lib/oci/database/models/external_container_database.rb', line 33

def compartment_id
  @compartment_id
end

#database_editionString

The Oracle Database edition.

Returns:

  • (String)


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

def database_edition
  @database_edition
end

#database_management_configOCI::Database::Models::DatabaseManagementConfig



108
109
110
# File 'lib/oci/database/models/external_container_database.rb', line 108

def database_management_config
  @database_management_config
end

#database_versionString

The Oracle Database version.

Returns:

  • (String)


81
82
83
# File 'lib/oci/database/models/external_container_database.rb', line 81

def database_version
  @database_version
end

#db_idString

The Oracle Database ID, which identifies an Oracle Database located outside of Oracle Cloud.

Returns:

  • (String)


77
78
79
# File 'lib/oci/database/models/external_container_database.rb', line 77

def db_id
  @db_id
end

#db_packsString

The database packs licensed for the external Oracle Database.

Returns:

  • (String)


105
106
107
# File 'lib/oci/database/models/external_container_database.rb', line 105

def db_packs
  @db_packs
end

#db_unique_nameString

The DB_UNIQUE_NAME of the external database.

Returns:

  • (String)


72
73
74
# File 'lib/oci/database/models/external_container_database.rb', line 72

def db_unique_name
  @db_unique_name
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Returns:

  • (Hash<String, Hash<String, Object>>)


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

def defined_tags
  @defined_tags
end

#display_nameString

[Required] The user-friendly name for the external database. The name does not have to be unique.

Returns:

  • (String)


51
52
53
# File 'lib/oci/database/models/external_container_database.rb', line 51

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


41
42
43
# File 'lib/oci/database/models/external_container_database.rb', line 41

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the Oracle Cloud Infrastructure external database resource.

Returns:

  • (String)


56
57
58
# File 'lib/oci/database/models/external_container_database.rb', line 56

def id
  @id
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


60
61
62
# File 'lib/oci/database/models/external_container_database.rb', line 60

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the Oracle Cloud Infrastructure external database resource.

Returns:

  • (String)


64
65
66
# File 'lib/oci/database/models/external_container_database.rb', line 64

def lifecycle_state
  @lifecycle_state
end

#ncharacter_setString

The national character of the external database.

Returns:

  • (String)


101
102
103
# File 'lib/oci/database/models/external_container_database.rb', line 101

def ncharacter_set
  @ncharacter_set
end

#time_createdDateTime

[Required] The date and time the database was created.

Returns:

  • (DateTime)


68
69
70
# File 'lib/oci/database/models/external_container_database.rb', line 68

def time_created
  @time_created
end

#time_zoneString

The time zone of the external database. It is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name, depending on how the time zone value was specified when the database was created / last altered.

Returns:

  • (String)


93
94
95
# File 'lib/oci/database/models/external_container_database.rb', line 93

def time_zone
  @time_zone
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'display_name': :'displayName',
    'id': :'id',
    'lifecycle_details': :'lifecycleDetails',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated',
    'db_unique_name': :'dbUniqueName',
    'db_id': :'dbId',
    'database_version': :'databaseVersion',
    'database_edition': :'databaseEdition',
    'time_zone': :'timeZone',
    'character_set': :'characterSet',
    'ncharacter_set': :'ncharacterSet',
    'db_packs': :'dbPacks',
    'database_management_config': :'databaseManagementConfig'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/oci/database/models/external_container_database.rb', line 136

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'display_name': :'String',
    'id': :'String',
    'lifecycle_details': :'String',
    'lifecycle_state': :'String',
    'time_created': :'DateTime',
    'db_unique_name': :'String',
    'db_id': :'String',
    'database_version': :'String',
    'database_edition': :'String',
    'time_zone': :'String',
    'character_set': :'String',
    'ncharacter_set': :'String',
    'db_packs': :'String',
    'database_management_config': :'OCI::Database::Models::DatabaseManagementConfig'
    # 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



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/oci/database/models/external_container_database.rb', line 318

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

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    display_name == other.display_name &&
    id == other.id &&
    lifecycle_details == other.lifecycle_details &&
    lifecycle_state == other.lifecycle_state &&
    time_created == other.time_created &&
    db_unique_name == other.db_unique_name &&
    db_id == other.db_id &&
    database_version == other.database_version &&
    database_edition == other.database_edition &&
    time_zone == other.time_zone &&
    character_set == other.character_set &&
    ncharacter_set == other.ncharacter_set &&
    db_packs == other.db_packs &&
    database_management_config == other.database_management_config
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



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/oci/database/models/external_container_database.rb', line 364

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


344
345
346
# File 'lib/oci/database/models/external_container_database.rb', line 344

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



353
354
355
# File 'lib/oci/database/models/external_container_database.rb', line 353

def hash
  [compartment_id, freeform_tags, defined_tags, display_name, id, lifecycle_details, lifecycle_state, time_created, db_unique_name, db_id, database_version, database_edition, time_zone, character_set, ncharacter_set, db_packs, database_management_config].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



397
398
399
400
401
402
403
404
405
406
# File 'lib/oci/database/models/external_container_database.rb', line 397

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



391
392
393
# File 'lib/oci/database/models/external_container_database.rb', line 391

def to_s
  to_hash.to_s
end