Class: OracleBMC::Core::Models::VirtualCircuit

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VirtualCircuit

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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_nameString

The provisioned data rate of the connection.

Returns:

  • (String)


35
36
37
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 35

def bandwidth_shape_name
  @bandwidth_shape_name
end

#bgp_session_stateString

The state of the BGP session associated with the virtual circuit.

Returns:

  • (String)


39
40
41
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 39

def bgp_session_state
  @bgp_session_state
end

#compartment_idString

The OCID of the compartment containing the virtual circuit.

Returns:

  • (String)


43
44
45
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 43

def compartment_id
  @compartment_id
end

#cross_connect_mappingsArray<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_asnInteger

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.

Returns:

  • (Integer)


59
60
61
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 59

def customer_bgp_asn
  @customer_bgp_asn
end

#display_nameString

A user-friendly name. Does not have to be unique, and it’s changeable.

Returns:

  • (String)


64
65
66
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 64

def display_name
  @display_name
end

#gateway_idString

The OCID of the customer’s Drg that this virtual circuit uses.

Returns:

  • (String)


70
71
72
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 70

def gateway_id
  @gateway_id
end

#idString

The virtual circuit’s Oracle ID (OCID).

Returns:

  • (String)


74
75
76
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 74

def id
  @id
end

#lifecycle_stateString

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

Returns:

  • (String)


81
82
83
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 81

def lifecycle_state
  @lifecycle_state
end

#oracle_bgp_asnInteger

The Oracle BGP ASN.

Returns:

  • (Integer)


85
86
87
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 85

def oracle_bgp_asn
  @oracle_bgp_asn
end

#provider_nameString

The name of the provider (if the customer is connecting via a provider).

Returns:

  • (String)


90
91
92
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 90

def provider_name
  @provider_name
end

#provider_service_nameString

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

Returns:

  • (String)


95
96
97
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 95

def provider_service_name
  @provider_service_name
end

#provider_stateString

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.

Returns:

  • (String)


104
105
106
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 104

def provider_state
  @provider_state
end

#reference_commentString

Provider-supplied reference information about this virtual circuit (if the customer is connecting via a provider).

Returns:

  • (String)


110
111
112
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 110

def reference_comment
  @reference_comment
end

#regionString

The Oracle Bare Metal Cloud Services region where this virtual circuit is located.

Returns:

  • (String)


116
117
118
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 116

def region
  @region
end

#time_createdDateTime

The date and time the virtual circuit was created, in the format defined by RFC3339.

Example: ‘2016-08-25T21:10:29.600Z`

Returns:

  • (DateTime)


124
125
126
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 124

def time_created
  @time_created
end

#typeString

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.

Returns:

  • (String)


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.

Parameters:

  • other_object (Object)

    to be compared



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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • other_object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


279
280
281
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 279

def eql?(other_object)
  self == other_object
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



311
312
313
# File 'lib/oraclebmc/core/models/virtual_circuit.rb', line 311

def to_s
  to_hash.to_s
end