Class: OCI::GoldenGate::Models::DeploymentPeerSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/deployment_peer_summary.rb

Overview

The summary of the deployment Peer.

Constant Summary collapse

PEER_TYPE_ENUM =
[
  PEER_TYPE_LOCAL = 'LOCAL'.freeze,
  PEER_TYPE_REMOTE = 'REMOTE'.freeze,
  PEER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PEER_ROLE_ENUM =
[
  PEER_ROLE_PRIMARY = 'PRIMARY'.freeze,
  PEER_ROLE_STANDBY = 'STANDBY'.freeze,
  PEER_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PRECHECK_STATUS_ENUM =
[
  PRECHECK_STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  PRECHECK_STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  PRECHECK_STATUS_FAILED = 'FAILED'.freeze,
  PRECHECK_STATUS_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  PRECHECK_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DeploymentPeerSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :deployment_id (String)

    The value to assign to the #deployment_id property

  • :region (String)

    The value to assign to the #region property

  • :availability_domain (String)

    The value to assign to the #availability_domain property

  • :fault_domain (String)

    The value to assign to the #fault_domain property

  • :display_name (String)

    The value to assign to the #display_name property

  • :peer_type (String)

    The value to assign to the #peer_type property

  • :peer_role (String)

    The value to assign to the #peer_role property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :time_role_changed (DateTime)

    The value to assign to the #time_role_changed property

  • :time_last_synced (DateTime)

    The value to assign to the #time_last_synced property

  • :subscription_id (String)

    The value to assign to the #subscription_id property

  • :cluster_placement_group_id (String)

    The value to assign to the #cluster_placement_group_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :precheck_status (String)

    The value to assign to the #precheck_status property

  • :time_last_precheck_performed (DateTime)

    The value to assign to the #time_last_precheck_performed property



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
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
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 196

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

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

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

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

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

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

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

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

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

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

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

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

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

  self.time_role_changed = attributes[:'timeRoleChanged'] if attributes[:'timeRoleChanged']

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

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

  self.time_last_synced = attributes[:'timeLastSynced'] if attributes[:'timeLastSynced']

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

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

  self.subscription_id = attributes[:'subscriptionId'] if attributes[:'subscriptionId']

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

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

  self.cluster_placement_group_id = attributes[:'clusterPlacementGroupId'] if attributes[:'clusterPlacementGroupId']

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

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

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

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

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

  self.time_last_precheck_performed = attributes[:'timeLastPrecheckPerformed'] if attributes[:'timeLastPrecheckPerformed']

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

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

Instance Attribute Details

#availability_domainString

[Required] The availability domain of a placement.

Returns:

  • (String)


56
57
58
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 56

def availability_domain
  @availability_domain
end

#cluster_placement_group_idString

The OCID(/Content/General/Concepts/identifiers.htm) of the cluster placement group for the resource. Only applicable for multicloud subscriptions. The cluster placement group id must be provided when a multicloud subscription id is provided. Otherwise the cluster placement group must not be provided.

Returns:

  • (String)


110
111
112
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 110

def cluster_placement_group_id
  @cluster_placement_group_id
end

#deployment_idString

[Required] The OCID of the deployment being referenced.

Returns:

  • (String)


46
47
48
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 46

def deployment_id
  @deployment_id
end

#display_nameString

[Required] An object's Display Name.

Returns:

  • (String)


65
66
67
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 65

def display_name
  @display_name
end

#fault_domainString

[Required] The fault domain of a placement.

Returns:

  • (String)


60
61
62
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 60

def fault_domain
  @fault_domain
end

#lifecycle_stateString

[Required] Possible lifecycle states for deployment peer.

Returns:

  • (String)


114
115
116
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 114

def lifecycle_state
  @lifecycle_state
end

#peer_roleString

[Required] The type of the deployment role.

Returns:

  • (String)


75
76
77
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 75

def peer_role
  @peer_role
end

#peer_typeString

[Required] The type of the deployment peer.

Returns:

  • (String)


70
71
72
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 70

def peer_type
  @peer_type
end

#precheck_statusString

Status of the DR precheck result.

Returns:

  • (String)


118
119
120
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 118

def precheck_status
  @precheck_status
end

#regionString

[Required] The name of the region. e.g.: us-ashburn-1 If the region is not provided, backend will default to the default region.

Returns:

  • (String)


52
53
54
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 52

def region
  @region
end

#subscription_idString

The OCID of the subscription with which resource needs to be associated with.

Returns:

  • (String)


103
104
105
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 103

def subscription_id
  @subscription_id
end

#time_createdDateTime

[Required] The time the resource was created. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


81
82
83
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 81

def time_created
  @time_created
end

#time_last_precheck_performedDateTime

The timestamp when pre-check started. The format is defined by RFC3339, such as 2024-10-26T20:19:29.600Z.

Returns:

  • (DateTime)


124
125
126
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 124

def time_last_precheck_performed
  @time_last_precheck_performed
end

#time_last_syncedDateTime

The time of the last data synchronization from the primary to the standby peer. RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


99
100
101
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 99

def time_last_synced
  @time_last_synced
end

#time_role_changedDateTime

[Required] The time of the last role change. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


93
94
95
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 93

def time_role_changed
  @time_role_changed
end

#time_updatedDateTime

[Required] The time the resource was last updated. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


87
88
89
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 87

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 127

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'deployment_id': :'deploymentId',
    'region': :'region',
    'availability_domain': :'availabilityDomain',
    'fault_domain': :'faultDomain',
    'display_name': :'displayName',
    'peer_type': :'peerType',
    'peer_role': :'peerRole',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_role_changed': :'timeRoleChanged',
    'time_last_synced': :'timeLastSynced',
    'subscription_id': :'subscriptionId',
    'cluster_placement_group_id': :'clusterPlacementGroupId',
    'lifecycle_state': :'lifecycleState',
    'precheck_status': :'precheckStatus',
    'time_last_precheck_performed': :'timeLastPrecheckPerformed'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 151

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'deployment_id': :'String',
    'region': :'String',
    'availability_domain': :'String',
    'fault_domain': :'String',
    'display_name': :'String',
    'peer_type': :'String',
    'peer_role': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'time_role_changed': :'DateTime',
    'time_last_synced': :'DateTime',
    'subscription_id': :'String',
    'cluster_placement_group_id': :'String',
    'lifecycle_state': :'String',
    'precheck_status': :'String',
    'time_last_precheck_performed': :'DateTime'
    # 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



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 354

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

  self.class == other.class &&
    deployment_id == other.deployment_id &&
    region == other.region &&
    availability_domain == other.availability_domain &&
    fault_domain == other.fault_domain &&
    display_name == other.display_name &&
    peer_type == other.peer_type &&
    peer_role == other.peer_role &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    time_role_changed == other.time_role_changed &&
    time_last_synced == other.time_last_synced &&
    subscription_id == other.subscription_id &&
    cluster_placement_group_id == other.cluster_placement_group_id &&
    lifecycle_state == other.lifecycle_state &&
    precheck_status == other.precheck_status &&
    time_last_precheck_performed == other.time_last_precheck_performed
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



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 399

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


379
380
381
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 379

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



388
389
390
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 388

def hash
  [deployment_id, region, availability_domain, fault_domain, display_name, peer_type, peer_role, time_created, time_updated, time_role_changed, time_last_synced, subscription_id, cluster_placement_group_id, lifecycle_state, precheck_status, time_last_precheck_performed].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



432
433
434
435
436
437
438
439
440
441
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 432

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



426
427
428
# File 'lib/oci/golden_gate/models/deployment_peer_summary.rb', line 426

def to_s
  to_hash.to_s
end