Class: OCI::Core::Models::IPSecConnectionTunnel
- Inherits:
-
Object
- Object
- OCI::Core::Models::IPSecConnectionTunnel
- Defined in:
- lib/oci/core/models/ip_sec_connection_tunnel.rb
Overview
Information about a single tunnel in an IPSec connection. This object does not include the tunnel’s shared secret (pre-shared key). That is 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
Instance Attribute Summary collapse
- #bgp_session_info ⇒ OCI::Core::Models::BgpSessionInfo
-
#compartment_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the tunnel.
-
#cpe_ip ⇒ String
The IP address of the CPE’s VPN headend.
-
#display_name ⇒ String
A user-friendly name.
- #encryption_domain_config ⇒ OCI::Core::Models::EncryptionDomainConfig
-
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel.
-
#ike_version ⇒ String
Internet Key Exchange protocol version.
-
#lifecycle_state ⇒ String
[Required] The tunnel’s lifecycle state.
-
#routing ⇒ String
The type of routing used for this tunnel (either BGP dynamic routing or static routing).
-
#status ⇒ String
The status of the tunnel based on IPSec protocol characteristics.
-
#time_created ⇒ DateTime
The date and time the IPSec connection tunnel was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#time_status_updated ⇒ DateTime
When the status of the tunnel last changed, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#vpn_ip ⇒ String
The IP address of Oracle’s VPN headend.
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 = {}) ⇒ IPSecConnectionTunnel
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.
Constructor Details
#initialize(attributes = {}) ⇒ IPSecConnectionTunnel
Initializes the object
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 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 171 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'] end |
Instance Attribute Details
#bgp_session_info ⇒ OCI::Core::Models::BgpSessionInfo
86 87 88 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 86 def bgp_session_info @bgp_session_info end |
#compartment_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the tunnel.
46 47 48 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 46 def compartment_id @compartment_id end |
#cpe_ip ⇒ String
The IP address of the CPE’s VPN headend.
Example: 203.0.113.22
64 65 66 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 64 def cpe_ip @cpe_ip end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
83 84 85 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 83 def display_name @display_name end |
#encryption_domain_config ⇒ OCI::Core::Models::EncryptionDomainConfig
89 90 91 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 89 def encryption_domain_config @encryption_domain_config end |
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the tunnel.
50 51 52 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 50 def id @id end |
#ike_version ⇒ String
Internet Key Exchange protocol version.
73 74 75 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 73 def ike_version @ike_version end |
#lifecycle_state ⇒ String
[Required] The tunnel’s lifecycle state.
77 78 79 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 77 def lifecycle_state @lifecycle_state end |
#routing ⇒ String
The type of routing used for this tunnel (either BGP dynamic routing or static routing).
94 95 96 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 94 def routing @routing end |
#status ⇒ String
The status of the tunnel based on IPSec protocol characteristics.
68 69 70 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 68 def status @status end |
#time_created ⇒ DateTime
The date and time the IPSec connection tunnel was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
Example: 2016-08-25T21:10:29.600Z
101 102 103 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 101 def time_created @time_created end |
#time_status_updated ⇒ DateTime
When the status of the tunnel last changed, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
Example: 2016-08-25T21:10:29.600Z
108 109 110 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 108 def time_status_updated @time_status_updated end |
#vpn_ip ⇒ String
The IP address of Oracle’s VPN headend.
Example: 203.0.113.21
57 58 59 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 57 def vpn_ip @vpn_ip end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 111 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 132 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::Core::Models::BgpSessionInfo', 'encryption_domain_config': :'OCI::Core::Models::EncryptionDomainConfig', 'routing': :'String', 'time_created': :'DateTime', 'time_status_updated': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 303 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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/core/models/ip_sec_connection_tunnel.rb', line 345 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
325 326 327 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 325 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
334 335 336 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 334 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
378 379 380 381 382 383 384 385 386 387 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 378 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
372 373 374 |
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 372 def to_s to_hash.to_s end |