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

Inherits:
CreateDistributedDatabaseShardDetails show all
Defined in:
lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb

Overview

Globally distributed database shard based on ExaDbXs.

Constant Summary

Constants inherited from CreateDistributedDatabaseShardDetails

OCI::DistributedDatabase::Models::CreateDistributedDatabaseShardDetails::SOURCE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreateDistributedDatabaseShardDetails

#source

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreateDistributedDatabaseShardDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreateDistributedDatabaseShardWithExadbXsNewVaultAndClusterDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 102

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

  attributes['source'] = 'NEW_VAULT_AND_CLUSTER'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.admin_password = attributes[:'adminPassword'] if attributes[:'adminPassword']

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

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

  self.peer_details = attributes[:'peerDetails'] if attributes[:'peerDetails']

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

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

  self.shard_space = attributes[:'shardSpace'] if attributes[:'shardSpace']

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

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

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

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

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

  self.db_storage_vault_details = attributes[:'dbStorageVaultDetails'] if attributes[:'dbStorageVaultDetails']

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

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

  self.vm_cluster_details = attributes[:'vmClusterDetails'] if attributes[:'vmClusterDetails']

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

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

Instance Attribute Details

#admin_passwordString

[Required] The admin password for the shard associated with Globally distributed database.

Returns:

  • (String)


14
15
16
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 14

def admin_password
  @admin_password
end

#availability_domainString

[Required] The name of the availability domain that the distributed database shard will be located in.

Returns:

  • (String)


41
42
43
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 41

def availability_domain
  @availability_domain
end

#db_storage_vault_detailsOCI::DistributedDatabase::Models::DbStorageVaultDetails

This attribute is required.



45
46
47
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 45

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


32
33
34
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 32

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.

Returns:

  • (String)


37
38
39
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 37

def kms_key_version_id
  @kms_key_version_id
end

#peer_detailsArray<OCI::DistributedDatabase::Models::CreateShardPeerWithExadbXsNewVaultAndClusterDetails>

The details required for creation of the peer for the ExadbXs infrastructure based shard.



18
19
20
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 18

def peer_details
  @peer_details
end

#shard_spaceString

The shard space name for the Globally distributed database. Shard space for existing shard cannot be changed, once shard is created. Shard space name shall be used while creation of new shards.

Returns:

  • (String)


24
25
26
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 24

def shard_space
  @shard_space
end

#vault_idString

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

Returns:

  • (String)


28
29
30
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 28

def vault_id
  @vault_id
end

#vm_cluster_detailsOCI::DistributedDatabase::Models::VmClusterDetails

This attribute is required.



49
50
51
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 49

def vm_cluster_details
  @vm_cluster_details
end

Class Method Details

.attribute_mapObject

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



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 52

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'source': :'source',
    'admin_password': :'adminPassword',
    'peer_details': :'peerDetails',
    'shard_space': :'shardSpace',
    'vault_id': :'vaultId',
    'kms_key_id': :'kmsKeyId',
    'kms_key_version_id': :'kmsKeyVersionId',
    'availability_domain': :'availabilityDomain',
    'db_storage_vault_details': :'dbStorageVaultDetails',
    'vm_cluster_details': :'vmClusterDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 70

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'source': :'String',
    'admin_password': :'String',
    'peer_details': :'Array<OCI::DistributedDatabase::Models::CreateShardPeerWithExadbXsNewVaultAndClusterDetails>',
    'shard_space': :'String',
    'vault_id': :'String',
    'kms_key_id': :'String',
    'kms_key_version_id': :'String',
    'availability_domain': :'String',
    'db_storage_vault_details': :'OCI::DistributedDatabase::Models::DbStorageVaultDetails',
    'vm_cluster_details': :'OCI::DistributedDatabase::Models::VmClusterDetails'
    # 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



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 174

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

  self.class == other.class &&
    source == other.source &&
    admin_password == other.admin_password &&
    peer_details == other.peer_details &&
    shard_space == other.shard_space &&
    vault_id == other.vault_id &&
    kms_key_id == other.kms_key_id &&
    kms_key_version_id == other.kms_key_version_id &&
    availability_domain == other.availability_domain &&
    db_storage_vault_details == other.db_storage_vault_details &&
    vm_cluster_details == other.vm_cluster_details
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



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 213

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


193
194
195
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 193

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



202
203
204
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 202

def hash
  [source, admin_password, peer_details, shard_space, vault_id, kms_key_id, kms_key_version_id, availability_domain, db_storage_vault_details, vm_cluster_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



246
247
248
249
250
251
252
253
254
255
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 246

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



240
241
242
# File 'lib/oci/distributed_database/models/create_distributed_database_shard_with_exadb_xs_new_vault_and_cluster_details.rb', line 240

def to_s
  to_hash.to_s
end