Class: OCI::VnMonitoring::Models::IpsecTunnelDrgAttachmentNetworkDetails

Inherits:
DrgAttachmentNetworkDetails show all
Defined in:
lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb

Overview

Specifies the IPSec tunnel attached to the DRG.

Constant Summary

Constants inherited from DrgAttachmentNetworkDetails

DrgAttachmentNetworkDetails::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from DrgAttachmentNetworkDetails

#id, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DrgAttachmentNetworkDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ IpsecTunnelDrgAttachmentNetworkDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id proprety

  • :ipsec_connection_id (String)

    The value to assign to the #ipsec_connection_id property

  • :import_route_target (String)

    The value to assign to the #import_route_target property

  • :export_route_target (String)

    The value to assign to the #export_route_target property

  • :mpls_label (Integer)

    The value to assign to the #mpls_label property

  • :regional_oci_asn (String)

    The value to assign to the #regional_oci_asn property

  • :ingress_vip (String)

    The value to assign to the #ingress_vip property

  • :is_gamma_drg (BOOLEAN)

    The value to assign to the #is_gamma_drg property

  • :common_export_rt (String)

    The value to assign to the #common_export_rt property

  • :common_import_rt (String)

    The value to assign to the #common_import_rt property

  • :is_route_unification_enabled (BOOLEAN)

    The value to assign to the #is_route_unification_enabled property

  • :transport_attachment_id (String)

    The value to assign to the #transport_attachment_id property



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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 131

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['type'] = 'IPSEC_TUNNEL'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.ipsec_connection_id = attributes[:'ipsecConnectionId'] if attributes[:'ipsecConnectionId']

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

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

  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']

  self.is_gamma_drg = attributes[:'isGammaDrg'] unless attributes[:'isGammaDrg'].nil?

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

  self.is_gamma_drg = attributes[:'is_gamma_drg'] unless attributes[:'is_gamma_drg'].nil?

  self.common_export_rt = attributes[:'commonExportRT'] if attributes[:'commonExportRT']

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

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

  self.common_import_rt = attributes[:'commonImportRT'] if attributes[:'commonImportRT']

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

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

  self.is_route_unification_enabled = attributes[:'isRouteUnificationEnabled'] unless attributes[:'isRouteUnificationEnabled'].nil?
  self.is_route_unification_enabled = false if is_route_unification_enabled.nil? && !attributes.key?(:'isRouteUnificationEnabled') # rubocop:disable Style/StringLiterals

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

  self.is_route_unification_enabled = attributes[:'is_route_unification_enabled'] unless attributes[:'is_route_unification_enabled'].nil?
  self.is_route_unification_enabled = false if is_route_unification_enabled.nil? && !attributes.key?(:'isRouteUnificationEnabled') && !attributes.key?(:'is_route_unification_enabled') # rubocop:disable Style/StringLiterals

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

Instance Attribute Details

#common_export_rtString

Common Export route target to use for the DRG Attachment instead of per-attachment route target. This is applicable to DRG attachments that are assigned to a DRG route table which is whitelisted for route unification.

Returns:

  • (String)


51
52
53
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 51

def common_export_rt
  @common_export_rt
end

#common_import_rtString

Common Import route target to use for the DRG attachment instead of per-attachment import route target. This is applicable to DRG attachments that are assigned to a DRG route table which is whitelisted for route unification.

Returns:

  • (String)


58
59
60
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 58

def common_import_rt
  @common_import_rt
end

#export_route_targetString

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.

Returns:

  • (String)


26
27
28
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 26

def export_route_target
  @export_route_target
end

#import_route_targetString

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.

Returns:

  • (String)


20
21
22
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 20

def import_route_target
  @import_route_target
end

#ingress_vipString

IPv4 address used to encapsulate ingress traffic to the DRG through this attachment

Returns:

  • (String)


39
40
41
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 39

def ingress_vip
  @ingress_vip
end

#ipsec_connection_idString

The IPSec connection that contains the attached IPSec tunnel.

Returns:

  • (String)


14
15
16
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 14

def ipsec_connection_id
  @ipsec_connection_id
end

#is_gamma_drgBOOLEAN

Whether traffic from this network is forwarded to the El Paso Gamma VIPs (or not)

Returns:

  • (BOOLEAN)


44
45
46
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 44

def is_gamma_drg
  @is_gamma_drg
end

#is_route_unification_enabledBOOLEAN

This indicates whether the DRG route table associated with the DRG attachment is whitelisted for route unification.

Example: true

Returns:

  • (BOOLEAN)


65
66
67
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 65

def is_route_unification_enabled
  @is_route_unification_enabled
end

#mpls_labelInteger

The MPLS label of the DRG attachment.

Returns:

  • (Integer)


30
31
32
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 30

def mpls_label
  @mpls_label
end

#regional_oci_asnString

The BGP ASN to use for the IPSec connection's route target.

Returns:

  • (String)


35
36
37
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 35

def regional_oci_asn
  @regional_oci_asn
end

#transport_attachment_idString

The OCID of the virtual circuit's DRG attachment.

Returns:

  • (String)


69
70
71
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 69

def transport_attachment_id
  @transport_attachment_id
end

Class Method Details

.attribute_mapObject

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



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 72

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'type',
    'id': :'id',
    'ipsec_connection_id': :'ipsecConnectionId',
    'import_route_target': :'importRouteTarget',
    'export_route_target': :'exportRouteTarget',
    'mpls_label': :'mplsLabel',
    'regional_oci_asn': :'regionalOciAsn',
    'ingress_vip': :'ingressVip',
    'is_gamma_drg': :'isGammaDrg',
    'common_export_rt': :'commonExportRT',
    'common_import_rt': :'commonImportRT',
    'is_route_unification_enabled': :'isRouteUnificationEnabled',
    'transport_attachment_id': :'transportAttachmentId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 93

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'String',
    'id': :'String',
    'ipsec_connection_id': :'String',
    'import_route_target': :'String',
    'export_route_target': :'String',
    'mpls_label': :'Integer',
    'regional_oci_asn': :'String',
    'ingress_vip': :'String',
    'is_gamma_drg': :'BOOLEAN',
    'common_export_rt': :'String',
    'common_import_rt': :'String',
    'is_route_unification_enabled': :'BOOLEAN',
    'transport_attachment_id': :'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



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 217

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

  self.class == other.class &&
    type == other.type &&
    id == other.id &&
    ipsec_connection_id == other.ipsec_connection_id &&
    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 &&
    is_gamma_drg == other.is_gamma_drg &&
    common_export_rt == other.common_export_rt &&
    common_import_rt == other.common_import_rt &&
    is_route_unification_enabled == other.is_route_unification_enabled &&
    transport_attachment_id == other.transport_attachment_id
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



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 259

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


239
240
241
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 239

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



248
249
250
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 248

def hash
  [type, id, ipsec_connection_id, import_route_target, export_route_target, mpls_label, regional_oci_asn, ingress_vip, is_gamma_drg, common_export_rt, common_import_rt, is_route_unification_enabled, transport_attachment_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



292
293
294
295
296
297
298
299
300
301
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 292

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



286
287
288
# File 'lib/oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.rb', line 286

def to_s
  to_hash.to_s
end