Class: OCI::DisasterRecovery::Models::DrProtectionGroupMemberOkeCluster

Inherits:
DrProtectionGroupMember show all
Defined in:
lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb

Overview

Properties for a OKE Cluster member of a DR Protection Group.

Constant Summary

Constants inherited from DrProtectionGroupMember

OCI::DisasterRecovery::Models::DrProtectionGroupMember::MEMBER_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from DrProtectionGroupMember

#member_id, #member_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DrProtectionGroupMember

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ DrProtectionGroupMemberOkeCluster

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 118

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

  attributes['memberType'] = 'OKE_CLUSTER'

  super(attributes)

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

  self.peer_cluster_id = attributes[:'peerClusterId'] if attributes[:'peerClusterId']

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

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

  self.jump_host_id = attributes[:'jumpHostId'] if attributes[:'jumpHostId']

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

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

  self.backup_location = attributes[:'backupLocation'] if attributes[:'backupLocation']

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

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

  self.backup_config = attributes[:'backupConfig'] if attributes[:'backupConfig']

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

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

  self.load_balancer_mappings = attributes[:'loadBalancerMappings'] if attributes[:'loadBalancerMappings']

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

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

  self.network_load_balancer_mappings = attributes[:'networkLoadBalancerMappings'] if attributes[:'networkLoadBalancerMappings']

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

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

  self.vault_mappings = attributes[:'vaultMappings'] if attributes[:'vaultMappings']

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

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

  self.managed_node_pool_configs = attributes[:'managedNodePoolConfigs'] if attributes[:'managedNodePoolConfigs']

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

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

  self.virtual_node_pool_configs = attributes[:'virtualNodePoolConfigs'] if attributes[:'virtualNodePoolConfigs']

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

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

Instance Attribute Details

#backup_configOCI::DisasterRecovery::Models::OkeClusterBackupConfig



32
33
34
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 32

def backup_config
  @backup_config
end

#backup_locationOCI::DisasterRecovery::Models::OkeBackupLocation



29
30
31
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 29

def backup_location
  @backup_location
end

#jump_host_idString

The OCID of the compute instance member that is designated as a jump host. This compute instance will be used to perform DR operations on the cluster using Oracle Cloud Agent's Run Command feature.

Example: ocid1.instance.oc1..uniqueID

Returns:

  • (String)


26
27
28
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 26

def jump_host_id
  @jump_host_id
end

#load_balancer_mappingsArray<OCI::DisasterRecovery::Models::OkeClusterLoadBalancerMapping>

The list of source-to-destination load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region.



38
39
40
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 38

def load_balancer_mappings
  @load_balancer_mappings
end

#managed_node_pool_configsArray<OCI::DisasterRecovery::Models::OkeClusterManagedNodePoolConfiguration>

The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region.



56
57
58
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 56

def managed_node_pool_configs
  @managed_node_pool_configs
end

#network_load_balancer_mappingsArray<OCI::DisasterRecovery::Models::OkeClusterNetworkLoadBalancerMapping>

The list of source-to-destination network load balancer mappings required for DR operations. This property applies to the OKE cluster member in primary region.



44
45
46
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 44

def network_load_balancer_mappings
  @network_load_balancer_mappings
end

#peer_cluster_idString

The OCID of the peer OKE cluster. This property applies to the OKE cluster member in both the primary and standby region.

Example: ocid1.cluster.oc1.uniqueID

Returns:

  • (String)


18
19
20
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 18

def peer_cluster_id
  @peer_cluster_id
end

#vault_mappingsArray<OCI::DisasterRecovery::Models::OkeClusterVaultMapping>

The list of source-to-destination vault mappings required for DR operations. This property applies to the OKE cluster member in primary region.



50
51
52
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 50

def vault_mappings
  @vault_mappings
end

#virtual_node_pool_configsArray<OCI::DisasterRecovery::Models::OkeClusterVirtualNodePoolConfiguration>

The list of node pools with configurations for minimum and maximum node counts. This property applies to the OKE cluster member in both the primary and standby region.



62
63
64
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 62

def virtual_node_pool_configs
  @virtual_node_pool_configs
end

Class Method Details

.attribute_mapObject

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



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 65

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'member_id': :'memberId',
    'member_type': :'memberType',
    'peer_cluster_id': :'peerClusterId',
    'jump_host_id': :'jumpHostId',
    'backup_location': :'backupLocation',
    'backup_config': :'backupConfig',
    'load_balancer_mappings': :'loadBalancerMappings',
    'network_load_balancer_mappings': :'networkLoadBalancerMappings',
    'vault_mappings': :'vaultMappings',
    'managed_node_pool_configs': :'managedNodePoolConfigs',
    'virtual_node_pool_configs': :'virtualNodePoolConfigs'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 84

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'member_id': :'String',
    'member_type': :'String',
    'peer_cluster_id': :'String',
    'jump_host_id': :'String',
    'backup_location': :'OCI::DisasterRecovery::Models::OkeBackupLocation',
    'backup_config': :'OCI::DisasterRecovery::Models::OkeClusterBackupConfig',
    'load_balancer_mappings': :'Array<OCI::DisasterRecovery::Models::OkeClusterLoadBalancerMapping>',
    'network_load_balancer_mappings': :'Array<OCI::DisasterRecovery::Models::OkeClusterNetworkLoadBalancerMapping>',
    'vault_mappings': :'Array<OCI::DisasterRecovery::Models::OkeClusterVaultMapping>',
    'managed_node_pool_configs': :'Array<OCI::DisasterRecovery::Models::OkeClusterManagedNodePoolConfiguration>',
    'virtual_node_pool_configs': :'Array<OCI::DisasterRecovery::Models::OkeClusterVirtualNodePoolConfiguration>'
    # 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



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 190

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

  self.class == other.class &&
    member_id == other.member_id &&
    member_type == other.member_type &&
    peer_cluster_id == other.peer_cluster_id &&
    jump_host_id == other.jump_host_id &&
    backup_location == other.backup_location &&
    backup_config == other.backup_config &&
    load_balancer_mappings == other.load_balancer_mappings &&
    network_load_balancer_mappings == other.network_load_balancer_mappings &&
    vault_mappings == other.vault_mappings &&
    managed_node_pool_configs == other.managed_node_pool_configs &&
    virtual_node_pool_configs == other.virtual_node_pool_configs
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



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 230

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


210
211
212
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 210

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



219
220
221
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 219

def hash
  [member_id, member_type, peer_cluster_id, jump_host_id, backup_location, backup_config, load_balancer_mappings, network_load_balancer_mappings, vault_mappings, managed_node_pool_configs, virtual_node_pool_configs].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



263
264
265
266
267
268
269
270
271
272
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 263

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



257
258
259
# File 'lib/oci/disaster_recovery/models/dr_protection_group_member_oke_cluster.rb', line 257

def to_s
  to_hash.to_s
end