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

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

Overview

Database model.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_UPGRADING = 'UPGRADING'.freeze,
  LIFECYCLE_STATE_CONVERTING = 'CONVERTING'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
HOME_TYPE_ENUM =
[
  HOME_TYPE_ORACLE_MANAGED = 'ORACLE_MANAGED'.freeze,
  HOME_TYPE_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED'.freeze,
  HOME_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Database

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/oci/database/models/database.rb', line 330

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

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

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

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

  self.db_system_id = attributes[:'dbSystemId'] if attributes[:'dbSystemId']

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

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

  self.vm_cluster_id = attributes[:'vmClusterId'] if attributes[:'vmClusterId']

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

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

  self.db_name = attributes[:'dbName'] if attributes[:'dbName']

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

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

  self.pdb_name = attributes[:'pdbName'] if attributes[:'pdbName']

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

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

  self.db_workload = attributes[:'dbWorkload'] if attributes[:'dbWorkload']

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

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

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

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

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

  self.last_backup_duration_in_seconds = attributes[:'lastBackupDurationInSeconds'] if attributes[:'lastBackupDurationInSeconds']

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

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

  self.last_failed_backup_timestamp = attributes[:'lastFailedBackupTimestamp'] if attributes[:'lastFailedBackupTimestamp']

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

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

  self.db_backup_config = attributes[:'dbBackupConfig'] if attributes[:'dbBackupConfig']

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

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

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

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

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

  self.connection_strings = attributes[:'connectionStrings'] if attributes[:'connectionStrings']

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

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

  self.kms_key_id = attributes[:'kmsKeyId'] if attributes[:'kmsKeyId']

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

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

  self.kms_key_version_id = attributes[:'kmsKeyVersionId'] if attributes[:'kmsKeyVersionId']

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

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

  self.vault_id = attributes[:'vaultId'] if attributes[:'vaultId']

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

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

  self.source_database_point_in_time_recovery_timestamp = attributes[:'sourceDatabasePointInTimeRecoveryTimestamp'] if attributes[:'sourceDatabasePointInTimeRecoveryTimestamp']

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

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

  self.database_software_image_id = attributes[:'databaseSoftwareImageId'] if attributes[:'databaseSoftwareImageId']

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

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

  self.is_cdb = attributes[:'isCdb'] unless attributes[:'isCdb'].nil?

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

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

  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']

  self.sid_prefix = attributes[:'sidPrefix'] if attributes[:'sidPrefix']

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

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

  self.key_store_id = attributes[:'keyStoreId'] if attributes[:'keyStoreId']

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

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

  self.key_store_wallet_name = attributes[:'keyStoreWalletName'] if attributes[:'keyStoreWalletName']

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

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

  self.data_guard_group = attributes[:'dataGuardGroup'] if attributes[:'dataGuardGroup']

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

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

  self.encryption_key_location_details = attributes[:'encryptionKeyLocationDetails'] if attributes[:'encryptionKeyLocationDetails']

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

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

  self.storage_size_details = attributes[:'storageSizeDetails'] if attributes[:'storageSizeDetails']

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

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

  self.managed_software_update_details = attributes[:'managedSoftwareUpdateDetails'] if attributes[:'managedSoftwareUpdateDetails']

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

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

  self.home_type = attributes[:'homeType'] if attributes[:'homeType']

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

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

  self.patch_version = attributes[:'patchVersion'] if attributes[:'patchVersion']

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

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

Instance Attribute Details

#character_setString

The character set for the database.

Returns:

  • (String)


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

def character_set
  @character_set
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


38
39
40
# File 'lib/oci/database/models/database.rb', line 38

def compartment_id
  @compartment_id
end

#connection_stringsOCI::Database::Models::DatabaseConnectionStrings

The Connection strings used to connect to the Oracle Database.



130
131
132
# File 'lib/oci/database/models/database.rb', line 130

def connection_strings
  @connection_strings
end

#data_guard_groupOCI::Database::Models::DataGuardGroup



174
175
176
# File 'lib/oci/database/models/database.rb', line 174

def data_guard_group
  @data_guard_group
end

#database_management_configOCI::Database::Models::CloudDatabaseManagementConfig



158
159
160
# File 'lib/oci/database/models/database.rb', line 158

def database_management_config
  @database_management_config
end

#database_software_image_idString

The database software image OCID

Returns:

  • (String)


151
152
153
# File 'lib/oci/database/models/database.rb', line 151

def database_software_image_id
  @database_software_image_id
end

#db_backup_configOCI::Database::Models::DbBackupConfig



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

def db_backup_config
  @db_backup_config
end

#db_home_idString

The OCID of the Database Home.

Returns:

  • (String)


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

def db_home_id
  @db_home_id
end

#db_nameString

[Required] The database name.

Returns:

  • (String)


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

def db_name
  @db_name
end

#db_system_idString

The OCID of the DB system.

Returns:

  • (String)


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

def db_system_id
  @db_system_id
end

#db_unique_nameString

[Required] A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed.

Returns:

  • (String)


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

def db_unique_name
  @db_unique_name
end

#db_workloadString

Deprecated. The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored.

The database workload type.

Returns:

  • (String)


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

def db_workload
  @db_workload
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>>)


