Class: OracleBMC::Core::Models::CreateVirtualCircuitDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oraclebmc/core/models/create_virtual_circuit_details.rb

Constant Summary collapse

TYPE_ENUM =
[TYPE_PUBLIC = 'PUBLIC',
TYPE_PRIVATE = 'PRIVATE']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateVirtualCircuitDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 81

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[:'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[:'providerName']
    self.provider_name = attributes[:'providerName']
  end
  
  if attributes[:'providerServiceName']
    self.provider_service_name = attributes[:'providerServiceName']
  end
  
  if attributes[:'region']
    self.region = attributes[:'region']
  end
  
  if attributes[:'type']
    self.type = attributes[:'type']
  end
  
end

Instance Attribute Details

#bandwidth_shape_nameString

The provisioned data rate of the connection. To get a list of the available bandwidth levels (i.e., shapes), see list_virtual_circuit_bandwidth_shapes.

Example: ‘10 Gbps`

Returns:

  • (String)


18
19
20
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 18

def bandwidth_shape_name
  @bandwidth_shape_name
end

#compartment_idString

The OCID of the compartment to contain the virtual circuit.

Returns:

  • (String)


23
24
25
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 23

def compartment_id
  @compartment_id
end

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

Create a ‘CrossConnectMapping` for each cross-connect or cross-connect group this virtual circuit will run on.



29
30
31
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 29

def cross_connect_mappings
  @cross_connect_mappings
end

#customer_bgp_asnInteger

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.

Returns:

  • (Integer)


36
37
38
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 36

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)


41
42
43
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 41

def display_name
  @display_name
end

#gateway_idString

The OCID of the Drg that this virtual circuit uses.

Returns:

  • (String)


47
48
49
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 47

def gateway_id
  @gateway_id
end

#provider_nameString

The name of the provider (if you’re connecting via a provider). To get a list of the provider names, see list_fast_connect_provider_services.

Returns:

  • (String)


54
55
56
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 54

def provider_name
  @provider_name
end

#provider_service_nameString

The name 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.

Returns:

  • (String)


61
62
63
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 61

def provider_service_name
  @provider_service_name
end

#regionString

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

Example: ‘phx`

Returns:

  • (String)


69
70
71
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 69

def region
  @region
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)


76
77
78
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 76

def type
  @type
end

Instance Method Details

#==(other_object) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other_object (Object)

    to be compared



142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 142

def ==(other_object)
  return true if self.equal?(other_object)
  self.class == other_object.class &&
      bandwidth_shape_name == other_object.bandwidth_shape_name &&
      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 &&
      provider_name == other_object.provider_name &&
      provider_service_name == other_object.provider_service_name &&
      region == other_object.region &&
      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



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 172

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


159
160
161
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 159

def eql?(other_object)
  self == other_object
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



165
166
167
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 165

def hash
  [bandwidth_shape_name, compartment_id, cross_connect_mappings, customer_bgp_asn, display_name, gateway_id, provider_name, provider_service_name, region, type].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



197
198
199
200
201
202
203
204
205
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 197

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



191
192
193
# File 'lib/oraclebmc/core/models/create_virtual_circuit_details.rb', line 191

def to_s
  to_hash.to_s
end