Class: OCI::Database::Models::DataGuardAssociationSummary

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

Overview

The properties that define a Data Guard association.

To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.

For information about endpoints and signing API requests, see About the API. For information about available SDKs and tools, see SDKS and Other Tools.

Constant Summary collapse

ROLE_ENUM =
[
  ROLE_PRIMARY = 'PRIMARY'.freeze,
  ROLE_STANDBY = 'STANDBY'.freeze,
  ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY'.freeze,
  ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UPGRADING = 'UPGRADING'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PEER_ROLE_ENUM =
[
  PEER_ROLE_PRIMARY = 'PRIMARY'.freeze,
  PEER_ROLE_STANDBY = 'STANDBY'.freeze,
  PEER_ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY'.freeze,
  PEER_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PROTECTION_MODE_ENUM =
[
  PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY'.freeze,
  PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE'.freeze,
  PROTECTION_MODE_MAXIMUM_PROTECTION = 'MAXIMUM_PROTECTION'.freeze,
  PROTECTION_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TRANSPORT_TYPE_ENUM =
[
  TRANSPORT_TYPE_SYNC = 'SYNC'.freeze,
  TRANSPORT_TYPE_ASYNC = 'ASYNC'.freeze,
  TRANSPORT_TYPE_FASTSYNC = 'FASTSYNC'.freeze,
  TRANSPORT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DataGuardAssociationSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :database_id (String)

    The value to assign to the #database_id property

  • :role (String)

    The value to assign to the #role property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :peer_db_system_id (String)

    The value to assign to the #peer_db_system_id property

  • :peer_db_home_id (String)

    The value to assign to the #peer_db_home_id property

  • :peer_database_id (String)

    The value to assign to the #peer_database_id property

  • :peer_data_guard_association_id (String)

    The value to assign to the #peer_data_guard_association_id property

  • :peer_role (String)

    The value to assign to the #peer_role property

  • :apply_lag (String)

    The value to assign to the #apply_lag property

  • :apply_rate (String)

    The value to assign to the #apply_rate property

  • :protection_mode (String)

    The value to assign to the #protection_mode property

  • :transport_type (String)

    The value to assign to the #transport_type property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :is_active_data_guard_enabled (BOOLEAN)

    The value to assign to the #is_active_data_guard_enabled property



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
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
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 211

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

  self.database_id = attributes[:'databaseId'] if attributes[:'databaseId']

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

  self.peer_db_system_id = attributes[:'peerDbSystemId'] if attributes[:'peerDbSystemId']

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

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

  self.peer_db_home_id = attributes[:'peerDbHomeId'] if attributes[:'peerDbHomeId']

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

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

  self.peer_database_id = attributes[:'peerDatabaseId'] if attributes[:'peerDatabaseId']

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

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

  self.peer_data_guard_association_id = attributes[:'peerDataGuardAssociationId'] if attributes[:'peerDataGuardAssociationId']

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

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

  self.peer_role = attributes[:'peerRole'] if attributes[:'peerRole']

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

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

  self.apply_lag = attributes[:'applyLag'] if attributes[:'applyLag']

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

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

  self.apply_rate = attributes[:'applyRate'] if attributes[:'applyRate']

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

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

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

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.is_active_data_guard_enabled = attributes[:'isActiveDataGuardEnabled'] unless attributes[:'isActiveDataGuardEnabled'].nil?

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

  self.is_active_data_guard_enabled = attributes[:'is_active_data_guard_enabled'] unless attributes[:'is_active_data_guard_enabled'].nil?
end

Instance Attribute Details

#apply_lagString

The lag time between updates to the primary database and application of the redo data on the standby database, as computed by the reporting database.

Example: 9 seconds

Returns:

  • (String)


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

def apply_lag
  @apply_lag
end

#apply_rateString

The rate at which redo logs are synced between the associated databases.

Example: 180 Mb per second

Returns:

  • (String)


117
118
119
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 117

def apply_rate
  @apply_rate
end

#database_idString

[Required] The OCID of the reporting database.

Returns:

  • (String)


66
67
68
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 66

def database_id
  @database_id
end

#idString

[Required] The OCID of the Data Guard association.

Returns:

  • (String)


62
63
64
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 62

def id
  @id
end

#is_active_data_guard_enabledBOOLEAN

True if active Data Guard is enabled.

Returns:

  • (BOOLEAN)


139
140
141
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 139

def is_active_data_guard_enabled
  @is_active_data_guard_enabled
end

#lifecycle_detailsString

Additional information about the current lifecycleState, if available.

Returns:

  • (String)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the Data Guard association.

Returns:

  • (String)


74
75
76
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 74

def lifecycle_state
  @lifecycle_state
end

#peer_data_guard_association_idString

The OCID of the peer database's Data Guard association.

Returns:

  • (String)


98
99
100
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 98

def peer_data_guard_association_id
  @peer_data_guard_association_id
end

#peer_database_idString

The OCID of the associated peer database.

Returns:

  • (String)


94
95
96
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 94

def peer_database_id
  @peer_database_id
end

#peer_db_home_idString

The OCID of the Database Home containing the associated peer database.

Returns:

  • (String)


90
91
92
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 90

def peer_db_home_id
  @peer_db_home_id
end

#peer_db_system_idString

[Required] The OCID of the DB system containing the associated peer database.

Returns:

  • (String)


85
86
87
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 85

def peer_db_system_id
  @peer_db_system_id
end

#peer_roleString

[Required] The role of the peer database in this Data Guard association.

Returns:

  • (String)


102
103
104
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 102

def peer_role
  @peer_role
end

#protection_modeString

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

Returns:

  • (String)


124
125
126
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 124

def protection_mode
  @protection_mode
end

#roleString

[Required] The role of the reporting database in this Data Guard association.

Returns:

  • (String)


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

def role
  @role
end

#time_createdDateTime

The date and time the Data Guard association was created.

Returns:

  • (DateTime)


135
136
137
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 135

def time_created
  @time_created
end

#transport_typeString

The redo transport type used by this Data Guard association. For more information, see Redo Transport Services in the Oracle Data Guard documentation.

Returns:

  • (String)


131
132
133
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 131

def transport_type
  @transport_type
end

Class Method Details

.attribute_mapObject

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



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 142

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'database_id': :'databaseId',
    'role': :'role',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'peer_db_system_id': :'peerDbSystemId',
    'peer_db_home_id': :'peerDbHomeId',
    'peer_database_id': :'peerDatabaseId',
    'peer_data_guard_association_id': :'peerDataGuardAssociationId',
    'peer_role': :'peerRole',
    'apply_lag': :'applyLag',
    'apply_rate': :'applyRate',
    'protection_mode': :'protectionMode',
    'transport_type': :'transportType',
    'time_created': :'timeCreated',
    'is_active_data_guard_enabled': :'isActiveDataGuardEnabled'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 166

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'database_id': :'String',
    'role': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'peer_db_system_id': :'String',
    'peer_db_home_id': :'String',
    'peer_database_id': :'String',
    'peer_data_guard_association_id': :'String',
    'peer_role': :'String',
    'apply_lag': :'String',
    'apply_rate': :'String',
    'protection_mode': :'String',
    'transport_type': :'String',
    'time_created': :'DateTime',
    'is_active_data_guard_enabled': :'BOOLEAN'
    # 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



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 378

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

  self.class == other.class &&
    id == other.id &&
    database_id == other.database_id &&
    role == other.role &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    peer_db_system_id == other.peer_db_system_id &&
    peer_db_home_id == other.peer_db_home_id &&
    peer_database_id == other.peer_database_id &&
    peer_data_guard_association_id == other.peer_data_guard_association_id &&
    peer_role == other.peer_role &&
    apply_lag == other.apply_lag &&
    apply_rate == other.apply_rate &&
    protection_mode == other.protection_mode &&
    transport_type == other.transport_type &&
    time_created == other.time_created &&
    is_active_data_guard_enabled == other.is_active_data_guard_enabled
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



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 423

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


403
404
405
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 403

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



412
413
414
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 412

def hash
  [id, database_id, role, lifecycle_state, lifecycle_details, peer_db_system_id, peer_db_home_id, peer_database_id, peer_data_guard_association_id, peer_role, apply_lag, apply_rate, protection_mode, transport_type, time_created, is_active_data_guard_enabled].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



456
457
458
459
460
461
462
463
464
465
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 456

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



450
451
452
# File 'lib/oci/database/models/data_guard_association_summary.rb', line 450

def to_s
  to_hash.to_s
end