Class: OCI::DistributedDatabase::Models::DistributedDatabase

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

Overview

Globally distributed database.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SHARDING_METHOD_ENUM =
[
  SHARDING_METHOD_USER = 'USER'.freeze,
  SHARDING_METHOD_SYSTEM = 'SYSTEM'.freeze,
  SHARDING_METHOD_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
REPLICATION_METHOD_ENUM =
[
  REPLICATION_METHOD_RAFT = 'RAFT'.freeze,
  REPLICATION_METHOD_DG = 'DG'.freeze,
  REPLICATION_METHOD_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
DB_DEPLOYMENT_TYPE_ENUM =
[
  DB_DEPLOYMENT_TYPE_EXADB_XS = 'EXADB_XS'.freeze,
  DB_DEPLOYMENT_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 = {}) ⇒ DistributedDatabase

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
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
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 313

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

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

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

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

  self.private_endpoint_ids = attributes[:'privateEndpointIds'] if attributes[:'privateEndpointIds']

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

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

  self.latest_gsm_image_details = attributes[:'latestGsmImageDetails'] if attributes[:'latestGsmImageDetails']

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

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

  self.sharding_method = attributes[:'shardingMethod'] if attributes[:'shardingMethod']

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

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

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

  self.listener_port = attributes[:'listenerPort'] if attributes[:'listenerPort']

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

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

  self.listener_port_tls = attributes[:'listenerPortTls'] if attributes[:'listenerPortTls']

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

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

  self.ons_port_local = attributes[:'onsPortLocal'] if attributes[:'onsPortLocal']

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

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

  self.ons_port_remote = attributes[:'onsPortRemote'] if attributes[:'onsPortRemote']

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

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

  self.scan_listener_port = attributes[:'scanListenerPort'] if attributes[:'scanListenerPort']

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

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

  self.replication_method = attributes[:'replicationMethod'] if attributes[:'replicationMethod']

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

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

  self.replication_factor = attributes[:'replicationFactor'] if attributes[:'replicationFactor']

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

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

  self.replication_unit = attributes[:'replicationUnit'] if attributes[:'replicationUnit']

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

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

  self.db_deployment_type = attributes[:'dbDeploymentType'] if attributes[:'dbDeploymentType']

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

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

  self.shard_details = attributes[:'shardDetails'] if attributes[:'shardDetails']

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

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

  self.catalog_details = attributes[:'catalogDetails'] if attributes[:'catalogDetails']

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

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

  self.gsm_details = attributes[:'gsmDetails'] if attributes[:'gsmDetails']

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

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

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

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

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

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

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

Instance Attribute Details

#catalog_detailsArray<OCI::DistributedDatabase::Models::DistributedDatabaseCatalog>

Collection of catalogs associated with the Globally distributed database.



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

def catalog_details
  @catalog_details
end

#character_setString

[Required] The character set for the database.

Returns:

  • (String)


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

def character_set
  @character_set
end

#chunksInteger

The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.

Returns:

  • (Integer)


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

def chunks
  @chunks
end

#compartment_idString

[Required] The OCID of the Globally distributed database compartment.

Returns:

  • (String)


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

def compartment_id
  @compartment_id
end

#connection_stringsOCI::DistributedDatabase::Models::DistributedDbConnectionString



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

def connection_strings
  @connection_strings
end

#database_versionString

[Required] Oracle Database version for the shards and catalog used in Globally distributed database.

Returns:

  • (String)


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

def database_version
  @database_version
end

#db_backup_configOCI::DistributedDatabase::Models::DistributedDbBackupConfig



162
163
164
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 162

def db_backup_config
  @db_backup_config
end

#db_deployment_typeString

[Required] The distributed database deployment type.

Returns:

  • (String)


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

def db_deployment_type
  @db_deployment_type
end

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

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

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


181
182
183
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 181

def defined_tags
  @defined_tags
end

#display_nameString

[Required] The display name of the Globally distributed database.

Returns:

  • (String)


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

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


175
176
177
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 175

def freeform_tags
  @freeform_tags
end

#gsm_detailsArray<OCI::DistributedDatabase::Models::DistributedDatabaseGsm>

Collection of catalogs associated with the Globally distributed database.



159
160
161
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 159

def gsm_details
  @gsm_details
end

#gsm_ssh_public_keyString

The SSH public key for Global service manager instances.

Returns:

  • (String)


166
167
168
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 166

def gsm_ssh_public_key
  @gsm_ssh_public_key
end

#idString

[Required] The OCID of the Globally distributed database.

Returns:

  • (String)


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

def id
  @id
end

#latest_gsm_image_detailsOCI::DistributedDatabase::Models::DistributedDbGsmImage



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

def latest_gsm_image_details
  @latest_gsm_image_details
end

#lifecycle_detailsString

[Required] The lifecycleDetails for the Globally distributed database.

Returns:

  • (String)


71
72
73
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 71

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] Lifecycle states for the Globally distributed database.

Returns:

  • (String)


67
68
69
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 67

def lifecycle_state
  @lifecycle_state
end

#listener_portInteger

[Required] The Global service manager listener port number for the Globally distributed database.

Returns:

  • (Integer)


109
110
111
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 109

def listener_port
  @listener_port
end

#listener_port_tlsInteger

The TLS listener port number for Globally distributed database.

Returns:

  • (Integer)


113
114
115
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 113

def listener_port_tls
  @listener_port_tls
end

#metadataOCI::DistributedDatabase::Models::DistributedDbMetadata



169
170
171
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 169

def 
  @metadata
end

#ncharacter_setString

[Required] The national character set for the database.

Returns:

  • (String)


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

def ncharacter_set
  @ncharacter_set
end

#ons_port_localInteger

[Required] Ons local port number.

Returns:

  • (Integer)


117
118
119
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 117

def ons_port_local
  @ons_port_local
end

#ons_port_remoteInteger

[Required] Ons remote port number.

Returns:

  • (Integer)


121
122
123
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 121

def ons_port_remote
  @ons_port_remote
end

#prefixString

[Required] Unique name prefix for the Globally distributed databases. Only alpha-numeric values are allowed. First character has to be a letter followed by any combination of letter and number.

Returns:

  • (String)


80
81
82
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 80

def prefix
  @prefix
end

#private_endpoint_idsArray<String>

[Required] The collection of OCID of the private endpoint associated with Globally distributed autonomous database.

Returns:

  • (Array<String>)


84
85
86
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 84

def private_endpoint_ids
  @private_endpoint_ids
end

#replication_factorInteger

The Replication factor for RAFT replication based Globally distributed database. Currently supported values are 3, 5 and 7.

Returns:

  • (Integer)


136
137
138
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 136

def replication_factor
  @replication_factor
end

#replication_methodString

The Replication method for Globally distributed database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.

Returns:

  • (String)


131
132
133
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 131

def replication_method
  @replication_method
end

#replication_unitInteger

The replication unit count for RAFT based distributed database. For RAFT replication based Globally distributed database, the value should be at least twice the number of shards.

Returns:

  • (Integer)


142
143
144
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 142

def replication_unit
  @replication_unit
end

#scan_listener_portInteger

The TCP Single Client Access Name (SCAN) port for Globally distributed database clusters.

Returns:

  • (Integer)


125
126
127
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 125

def scan_listener_port
  @scan_listener_port
end

#shard_detailsArray<OCI::DistributedDatabase::Models::DistributedDatabaseShard>

Collection of shards associated with the Globally distributed database.



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

def shard_details
  @shard_details
end

#sharding_methodString

[Required] Sharding Methods for the Globally distributed database.

Returns:

  • (String)


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

def sharding_method
  @sharding_method
end

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

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}