120
121
122
# File 'lib/oci/database/models/database.rb', line 120

def defined_tags
  @defined_tags
end

#encryption_key_location_detailsOCI::Database::Models::EncryptionKeyLocationDetails



177
178
179
# File 'lib/oci/database/models/database.rb', line 177

def encryption_key_location_details
  @encryption_key_location_details
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>)


114
115
116
# File 'lib/oci/database/models/database.rb', line 114

def freeform_tags
  @freeform_tags
end

#home_typeString

Represents database will be under oracle managed home or customer managed home

Returns:

  • (String)


188
189
190
# File 'lib/oci/database/models/database.rb', line 188

def home_type
  @home_type
end

#idString

[Required] The OCID of the database.

Returns:

  • (String)


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

def id
  @id
end

#is_cdbBOOLEAN

True if the database is a container database.

Returns:

  • (BOOLEAN)


155
156
157
# File 'lib/oci/database/models/database.rb', line 155

def is_cdb
  @is_cdb
end

#key_store_idString

The OCID of the key store of Oracle Vault.

Returns:

  • (String)


167
168
169
# File 'lib/oci/database/models/database.rb', line 167

def key_store_id
  @key_store_id
end

#key_store_wallet_nameString

The wallet name for Oracle Key Vault.

Returns:

  • (String)


171
172
173
# File 'lib/oci/database/models/database.rb', line 171

def key_store_wallet_name
  @key_store_wallet_name
end

#kms_key_idString

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

Returns:

  • (String)


134
135
136
# File 'lib/oci/database/models/database.rb', line 134

def kms_key_id
  @kms_key_id
end

#kms_key_version_idString

The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous AI Database Serverless does not use key versions, hence is not applicable for Autonomous AI Database Serverless instances.

Returns:

  • (String)


139
140
141
# File 'lib/oci/database/models/database.rb', line 139

def kms_key_version_id
  @kms_key_version_id
end

#last_backup_duration_in_secondsInteger

The duration when the latest database backup created.

Returns:

  • (Integer)


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

def last_backup_duration_in_seconds
  @last_backup_duration_in_seconds
end

#last_backup_timestampDateTime

The date and time when the latest database backup was created.

Returns:

  • (DateTime)


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

def last_backup_timestamp
  @last_backup_timestamp
end

#last_failed_backup_timestampDateTime

The date and time when the latest database backup failed.

Returns:

  • (DateTime)


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

def last_failed_backup_timestamp
  @last_failed_backup_timestamp
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the database.

Returns:

  • (String)


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

def lifecycle_state
  @lifecycle_state
end

#managed_software_update_detailsOCI::Database::Models::ManagedSoftwareUpdateDetails



183
184
185
# File 'lib/oci/database/models/database.rb', line 183

def managed_software_update_details
  @managed_software_update_details
end

#ncharacter_setString

The national character set for the database.

