Class: OCI::Database::Models::CreateAutonomousContainerDatabaseDataguardAssociationDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb

Overview

Create Autonomous Dataguard Association to an existing Autonomous Container Database

Constant Summary collapse

PROTECTION_MODE_ENUM =
[
  PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY'.freeze,
  PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateAutonomousContainerDatabaseDataguardAssociationDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 102

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

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

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

  self.peer_autonomous_container_database_compartment_id = attributes[:'peerAutonomousContainerDatabaseCompartmentId'] if attributes[:'peerAutonomousContainerDatabaseCompartmentId']

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

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

  self.peer_autonomous_container_database_backup_config = attributes[:'peerAutonomousContainerDatabaseBackupConfig'] if attributes[:'peerAutonomousContainerDatabaseBackupConfig']

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

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

  self.is_automatic_failover_enabled = attributes[:'isAutomaticFailoverEnabled'] unless attributes[:'isAutomaticFailoverEnabled'].nil?

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

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

  self.protection_mode = attributes[:'protectionMode'] if attributes[:'protectionMode']

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

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

  self.fast_start_fail_over_lag_limit_in_seconds = attributes[:'fastStartFailOverLagLimitInSeconds'] if attributes[:'fastStartFailOverLagLimitInSeconds']

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

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

  self.standby_maintenance_buffer_in_days = attributes[:'standbyMaintenanceBufferInDays'] if attributes[:'standbyMaintenanceBufferInDays']

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

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

Instance Attribute Details

#fast_start_fail_over_lag_limit_in_secondsInteger

The lag time for my preference based on data loss tolerance in seconds.

Returns:

  • (Integer)


48
49
50
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 48

def fast_start_fail_over_lag_limit_in_seconds
  @fast_start_fail_over_lag_limit_in_seconds
end

#is_automatic_failover_enabledBOOLEAN

Indicates whether Automatic Failover is enabled for Autonomous Container Database Dataguard Association

Returns:

  • (BOOLEAN)


37
38
39
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 37

def is_automatic_failover_enabled
  @is_automatic_failover_enabled
end

#peer_autonomous_container_database_backup_configOCI::Database::Models::PeerAutonomousContainerDatabaseBackupConfig



32
33
34
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 32

def peer_autonomous_container_database_backup_config
  @peer_autonomous_container_database_backup_config
end

#peer_autonomous_container_database_compartment_idString

The OCID of the compartment where the standby Autonomous Container Database will be created.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 25

def peer_autonomous_container_database_compartment_id
  @peer_autonomous_container_database_compartment_id
end

#peer_autonomous_container_database_display_nameString

[Required] The display name for the peer Autonomous Container Database.

Returns:

  • (String)


19
20
21
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 19

def peer_autonomous_container_database_display_name
  @peer_autonomous_container_database_display_name
end

#peer_cloud_autonomous_vm_cluster_idString

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

Returns:

  • (String)


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

def peer_cloud_autonomous_vm_cluster_id
  @peer_cloud_autonomous_vm_cluster_id
end

#protection_modeString

[Required] The protection mode of this Autonomous Data Guard association. For more information, see Oracle Data Guard Protection Modes in the Oracle Data Guard documentation.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 44

def protection_mode
  @protection_mode
end

#standby_maintenance_buffer_in_daysInteger

The scheduling detail for the quarterly maintenance window of the standby Autonomous Container Database. This value represents the number of days before scheduled maintenance of the primary database.

Returns:

  • (Integer)


54
55
56
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 54

def standby_maintenance_buffer_in_days
  @standby_maintenance_buffer_in_days
end

Class Method Details

.attribute_mapObject

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



57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 57

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'peer_autonomous_container_database_display_name': :'peerAutonomousContainerDatabaseDisplayName',
    'peer_autonomous_container_database_compartment_id': :'peerAutonomousContainerDatabaseCompartmentId',
    'peer_cloud_autonomous_vm_cluster_id': :'peerCloudAutonomousVmClusterId',
    'peer_autonomous_container_database_backup_config': :'peerAutonomousContainerDatabaseBackupConfig',
    'is_automatic_failover_enabled': :'isAutomaticFailoverEnabled',
    'protection_mode': :'protectionMode',
    'fast_start_fail_over_lag_limit_in_seconds': :'fastStartFailOverLagLimitInSeconds',
    'standby_maintenance_buffer_in_days': :'standbyMaintenanceBufferInDays'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 73

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'peer_autonomous_container_database_display_name': :'String',
    'peer_autonomous_container_database_compartment_id': :'String',
    'peer_cloud_autonomous_vm_cluster_id': :'String',
    'peer_autonomous_container_database_backup_config': :'OCI::Database::Models::PeerAutonomousContainerDatabaseBackupConfig',
    'is_automatic_failover_enabled': :'BOOLEAN',
    'protection_mode': :'String',
    'fast_start_fail_over_lag_limit_in_seconds': :'Integer',
    'standby_maintenance_buffer_in_days': :'Integer'
    # 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



172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 172

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

  self.class == other.class &&
    peer_autonomous_container_database_display_name == other.peer_autonomous_container_database_display_name &&
    peer_autonomous_container_database_compartment_id == other.peer_autonomous_container_database_compartment_id &&
    peer_cloud_autonomous_vm_cluster_id == other.peer_cloud_autonomous_vm_cluster_id &&
    peer_autonomous_container_database_backup_config == other.peer_autonomous_container_database_backup_config &&
    is_automatic_failover_enabled == other.is_automatic_failover_enabled &&
    protection_mode == other.protection_mode &&
    fast_start_fail_over_lag_limit_in_seconds == other.fast_start_fail_over_lag_limit_in_seconds &&
    standby_maintenance_buffer_in_days == other.standby_maintenance_buffer_in_days
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



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 209

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


189
190
191
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 189

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



198
199
200
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 198

def hash
  [peer_autonomous_container_database_display_name, peer_autonomous_container_database_compartment_id, peer_cloud_autonomous_vm_cluster_id, peer_autonomous_container_database_backup_config, is_automatic_failover_enabled, protection_mode, fast_start_fail_over_lag_limit_in_seconds, standby_maintenance_buffer_in_days].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



242
243
244
245
246
247
248
249
250
251
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 242

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



236
237
238
# File 'lib/oci/database/models/create_autonomous_container_database_dataguard_association_details.rb', line 236

def to_s
  to_hash.to_s
end