Class: OCI::GloballyDistributedDatabase::Models::CreateDedicatedShardDetail

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

Overview

Details required for creation of ATP-D based shard.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDedicatedShardDetail

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



91
92
93
94
95
96
97
98
99
100
101
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
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 91

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

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

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

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

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

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

  self.data_storage_size_in_gbs = attributes[:'dataStorageSizeInGbs'] if attributes[:'dataStorageSizeInGbs']

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

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

  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.is_auto_scaling_enabled = attributes[:'isAutoScalingEnabled'] unless attributes[:'isAutoScalingEnabled'].nil?

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

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

  self.cloud_autonomous_vm_cluster_id = attributes[:'cloudAutonomousVmClusterId'] if attributes[:'cloudAutonomousVmClusterId']

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

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

  self.peer_cloud_autonomous_vm_cluster_id = attributes[:'peerCloudAutonomousVmClusterId'] if attributes[:'peerCloudAutonomousVmClusterId']

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

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

Instance Attribute Details

#admin_passwordString

[Required] Admin password for shard database.

Returns:

  • (String)


16
17
18
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 16

def admin_password
  @admin_password
end

#cloud_autonomous_vm_cluster_idString

[Required] The OCID of the cloud Autonomous Exadata VM Cluster.

Returns:

  • (String)


39
40
41
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 39

def cloud_autonomous_vm_cluster_id
  @cloud_autonomous_vm_cluster_id
end

#compute_countFloat

[Required] The compute count for the shard database. It has to be in multiples of 2.

Returns:

  • (Float)


20
21
22
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 20

def compute_count
  @compute_count
end

#data_storage_size_in_gbsFloat

[Required] The data disk group size to be allocated in GBs for the shard database.

Returns:

  • (Float)


24
25
26
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 24

def data_storage_size_in_gbs
  @data_storage_size_in_gbs
end

#encryption_key_detailsOCI::GloballyDistributedDatabase::Models::DedicatedShardOrCatalogEncryptionKeyDetails



12
13
14
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 12

def encryption_key_details
  @encryption_key_details
end

#is_auto_scaling_enabledBOOLEAN

[Required] Determines the auto-scaling mode for the shard database.

Returns:

  • (BOOLEAN)


35
36
37
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 35

def is_auto_scaling_enabled
  @is_auto_scaling_enabled
end

#peer_cloud_autonomous_vm_cluster_idString

The OCID of the peer cloud Autonomous Exadata VM Cluster.

Returns:

  • (String)


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

def peer_cloud_autonomous_vm_cluster_id
  @peer_cloud_autonomous_vm_cluster_id
end

#shard_spaceString

The shard space name for the shard database. Shard space for existing shard cannot be changed, once shard is created. Shard space name shall be used while creation of new shards. For User defined sharding, every shard must have a unique shard space name. For system defined sharding, shard space name is not required.

Returns:

  • (String)


31
32
33
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 31

def shard_space
  @shard_space
end

Class Method Details

.attribute_mapObject

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



46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 46

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'encryption_key_details': :'encryptionKeyDetails',
    'admin_password': :'adminPassword',
    'compute_count': :'computeCount',
    'data_storage_size_in_gbs': :'dataStorageSizeInGbs',
    'shard_space': :'shardSpace',
    'is_auto_scaling_enabled': :'isAutoScalingEnabled',
    'cloud_autonomous_vm_cluster_id': :'cloudAutonomousVmClusterId',
    'peer_cloud_autonomous_vm_cluster_id': :'peerCloudAutonomousVmClusterId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 62

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'encryption_key_details': :'OCI::GloballyDistributedDatabase::Models::DedicatedShardOrCatalogEncryptionKeyDetails',
    'admin_password': :'String',
    'compute_count': :'Float',
    'data_storage_size_in_gbs': :'Float',
    'shard_space': :'String',
    'is_auto_scaling_enabled': :'BOOLEAN',
    'cloud_autonomous_vm_cluster_id': :'String',
    'peer_cloud_autonomous_vm_cluster_id': :'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



153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 153

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

  self.class == other.class &&
    encryption_key_details == other.encryption_key_details &&
    admin_password == other.admin_password &&
    compute_count == other.compute_count &&
    data_storage_size_in_gbs == other.data_storage_size_in_gbs &&
    shard_space == other.shard_space &&
    is_auto_scaling_enabled == other.is_auto_scaling_enabled &&
    cloud_autonomous_vm_cluster_id == other.cloud_autonomous_vm_cluster_id &&
    peer_cloud_autonomous_vm_cluster_id == other.peer_cloud_autonomous_vm_cluster_id
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



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 190

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


170
171
172
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 170

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



179
180
181
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 179

def hash
  [encryption_key_details, admin_password, compute_count, data_storage_size_in_gbs, shard_space, is_auto_scaling_enabled, cloud_autonomous_vm_cluster_id, peer_cloud_autonomous_vm_cluster_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



223
224
225
226
227
228
229
230
231
232
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 223

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



217
218
219
# File 'lib/oci/globally_distributed_database/models/create_dedicated_shard_detail.rb', line 217

def to_s
  to_hash.to_s
end