Class: OCI::Multicloud::Models::ExternalLocationsMetadatumSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/multicloud/models/external_locations_metadatum_summary.rb

Overview

Flat Map of CSP Region -> CSP-Physical-AZ -> CSP-Logical-AZ -> OCI Site Group -> CPG-ID

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExternalLocationsMetadatumSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 128

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

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

  self.external_location = attributes[:'externalLocation'] if attributes[:'externalLocation']

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

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

  self.oci_physical_ad = attributes[:'ociPhysicalAd'] if attributes[:'ociPhysicalAd']

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

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

  self.oci_logical_ad = attributes[:'ociLogicalAd'] if attributes[:'ociLogicalAd']

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

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

  self.oci_region = attributes[:'ociRegion'] if attributes[:'ociRegion']

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

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

  self.cpg_id = attributes[:'cpgId'] if attributes[:'cpgId']

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

  self.cpg_id = attributes[:'cpg_id'] if attributes[:'cpg_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.partner_cloud_name = attributes[:'partnerCloudName'] if attributes[:'partnerCloudName']

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

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

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

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

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

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

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

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

Instance Attribute Details

#cluster_placement_group_idString

[Required] Cluster Placement Group OCID

Returns:

  • (String)


56
57
58
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 56

def cluster_placement_group_id
  @cluster_placement_group_id
end

#cpg_idString

[Required] Cluster Placement Group OCID (deprecated representation)

Returns:

  • (String)


52
53
54
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 52

def cpg_id
  @cpg_id
end

#defined_tagsHash<String, Hash<String, Object>>

[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


25
26
27
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 25

def defined_tags
  @defined_tags
end

#external_locationOCI::Multicloud::Models::ExternalLocationDetail

This attribute is required.



36
37
38
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 36

def external_location
  @external_location
end

#freeform_tagsHash<String, String>

[Required] Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


17
18
19
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 17

def freeform_tags
  @freeform_tags
end

#oci_logical_adString

OCI logical ad name

Returns:

  • (String)


44
45
46
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 44

def oci_logical_ad
  @oci_logical_ad
end

#oci_physical_adString

[Required] OCI physical ad name

Returns:

  • (String)


40
41
42
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 40

def oci_physical_ad
  @oci_physical_ad
end

#oci_regionString

Returns:

  • (String)


48
49
50
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 48

def oci_region
  @oci_region
end

#partner_cloud_account_nameString

User friendly name of account name for customer's subscription

Returns:

  • (String)


64
65
66
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 64

def 
  @partner_cloud_account_name
end

#partner_cloud_account_urlString

Direct URL to partner cloud for customer's account

Returns:

  • (String)


68
69
70
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 68

def 
  @partner_cloud_account_url
end

#partner_cloud_nameString

Partner Cloud Name based on service name

Returns:

  • (String)


60
61
62
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 60

def partner_cloud_name
  @partner_cloud_name
end

#system_tagsHash<String, Hash<String, Object>>

System tags for this resource. Each key is predefined and scoped to a namespace.

Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


32
33
34
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 32

def system_tags
  @system_tags
end

Class Method Details

.attribute_mapObject

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



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 71

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags',
    'external_location': :'externalLocation',
    'oci_physical_ad': :'ociPhysicalAd',
    'oci_logical_ad': :'ociLogicalAd',
    'oci_region': :'ociRegion',
    'cpg_id': :'cpgId',
    'cluster_placement_group_id': :'clusterPlacementGroupId',
    'partner_cloud_name': :'partnerCloudName',
    'partner_cloud_account_name': :'partnerCloudAccountName',
    'partner_cloud_account_url': :'partnerCloudAccountUrl'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 91

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>',
    'external_location': :'OCI::Multicloud::Models::ExternalLocationDetail',
    'oci_physical_ad': :'String',
    'oci_logical_ad': :'String',
    'oci_region': :'String',
    'cpg_id': :'String',
    'cluster_placement_group_id': :'String',
    'partner_cloud_name': :'String',
    'partner_cloud_account_name': :'String',
    'partner_cloud_account_url': :'String'
    # 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



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 214

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

  self.class == other.class &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags &&
    external_location == other.external_location &&
    oci_physical_ad == other.oci_physical_ad &&
    oci_logical_ad == other.oci_logical_ad &&
    oci_region == other.oci_region &&
    cpg_id == other.cpg_id &&
    cluster_placement_group_id == other.cluster_placement_group_id &&
    partner_cloud_name == other.partner_cloud_name &&
     == other. &&
     == other.
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



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 255

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


235
236
237
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 235

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



244
245
246
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 244

def hash
  [freeform_tags, defined_tags, system_tags, external_location, oci_physical_ad, oci_logical_ad, oci_region, cpg_id, cluster_placement_group_id, partner_cloud_name, , ].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



288
289
290
291
292
293
294
295
296
297
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 288

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



282
283
284
# File 'lib/oci/multicloud/models/external_locations_metadatum_summary.rb', line 282

def to_s
  to_hash.to_s
end