Class: OCI::Database::Models::CreateDataGuardAssociationWithNewDbSystemDetails

Inherits:
CreateDataGuardAssociationDetails show all
Defined in:
lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb

Overview

The configuration details for creating a Data Guard association for a virtual machine DB system database. For this type of DB system database, the `creationType` should be `NewDbSystem`. A new DB system will be launched to create the standby database.

To create a Data Guard association for a database in a bare metal or Exadata DB system, use the create_data_guard_association_to_existing_db_system_details subtype instead.

Constant Summary collapse

STORAGE_VOLUME_PERFORMANCE_MODE_ENUM =
[
  STORAGE_VOLUME_PERFORMANCE_MODE_BALANCED = 'BALANCED'.freeze,
  STORAGE_VOLUME_PERFORMANCE_MODE_HIGH_PERFORMANCE = 'HIGH_PERFORMANCE'.freeze
].freeze
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 CreateDataGuardAssociationDetails

OCI::Database::Models::CreateDataGuardAssociationDetails::PROTECTION_MODE_ENUM, OCI::Database::Models::CreateDataGuardAssociationDetails::TRANSPORT_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreateDataGuardAssociationDetails

#creation_type, #database_admin_password, #database_software_image_id, #is_active_data_guard_enabled, #peer_db_unique_name, #peer_sid_prefix, #protection_mode, #transport_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreateDataGuardAssociationDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreateDataGuardAssociationWithNewDbSystemDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :database_software_image_id (String)

    The value to assign to the #database_software_image_id proprety

  • :database_admin_password (String)

    The value to assign to the #database_admin_password proprety

  • :protection_mode (String)

    The value to assign to the #protection_mode proprety

  • :transport_type (String)

    The value to assign to the #transport_type proprety

  • :is_active_data_guard_enabled (BOOLEAN)

    The value to assign to the #is_active_data_guard_enabled proprety

  • :peer_db_unique_name (String)

    The value to assign to the #peer_db_unique_name proprety

  • :peer_sid_prefix (String)

    The value to assign to the #peer_sid_prefix proprety

  • :display_name (String)

    The value to assign to the #display_name property

  • :availability_domain (String)

    The value to assign to the #availability_domain property

  • :shape (String)

    The value to assign to the #shape property

  • :cpu_core_count (Integer)

    The value to assign to the #cpu_core_count property

  • :storage_volume_performance_mode (String)

    The value to assign to the #storage_volume_performance_mode property

  • :node_count (Integer)

    The value to assign to the #node_count property

  • :subnet_id (String)

    The value to assign to the #subnet_id property

  • :nsg_ids (Array<String>)

    The value to assign to the #nsg_ids property

  • :backup_network_nsg_ids (Array<String>)

    The value to assign to the #backup_network_nsg_ids property

  • :hostname (String)

    The value to assign to the #hostname property

  • :time_zone (String)

    The value to assign to the #time_zone property

  • :fault_domains (Array<String>)

    The value to assign to the #fault_domains property

  • :private_ip (String)

    The value to assign to the #private_ip property

  • :license_model (String)

    The value to assign to the #license_model property

  • :db_system_freeform_tags (Hash<String, String>)

    The value to assign to the #db_system_freeform_tags property

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

    The value to assign to the #db_system_defined_tags property

  • :database_freeform_tags (Hash<String, String>)

    The value to assign to the #database_freeform_tags property

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

    The value to assign to the #database_defined_tags property



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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
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
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 244

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

  attributes['creationType'] = 'NewDbSystem'

  super(attributes)

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

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

  self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']

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

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

  self.storage_volume_performance_mode = attributes[:'storageVolumePerformanceMode'] if attributes[:'storageVolumePerformanceMode']
  self.storage_volume_performance_mode = "BALANCED" if storage_volume_performance_mode.nil? && !attributes.key?(:'storageVolumePerformanceMode') # rubocop:disable Style/StringLiterals

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

  self.storage_volume_performance_mode = attributes[:'storage_volume_performance_mode'] if attributes[:'storage_volume_performance_mode']
  self.storage_volume_performance_mode = "BALANCED" if storage_volume_performance_mode.nil? && !attributes.key?(:'storageVolumePerformanceMode') && !attributes.key?(:'storage_volume_performance_mode') # rubocop:disable Style/StringLiterals

  self.node_count = attributes[:'nodeCount'] if attributes[:'nodeCount']

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

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

  self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId']

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

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

  self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds']

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

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

  self.backup_network_nsg_ids = attributes[:'backupNetworkNsgIds'] if attributes[:'backupNetworkNsgIds']

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

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

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

  self.time_zone = attributes[:'timeZone'] if attributes[:'timeZone']

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

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

  self.fault_domains = attributes[:'faultDomains'] if attributes[:'faultDomains']

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

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

  self.private_ip = attributes[:'privateIp'] if attributes[:'privateIp']

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

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

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

  self.db_system_freeform_tags = attributes[:'dbSystemFreeformTags'] if attributes[:'dbSystemFreeformTags']

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

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

  self.db_system_defined_tags = attributes[:'dbSystemDefinedTags'] if attributes[:'dbSystemDefinedTags']

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

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

  self.database_freeform_tags = attributes[:'databaseFreeformTags'] if attributes[:'databaseFreeformTags']

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

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

  self.database_defined_tags = attributes[:'databaseDefinedTags'] if attributes[:'databaseDefinedTags']

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

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

