Class: OCI::VnMonitoring::Models::CreateVirtualCircuitDetails
- Inherits:
-
Object
- Object
- OCI::VnMonitoring::Models::CreateVirtualCircuitDetails
- Defined in:
- lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb
Overview
CreateVirtualCircuitDetails model.
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_PUBLIC = 'PUBLIC'.freeze, TYPE_PRIVATE = 'PRIVATE'.freeze ].freeze
Instance Attribute Summary collapse
-
#bandwidth_shape_name ⇒ String
The provisioned data rate of the connection.
-
#compartment_id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the virtual circuit.
-
#cross_connect_mappings ⇒ Array<OCI::VnMonitoring::Models::CrossConnectMapping>
Create a `CrossConnectMapping` for each cross-connect or cross-connect group this virtual circuit will run on.
-
#customer_bgp_asn ⇒ Integer
Your BGP ASN (either public or private).
-
#display_name ⇒ String
A user-friendly name.
-
#gateway_id ⇒ String
For private virtual circuits only.
-
#provider_name ⇒ String
Deprecated.
-
#provider_service_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service offered by the provider (if you're connecting via a provider).
-
#provider_service_name ⇒ String
Deprecated.
-
#public_prefixes ⇒ Array<OCI::VnMonitoring::Models::CreateVirtualCircuitPublicPrefixDetails>
For a public virtual circuit.
-
#region ⇒ String
The Oracle Cloud Infrastructure region where this virtual circuit is located.
-
#type ⇒ String
**[Required]** The type of IP addresses used in 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 = {}) ⇒ CreateVirtualCircuitDetails
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 = {}) ⇒ CreateVirtualCircuitDetails
Initializes the object
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 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 153 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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] 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.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.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_name = attributes[:'providerName'] if attributes[:'providerName'] raise 'You cannot provide both :providerName and :provider_name' if attributes.key?(:'providerName') && attributes.key?(:'provider_name') self.provider_name = attributes[:'provider_name'] if attributes[:'provider_name'] self.provider_service_id = attributes[:'providerServiceId'] if attributes[:'providerServiceId'] raise 'You cannot provide both :providerServiceId and :provider_service_id' if attributes.key?(:'providerServiceId') && attributes.key?(:'provider_service_id') self.provider_service_id = attributes[:'provider_service_id'] if attributes[:'provider_service_id'] self.provider_service_name = attributes[:'providerServiceName'] if attributes[:'providerServiceName'] raise 'You cannot provide both :providerServiceName and :provider_service_name' if attributes.key?(:'providerServiceName') && attributes.key?(:'provider_service_name') self.provider_service_name = attributes[:'provider_service_name'] if attributes[:'provider_service_name'] self.public_prefixes = attributes[:'publicPrefixes'] if attributes[:'publicPrefixes'] raise 'You cannot provide both :publicPrefixes and :public_prefixes' if attributes.key?(:'publicPrefixes') && attributes.key?(:'public_prefixes') self.public_prefixes = attributes[:'public_prefixes'] if attributes[:'public_prefixes'] self.region = attributes[:'region'] if attributes[:'region'] self.type = attributes[:'type'] if attributes[:'type'] 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.
Example: `10 Gbps`
22 23 24 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 22 def bandwidth_shape_name @bandwidth_shape_name end |
#compartment_id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to contain the virtual circuit.
27 28 29 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 27 def compartment_id @compartment_id end |
#cross_connect_mappings ⇒ Array<OCI::VnMonitoring::Models::CrossConnectMapping>
Create a `CrossConnectMapping` for each cross-connect or cross-connect group this virtual circuit will run on.
33 34 35 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 33 def cross_connect_mappings @cross_connect_mappings end |
#customer_bgp_asn ⇒ Integer
Your BGP ASN (either public or private). Provide this value only if there's a BGP session that goes from your edge router to Oracle. Otherwise, leave this empty or null.
40 41 42 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 40 def customer_bgp_asn @customer_bgp_asn end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
46 47 48 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 46 def display_name @display_name end |
#gateway_id ⇒ String
For private virtual circuits only. The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Drg that this virtual circuit uses.
52 53 54 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 52 def gateway_id @gateway_id end |
#provider_name ⇒ String
Deprecated. Instead use `providerServiceId`. To get a list of the provider names, see list_fast_connect_provider_services.
59 60 61 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 59 def provider_name @provider_name end |
#provider_service_id ⇒ String
The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the service offered by the provider (if you're connecting via a provider). To get a list of the available service offerings, see list_fast_connect_provider_services.
66 67 68 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 66 def provider_service_id @provider_service_id end |
#provider_service_name ⇒ String
Deprecated. Instead use `providerServiceId`. To get a list of the provider names, see list_fast_connect_provider_services.
73 74 75 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 73 def provider_service_name @provider_service_name end |
#public_prefixes ⇒ Array<OCI::VnMonitoring::Models::CreateVirtualCircuitPublicPrefixDetails>
For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to advertise across the connection.
79 80 81 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 79 def public_prefixes @public_prefixes end |
#region ⇒ String
The Oracle Cloud Infrastructure region where this virtual circuit is located. Example: `phx`
86 87 88 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 86 def region @region end |
#type ⇒ String
**[Required]** The type of IP addresses used in this virtual circuit. PRIVATE means [RFC 1918](tools.ietf.org/html/rfc1918) addresses (10.0.0.0/8, 172.16/12, and 192.168/16).
93 94 95 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 93 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 96 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'bandwidth_shape_name': :'bandwidthShapeName', 'compartment_id': :'compartmentId', 'cross_connect_mappings': :'crossConnectMappings', 'customer_bgp_asn': :'customerBgpAsn', 'display_name': :'displayName', 'gateway_id': :'gatewayId', 'provider_name': :'providerName', 'provider_service_id': :'providerServiceId', 'provider_service_name': :'providerServiceName', 'public_prefixes': :'publicPrefixes', 'region': :'region', 'type': :'type' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 116 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'bandwidth_shape_name': :'String', 'compartment_id': :'String', 'cross_connect_mappings': :'Array<OCI::VnMonitoring::Models::CrossConnectMapping>', 'customer_bgp_asn': :'Integer', 'display_name': :'String', 'gateway_id': :'String', 'provider_name': :'String', 'provider_service_id': :'String', 'provider_service_name': :'String', 'public_prefixes': :'Array<OCI::VnMonitoring::Models::CreateVirtualCircuitPublicPrefixDetails>', 'region': :'String', 'type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 239 def ==(other) return true if equal?(other) self.class == other.class && bandwidth_shape_name == other.bandwidth_shape_name && compartment_id == other.compartment_id && cross_connect_mappings == other.cross_connect_mappings && customer_bgp_asn == other.customer_bgp_asn && display_name == other.display_name && gateway_id == other.gateway_id && provider_name == other.provider_name && provider_service_id == other.provider_service_id && provider_service_name == other.provider_service_name && public_prefixes == other.public_prefixes && region == other.region && type == other.type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 280 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
260 261 262 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 260 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
269 270 271 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 269 def hash [bandwidth_shape_name, compartment_id, cross_connect_mappings, customer_bgp_asn, display_name, gateway_id, provider_name, provider_service_id, provider_service_name, public_prefixes, region, type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 313 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
307 308 309 |
# File 'lib/oci/vn_monitoring/models/create_virtual_circuit_details.rb', line 307 def to_s to_hash.to_s end |