Class: OCI::VnMonitoring::Models::FlexTunnelDrgAttachmentNetworkDetails
- Inherits:
-
DrgAttachmentNetworkDetails
- Object
- DrgAttachmentNetworkDetails
- OCI::VnMonitoring::Models::FlexTunnelDrgAttachmentNetworkDetails
- Defined in:
- lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb
Overview
Specifies the flex tunnel attached to the DRG.
Constant Summary
Constants inherited from DrgAttachmentNetworkDetails
DrgAttachmentNetworkDetails::TYPE_ENUM
Instance Attribute Summary collapse
-
#export_route_target ⇒ String
Routes which are exported to the attachment are exported to the route reflectors with the route target set to the value of the attachment's export route target.
-
#import_route_target ⇒ String
Routes which may be imported from the attachment (subject to import policy) appear in the route reflectors tagged with the attachment's import route target.
-
#ingress_vip ⇒ String
IPv4 address used to encapsulate ingress traffic to the DRG through this attachment.
-
#mpls_label ⇒ Integer
The MPLS label of the DRG attachment.
-
#regional_oci_asn ⇒ String
The BGP ASN to use for the Flex Tunnel connection's route target.
-
#transport_attachment_id ⇒ String
The OCID of the transport drg attachment of the flex tunnel.
Attributes inherited from DrgAttachmentNetworkDetails
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ FlexTunnelDrgAttachmentNetworkDetails
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.
Methods inherited from DrgAttachmentNetworkDetails
Constructor Details
#initialize(attributes = {}) ⇒ FlexTunnelDrgAttachmentNetworkDetails
Initializes the object
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 129 130 131 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 86 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'FLEX_TUNNEL' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self. = attributes[:'transportAttachmentId'] if attributes[:'transportAttachmentId'] raise 'You cannot provide both :transportAttachmentId and :transport_attachment_id' if attributes.key?(:'transportAttachmentId') && attributes.key?(:'transport_attachment_id') self. = attributes[:'transport_attachment_id'] if attributes[:'transport_attachment_id'] self.regional_oci_asn = attributes[:'regionalOciAsn'] if attributes[:'regionalOciAsn'] raise 'You cannot provide both :regionalOciAsn and :regional_oci_asn' if attributes.key?(:'regionalOciAsn') && attributes.key?(:'regional_oci_asn') self.regional_oci_asn = attributes[:'regional_oci_asn'] if attributes[:'regional_oci_asn'] self.import_route_target = attributes[:'importRouteTarget'] if attributes[:'importRouteTarget'] raise 'You cannot provide both :importRouteTarget and :import_route_target' if attributes.key?(:'importRouteTarget') && attributes.key?(:'import_route_target') self.import_route_target = attributes[:'import_route_target'] if attributes[:'import_route_target'] self.export_route_target = attributes[:'exportRouteTarget'] if attributes[:'exportRouteTarget'] raise 'You cannot provide both :exportRouteTarget and :export_route_target' if attributes.key?(:'exportRouteTarget') && attributes.key?(:'export_route_target') self.export_route_target = attributes[:'export_route_target'] if attributes[:'export_route_target'] self.mpls_label = attributes[:'mplsLabel'] if attributes[:'mplsLabel'] raise 'You cannot provide both :mplsLabel and :mpls_label' if attributes.key?(:'mplsLabel') && attributes.key?(:'mpls_label') self.mpls_label = attributes[:'mpls_label'] if attributes[:'mpls_label'] self.ingress_vip = attributes[:'ingressVip'] if attributes[:'ingressVip'] raise 'You cannot provide both :ingressVip and :ingress_vip' if attributes.key?(:'ingressVip') && attributes.key?(:'ingress_vip') self.ingress_vip = attributes[:'ingress_vip'] if attributes[:'ingress_vip'] end |
Instance Attribute Details
#export_route_target ⇒ String
Routes which are exported to the attachment are exported to the route reflectors with the route target set to the value of the attachment's export route target.
31 32 33 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 31 def export_route_target @export_route_target end |
#import_route_target ⇒ String
Routes which may be imported from the attachment (subject to import policy) appear in the route reflectors tagged with the attachment's import route target.
25 26 27 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 25 def import_route_target @import_route_target end |
#ingress_vip ⇒ String
IPv4 address used to encapsulate ingress traffic to the DRG through this attachment
39 40 41 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 39 def ingress_vip @ingress_vip end |
#mpls_label ⇒ Integer
The MPLS label of the DRG attachment.
35 36 37 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 35 def mpls_label @mpls_label end |
#regional_oci_asn ⇒ String
The BGP ASN to use for the Flex Tunnel connection's route target
19 20 21 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 19 def regional_oci_asn @regional_oci_asn end |
#transport_attachment_id ⇒ String
The OCID of the transport drg attachment of the flex tunnel.
14 15 16 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 14 def @transport_attachment_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'id': :'id', 'transport_attachment_id': :'transportAttachmentId', 'regional_oci_asn': :'regionalOciAsn', 'import_route_target': :'importRouteTarget', 'export_route_target': :'exportRouteTarget', 'mpls_label': :'mplsLabel', 'ingress_vip': :'ingressVip' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 58 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'id': :'String', 'transport_attachment_id': :'String', 'regional_oci_asn': :'String', 'import_route_target': :'String', 'export_route_target': :'String', 'mpls_label': :'Integer', 'ingress_vip': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 140 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && id == other.id && == other. && regional_oci_asn == other.regional_oci_asn && import_route_target == other.import_route_target && export_route_target == other.export_route_target && mpls_label == other.mpls_label && ingress_vip == other.ingress_vip end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 177 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
157 158 159 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 157 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
166 167 168 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 166 def hash [type, id, , regional_oci_asn, import_route_target, export_route_target, mpls_label, ingress_vip].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 210 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_s ⇒ String
Returns the string representation of the object
204 205 206 |
# File 'lib/oci/vn_monitoring/models/flex_tunnel_drg_attachment_network_details.rb', line 204 def to_s to_hash.to_s end |