class OCI::Core::Models::FastConnectProviderService
A service offering from a supported provider. For more information, see [FastConnect Overview](docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm).
Constants
- BANDWITH_SHAPE_MANAGEMENT_ENUM
- CUSTOMER_ASN_MANAGEMENT_ENUM
- PRIVATE_PEERING_BGP_MANAGEMENT_ENUM
- PROVIDER_SERVICE_KEY_MANAGEMENT_ENUM
- PUBLIC_PEERING_BGP_MANAGEMENT_ENUM
- SUPPORTED_VIRTUAL_CIRCUIT_TYPES_ENUM
- TYPE_ENUM
Attributes
[Required] Who is responsible for managing the virtual circuit bandwidth.
@return [String]
[Required] Who is responsible for managing the ASN information for the network at the other end of the connection from Oracle.
@return [String]
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: `example.com`
@return [String]
[Required] The OCID of the service offered by the provider.
@return [String]
[Required] Who is responsible for managing the private peering BGP information.
@return [String]
[Required] The name of the provider.
@return [String]
[Required] Who is responsible for managing the provider service key.
@return [String]
[Required] The name of the service offered by the provider.
@return [String]
[Required] Who is responsible for managing the public peering BGP information.
@return [String]
[Required] Total number of cross-connect or cross-connect groups required for the virtual circuit.
@return [Integer]
An array of virtual circuit types supported by this service.
@return [Array<String>]
[Required] Provider service type.
@return [String]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/core/models/fast_connect_provider_service.rb, line 126 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', 'customer_asn_management': :'customerAsnManagement', 'provider_service_key_management': :'providerServiceKeyManagement', 'bandwith_shape_management': :'bandwithShapeManagement', 'required_total_cross_connects': :'requiredTotalCrossConnects', 'type': :'type' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :description The value to assign to the {#description} property @option attributes [String] :id The value to assign to the {#id} property @option attributes [String] :private_peering_bgp_management The value to assign to the {#private_peering_bgp_management} property @option attributes [String] :provider_name The value to assign to the {#provider_name} property @option attributes [String] :provider_service_name The value to assign to the {#provider_service_name} property @option attributes [String] :public_peering_bgp_management The value to assign to the {#public_peering_bgp_management} property @option attributes [Array<String>] :supported_virtual_circuit_types The value to assign to the {#supported_virtual_circuit_types} property @option attributes [String] :customer_asn_management The value to assign to the {#customer_asn_management} property @option attributes [String] :provider_service_key_management The value to assign to the {#provider_service_key_management} property @option attributes [String] :bandwith_shape_management The value to assign to the {#bandwith_shape_management} property @option attributes [Integer] :required_total_cross_connects The value to assign to the {#required_total_cross_connects} property @option attributes [String] :type The value to assign to the {#type} property
# File lib/oci/core/models/fast_connect_provider_service.rb, line 183 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.customer_asn_management = attributes[:'customerAsnManagement'] if attributes[:'customerAsnManagement'] raise 'You cannot provide both :customerAsnManagement and :customer_asn_management' if attributes.key?(:'customerAsnManagement') && attributes.key?(:'customer_asn_management') self.customer_asn_management = attributes[:'customer_asn_management'] if attributes[:'customer_asn_management'] self.provider_service_key_management = attributes[:'providerServiceKeyManagement'] if attributes[:'providerServiceKeyManagement'] raise 'You cannot provide both :providerServiceKeyManagement and :provider_service_key_management' if attributes.key?(:'providerServiceKeyManagement') && attributes.key?(:'provider_service_key_management') self.provider_service_key_management = attributes[:'provider_service_key_management'] if attributes[:'provider_service_key_management'] self.bandwith_shape_management = attributes[:'bandwithShapeManagement'] if attributes[:'bandwithShapeManagement'] raise 'You cannot provide both :bandwithShapeManagement and :bandwith_shape_management' if attributes.key?(:'bandwithShapeManagement') && attributes.key?(:'bandwith_shape_management') self.bandwith_shape_management = attributes[:'bandwith_shape_management'] if attributes[:'bandwith_shape_management'] self.required_total_cross_connects = attributes[:'requiredTotalCrossConnects'] if attributes[:'requiredTotalCrossConnects'] raise 'You cannot provide both :requiredTotalCrossConnects and :required_total_cross_connects' if attributes.key?(:'requiredTotalCrossConnects') && attributes.key?(:'required_total_cross_connects') self.required_total_cross_connects = attributes[:'required_total_cross_connects'] if attributes[:'required_total_cross_connects'] self.type = attributes[:'type'] if attributes[:'type'] end
Attribute type mapping.
# File lib/oci/core/models/fast_connect_provider_service.rb, line 146 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>', 'customer_asn_management': :'String', 'provider_service_key_management': :'String', 'bandwith_shape_management': :'String', 'required_total_cross_connects': :'Integer', 'type': :'String' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/core/models/fast_connect_provider_service.rb, line 355 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 && customer_asn_management == other.customer_asn_management && provider_service_key_management == other.provider_service_key_management && bandwith_shape_management == other.bandwith_shape_management && required_total_cross_connects == other.required_total_cross_connects && type == other.type end
Custom attribute writer method checking allowed values (enum). @param [Object] bandwith_shape_management
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 326 def bandwith_shape_management=(bandwith_shape_management) # rubocop:disable Style/ConditionalAssignment if bandwith_shape_management && !BANDWITH_SHAPE_MANAGEMENT_ENUM.include?(bandwith_shape_management) OCI.logger.debug("Unknown value for 'bandwith_shape_management' [" + bandwith_shape_management + "]. Mapping to 'BANDWITH_SHAPE_MANAGEMENT_UNKNOWN_ENUM_VALUE'") if OCI.logger @bandwith_shape_management = BANDWITH_SHAPE_MANAGEMENT_UNKNOWN_ENUM_VALUE else @bandwith_shape_management = bandwith_shape_management end # rubocop:enable Style/ConditionalAssignment end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/core/models/fast_connect_provider_service.rb, line 396 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
Custom attribute writer method checking allowed values (enum). @param [Object] customer_asn_management
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 300 def customer_asn_management=(customer_asn_management) # rubocop:disable Style/ConditionalAssignment if customer_asn_management && !CUSTOMER_ASN_MANAGEMENT_ENUM.include?(customer_asn_management) OCI.logger.debug("Unknown value for 'customer_asn_management' [" + customer_asn_management + "]. Mapping to 'CUSTOMER_ASN_MANAGEMENT_UNKNOWN_ENUM_VALUE'") if OCI.logger @customer_asn_management = CUSTOMER_ASN_MANAGEMENT_UNKNOWN_ENUM_VALUE else @customer_asn_management = customer_asn_management end # rubocop:enable Style/ConditionalAssignment end
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/core/models/fast_connect_provider_service.rb, line 376 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/core/models/fast_connect_provider_service.rb, line 385 def hash [description, id, private_peering_bgp_management, provider_name, provider_service_name, public_peering_bgp_management, supported_virtual_circuit_types, customer_asn_management, provider_service_key_management, bandwith_shape_management, required_total_cross_connects, type].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] private_peering_bgp_management
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 254 def private_peering_bgp_management=(private_peering_bgp_management) # rubocop:disable Style/ConditionalAssignment if private_peering_bgp_management && !PRIVATE_PEERING_BGP_MANAGEMENT_ENUM.include?(private_peering_bgp_management) OCI.logger.debug("Unknown value for 'private_peering_bgp_management' [" + private_peering_bgp_management + "]. Mapping to 'PRIVATE_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE'") if OCI.logger @private_peering_bgp_management = PRIVATE_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE else @private_peering_bgp_management = private_peering_bgp_management end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] provider_service_key_management
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 313 def provider_service_key_management=(provider_service_key_management) # rubocop:disable Style/ConditionalAssignment if provider_service_key_management && !PROVIDER_SERVICE_KEY_MANAGEMENT_ENUM.include?(provider_service_key_management) OCI.logger.debug("Unknown value for 'provider_service_key_management' [" + provider_service_key_management + "]. Mapping to 'PROVIDER_SERVICE_KEY_MANAGEMENT_UNKNOWN_ENUM_VALUE'") if OCI.logger @provider_service_key_management = PROVIDER_SERVICE_KEY_MANAGEMENT_UNKNOWN_ENUM_VALUE else @provider_service_key_management = provider_service_key_management end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] public_peering_bgp_management
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 267 def public_peering_bgp_management=(public_peering_bgp_management) # rubocop:disable Style/ConditionalAssignment if public_peering_bgp_management && !PUBLIC_PEERING_BGP_MANAGEMENT_ENUM.include?(public_peering_bgp_management) OCI.logger.debug("Unknown value for 'public_peering_bgp_management' [" + public_peering_bgp_management + "]. Mapping to 'PUBLIC_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE'") if OCI.logger @public_peering_bgp_management = PUBLIC_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE else @public_peering_bgp_management = public_peering_bgp_management end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] supported_virtual_circuit_types
Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 280 def supported_virtual_circuit_types=(supported_virtual_circuit_types) # rubocop:disable Style/ConditionalAssignment if supported_virtual_circuit_types.nil? @supported_virtual_circuit_types = nil else @supported_virtual_circuit_types = supported_virtual_circuit_types.collect do |item| if SUPPORTED_VIRTUAL_CIRCUIT_TYPES_ENUM.include?(item) item else OCI.logger.debug("Unknown value for 'supported_virtual_circuit_types' [#{item}]. Mapping to 'SUPPORTED_VIRTUAL_CIRCUIT_TYPES_UNKNOWN_ENUM_VALUE'") if OCI.logger SUPPORTED_VIRTUAL_CIRCUIT_TYPES_UNKNOWN_ENUM_VALUE end end end # rubocop:enable Style/ConditionalAssignment end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/core/models/fast_connect_provider_service.rb, line 429 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/core/models/fast_connect_provider_service.rb, line 423 def to_s to_hash.to_s end
Custom attribute writer method checking allowed values (enum). @param [Object] type Object
to be assigned
# File lib/oci/core/models/fast_connect_provider_service.rb, line 339 def type=(type) # rubocop:disable Style/ConditionalAssignment if type && !TYPE_ENUM.include?(type) OCI.logger.debug("Unknown value for 'type' [" + type + "]. Mapping to 'TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger @type = TYPE_UNKNOWN_ENUM_VALUE else @type = type end # rubocop:enable Style/ConditionalAssignment end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/core/models/fast_connect_provider_service.rb, line 446 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end