Class: OCI::Core::Models::TunnelPhaseOneDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::TunnelPhaseOneDetails
- Defined in:
- lib/oci/core/models/tunnel_phase_one_details.rb
Overview
IPSec tunnel details specific to ISAKMP phase one.
Instance Attribute Summary collapse
-
#custom_authentication_algorithm ⇒ String
The proposed custom authentication algorithm.
-
#custom_dh_group ⇒ String
The proposed custom Diffie-Hellman group.
-
#custom_encryption_algorithm ⇒ String
The proposed custom encryption algorithm.
-
#is_custom_phase_one_config ⇒ BOOLEAN
Indicates whether custom phase one configuration is enabled.
-
#is_ike_established ⇒ BOOLEAN
Indicates whether IKE phase one is established.
-
#lifetime ⇒ Integer
The total configured lifetime of the IKE security association.
-
#negotiated_authentication_algorithm ⇒ String
The negotiated authentication algorithm.
-
#negotiated_dh_group ⇒ String
The negotiated Diffie-Hellman group.
-
#negotiated_encryption_algorithm ⇒ String
The negotiated encryption algorithm.
-
#remaining_lifetime ⇒ Integer
The remaining lifetime before the key is refreshed.
-
#remaining_lifetime_last_retrieved ⇒ DateTime
The date and time we retrieved the remaining lifetime, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
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 = {}) ⇒ TunnelPhaseOneDetails
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 = {}) ⇒ TunnelPhaseOneDetails
Initializes the object
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 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 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 114 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.is_custom_phase_one_config = attributes[:'isCustomPhaseOneConfig'] unless attributes[:'isCustomPhaseOneConfig'].nil? raise 'You cannot provide both :isCustomPhaseOneConfig and :is_custom_phase_one_config' if attributes.key?(:'isCustomPhaseOneConfig') && attributes.key?(:'is_custom_phase_one_config') self.is_custom_phase_one_config = attributes[:'is_custom_phase_one_config'] unless attributes[:'is_custom_phase_one_config'].nil? self.lifetime = attributes[:'lifetime'] if attributes[:'lifetime'] self.remaining_lifetime = attributes[:'remainingLifetime'] if attributes[:'remainingLifetime'] raise 'You cannot provide both :remainingLifetime and :remaining_lifetime' if attributes.key?(:'remainingLifetime') && attributes.key?(:'remaining_lifetime') self.remaining_lifetime = attributes[:'remaining_lifetime'] if attributes[:'remaining_lifetime'] self.custom_authentication_algorithm = attributes[:'customAuthenticationAlgorithm'] if attributes[:'customAuthenticationAlgorithm'] raise 'You cannot provide both :customAuthenticationAlgorithm and :custom_authentication_algorithm' if attributes.key?(:'customAuthenticationAlgorithm') && attributes.key?(:'custom_authentication_algorithm') self.custom_authentication_algorithm = attributes[:'custom_authentication_algorithm'] if attributes[:'custom_authentication_algorithm'] self.negotiated_authentication_algorithm = attributes[:'negotiatedAuthenticationAlgorithm'] if attributes[:'negotiatedAuthenticationAlgorithm'] raise 'You cannot provide both :negotiatedAuthenticationAlgorithm and :negotiated_authentication_algorithm' if attributes.key?(:'negotiatedAuthenticationAlgorithm') && attributes.key?(:'negotiated_authentication_algorithm') self.negotiated_authentication_algorithm = attributes[:'negotiated_authentication_algorithm'] if attributes[:'negotiated_authentication_algorithm'] self.custom_encryption_algorithm = attributes[:'customEncryptionAlgorithm'] if attributes[:'customEncryptionAlgorithm'] raise 'You cannot provide both :customEncryptionAlgorithm and :custom_encryption_algorithm' if attributes.key?(:'customEncryptionAlgorithm') && attributes.key?(:'custom_encryption_algorithm') self.custom_encryption_algorithm = attributes[:'custom_encryption_algorithm'] if attributes[:'custom_encryption_algorithm'] self.negotiated_encryption_algorithm = attributes[:'negotiatedEncryptionAlgorithm'] if attributes[:'negotiatedEncryptionAlgorithm'] raise 'You cannot provide both :negotiatedEncryptionAlgorithm and :negotiated_encryption_algorithm' if attributes.key?(:'negotiatedEncryptionAlgorithm') && attributes.key?(:'negotiated_encryption_algorithm') self.negotiated_encryption_algorithm = attributes[:'negotiated_encryption_algorithm'] if attributes[:'negotiated_encryption_algorithm'] self.custom_dh_group = attributes[:'customDhGroup'] if attributes[:'customDhGroup'] raise 'You cannot provide both :customDhGroup and :custom_dh_group' if attributes.key?(:'customDhGroup') && attributes.key?(:'custom_dh_group') self.custom_dh_group = attributes[:'custom_dh_group'] if attributes[:'custom_dh_group'] self.negotiated_dh_group = attributes[:'negotiatedDhGroup'] if attributes[:'negotiatedDhGroup'] raise 'You cannot provide both :negotiatedDhGroup and :negotiated_dh_group' if attributes.key?(:'negotiatedDhGroup') && attributes.key?(:'negotiated_dh_group') self.negotiated_dh_group = attributes[:'negotiated_dh_group'] if attributes[:'negotiated_dh_group'] self.is_ike_established = attributes[:'isIkeEstablished'] unless attributes[:'isIkeEstablished'].nil? raise 'You cannot provide both :isIkeEstablished and :is_ike_established' if attributes.key?(:'isIkeEstablished') && attributes.key?(:'is_ike_established') self.is_ike_established = attributes[:'is_ike_established'] unless attributes[:'is_ike_established'].nil? self.remaining_lifetime_last_retrieved = attributes[:'remainingLifetimeLastRetrieved'] if attributes[:'remainingLifetimeLastRetrieved'] raise 'You cannot provide both :remainingLifetimeLastRetrieved and :remaining_lifetime_last_retrieved' if attributes.key?(:'remainingLifetimeLastRetrieved') && attributes.key?(:'remaining_lifetime_last_retrieved') self.remaining_lifetime_last_retrieved = attributes[:'remaining_lifetime_last_retrieved'] if attributes[:'remaining_lifetime_last_retrieved'] end |
Instance Attribute Details
#custom_authentication_algorithm ⇒ String
The proposed custom authentication algorithm.
26 27 28 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 26 def custom_authentication_algorithm @custom_authentication_algorithm end |
#custom_dh_group ⇒ String
The proposed custom Diffie-Hellman group.
42 43 44 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 42 def custom_dh_group @custom_dh_group end |
#custom_encryption_algorithm ⇒ String
The proposed custom encryption algorithm.
34 35 36 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 34 def custom_encryption_algorithm @custom_encryption_algorithm end |
#is_custom_phase_one_config ⇒ BOOLEAN
Indicates whether custom phase one configuration is enabled. If this option is not enabled, default settings are proposed.
14 15 16 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 14 def is_custom_phase_one_config @is_custom_phase_one_config end |
#is_ike_established ⇒ BOOLEAN
Indicates whether IKE phase one is established.
50 51 52 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 50 def is_ike_established @is_ike_established end |
#lifetime ⇒ Integer
The total configured lifetime of the IKE security association.
18 19 20 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 18 def lifetime @lifetime end |
#negotiated_authentication_algorithm ⇒ String
The negotiated authentication algorithm.
30 31 32 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 30 def negotiated_authentication_algorithm @negotiated_authentication_algorithm end |
#negotiated_dh_group ⇒ String
The negotiated Diffie-Hellman group.
46 47 48 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 46 def negotiated_dh_group @negotiated_dh_group end |
#negotiated_encryption_algorithm ⇒ String
The negotiated encryption algorithm.
38 39 40 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 38 def negotiated_encryption_algorithm @negotiated_encryption_algorithm end |
#remaining_lifetime ⇒ Integer
The remaining lifetime before the key is refreshed.
22 23 24 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 22 def remaining_lifetime @remaining_lifetime end |
#remaining_lifetime_last_retrieved ⇒ DateTime
The date and time we retrieved the remaining lifetime, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
Example: `2016-08-25T21:10:29.600Z`
57 58 59 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 57 def remaining_lifetime_last_retrieved @remaining_lifetime_last_retrieved end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 60 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_custom_phase_one_config': :'isCustomPhaseOneConfig', 'lifetime': :'lifetime', 'remaining_lifetime': :'remainingLifetime', 'custom_authentication_algorithm': :'customAuthenticationAlgorithm', 'negotiated_authentication_algorithm': :'negotiatedAuthenticationAlgorithm', 'custom_encryption_algorithm': :'customEncryptionAlgorithm', 'negotiated_encryption_algorithm': :'negotiatedEncryptionAlgorithm', 'custom_dh_group': :'customDhGroup', 'negotiated_dh_group': :'negotiatedDhGroup', 'is_ike_established': :'isIkeEstablished', 'remaining_lifetime_last_retrieved': :'remainingLifetimeLastRetrieved' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 79 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_custom_phase_one_config': :'BOOLEAN', 'lifetime': :'Integer', 'remaining_lifetime': :'Integer', 'custom_authentication_algorithm': :'String', 'negotiated_authentication_algorithm': :'String', 'custom_encryption_algorithm': :'String', 'negotiated_encryption_algorithm': :'String', 'custom_dh_group': :'String', 'negotiated_dh_group': :'String', 'is_ike_established': :'BOOLEAN', 'remaining_lifetime_last_retrieved': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 190 def ==(other) return true if equal?(other) self.class == other.class && is_custom_phase_one_config == other.is_custom_phase_one_config && lifetime == other.lifetime && remaining_lifetime == other.remaining_lifetime && custom_authentication_algorithm == other.custom_authentication_algorithm && negotiated_authentication_algorithm == other.negotiated_authentication_algorithm && custom_encryption_algorithm == other.custom_encryption_algorithm && negotiated_encryption_algorithm == other.negotiated_encryption_algorithm && custom_dh_group == other.custom_dh_group && negotiated_dh_group == other.negotiated_dh_group && is_ike_established == other.is_ike_established && remaining_lifetime_last_retrieved == other.remaining_lifetime_last_retrieved end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 230 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
210 211 212 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 210 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
219 220 221 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 219 def hash [is_custom_phase_one_config, lifetime, remaining_lifetime, custom_authentication_algorithm, negotiated_authentication_algorithm, custom_encryption_algorithm, negotiated_encryption_algorithm, custom_dh_group, negotiated_dh_group, is_ike_established, remaining_lifetime_last_retrieved].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
263 264 265 266 267 268 269 270 271 272 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 263 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
257 258 259 |
# File 'lib/oci/core/models/tunnel_phase_one_details.rb', line 257 def to_s to_hash.to_s end |