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 to an existing database. A new DbSystem will be launched for standby database.

Constant Summary

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, #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_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

  • :display_name (String)

    The value to assign to the #display_name property

  • :availability_domain (String)

    The value to assign to the #availability_domain property

  • :subnet_id (String)

    The value to assign to the #subnet_id property

  • :hostname (String)

    The value to assign to the #hostname property



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

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


16
17
18
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 16

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


12
13
14
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 12

def display_name
  @display_name
end

#hostnameString

The host name for the DB Node.

Returns:

  • (String)


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

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


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

def subnet_id
  @subnet_id
end

Class Method Details

.attribute_mapObject

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



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 34

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'database_admin_password': :'databaseAdminPassword',
    'protection_mode': :'protectionMode',
    'transport_type': :'transportType',
    'creation_type': :'creationType',
    'display_name': :'displayName',
    'availability_domain': :'availabilityDomain',
    'subnet_id': :'subnetId',
    'hostname': :'hostname'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 50

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'database_admin_password': :'String',
    'protection_mode': :'String',
    'transport_type': :'String',
    'creation_type': :'String',
    'display_name': :'String',
    'availability_domain': :'String',
    'subnet_id': :'String',
    'hostname': :'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



116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 116

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

  self.class == other.class &&
    database_admin_password == other.database_admin_password &&
    protection_mode == other.protection_mode &&
    transport_type == other.transport_type &&
    creation_type == other.creation_type &&
    display_name == other.display_name &&
    availability_domain == other.availability_domain &&
    subnet_id == other.subnet_id &&
    hostname == other.hostname
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



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

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


133
134
135
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 133

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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

def hash
  [database_admin_password, protection_mode, transport_type, creation_type, display_name, availability_domain, subnet_id, hostname].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



186
187
188
189
190
191
192
193
194
195
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 186

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



180
181
182
# File 'lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb', line 180

def to_s
  to_hash.to_s
end