Class: OCI::VnMonitoring::Models::RemotePeeringConnectionDrgAttachmentNetworkDetails
- Inherits:
-
DrgAttachmentNetworkDetails
- Object
- DrgAttachmentNetworkDetails
- OCI::VnMonitoring::Models::RemotePeeringConnectionDrgAttachmentNetworkDetails
- Defined in:
- lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb
Overview
Specifies the DRG attachment to another 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.
-
#peer_attachment_route_target ⇒ String
The attachment route target.
-
#peer_region_name ⇒ String
The remote Oracle Cloud Infrastructure region name.
-
#regional_oci_asn ⇒ String
The BGP ASN to use for the IPSec connection's route target.
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 = {}) ⇒ RemotePeeringConnectionDrgAttachmentNetworkDetails
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 = {}) ⇒ RemotePeeringConnectionDrgAttachmentNetworkDetails
Initializes the object
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 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 94 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'REMOTE_PEERING_CONNECTION' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.peer_region_name = attributes[:'peerRegionName'] if attributes[:'peerRegionName'] raise 'You cannot provide both :peerRegionName and :peer_region_name' if attributes.key?(:'peerRegionName') && attributes.key?(:'peer_region_name') self.peer_region_name = attributes[:'peer_region_name'] if attributes[:'peer_region_name'] self. = attributes[:'peerAttachmentRouteTarget'] if attributes[:'peerAttachmentRouteTarget'] raise 'You cannot provide both :peerAttachmentRouteTarget and :peer_attachment_route_target' if attributes.key?(:'peerAttachmentRouteTarget') && attributes.key?(:'peer_attachment_route_target') self. = attributes[:'peer_attachment_route_target'] if attributes[:'peer_attachment_route_target'] 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.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.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/remote_peering_connection_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/remote_peering_connection_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
44 45 46 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 44 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/remote_peering_connection_drg_attachment_network_details.rb', line 35 def mpls_label @mpls_label end |
#peer_attachment_route_target ⇒ String
The attachment route target.
19 20 21 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 19 def @peer_attachment_route_target end |
#peer_region_name ⇒ String
The remote Oracle Cloud Infrastructure region name.
15 16 17 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 15 def peer_region_name @peer_region_name end |
#regional_oci_asn ⇒ String
The BGP ASN to use for the IPSec connection's route target.
40 41 42 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 40 def regional_oci_asn @regional_oci_asn end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 47 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'id': :'id', 'peer_region_name': :'peerRegionName', 'peer_attachment_route_target': :'peerAttachmentRouteTarget', 'import_route_target': :'importRouteTarget', 'export_route_target': :'exportRouteTarget', 'mpls_label': :'mplsLabel', 'regional_oci_asn': :'regionalOciAsn', 'ingress_vip': :'ingressVip' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'id': :'String', 'peer_region_name': :'String', 'peer_attachment_route_target': :'String', 'import_route_target': :'String', 'export_route_target': :'String', 'mpls_label': :'Integer', 'regional_oci_asn': :'String', 'ingress_vip': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 154 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && id == other.id && peer_region_name == other.peer_region_name && == other. && import_route_target == other.import_route_target && export_route_target == other.export_route_target && mpls_label == other.mpls_label && regional_oci_asn == other.regional_oci_asn && ingress_vip == other.ingress_vip end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 192 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
172 173 174 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 172 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
181 182 183 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 181 def hash [type, id, peer_region_name, , import_route_target, export_route_target, mpls_label, regional_oci_asn, ingress_vip].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 225 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
219 220 221 |
# File 'lib/oci/vn_monitoring/models/remote_peering_connection_drg_attachment_network_details.rb', line 219 def to_s to_hash.to_s end |