Instance Attribute Details

#availability_domainString

The name of the availability domain that the standby database DB system will be located in. For example- "Uocm:PHX-AD-1".

Returns:

  • (String)


30
31
32
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 30

def availability_domain
  @availability_domain
end

#backup_network_nsg_idsArray<String>

A list of the [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network security groups (NSGs) that the backup network of this DB system belongs to. Setting this to an empty array after the list is created removes the resource from all NSGs. For more information about NSGs, see [Security Rules](docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). Applicable only to Exadata systems.

Returns:

  • (Array<String>)


75
76
77
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 75

def backup_network_nsg_ids
  @backup_network_nsg_ids
end

#cpu_core_countInteger

The number of OCPU cores available for AMD-based virtual machine DB systems.

Returns:

  • (Integer)


42
43
44
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 42

def cpu_core_count
  @cpu_core_count
end

#database_defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).

Returns:

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


143
144
145
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 143

def database_defined_tags
  @database_defined_tags
end

#database_freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).

Example: `"Finance"`

Returns:

  • (Hash<String, String>)


137
138
139
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 137

def database_freeform_tags
  @database_freeform_tags
end

#db_system_defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).

Returns:

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


129
130
131
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 129

def db_system_defined_tags
  @db_system_defined_tags
end

#db_system_freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).

Example: `"Finance"`

Returns:

  • (Hash<String, String>)


123
124
125
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 123

def db_system_freeform_tags
  @db_system_freeform_tags
end

#display_nameString

The user-friendly name of the DB system that will contain the the standby database. The display name does not have to be unique.

Returns:

  • (String)


26
27
28
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 26

def display_name
  @display_name
end

#fault_domainsArray<String>

A Fault Domain is a grouping of hardware and infrastructure within an availability domain. Fault Domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or maintenance that affects one Fault Domain does not affect DB systems in other Fault Domains.

If you do not specify the Fault Domain, the system selects one for you. To change the Fault Domain for a DB system, terminate it and launch a new DB system in the preferred Fault Domain.

If the node count is greater than 1, you can specify which Fault Domains these nodes will be distributed into. The system assigns your nodes automatically to the Fault Domains you specify so that no Fault Domain contains more than one node.

To get a list of Fault Domains, use the list_fault_domains operation in the Identity and Access Management Service API.

Example: `FAULT-DOMAIN-1`

Returns:

  • (Array<String>)


104
105
106
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 104

def fault_domains
  @fault_domains
end

#hostnameString

The hostname for the DB node.

Returns:

  • (String)


79
80
81
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 79

def hostname
  @hostname
end

#license_modelString

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

Returns:

  • (String)


115
116
117
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 115

def license_model
  @license_model
end

#node_countInteger

The number of nodes to launch for the DB system of the standby in the Data Guard association. For a 2-node RAC virtual machine DB system, specify either 1 or 2. If you do not supply this parameter, the default is the node count of the primary DB system.

Returns:

  • (Integer)


52
53
54
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 52

def node_count
  @node_count
end

#nsg_idsArray<String>

The list of [OCIDs](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) for the network security groups (NSGs) to which this resource belongs. Setting this to an empty list removes all resources from all NSGs. For more information about NSGs, see [Security Rules](docs.cloud.oracle.com/Content/Network/Concepts/securityrules.htm). **NsgIds restrictions:**

  • A network security group (NSG) is optional for Autonomous Databases with private access. The nsgIds list can be empty.

Returns:

  • (Array<String>)


70
71
72
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 70

def nsg_ids
  @nsg_ids
end

#private_ipString

The IPv4 address from the provided OCI subnet which needs to be assigned to the VNIC. If not provided, it will be auto-assigned with an available IPv4 address from the subnet.

Returns:

  • (String)


110
111
112
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 110

def private_ip
  @private_ip
end

#shapeString

The virtual machine DB system shape to launch for the standby database in the Data Guard association. The shape determines the number of CPU cores and the amount of memory available for the DB system. Only virtual machine shapes are valid options. If you do not supply this parameter, the default shape is the shape of the primary DB system.

To get a list of all shapes, use the list_db_system_shapes operation.

Returns:

  • (String)


38
39
40
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 38

def shape
  @shape
end

#storage_volume_performance_modeString

The block storage volume performance level. Valid values are `BALANCED` and `HIGH_PERFORMANCE`. See [Block Volume Performance](docs.cloud.oracle.com/Content/Block/Concepts/blockvolumeperformance.htm) for more information.

Returns:

  • (String)


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

def storage_volume_performance_mode
  @storage_volume_performance_mode
end

#subnet_idString

The OCID of the subnet the DB system is associated with. **Subnet Restrictions:**

  • For 1- and 2-node RAC DB systems, do not use a subnet that overlaps with 192.168.16.16/28

These subnets are used by the Oracle Clusterware private interconnect on the database instance. Specifying an overlapping subnet will cause the private interconnect to malfunction. This restriction applies to both the client subnet and backup subnet.

Returns:

  • (String)


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

def subnet_id
  @subnet_id
end

#time_zoneString

The time zone of the dataguard standby DB system. For details, see [DB System Time Zones](docs.cloud.oracle.com/Content/Database/References/timezones.htm).

Returns:

  • (String)


83
84
85
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 83

def time_zone
  @time_zone
end

Class Method Details

.attribute_mapObject

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



146
147
148
149
150
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
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 146

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'database_software_image_id': :'databaseSoftwareImageId',
    'database_admin_password': :'databaseAdminPassword',
    'protection_mode': :'protectionMode',
    'transport_type': :'transportType',
    'creation_type': :'creationType',
    'is_active_data_guard_enabled': :'isActiveDataGuardEnabled',
    'peer_db_unique_name': :'peerDbUniqueName',
    'peer_sid_prefix': :'peerSidPrefix',
    'display_name': :'displayName',
    'availability_domain': :'availabilityDomain',
    'shape': :'shape',
    'cpu_core_count': :'cpuCoreCount',
    'storage_volume_performance_mode': :'storageVolumePerformanceMode',
    'node_count': :'nodeCount',
    'subnet_id': :'subnetId',
    'nsg_ids': :'nsgIds',
    'backup_network_nsg_ids': :'backupNetworkNsgIds',
    'hostname': :'hostname',
    'time_zone': :'timeZone',
    'fault_domains': :'faultDomains',
    'private_ip': :'privateIp',
    'license_model': :'licenseModel',
    'db_system_freeform_tags': :'dbSystemFreeformTags',
    'db_system_defined_tags': :'dbSystemDefinedTags',
    'database_freeform_tags': :'databaseFreeformTags',
    'database_defined_tags': :'databaseDefinedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 180

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'database_software_image_id': :'String',
    'database_admin_password': :'String',
    'protection_mode': :'String',
    'transport_type': :'String',
    'creation_type': :'String',
    'is_active_data_guard_enabled': :'BOOLEAN',
    'peer_db_unique_name': :'String',
    'peer_sid_prefix': :'String',
    'display_name': :'String',
    'availability_domain': :'String',
    'shape': :'String',
    'cpu_core_count': :'Integer',
    'storage_volume_performance_mode': :'String',
    'node_count': :'Integer',
    'subnet_id': :'String',
    'nsg_ids': :'Array<String>',
    'backup_network_nsg_ids': :'Array<String>',
    'hostname': :'String',
    'time_zone': :'String',
    'fault_domains': :'Array<String>',
    'private_ip': :'String',
    'license_model': :'String',
    'db_system_freeform_tags': :'Hash<String, String>',
    'db_system_defined_tags': :'Hash<String, Hash<String, Object>>',
    'database_freeform_tags': :'Hash<String, String>',
    'database_defined_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



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

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

  self.class == other.class &&
    database_software_image_id == other.database_software_image_id &&
    database_admin_password == other.database_admin_password &&
    protection_mode == other.protection_mode &&
    transport_type == other.transport_type &&
    creation_type == other.creation_type &&
    is_active_data_guard_enabled == other.is_active_data_guard_enabled &&
    peer_db_unique_name == other.peer_db_unique_name &&
    peer_sid_prefix == other.peer_sid_prefix &&
    display_name == other.display_name &&
    availability_domain == other.availability_domain &&
    shape == other.shape &&
    cpu_core_count == other.cpu_core_count &&
    storage_volume_performance_mode == other.storage_volume_performance_mode &&
    node_count == other.node_count &&
    subnet_id == other.subnet_id &&
    nsg_ids == other.nsg_ids &&
    backup_network_nsg_ids == other.backup_network_nsg_ids &&
    hostname == other.hostname &&
    time_zone == other.time_zone &&
    fault_domains == other.fault_domains &&
    private_ip == other.private_ip &&
    license_model == other.license_model &&
    db_system_freeform_tags == other.db_system_freeform_tags &&
    db_system_defined_tags == other.db_system_defined_tags &&
    database_freeform_tags == other.database_freeform_tags &&
    database_defined_tags == other.database_defined_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



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 435

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


415
416
417
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 415

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



424
425
426
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 424

def hash
  [database_software_image_id, database_admin_password, protection_mode, transport_type, creation_type, is_active_data_guard_enabled, peer_db_unique_name, peer_sid_prefix, display_name, availability_domain, shape, cpu_core_count, storage_volume_performance_mode, node_count, subnet_id, nsg_ids, backup_network_nsg_ids, hostname, time_zone, fault_domains, private_ip, license_model, db_system_freeform_tags, db_system_defined_tags, database_freeform_tags, database_defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



468
469
470
471
472
473
474
475
476
477
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 468

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



462
463
464
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 462

def to_s
  to_hash.to_s
end