Class: OCI::VnMonitoring::Models::FastConnectProviderService

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/vn_monitoring/models/fast_connect_provider_service.rb

Overview

A service offering from a supported provider. For more information, see FastConnect Overview.

Constant Summary collapse

PRIVATE_PEERING_BGP_MANAGEMENT_ENUM =
[
  PRIVATE_PEERING_BGP_MANAGEMENT_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED'.freeze,
  PRIVATE_PEERING_BGP_MANAGEMENT_PROVIDER_MANAGED = 'PROVIDER_MANAGED'.freeze,
  PRIVATE_PEERING_BGP_MANAGEMENT_ORACLE_MANAGED = 'ORACLE_MANAGED'.freeze,
  PRIVATE_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
PUBLIC_PEERING_BGP_MANAGEMENT_ENUM =
[
  PUBLIC_PEERING_BGP_MANAGEMENT_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED'.freeze,
  PUBLIC_PEERING_BGP_MANAGEMENT_PROVIDER_MANAGED = 'PROVIDER_MANAGED'.freeze,
  PUBLIC_PEERING_BGP_MANAGEMENT_ORACLE_MANAGED = 'ORACLE_MANAGED'.freeze,
  PUBLIC_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SUPPORTED_VIRTUAL_CIRCUIT_TYPES_ENUM =
[
  SUPPORTED_VIRTUAL_CIRCUIT_TYPES_PUBLIC = 'PUBLIC'.freeze,
  SUPPORTED_VIRTUAL_CIRCUIT_TYPES_PRIVATE = 'PRIVATE'.freeze,
  SUPPORTED_VIRTUAL_CIRCUIT_TYPES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
TYPE_ENUM =
[
  TYPE_LAYER2 = 'LAYER2'.freeze,
  TYPE_LAYER3 = 'LAYER3'.freeze,
  TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FastConnectProviderService

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



130
131
132
133
134
135
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
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 130

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.description = attributes[:'description'] if attributes[:'description']

  self.id = attributes[:'id'] if attributes[:'id']

  self.private_peering_bgp_management = attributes[:'privatePeeringBgpManagement'] if attributes[:'privatePeeringBgpManagement']

  raise 'You cannot provide both :privatePeeringBgpManagement and :private_peering_bgp_management' if attributes.key?(:'privatePeeringBgpManagement') && attributes.key?(:'private_peering_bgp_management')

  self.private_peering_bgp_management = attributes[:'private_peering_bgp_management'] if attributes[:'private_peering_bgp_management']

  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_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_peering_bgp_management = attributes[:'publicPeeringBgpManagement'] if attributes[:'publicPeeringBgpManagement']

  raise 'You cannot provide both :publicPeeringBgpManagement and :public_peering_bgp_management' if attributes.key?(:'publicPeeringBgpManagement') && attributes.key?(:'public_peering_bgp_management')

  self.public_peering_bgp_management = attributes[:'public_peering_bgp_management'] if attributes[:'public_peering_bgp_management']

  self.supported_virtual_circuit_types = attributes[:'supportedVirtualCircuitTypes'] if attributes[:'supportedVirtualCircuitTypes']

  raise 'You cannot provide both :supportedVirtualCircuitTypes and :supported_virtual_circuit_types' if attributes.key?(:'supportedVirtualCircuitTypes') && attributes.key?(:'supported_virtual_circuit_types')

  self.supported_virtual_circuit_types = attributes[:'supported_virtual_circuit_types'] if attributes[:'supported_virtual_circuit_types']

  self.type = attributes[:'type'] if attributes[:'type']
end

Instance Attribute Details

#descriptionString

The location of the provider's website or portal. This portal is where you can get information about the provider service, create a virtual circuit connection from the provider to Oracle Cloud Infrastructure, and retrieve your provider service key for that virtual circuit connection.

Example: https://example.com

Returns:

  • (String)


47
48
49
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 47

def description
  @description
end

#idString

[Required] The OCID of the service offered by the provider.

Returns:

  • (String)


52
53
54
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 52

def id
  @id
end

#private_peering_bgp_managementString

[Required] Who is responsible for managing the private peering BGP information.

Returns:

  • (String)


57
58
59
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 57

def private_peering_bgp_management
  @private_peering_bgp_management
end

#provider_nameString

[Required] The name of the provider.

Returns:

  • (String)


62
63
64
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 62

def provider_name
  @provider_name
end

#provider_service_nameString

[Required] The name of the service offered by the provider.

Returns:

  • (String)


67
68
69
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 67

def provider_service_name
  @provider_service_name
end

#public_peering_bgp_managementString

[Required] Who is responsible for managing the public peering BGP information.

Returns:

  • (String)


72
73
74
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 72

def public_peering_bgp_management
  @public_peering_bgp_management
end

#supported_virtual_circuit_typesArray<String>

An array of virtual circuit types supported by this service.

Returns:

  • (Array<String>)


77
78
79
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 77

def supported_virtual_circuit_types
  @supported_virtual_circuit_types
end

#typeString

[Required] Provider service type.

Returns:

  • (String)


82
83
84
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 82

def type
  @type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 85

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'description': :'description',
    'id': :'id',
    'private_peering_bgp_management': :'privatePeeringBgpManagement',
    'provider_name': :'providerName',
    'provider_service_name': :'providerServiceName',
    'public_peering_bgp_management': :'publicPeeringBgpManagement',
    'supported_virtual_circuit_types': :'supportedVirtualCircuitTypes',
    'type': :'type'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 101

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'description': :'String',
    'id': :'String',
    'private_peering_bgp_management': :'String',
    'provider_name': :'String',
    'provider_service_name': :'String',
    'public_peering_bgp_management': :'String',
    'supported_virtual_circuit_types': :'Array<String>',
    'type': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 239

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    description == other.description &&
    id == other.id &&
    private_peering_bgp_management == other.private_peering_bgp_management &&
    provider_name == other.provider_name &&
    provider_service_name == other.provider_service_name &&
    public_peering_bgp_management == other.public_peering_bgp_management &&
    supported_virtual_circuit_types == other.supported_virtual_circuit_types &&
    type == other.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



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 276

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


256
257
258
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 256

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



265
266
267
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 265

def hash
  [description, id, private_peering_bgp_management, provider_name, provider_service_name, public_peering_bgp_management, supported_virtual_circuit_types, type].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



309
310
311
312
313
314
315
316
317
318
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 309

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



303
304
305
# File 'lib/oci/vn_monitoring/models/fast_connect_provider_service.rb', line 303

def to_s
  to_hash.to_s
end