Class: OCI::Core::Models::UpdateVirtualCircuitDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/models/update_virtual_circuit_details.rb

Overview

UpdateVirtualCircuitDetails model.

Constant Summary collapse

PROVIDER_STATE_ENUM =
[
  PROVIDER_STATE_ACTIVE = 'ACTIVE'.freeze,
  PROVIDER_STATE_INACTIVE = 'INACTIVE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateVirtualCircuitDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 166

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

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

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

  self.cross_connect_mappings = attributes[:'crossConnectMappings'] if attributes[:'crossConnectMappings']

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

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

  self.customer_bgp_asn = attributes[:'customerBgpAsn'] if attributes[:'customerBgpAsn']

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

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

  self.customer_asn = attributes[:'customerAsn'] if attributes[:'customerAsn']

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

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

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

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

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

  self.provider_state = attributes[:'providerState'] if attributes[:'providerState']

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

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

  self.provider_service_key_name = attributes[:'providerServiceKeyName'] if attributes[:'providerServiceKeyName']

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

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

  self.reference_comment = attributes[:'referenceComment'] if attributes[:'referenceComment']

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

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

Instance Attribute Details

#bandwidth_shape_nameString

The provisioned data rate of the connection. To get a list of the available bandwidth levels (that is, shapes), see list_fast_connect_provider_virtual_circuit_bandwidth_shapes. To be updated only by the customer who owns the virtual circuit.

Returns:

  • (String)


21
22
23
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 21

def bandwidth_shape_name
  @bandwidth_shape_name
end

#cross_connect_mappingsArray<OCI::Core::Models::CrossConnectMapping>

An array of mappings, each containing properties for a cross-connect or cross-connect group associated with this virtual circuit.

The customer and provider can update different properties in the mapping depending on the situation. See the description of the CrossConnectMapping.



31
32
33
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 31

def cross_connect_mappings
  @cross_connect_mappings
end

#customer_asnInteger

The BGP ASN of the network at the other end of the BGP session from Oracle.

If the BGP session is from the customer's edge router to Oracle, the required value is the customer's ASN, and it can be updated only by the customer.

If the BGP session is from the provider's edge router to Oracle, the required value is the provider's ASN, and it can be updated only by the provider.

Can be a 2-byte or 4-byte ASN. Uses "asplain" format.

Returns:

  • (Integer)


53
54
55
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 53

def customer_asn
  @customer_asn
end

#customer_bgp_asnInteger

Deprecated. Instead use customerAsn. If you specify values for both, the request will be rejected.

Returns:

  • (Integer)


37
38
39
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 37

def customer_bgp_asn
  @customer_bgp_asn
end

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

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>>)


61
62
63
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 61

def defined_tags
  @defined_tags
end

#display_nameString

A user-friendly name. Does not have to be unique. Avoid entering confidential information.

To be updated only by the customer who owns the virtual circuit.

Returns:

  • (String)


69
70
71
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 69

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

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>)


77
78
79
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 77

def freeform_tags
  @freeform_tags
end

#gateway_idString

The OCID of the Drg that this private virtual circuit uses.

To be updated only by the customer who owns the virtual circuit.

Returns:

  • (String)


85
86
87
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 85

def gateway_id
  @gateway_id
end

#provider_service_key_nameString

The service key name offered by the provider (if the customer is connecting via a provider).

Returns:

  • (String)


101
102
103
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 101

def provider_service_key_name
  @provider_service_key_name
end

#provider_stateString

The provider's state in relation to this virtual circuit. Relevant only if the customer is using FastConnect via a provider. ACTIVE means the provider has provisioned the virtual circuit from their end. INACTIVE means the provider has not yet provisioned the virtual circuit, or has de-provisioned it.

To be updated only by the provider.

Returns:

  • (String)


96
97
98
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 96

def provider_state
  @provider_state
end

#reference_commentString

Provider-supplied reference information about this virtual circuit. Relevant only if the customer is using FastConnect via a provider.

To be updated only by the provider.

Returns:

  • (String)


109
110
111
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 109

def reference_comment
  @reference_comment
end

Class Method Details

.attribute_mapObject

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



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 112

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'bandwidth_shape_name': :'bandwidthShapeName',
    'cross_connect_mappings': :'crossConnectMappings',
    'customer_bgp_asn': :'customerBgpAsn',
    'customer_asn': :'customerAsn',
    'defined_tags': :'definedTags',
    'display_name': :'displayName',
    'freeform_tags': :'freeformTags',
    'gateway_id': :'gatewayId',
    'provider_state': :'providerState',
    'provider_service_key_name': :'providerServiceKeyName',
    'reference_comment': :'referenceComment'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 131

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'bandwidth_shape_name': :'String',
    'cross_connect_mappings': :'Array<OCI::Core::Models::CrossConnectMapping>',
    'customer_bgp_asn': :'Integer',
    'customer_asn': :'Integer',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'display_name': :'String',
    'freeform_tags': :'Hash<String, String>',
    'gateway_id': :'String',
    'provider_state': :'String',
    'provider_service_key_name': :'String',
    'reference_comment': :'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



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 254

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

  self.class == other.class &&
    bandwidth_shape_name == other.bandwidth_shape_name &&
    cross_connect_mappings == other.cross_connect_mappings &&
    customer_bgp_asn == other.customer_bgp_asn &&
    customer_asn == other.customer_asn &&
    defined_tags == other.defined_tags &&
    display_name == other.display_name &&
    freeform_tags == other.freeform_tags &&
    gateway_id == other.gateway_id &&
    provider_state == other.provider_state &&
    provider_service_key_name == other.provider_service_key_name &&
    reference_comment == other.reference_comment
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



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 294

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


274
275
276
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 274

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



283
284
285
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 283

def hash
  [bandwidth_shape_name, cross_connect_mappings, customer_bgp_asn, customer_asn, defined_tags, display_name, freeform_tags, gateway_id, provider_state, provider_service_key_name, reference_comment].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



327
328
329
330
331
332
333
334
335
336
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 327

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



321
322
323
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 321

def to_s
  to_hash.to_s
end