Class: OCI::Core::Models::UpdateVirtualCircuitDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::UpdateVirtualCircuitDetails
- Defined in:
- lib/oci/core/models/update_virtual_circuit_details.rb
Overview
UpdateVirtualCircuitDetails model.
Constant Summary collapse
- ROUTING_POLICY_ENUM =
[ ROUTING_POLICY_ORACLE_SERVICE_NETWORK = 'ORACLE_SERVICE_NETWORK'.freeze, ROUTING_POLICY_REGIONAL = 'REGIONAL'.freeze, ROUTING_POLICY_MARKET_LEVEL = 'MARKET_LEVEL'.freeze, ROUTING_POLICY_GLOBAL = 'GLOBAL'.freeze ].freeze
- BGP_ADMIN_STATE_ENUM =
[ BGP_ADMIN_STATE_ENABLED = 'ENABLED'.freeze, BGP_ADMIN_STATE_DISABLED = 'DISABLED'.freeze ].freeze
- TRAFFIC_MODE_ENUM =
[ TRAFFIC_MODE_NORMAL = 'NORMAL'.freeze, TRAFFIC_MODE_DRAIN = 'DRAIN'.freeze ].freeze
- PROVIDER_STATE_ENUM =
[ PROVIDER_STATE_ACTIVE = 'ACTIVE'.freeze, PROVIDER_STATE_INACTIVE = 'INACTIVE'.freeze ].freeze
- IP_MTU_ENUM =
[ IP_MTU_MTU_1500 = 'MTU_1500'.freeze, IP_MTU_MTU_9000 = 'MTU_9000'.freeze ].freeze
Instance Attribute Summary collapse
-
#bandwidth_shape_name ⇒ String
The provisioned data rate of the connection.
-
#bgp_admin_state ⇒ String
Set to
ENABLED(the default) to activate the BGP session of the virtual circuit, set toDISABLEDto deactivate the virtual circuit. -
#cross_connect_mappings ⇒ Array<OCI::Core::Models::CrossConnectMapping>
An array of mappings, each containing properties for a cross-connect or cross-connect group associated with this virtual circuit.
-
#customer_asn ⇒ Integer
The BGP ASN of the network at the other end of the BGP session from Oracle.
-
#customer_bgp_asn ⇒ Integer
Deprecated.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
- #gateway_id ⇒ String
-
#ip_mtu ⇒ String
The layer 3 IP MTU to use on this virtual circuit.
-
#is_bfd_enabled ⇒ BOOLEAN
Set to
trueto enable BFD for IPv4 BGP peering, or set tofalseto disable BFD. -
#is_transport_mode ⇒ BOOLEAN
Set to
truefor the virtual circuit to carry only encrypted traffic, or set tofalsefor the virtual circuit to carry unencrypted traffic. -
#provider_service_key_name ⇒ String
The service key name offered by the provider (if the customer is connecting via a provider).
-
#provider_state ⇒ String
The provider's state in relation to this virtual circuit.
-
#reference_comment ⇒ String
Provider-supplied reference information about this virtual circuit.
-
#routing_policy ⇒ Array<String>
The routing policy sets how routing information about the Oracle cloud is shared over a public virtual circuit.
-
#traffic_mode ⇒ String
The traffic mode to be set with this Virtual Circuit.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateVirtualCircuitDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateVirtualCircuitDetails
Initializes the object
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 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 238 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.routing_policy = attributes[:'routingPolicy'] if attributes[:'routingPolicy'] raise 'You cannot provide both :routingPolicy and :routing_policy' if attributes.key?(:'routingPolicy') && attributes.key?(:'routing_policy') self.routing_policy = attributes[:'routing_policy'] if attributes[:'routing_policy'] self.bgp_admin_state = attributes[:'bgpAdminState'] if attributes[:'bgpAdminState'] raise 'You cannot provide both :bgpAdminState and :bgp_admin_state' if attributes.key?(:'bgpAdminState') && attributes.key?(:'bgp_admin_state') self.bgp_admin_state = attributes[:'bgp_admin_state'] if attributes[:'bgp_admin_state'] self.is_bfd_enabled = attributes[:'isBfdEnabled'] unless attributes[:'isBfdEnabled'].nil? self.is_bfd_enabled = false if is_bfd_enabled.nil? && !attributes.key?(:'isBfdEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isBfdEnabled and :is_bfd_enabled' if attributes.key?(:'isBfdEnabled') && attributes.key?(:'is_bfd_enabled') self.is_bfd_enabled = attributes[:'is_bfd_enabled'] unless attributes[:'is_bfd_enabled'].nil? self.is_bfd_enabled = false if is_bfd_enabled.nil? && !attributes.key?(:'isBfdEnabled') && !attributes.key?(:'is_bfd_enabled') # rubocop:disable Style/StringLiterals self.is_transport_mode = attributes[:'isTransportMode'] unless attributes[:'isTransportMode'].nil? self.is_transport_mode = false if is_transport_mode.nil? && !attributes.key?(:'isTransportMode') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isTransportMode and :is_transport_mode' if attributes.key?(:'isTransportMode') && attributes.key?(:'is_transport_mode') self.is_transport_mode = attributes[:'is_transport_mode'] unless attributes[:'is_transport_mode'].nil? self.is_transport_mode = false if is_transport_mode.nil? && !attributes.key?(:'isTransportMode') && !attributes.key?(:'is_transport_mode') # rubocop:disable Style/StringLiterals 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. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.traffic_mode = attributes[:'trafficMode'] if attributes[:'trafficMode'] raise 'You cannot provide both :trafficMode and :traffic_mode' if attributes.key?(:'trafficMode') && attributes.key?(:'traffic_mode') self.traffic_mode = attributes[:'traffic_mode'] if attributes[:'traffic_mode'] 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'] self.ip_mtu = attributes[:'ipMtu'] if attributes[:'ipMtu'] raise 'You cannot provide both :ipMtu and :ip_mtu' if attributes.key?(:'ipMtu') && attributes.key?(:'ip_mtu') self.ip_mtu = attributes[:'ip_mtu'] if attributes[:'ip_mtu'] end |
Instance Attribute Details
#bandwidth_shape_name ⇒ String
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.
44 45 46 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 44 def bandwidth_shape_name @bandwidth_shape_name end |
#bgp_admin_state ⇒ String
Set to ENABLED (the default) to activate the BGP session of the virtual circuit, set to DISABLED to deactivate the virtual circuit.
67 68 69 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 67 def bgp_admin_state @bgp_admin_state end |
#cross_connect_mappings ⇒ Array<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.
54 55 56 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 54 def cross_connect_mappings @cross_connect_mappings end |
#customer_asn ⇒ Integer
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.
99 100 101 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 99 def customer_asn @customer_asn end |
#customer_bgp_asn ⇒ Integer
Deprecated. Instead use customerAsn. If you specify values for both, the request will be rejected.
83 84 85 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 83 def customer_bgp_asn @customer_bgp_asn end |
#defined_tags ⇒ Hash<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\"}}
107 108 109 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 107 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
113 114 115 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 113 def display_name @display_name end |
#freeform_tags ⇒ Hash<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\"}
121 122 123 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 121 def @freeform_tags end |
#gateway_id ⇒ String
135 136 137 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 135 def gateway_id @gateway_id end |
#ip_mtu ⇒ String
The layer 3 IP MTU to use on this virtual circuit.
163 164 165 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 163 def ip_mtu @ip_mtu end |
#is_bfd_enabled ⇒ BOOLEAN
Set to true to enable BFD for IPv4 BGP peering, or set to false to disable BFD. If this is not set, the default is false.
72 73 74 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 72 def is_bfd_enabled @is_bfd_enabled end |
#is_transport_mode ⇒ BOOLEAN
Set to true for the virtual circuit to carry only encrypted traffic, or set to false for the virtual circuit to carry unencrypted traffic. If this is not set, the default is false.
77 78 79 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 77 def is_transport_mode @is_transport_mode end |
#provider_service_key_name ⇒ String
The service key name offered by the provider (if the customer is connecting via a provider).
151 152 153 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 151 def provider_service_key_name @provider_service_key_name end |
#provider_state ⇒ String
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.
146 147 148 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 146 def provider_state @provider_state end |
#reference_comment ⇒ String
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.
159 160 161 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 159 def reference_comment @reference_comment end |
#routing_policy ⇒ Array<String>
The routing policy sets how routing information about the Oracle cloud is shared over a public virtual circuit. Policies available are: ORACLE_SERVICE_NETWORK, REGIONAL, MARKET_LEVEL, and GLOBAL. See Route Filtering for details. By default, routing information is shared for all routes in the same market.
62 63 64 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 62 def routing_policy @routing_policy end |
#traffic_mode ⇒ String
The traffic mode to be set with this Virtual Circuit. This controls whether the traffic is to be drained for the associated Virtual Circuit or not.
127 128 129 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 127 def traffic_mode @traffic_mode end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 166 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'bandwidth_shape_name': :'bandwidthShapeName', 'cross_connect_mappings': :'crossConnectMappings', 'routing_policy': :'routingPolicy', 'bgp_admin_state': :'bgpAdminState', 'is_bfd_enabled': :'isBfdEnabled', 'is_transport_mode': :'isTransportMode', 'customer_bgp_asn': :'customerBgpAsn', 'customer_asn': :'customerAsn', 'defined_tags': :'definedTags', 'display_name': :'displayName', 'freeform_tags': :'freeformTags', 'traffic_mode': :'trafficMode', 'gateway_id': :'gatewayId', 'provider_state': :'providerState', 'provider_service_key_name': :'providerServiceKeyName', 'reference_comment': :'referenceComment', 'ip_mtu': :'ipMtu' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 191 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'bandwidth_shape_name': :'String', 'cross_connect_mappings': :'Array<OCI::Core::Models::CrossConnectMapping>', 'routing_policy': :'Array<String>', 'bgp_admin_state': :'String', 'is_bfd_enabled': :'BOOLEAN', 'is_transport_mode': :'BOOLEAN', 'customer_bgp_asn': :'Integer', 'customer_asn': :'Integer', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'freeform_tags': :'Hash<String, String>', 'traffic_mode': :'String', 'gateway_id': :'String', 'provider_state': :'String', 'provider_service_key_name': :'String', 'reference_comment': :'String', 'ip_mtu': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 405 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 && routing_policy == other.routing_policy && bgp_admin_state == other.bgp_admin_state && is_bfd_enabled == other.is_bfd_enabled && is_transport_mode == other.is_transport_mode && customer_bgp_asn == other.customer_bgp_asn && customer_asn == other.customer_asn && == other. && display_name == other.display_name && == other. && traffic_mode == other.traffic_mode && gateway_id == other.gateway_id && provider_state == other.provider_state && provider_service_key_name == other.provider_service_key_name && reference_comment == other.reference_comment && ip_mtu == other.ip_mtu end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 451 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
431 432 433 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 431 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
440 441 442 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 440 def hash [bandwidth_shape_name, cross_connect_mappings, routing_policy, bgp_admin_state, is_bfd_enabled, is_transport_mode, customer_bgp_asn, customer_asn, , display_name, , traffic_mode, gateway_id, provider_state, provider_service_key_name, reference_comment, ip_mtu].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
484 485 486 487 488 489 490 491 492 493 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 484 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_s ⇒ String
Returns the string representation of the object
478 479 480 |
# File 'lib/oci/core/models/update_virtual_circuit_details.rb', line 478 def to_s to_hash.to_s end |