Class: OCI::GloballyDistributedDatabase::Models::CreateDedicatedCatalogDetail

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

Overview

Details required for creation of ATP-D based catalog.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDedicatedCatalogDetail

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



81
82
83
84
85
86
87
88
89
90
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
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 81

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.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 the catalog database.

Returns:

  • (String)


16
17
18
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_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)


32
33
34
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 32

def cloud_autonomous_vm_cluster_id
  @cloud_autonomous_vm_cluster_id
end

#compute_countFloat

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

Returns:

  • (Float)


20
21
22
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_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 catalog database.

Returns:

  • (Float)


24
25
26
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_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_catalog_detail.rb', line 12

def encryption_key_details
  @encryption_key_details
end

#is_auto_scaling_enabledBOOLEAN

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

Returns:

  • (BOOLEAN)


28
29
30
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 28

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)


36
37
38
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 36

def peer_cloud_autonomous_vm_cluster_id
  @peer_cloud_autonomous_vm_cluster_id
end

Class Method Details

.attribute_mapObject

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



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 39

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'encryption_key_details': :'encryptionKeyDetails',
    'admin_password': :'adminPassword',
    'compute_count': :'computeCount',
    'data_storage_size_in_gbs': :'dataStorageSizeInGbs',
    '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.



54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 54

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



137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 137

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 &&
    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



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 173

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


153
154
155
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 153

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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

def hash
  [encryption_key_details, admin_password, compute_count, data_storage_size_in_gbs, 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



206
207
208
209
210
211
212
213
214
215
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 206

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



200
201
202
# File 'lib/oci/globally_distributed_database/models/create_dedicated_catalog_detail.rb', line 200

def to_s
  to_hash.to_s
end