Class: OracleBMC::Core::Models::VirtualCircuit
- Inherits:
-
Object
- Object
- OracleBMC::Core::Models::VirtualCircuit
- Defined in:
- lib/oraclebmc/core/models/virtual_circuit.rb
Constant Summary collapse
- BGP_SESSION_STATE_ENUM =
[BGP_SESSION_STATE_UP = 'UP', BGP_SESSION_STATE_DOWN = 'DOWN', BGP_SESSION_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- LIFECYCLE_STATE_ENUM =
[LIFECYCLE_STATE_PENDING_PROVIDER = 'PENDING_PROVIDER', LIFECYCLE_STATE_VERIFYING = 'VERIFYING', LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING', LIFECYCLE_STATE_PROVISIONED = 'PROVISIONED', LIFECYCLE_STATE_FAILED = 'FAILED', LIFECYCLE_STATE_INACTIVE = 'INACTIVE', LIFECYCLE_STATE_TERMINATING = 'TERMINATING', LIFECYCLE_STATE_TERMINATED = 'TERMINATED', LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- PROVIDER_STATE_ENUM =
[PROVIDER_STATE_ACTIVE = 'ACTIVE', PROVIDER_STATE_INACTIVE = 'INACTIVE', PROVIDER_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- TYPE_ENUM =
[TYPE_PUBLIC = 'PUBLIC', TYPE_PRIVATE = 'PRIVATE', TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
Instance Attribute Summary collapse
-
#bandwidth_shape_name ⇒ String
The provisioned data rate of the connection.
-
#bgp_session_state ⇒ String
The state of the BGP session associated with the virtual circuit.
-
#compartment_id ⇒ String
The OCID of the compartment containing the virtual circuit.
-
#cross_connect_mappings ⇒ Array<OracleBMC::Core::Models::CrossConnectMapping>
An array of mappings, each containing properties for a cross-connect or cross-connect group that is associated with this virtual circuit.
-
#customer_bgp_asn ⇒ Integer
The BGP ASN of the network at the other end of the BGP session from Oracle.
-
#display_name ⇒ String
A user-friendly name.
-
#gateway_id ⇒ String
The OCID of the customer’s Drg that this virtual circuit uses.
-
#id ⇒ String
The virtual circuit’s Oracle ID (OCID).
-
#lifecycle_state ⇒ String
The virtual circuit’s current state.
-
#oracle_bgp_asn ⇒ Integer
The Oracle BGP ASN.
-
#provider_name ⇒ String
The name of the provider (if the customer is connecting via a provider).
-
#provider_service_name ⇒ String
The name of the service 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 (if the customer is connecting via a provider).
-
#reference_comment ⇒ String
Provider-supplied reference information about this virtual circuit (if the customer is connecting via a provider).
-
#region ⇒ String
The Oracle Bare Metal Cloud Services region where this virtual circuit is located.
-
#time_created ⇒ DateTime
The date and time the virtual circuit was created, in the format defined by RFC3339.
-
#type ⇒ String
The type of IP addresses used in this virtual circuit.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VirtualCircuit
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 = {}) ⇒ VirtualCircuit
Initializes the object
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 206 207 208 209 210 211 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 136 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} if attributes[:'bandwidthShapeName'] self.bandwidth_shape_name = attributes[:'bandwidthShapeName'] end if attributes[:'bgpSessionState'] self.bgp_session_state = attributes[:'bgpSessionState'] end if attributes[:'compartmentId'] self.compartment_id = attributes[:'compartmentId'] end if attributes[:'crossConnectMappings'] self.cross_connect_mappings = attributes[:'crossConnectMappings'] end if attributes[:'customerBgpAsn'] self.customer_bgp_asn = attributes[:'customerBgpAsn'] end if attributes[:'displayName'] self.display_name = attributes[:'displayName'] end if attributes[:'gatewayId'] self.gateway_id = attributes[:'gatewayId'] end if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end if attributes[:'oracleBgpAsn'] self.oracle_bgp_asn = attributes[:'oracleBgpAsn'] end if attributes[:'providerName'] self.provider_name = attributes[:'providerName'] end if attributes[:'providerServiceName'] self.provider_service_name = attributes[:'providerServiceName'] end if attributes[:'providerState'] self.provider_state = attributes[:'providerState'] end if attributes[:'referenceComment'] self.reference_comment = attributes[:'referenceComment'] end if attributes[:'region'] self.region = attributes[:'region'] end if attributes[:'timeCreated'] self.time_created = attributes[:'timeCreated'] end if attributes[:'type'] self.type = attributes[:'type'] end end |
Instance Attribute Details
#bandwidth_shape_name ⇒ String
The provisioned data rate of the connection.
35 36 37 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 35 def bandwidth_shape_name @bandwidth_shape_name end |
#bgp_session_state ⇒ String
The state of the BGP session associated with the virtual circuit.
39 40 41 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 39 def bgp_session_state @bgp_session_state end |
#compartment_id ⇒ String
The OCID of the compartment containing the virtual circuit.
43 44 45 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 43 def compartment_id @compartment_id end |
#cross_connect_mappings ⇒ Array<OracleBMC::Core::Models::CrossConnectMapping>
An array of mappings, each containing properties for a cross-connect or cross-connect group that is associated with this virtual circuit.
50 51 52 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 50 def cross_connect_mappings @cross_connect_mappings end |
#customer_bgp_asn ⇒ Integer
The BGP ASN of the network at the other end of the BGP session from Oracle. If the session is between the customer’s edge router and Oracle, the value is the customer’s ASN. If the BGP session is between the provider’s edge router and Oracle, the value is the provider’s ASN.
59 60 61 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 59 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.
64 65 66 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 64 def display_name @display_name end |
#gateway_id ⇒ String
The OCID of the customer’s Drg that this virtual circuit uses.
70 71 72 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 70 def gateway_id @gateway_id end |
#id ⇒ String
The virtual circuit’s Oracle ID (OCID).
74 75 76 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 74 def id @id end |
#lifecycle_state ⇒ String
The virtual circuit’s current state. For information about the different states, see [FastConnect Overview](docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm).
81 82 83 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 81 def lifecycle_state @lifecycle_state end |
#oracle_bgp_asn ⇒ Integer
The Oracle BGP ASN.
85 86 87 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 85 def oracle_bgp_asn @oracle_bgp_asn end |
#provider_name ⇒ String
The name of the provider (if the customer is connecting via a provider).
90 91 92 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 90 def provider_name @provider_name end |
#provider_service_name ⇒ String
The name of the service offered by the provider (if the customer is connecting via a provider).
95 96 97 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 95 def provider_service_name @provider_service_name end |
#provider_state ⇒ String
The provider’s state in relation to this virtual circuit (if the customer is connecting 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.
104 105 106 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 104 def provider_state @provider_state end |
#reference_comment ⇒ String
Provider-supplied reference information about this virtual circuit (if the customer is connecting via a provider).
110 111 112 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 110 def reference_comment @reference_comment end |
#region ⇒ String
The Oracle Bare Metal Cloud Services region where this virtual circuit is located.
116 117 118 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 116 def region @region end |
#time_created ⇒ DateTime
The date and time the virtual circuit was created, in the format defined by RFC3339.
Example: ‘2016-08-25T21:10:29.600Z`
124 125 126 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 124 def time_created @time_created end |
#type ⇒ String
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). Only PRIVATE is supported.
131 132 133 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 131 def type @type end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 255 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && bandwidth_shape_name == other_object.bandwidth_shape_name && bgp_session_state == other_object.bgp_session_state && compartment_id == other_object.compartment_id && cross_connect_mappings == other_object.cross_connect_mappings && customer_bgp_asn == other_object.customer_bgp_asn && display_name == other_object.display_name && gateway_id == other_object.gateway_id && id == other_object.id && lifecycle_state == other_object.lifecycle_state && oracle_bgp_asn == other_object.oracle_bgp_asn && provider_name == other_object.provider_name && provider_service_name == other_object.provider_service_name && provider_state == other_object.provider_state && reference_comment == other_object.reference_comment && region == other_object.region && time_created == other_object.time_created && type == other_object.type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 292 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) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", OracleBMC::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_object) ⇒ Boolean
279 280 281 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 279 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
285 286 287 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 285 def hash [bandwidth_shape_name, bgp_session_state, compartment_id, cross_connect_mappings, customer_bgp_asn, display_name, gateway_id, id, lifecycle_state, oracle_bgp_asn, provider_name, provider_service_name, provider_state, reference_comment, region, time_created, type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
317 318 319 320 321 322 323 324 325 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 317 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
311 312 313 |
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 311 def to_s to_hash.to_s end |