Class: OCI::VnMonitoring::Models::IPSecConnectionTunnel

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

Overview

Information about a single IPSec tunnel in an IPSec connection. This object does not include the tunnel's shared secret (pre-shared key), which is found in the IPSecConnectionTunnelSharedSecret object.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_UP = 'UP'.freeze,
  STATUS_DOWN = 'DOWN'.freeze,
  STATUS_DOWN_FOR_MAINTENANCE = 'DOWN_FOR_MAINTENANCE'.freeze,
  STATUS_PARTIAL_UP = 'PARTIAL_UP'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
IKE_VERSION_ENUM =
[
  IKE_VERSION_V1 = 'V1'.freeze,
  IKE_VERSION_V2 = 'V2'.freeze,
  IKE_VERSION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ROUTING_ENUM =
[
  ROUTING_BGP = 'BGP'.freeze,
  ROUTING_STATIC = 'STATIC'.freeze,
  ROUTING_POLICY = 'POLICY'.freeze,
  ROUTING_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ORACLE_CAN_INITIATE_ENUM =
[
  ORACLE_CAN_INITIATE_INITIATOR_OR_RESPONDER = 'INITIATOR_OR_RESPONDER'.freeze,
  ORACLE_CAN_INITIATE_RESPONDER_ONLY = 'RESPONDER_ONLY'.freeze,
  ORACLE_CAN_INITIATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
NAT_TRANSLATION_ENABLED_ENUM =
[
  NAT_TRANSLATION_ENABLED_ENABLED = 'ENABLED'.freeze,
  NAT_TRANSLATION_ENABLED_DISABLED = 'DISABLED'.freeze,
  NAT_TRANSLATION_ENABLED_AUTO = 'AUTO'.freeze,
  NAT_TRANSLATION_ENABLED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
DPD_MODE_ENUM =
[
  DPD_MODE_INITIATE_AND_RESPOND = 'INITIATE_AND_RESPOND'.freeze,
  DPD_MODE_RESPOND_ONLY = 'RESPOND_ONLY'.freeze,
  DPD_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ IPSecConnectionTunnel

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 254

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

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

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

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

  self.vpn_ip = attributes[:'vpnIp'] if attributes[:'vpnIp']

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

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

  self.cpe_ip = attributes[:'cpeIp'] if attributes[:'cpeIp']

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

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

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

  self.ike_version = attributes[:'ikeVersion'] if attributes[:'ikeVersion']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.bgp_session_info = attributes[:'bgpSessionInfo'] if attributes[:'bgpSessionInfo']

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

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

  self.encryption_domain_config = attributes[:'encryptionDomainConfig'] if attributes[:'encryptionDomainConfig']

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

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_status_updated = attributes[:'timeStatusUpdated'] if attributes[:'timeStatusUpdated']

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

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

  self.oracle_can_initiate = attributes[:'oracleCanInitiate'] if attributes[:'oracleCanInitiate']

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

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

  self.nat_translation_enabled = attributes[:'natTranslationEnabled'] if attributes[:'natTranslationEnabled']

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

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

  self.dpd_mode = attributes[:'dpdMode'] if attributes[:'dpdMode']

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

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

  self.dpd_timeout_in_sec = attributes[:'dpdTimeoutInSec'] if attributes[:'dpdTimeoutInSec']

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

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

  self.phase_one_details = attributes[:'phaseOneDetails'] if attributes[:'phaseOneDetails']

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

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

  self.phase_two_details = attributes[:'phaseTwoDetails'] if attributes[:'phaseTwoDetails']

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

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

  self.associated_virtual_circuits = attributes[:'associatedVirtualCircuits'] if attributes[:'associatedVirtualCircuits']

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

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

Instance Attribute Details

#associated_virtual_circuitsArray<String>

The list of virtual circuit OCID[https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm]s over which your network can reach this tunnel.

Returns:

  • (Array<String>)


170
171
172
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 170

def associated_virtual_circuits
  @associated_virtual_circuits
end

#bgp_session_infoOCI::VnMonitoring::Models::BgpSessionInfo



106
107
108
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 106

def bgp_session_info
  @bgp_session_info
end

#compartment_idString

[Required] The OCID of the compartment containing the tunnel.

Returns:

  • (String)


66
67
68
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 66

def compartment_id
  @compartment_id
end

#cpe_ipString

The IP address of the CPE device's VPN headend.

Example: 203.0.113.22

Returns:

  • (String)


84
85
86
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 84

def cpe_ip
  @cpe_ip
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


103
104
105
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 103

def display_name
  @display_name
end

#dpd_modeString

Dead peer detection (DPD) mode set on the Oracle side of the connection. This mode sets whether Oracle can only respond to a request from the CPE device to start DPD, or both respond to and initiate requests.

Returns:

  • (String)


155
156
157
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 155

def dpd_mode
  @dpd_mode
end

#dpd_timeout_in_secInteger

DPD timeout in seconds.

Returns:

  • (Integer)


159
160
161
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 159

def dpd_timeout_in_sec
  @dpd_timeout_in_sec
end

#encryption_domain_configOCI::VnMonitoring::Models::EncryptionDomainConfig



109
110
111
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 109

def encryption_domain_config
  @encryption_domain_config
end

#idString

[Required] The OCID of the tunnel.

Returns:

  • (String)


70
71
72
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 70

def id
  @id
end

#ike_versionString

Internet Key Exchange protocol version.

Returns:

  • (String)


93
94
95
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 93

def ike_version
  @ike_version
end

#lifecycle_stateString

[Required] The tunnel's lifecycle state.

Returns:

  • (String)


97
98
99
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 97

def lifecycle_state
  @lifecycle_state
end

#nat_translation_enabledString

By default (the AUTO setting), IKE sends packets with a source and destination port set to 500, and when it detects that the port used to forward packets has changed (most likely because a NAT device is between the CPE device and the Oracle VPN headend) it will try to negotiate the use of NAT-T.

The ENABLED option sets the IKE protocol to use port 4500 instead of 500 and forces encapsulating traffic with the ESP protocol inside UDP packets.

The DISABLED option directs IKE to completely refuse to negotiate NAT-T even if it senses there may be a NAT device in use.

.

Returns:

  • (String)


148
149
150
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 148

def nat_translation_enabled
  @nat_translation_enabled
end

#oracle_can_initiateString

Indicates whether Oracle can only respond to a request to start an IPSec tunnel from the CPE device, or both respond to and initiate requests.

Returns:

  • (String)


133
134
135
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 133

def oracle_can_initiate
  @oracle_can_initiate
end

#phase_one_detailsOCI::VnMonitoring::Models::TunnelPhaseOneDetails



162
163
164
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 162

def phase_one_details
  @phase_one_details
end

#phase_two_detailsOCI::VnMonitoring::Models::TunnelPhaseTwoDetails



165
166
167
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 165

def phase_two_details
  @phase_two_details
end

#routingString

The type of routing used for this tunnel (BGP dynamic routing, static routing, or policy-based routing).

Returns:

  • (String)


114
115
116
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 114

def routing
  @routing
end

#statusString

The status of the tunnel based on IPSec protocol characteristics.

Returns:

  • (String)


88
89
90
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 88

def status
  @status
end

#time_createdDateTime

The date and time the IPSec tunnel was created, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


121
122
123
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 121

def time_created
  @time_created
end

#time_status_updatedDateTime

When the status of the IPSec tunnel last changed, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


128
129
130
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 128

def time_status_updated
  @time_status_updated
end

#vpn_ipString

The IP address of the Oracle VPN headend for the connection.

Example: 203.0.113.21

Returns:

  • (String)


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

def vpn_ip
  @vpn_ip
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 173

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'id': :'id',
    'vpn_ip': :'vpnIp',
    'cpe_ip': :'cpeIp',
    'status': :'status',
    'ike_version': :'ikeVersion',
    'lifecycle_state': :'lifecycleState',
    'display_name': :'displayName',
    'bgp_session_info': :'bgpSessionInfo',
    'encryption_domain_config': :'encryptionDomainConfig',
    'routing': :'routing',
    'time_created': :'timeCreated',
    'time_status_updated': :'timeStatusUpdated',
    'oracle_can_initiate': :'oracleCanInitiate',
    'nat_translation_enabled': :'natTranslationEnabled',
    'dpd_mode': :'dpdMode',
    'dpd_timeout_in_sec': :'dpdTimeoutInSec',
    'phase_one_details': :'phaseOneDetails',
    'phase_two_details': :'phaseTwoDetails',
    'associated_virtual_circuits': :'associatedVirtualCircuits'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 201

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'id': :'String',
    'vpn_ip': :'String',
    'cpe_ip': :'String',
    'status': :'String',
    'ike_version': :'String',
    'lifecycle_state': :'String',
    'display_name': :'String',
    'bgp_session_info': :'OCI::VnMonitoring::Models::BgpSessionInfo',
    'encryption_domain_config': :'OCI::VnMonitoring::Models::EncryptionDomainConfig',
    'routing': :'String',
    'time_created': :'DateTime',
    'time_status_updated': :'DateTime',
    'oracle_can_initiate': :'String',
    'nat_translation_enabled': :'String',
    'dpd_mode': :'String',
    'dpd_timeout_in_sec': :'Integer',
    'phase_one_details': :'OCI::VnMonitoring::Models::TunnelPhaseOneDetails',
    'phase_two_details': :'OCI::VnMonitoring::Models::TunnelPhaseTwoDetails',
    'associated_virtual_circuits': :'Array<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



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 467

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

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    id == other.id &&
    vpn_ip == other.vpn_ip &&
    cpe_ip == other.cpe_ip &&
    status == other.status &&
    ike_version == other.ike_version &&
    lifecycle_state == other.lifecycle_state &&
    display_name == other.display_name &&
    bgp_session_info == other.bgp_session_info &&
    encryption_domain_config == other.encryption_domain_config &&
    routing == other.routing &&
    time_created == other.time_created &&
    time_status_updated == other.time_status_updated &&
    oracle_can_initiate == other.oracle_can_initiate &&
    nat_translation_enabled == other.nat_translation_enabled &&
    dpd_mode == other.dpd_mode &&
    dpd_timeout_in_sec == other.dpd_timeout_in_sec &&
    phase_one_details == other.phase_one_details &&
    phase_two_details == other.phase_two_details &&
    associated_virtual_circuits == other.associated_virtual_circuits
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



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 516

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


496
497
498
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 496

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



505
506
507
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 505

def hash
  [compartment_id, id, vpn_ip, cpe_ip, status, ike_version, lifecycle_state, display_name, bgp_session_info, encryption_domain_config, routing, time_created, time_status_updated, oracle_can_initiate, nat_translation_enabled, dpd_mode, dpd_timeout_in_sec, phase_one_details, phase_two_details, associated_virtual_circuits].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



549
550
551
552
553
554
555
556
557
558
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 549

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



543
544
545
# File 'lib/oci/vn_monitoring/models/ip_sec_connection_tunnel.rb', line 543

def to_s
  to_hash.to_s
end