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

Inherits:
LaunchDbSystemBase show all
Defined in:
lib/oci/database/models/launch_db_system_from_db_system_details.rb

Overview

Used for creating a new database system by cloning an existing DB system.

Constant Summary collapse

LICENSE_MODEL_ENUM =
[
  LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
  LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
].freeze

Constants inherited from LaunchDbSystemBase

OCI::Database::Models::LaunchDbSystemBase::SOURCE_ENUM, OCI::Database::Models::LaunchDbSystemBase::STORAGE_VOLUME_PERFORMANCE_MODE_ENUM

Instance Attribute Summary collapse

Attributes inherited from LaunchDbSystemBase

#availability_domain, #backup_network_nsg_ids, #backup_subnet_id, #cluster_name, #compartment_id, #cpu_core_count, #data_collection_options, #data_storage_percentage, #db_system_options, #defined_tags, #display_name, #domain, #fault_domains, #freeform_tags, #hostname, #initial_data_storage_size_in_gb, #kms_key_id, #kms_key_version_id, #node_count, #nsg_ids, #private_ip, #private_ip_v6, #security_attributes, #shape, #source, #sparse_diskgroup, #ssh_public_keys, #storage_volume_performance_mode, #subnet_id, #time_zone

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LaunchDbSystemBase

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ LaunchDbSystemFromDbSystemDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 151

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

  attributes['source'] = 'DB_SYSTEM'

  super(attributes)

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

  self.source_db_system_id = attributes[:'sourceDbSystemId'] if attributes[:'sourceDbSystemId']

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

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

  self.db_home = attributes[:'dbHome'] if attributes[:'dbHome']

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

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

  self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']

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

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

Instance Attribute Details

#db_homeOCI::Database::Models::CreateDbHomeFromDbSystemDetails

This attribute is required.



24
25
26
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 24

def db_home
  @db_home
end

#license_modelString

The Oracle license model that applies to all the databases on the DB system. The default is LICENSE_INCLUDED.

Returns:

  • (String)


29
30
31
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 29

def license_model
  @license_model
end

#source_db_system_idString

[Required] The OCID of the DB system.

Returns:

  • (String)


20
21
22
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 20

def source_db_system_id
  @source_db_system_id
end

Class Method Details

.attribute_mapObject

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



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 32

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'fault_domains': :'faultDomains',
    'display_name': :'displayName',
    'availability_domain': :'availabilityDomain',
    'subnet_id': :'subnetId',
    'backup_subnet_id': :'backupSubnetId',
    'nsg_ids': :'nsgIds',
    'backup_network_nsg_ids': :'backupNetworkNsgIds',
    'shape': :'shape',
    'time_zone': :'timeZone',
    'db_system_options': :'dbSystemOptions',
    'storage_volume_performance_mode': :'storageVolumePerformanceMode',
    'sparse_diskgroup': :'sparseDiskgroup',
    'ssh_public_keys': :'sshPublicKeys',
    'hostname': :'hostname',
    'domain': :'domain',
    'cpu_core_count': :'cpuCoreCount',
    'cluster_name': :'clusterName',
    'data_storage_percentage': :'dataStoragePercentage',
    'initial_data_storage_size_in_gb': :'initialDataStorageSizeInGB',
    'kms_key_id': :'kmsKeyId',
    'kms_key_version_id': :'kmsKeyVersionId',
    'node_count': :'nodeCount',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'security_attributes': :'securityAttributes',
    'source': :'source',
    'private_ip': :'privateIp',
    'private_ip_v6': :'privateIpV6',
    'data_collection_options': :'dataCollectionOptions',
    'source_db_system_id': :'sourceDbSystemId',
    'db_home': :'dbHome',
    'license_model': :'licenseModel'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
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
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 73

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'fault_domains': :'Array<String>',
    'display_name': :'String',
    'availability_domain': :'String',
    'subnet_id': :'String',
    'backup_subnet_id': :'String',
    'nsg_ids': :'Array<String>',
    'backup_network_nsg_ids': :'Array<String>',
    'shape': :'String',
    'time_zone': :'String',
    'db_system_options': :'OCI::Database::Models::DbSystemOptions',
    'storage_volume_performance_mode': :'String',
    'sparse_diskgroup': :'BOOLEAN',
    'ssh_public_keys': :'Array<String>',
    'hostname': :'String',
    'domain': :'String',
    'cpu_core_count': :'Integer',
    'cluster_name': :'String',
    'data_storage_percentage': :'Integer',
    'initial_data_storage_size_in_gb': :'Integer',
    'kms_key_id': :'String',
    'kms_key_version_id': :'String',
    'node_count': :'Integer',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'security_attributes': :'Hash<String, Hash<String, Object>>',
    'source': :'String',
    'private_ip': :'String',
    'private_ip_v6': :'String',
    'data_collection_options': :'OCI::Database::Models::DataCollectionOptions',
    'source_db_system_id': :'String',
    'db_home': :'OCI::Database::Models::CreateDbHomeFromDbSystemDetails',
    'license_model': :'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



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

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

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    fault_domains == other.fault_domains &&
    display_name == other.display_name &&
    availability_domain == other.availability_domain &&
    subnet_id == other.subnet_id &&
    backup_subnet_id == other.backup_subnet_id &&
    nsg_ids == other.nsg_ids &&
    backup_network_nsg_ids == other.backup_network_nsg_ids &&
    shape == other.shape &&
    time_zone == other.time_zone &&
    db_system_options == other.db_system_options &&
    storage_volume_performance_mode == other.storage_volume_performance_mode &&
    sparse_diskgroup == other.sparse_diskgroup &&
    ssh_public_keys == other.ssh_public_keys &&
    hostname == other.hostname &&
    domain == other.domain &&
    cpu_core_count == other.cpu_core_count &&
    cluster_name == other.cluster_name &&
    data_storage_percentage == other.data_storage_percentage &&
    initial_data_storage_size_in_gb == other.initial_data_storage_size_in_gb &&
    kms_key_id == other.kms_key_id &&
    kms_key_version_id == other.kms_key_version_id &&
    node_count == other.node_count &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    security_attributes == other.security_attributes &&
    source == other.source &&
    private_ip == other.private_ip &&
    private_ip_v6 == other.private_ip_v6 &&
    data_collection_options == other.data_collection_options &&
    source_db_system_id == other.source_db_system_id &&
    db_home == other.db_home &&
    license_model == other.license_model
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



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 257

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


237
238
239
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 237

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



246
247
248
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 246

def hash
  [compartment_id, fault_domains, display_name, availability_domain, subnet_id, backup_subnet_id, nsg_ids, backup_network_nsg_ids, shape, time_zone, db_system_options, storage_volume_performance_mode, sparse_diskgroup, ssh_public_keys, hostname, domain, cpu_core_count, cluster_name, data_storage_percentage, initial_data_storage_size_in_gb, kms_key_id, kms_key_version_id, node_count, freeform_tags, defined_tags, security_attributes, source, private_ip, private_ip_v6, data_collection_options, source_db_system_id, db_home, license_model].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



290
291
292
293
294
295
296
297
298
299
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 290

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



284
285
286
# File 'lib/oci/database/models/launch_db_system_from_db_system_details.rb', line 284

def to_s
  to_hash.to_s
end