Returns:

  • (String)


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

def ncharacter_set
  @ncharacter_set
end

#patch_versionString

The patch version of the database.

Returns:

  • (String)


192
193
194
# File 'lib/oci/database/models/database.rb', line 192

def patch_version
  @patch_version
end

#pdb_nameString

The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.

Returns:

  • (String)


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

def pdb_name
  @pdb_name
end

#sid_prefixString

Specifies a prefix for the Oracle SID of the database to be created.

Returns:

  • (String)


163
164
165
# File 'lib/oci/database/models/database.rb', line 163

def sid_prefix
  @sid_prefix
end

#source_database_point_in_time_recovery_timestampDateTime

Point in time recovery timeStamp of the source database at which cloned database system is cloned from the source database system, as described in RFC 3339

Returns:

  • (DateTime)


147
148
149
# File 'lib/oci/database/models/database.rb', line 147

def source_database_point_in_time_recovery_timestamp
  @source_database_point_in_time_recovery_timestamp
end

#storage_size_detailsOCI::Database::Models::DatabaseStorageSizeResponseDetails



180
181
182
# File 'lib/oci/database/models/database.rb', line 180

def storage_size_details
  @storage_size_details
end

#system_tagsHash<String, Hash<String, Object>>

System 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>>)


126
127
128
# File 'lib/oci/database/models/database.rb', line 126

def system_tags
  @system_tags
end

#time_createdDateTime

The date and time the database was created.

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

#vault_idString

The OCID of the Oracle Cloud Infrastructure vault. This parameter and secretId are required for Customer Managed Keys.

Returns:

  • (String)


143
144
145
# File 'lib/oci/database/models/database.rb', line 143

def vault_id
  @vault_id
end

#vm_cluster_idString

The OCID of the VM cluster.

Returns:

  • (String)


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

