Class: OCI::DatabaseManagement::Models::DiscoveredExternalCluster

Inherits:
DiscoveredExternalDbSystemComponent show all
Defined in:
lib/oci/database_management/models/discovered_external_cluster.rb

Overview

The details of an external cluster discovered in an external DB system discovery run.

Constant Summary

Constants inherited from DiscoveredExternalDbSystemComponent

OCI::DatabaseManagement::Models::DiscoveredExternalDbSystemComponent::COMPONENT_TYPE_ENUM, OCI::DatabaseManagement::Models::DiscoveredExternalDbSystemComponent::STATUS_ENUM

Instance Attribute Summary collapse

Attributes inherited from DiscoveredExternalDbSystemComponent

#associated_components, #component_id, #component_name, #component_type, #display_name, #is_selected_for_monitoring, #resource_id, #status

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DiscoveredExternalDbSystemComponent

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ DiscoveredExternalCluster

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 112

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

  attributes['componentType'] = 'CLUSTER'

  super(attributes)

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

  self.grid_home = attributes[:'gridHome'] if attributes[:'gridHome']

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

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

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

  self.is_flex_cluster = attributes[:'isFlexCluster'] unless attributes[:'isFlexCluster'].nil?

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

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

  self.network_configurations = attributes[:'networkConfigurations'] if attributes[:'networkConfigurations']

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

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

  self.vip_configurations = attributes[:'vipConfigurations'] if attributes[:'vipConfigurations']

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

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

  self.scan_configurations = attributes[:'scanConfigurations'] if attributes[:'scanConfigurations']

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

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

  self.ocr_file_location = attributes[:'ocrFileLocation'] if attributes[:'ocrFileLocation']

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

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

  self.cluster_instances = attributes[:'clusterInstances'] if attributes[:'clusterInstances']

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

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

Instance Attribute Details

#cluster_instancesArray<OCI::DatabaseManagement::Models::DiscoveredExternalClusterInstance>



41
42
43
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 41

def cluster_instances
  @cluster_instances
end

#grid_homeString

The directory in which Oracle Grid Infrastructure is installed.

Returns:

  • (String)


14
15
16
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 14

def grid_home
  @grid_home
end

#is_flex_clusterBOOLEAN

Indicates whether the cluster is an Oracle Flex Cluster or not.

Returns:

  • (BOOLEAN)


22
23
24
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 22

def is_flex_cluster
  @is_flex_cluster
end

#network_configurationsArray<OCI::DatabaseManagement::Models::ExternalClusterNetworkConfiguration>

The list of network address configurations of the external cluster.



26
27
28
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 26

def network_configurations
  @network_configurations
end

#ocr_file_locationString

The location of the Oracle Cluster Registry (OCR) file.

Returns:

  • (String)


38
39
40
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 38

def ocr_file_location
  @ocr_file_location
end

#scan_configurationsArray<OCI::DatabaseManagement::Models::ExternalClusterScanListenerConfiguration>

The list of Single Client Access Name (SCAN) configurations of the external cluster.



34
35
36
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 34

def scan_configurations
  @scan_configurations
end

#versionString

The version of Oracle Clusterware running in the cluster.

Returns:

  • (String)


18
19
20
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 18

def version
  @version
end

#vip_configurationsArray<OCI::DatabaseManagement::Models::ExternalClusterVipConfiguration>

The list of Virtual IP (VIP) configurations of the external cluster.



30
31
32
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 30

def vip_configurations
  @vip_configurations
end

Class Method Details

.attribute_mapObject

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



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 44

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'component_id': :'componentId',
    'display_name': :'displayName',
    'component_name': :'componentName',
    'component_type': :'componentType',
    'resource_id': :'resourceId',
    'is_selected_for_monitoring': :'isSelectedForMonitoring',
    'status': :'status',
    'associated_components': :'associatedComponents',
    'grid_home': :'gridHome',
    'version': :'version',
    'is_flex_cluster': :'isFlexCluster',
    'network_configurations': :'networkConfigurations',
    'vip_configurations': :'vipConfigurations',
    'scan_configurations': :'scanConfigurations',
    'ocr_file_location': :'ocrFileLocation',
    'cluster_instances': :'clusterInstances'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 68

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'component_id': :'String',
    'display_name': :'String',
    'component_name': :'String',
    'component_type': :'String',
    'resource_id': :'String',
    'is_selected_for_monitoring': :'BOOLEAN',
    'status': :'String',
    'associated_components': :'Array<OCI::DatabaseManagement::Models::AssociatedComponent>',
    'grid_home': :'String',
    'version': :'String',
    'is_flex_cluster': :'BOOLEAN',
    'network_configurations': :'Array<OCI::DatabaseManagement::Models::ExternalClusterNetworkConfiguration>',
    'vip_configurations': :'Array<OCI::DatabaseManagement::Models::ExternalClusterVipConfiguration>',
    'scan_configurations': :'Array<OCI::DatabaseManagement::Models::ExternalClusterScanListenerConfiguration>',
    'ocr_file_location': :'String',
    'cluster_instances': :'Array<OCI::DatabaseManagement::Models::DiscoveredExternalClusterInstance>'
    # 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



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 174

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

  self.class == other.class &&
    component_id == other.component_id &&
    display_name == other.display_name &&
    component_name == other.component_name &&
    component_type == other.component_type &&
    resource_id == other.resource_id &&
    is_selected_for_monitoring == other.is_selected_for_monitoring &&
    status == other.status &&
    associated_components == other.associated_components &&
    grid_home == other.grid_home &&
    version == other.version &&
    is_flex_cluster == other.is_flex_cluster &&
    network_configurations == other.network_configurations &&
    vip_configurations == other.vip_configurations &&
    scan_configurations == other.scan_configurations &&
    ocr_file_location == other.ocr_file_location &&
    cluster_instances == other.cluster_instances
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



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 219

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


199
200
201
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 199

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



208
209
210
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 208

def hash
  [component_id, display_name, component_name, component_type, resource_id, is_selected_for_monitoring, status, associated_components, grid_home, version, is_flex_cluster, network_configurations, vip_configurations, scan_configurations, ocr_file_location, cluster_instances].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



252
253
254
255
256
257
258
259
260
261
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 252

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



246
247
248
# File 'lib/oci/database_management/models/discovered_external_cluster.rb', line 246

def to_s
  to_hash.to_s
end