Returns:

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


187
188
189
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 187

def system_tags
  @system_tags
end

#time_createdDateTime

[Required] The time the Globally distributed database was created. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The time the Globally distributed database was last updated. An RFC3339 formatted datetime string

Returns:

  • (DateTime)


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

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'database_version': :'databaseVersion',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'connection_strings': :'connectionStrings',
    'prefix': :'prefix',
    'private_endpoint_ids': :'privateEndpointIds',
    'latest_gsm_image_details': :'latestGsmImageDetails',
    'sharding_method': :'shardingMethod',
    'character_set': :'characterSet',
    'ncharacter_set': :'ncharacterSet',
    'chunks': :'chunks',
    'listener_port': :'listenerPort',
    'listener_port_tls': :'listenerPortTls',
    'ons_port_local': :'onsPortLocal',
    'ons_port_remote': :'onsPortRemote',
    'scan_listener_port': :'scanListenerPort',
    'replication_method': :'replicationMethod',
    'replication_factor': :'replicationFactor',
    'replication_unit': :'replicationUnit',
    'db_deployment_type': :'dbDeploymentType',
    'shard_details': :'shardDetails',
    'catalog_details': :'catalogDetails',
    'gsm_details': :'gsmDetails',
    'db_backup_config': :'dbBackupConfig',
    'gsm_ssh_public_key': :'gsmSshPublicKey',
    'metadata': :'metadata',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'database_version': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'connection_strings': :'OCI::DistributedDatabase::Models::DistributedDbConnectionString',
    'prefix': :'String',
    'private_endpoint_ids': :'Array<String>',
    'latest_gsm_image_details': :'OCI::DistributedDatabase::Models::DistributedDbGsmImage',
    'sharding_method': :'String',
    'character_set': :'String',
    'ncharacter_set': :'String',
    'chunks': :'Integer',
    'listener_port': :'Integer',
    'listener_port_tls': :'Integer',
    'ons_port_local': :'Integer',
    'ons_port_remote': :'Integer',
    'scan_listener_port': :'Integer',
    'replication_method': :'String',
    'replication_factor': :'Integer',
    'replication_unit': :'Integer',
    'db_deployment_type': :'String',
    'shard_details': :'Array<OCI::DistributedDatabase::Models::DistributedDatabaseShard>',
    'catalog_details': :'Array<OCI::DistributedDatabase::Models::DistributedDatabaseCatalog>',
    'gsm_details': :'Array<OCI::DistributedDatabase::Models::DistributedDatabaseGsm>',
    'db_backup_config': :'OCI::DistributedDatabase::Models::DistributedDbBackupConfig',
    'gsm_ssh_public_key': :'String',
    'metadata': :'OCI::DistributedDatabase::Models::DistributedDbMetadata',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>'
    # 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



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 567

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

  self.class == other.class &&
    id == other.id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    database_version == other.database_version &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    connection_strings == other.connection_strings &&
    prefix == other.prefix &&
    private_endpoint_ids == other.private_endpoint_ids &&
    latest_gsm_image_details == other.latest_gsm_image_details &&
    sharding_method == other.sharding_method &&
    character_set == other.character_set &&
    ncharacter_set == other.ncharacter_set &&
    chunks == other.chunks &&
    listener_port == other.listener_port &&
    listener_port_tls == other.listener_port_tls &&
    ons_port_local == other.ons_port_local &&
    ons_port_remote == other.ons_port_remote &&
    scan_listener_port == other.scan_listener_port &&
    replication_method == other.replication_method &&
    replication_factor == other.replication_factor &&
    replication_unit == other.replication_unit &&
    db_deployment_type == other.db_deployment_type &&
    shard_details == other.shard_details &&
    catalog_details == other.catalog_details &&
    gsm_details == other.gsm_details &&
    db_backup_config == other.db_backup_config &&
    gsm_ssh_public_key == other.gsm_ssh_public_key &&
     == other. &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags
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



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 630

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


610
611
612
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 610

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



619
620
621
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 619

def hash
  [id, compartment_id, display_name, time_created, time_updated, database_version, lifecycle_state, lifecycle_details, connection_strings, prefix, private_endpoint_ids, latest_gsm_image_details, sharding_method, character_set, ncharacter_set, chunks, listener_port, listener_port_tls, ons_port_local, ons_port_remote, scan_listener_port, replication_method, replication_factor, replication_unit, db_deployment_type, shard_details, catalog_details, gsm_details, db_backup_config, gsm_ssh_public_key, , freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



663
664
665
666
667
668
669
670
671
672
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 663

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



657
658
659
# File 'lib/oci/distributed_database/models/distributed_database.rb', line 657

def to_s
  to_hash.to_s
end