def vm_cluster_id
  @vm_cluster_id
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'character_set': :'characterSet',
    'ncharacter_set': :'ncharacterSet',
    'db_home_id': :'dbHomeId',
    'db_system_id': :'dbSystemId',
    'vm_cluster_id': :'vmClusterId',
    'db_name': :'dbName',
    'pdb_name': :'pdbName',
    'db_workload': :'dbWorkload',
    'db_unique_name': :'dbUniqueName',
    'lifecycle_details': :'lifecycleDetails',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated',
    'last_backup_timestamp': :'lastBackupTimestamp',
    'last_backup_duration_in_seconds': :'lastBackupDurationInSeconds',
    'last_failed_backup_timestamp': :'lastFailedBackupTimestamp',
    'db_backup_config': :'dbBackupConfig',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags',
    'connection_strings': :'connectionStrings',
    'kms_key_id': :'kmsKeyId',
    'kms_key_version_id': :'kmsKeyVersionId',
    'vault_id': :'vaultId',
    'source_database_point_in_time_recovery_timestamp': :'sourceDatabasePointInTimeRecoveryTimestamp',
    'database_software_image_id': :'databaseSoftwareImageId',
    'is_cdb': :'isCdb',
    'database_management_config': :'databaseManagementConfig',
    'sid_prefix': :'sidPrefix',
    'key_store_id': :'keyStoreId',
    'key_store_wallet_name': :'keyStoreWalletName',
    'data_guard_group': :'dataGuardGroup',
    'encryption_key_location_details': :'encryptionKeyLocationDetails',
    'storage_size_details': :'storageSizeDetails',
    'managed_software_update_details': :'managedSoftwareUpdateDetails',
    'home_type': :'homeType',
    'patch_version': :'patchVersion'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'character_set': :'String',
    'ncharacter_set': :'String',
    'db_home_id': :'String',
    'db_system_id': :'String',
    'vm_cluster_id': :'String',
    'db_name': :'String',
    'pdb_name': :'String',
    'db_workload': :'String',
    'db_unique_name': :'String',
    'lifecycle_details': :'String',
    'lifecycle_state': :'String',
    'time_created': :'DateTime',
    'last_backup_timestamp': :'DateTime',
    'last_backup_duration_in_seconds': :'Integer',
    'last_failed_backup_timestamp': :'DateTime',
    'db_backup_config': :'OCI::Database::Models::DbBackupConfig',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>',
    'connection_strings': :'OCI::Database::Models::DatabaseConnectionStrings',
    'kms_key_id': :'String',
    'kms_key_version_id': :'String',
    'vault_id': :'String',
    'source_database_point_in_time_recovery_timestamp': :'DateTime',
    'database_software_image_id': :'String',
    'is_cdb': :'BOOLEAN',
    'database_management_config': :'OCI::Database::Models::CloudDatabaseManagementConfig',
    'sid_prefix': :'String',
    'key_store_id': :'String',
    'key_store_wallet_name': :'String',
    'data_guard_group': :'OCI::Database::Models::DataGuardGroup',
    'encryption_key_location_details': :'OCI::Database::Models::EncryptionKeyLocationDetails',
    'storage_size_details': :'OCI::Database::Models::DatabaseStorageSizeResponseDetails',
    'managed_software_update_details': :'OCI::Database::Models::ManagedSoftwareUpdateDetails',
    'home_type': :'String',
    'patch_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



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/oci/database/models/database.rb', line 591

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    character_set == other.character_set &&
    ncharacter_set == other.ncharacter_set &&
    db_home_id == other.db_home_id &&
    db_system_id == other.db_system_id &&
    vm_cluster_id == other.vm_cluster_id &&
    db_name == other.db_name &&
    pdb_name == other.pdb_name &&
    db_workload == other.db_workload &&
    db_unique_name == other.db_unique_name &&
    lifecycle_details == other.lifecycle_details &&
    lifecycle_state == other.lifecycle_state &&
    time_created == other.time_created &&
    last_backup_timestamp == other.last_backup_timestamp &&
    last_backup_duration_in_seconds == other.last_backup_duration_in_seconds &&
    last_failed_backup_timestamp == other.last_failed_backup_timestamp &&
    db_backup_config == other.db_backup_config &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags &&
    connection_strings == other.connection_strings &&
    kms_key_id == other.kms_key_id &&
    kms_key_version_id == other.kms_key_version_id &&
    vault_id == other.vault_id &&
    source_database_point_in_time_recovery_timestamp == other.source_database_point_in_time_recovery_timestamp &&
    database_software_image_id == other.database_software_image_id &&
    is_cdb == other.is_cdb &&
    database_management_config == other.database_management_config &&
    sid_prefix == other.sid_prefix &&
    key_store_id == other.key_store_id &&
    key_store_wallet_name == other.key_store_wallet_name &&
    data_guard_group == other.data_guard_group &&
    encryption_key_location_details == other.encryption_key_location_details &&
    storage_size_details == other.storage_size_details &&
    managed_software_update_details == other.managed_software_update_details &&
    home_type == other.home_type &&
    patch_version == other.patch_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



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/oci/database/models/database.rb', line 658

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


638
639
640
# File 'lib/oci/database/models/database.rb', line 638

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



647
648
649
# File 'lib/oci/database/models/database.rb', line 647

def hash
  [id, compartment_id, character_set, ncharacter_set, db_home_id, db_system_id, vm_cluster_id, db_name, pdb_name, db_workload, db_unique_name, lifecycle_details, lifecycle_state, time_created, last_backup_timestamp, last_backup_duration_in_seconds, last_failed_backup_timestamp, db_backup_config, freeform_tags, defined_tags, system_tags, connection_strings, kms_key_id, kms_key_version_id, vault_id, source_database_point_in_time_recovery_timestamp, database_software_image_id, is_cdb, database_management_config, sid_prefix, key_store_id, key_store_wallet_name, data_guard_group, encryption_key_location_details, storage_size_details, managed_software_update_details, home_type, patch_version].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



691
692
693
694
695
696
697
698
699
700
# File 'lib/oci/database/models/database.rb', line 691

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



685
686
687
# File 'lib/oci/database/models/database.rb', line 685

def to_s
  to_hash.to_s
end