Class: OCI::VnMonitoring::Models::TunnelPhaseOneDetails
- Inherits:
-
Object
- Object
- OCI::VnMonitoring::Models::TunnelPhaseOneDetails
- Defined in:
- lib/oci/vn_monitoring/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.
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
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 182 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 115 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.
27 28 29 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 27 def custom_authentication_algorithm @custom_authentication_algorithm end |
#custom_dh_group ⇒ String
The proposed custom Diffie-Hellman group.
43 44 45 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 43 def custom_dh_group @custom_dh_group end |
#custom_encryption_algorithm ⇒ String
The proposed custom encryption algorithm.
35 36 37 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 35 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.
15 16 17 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 15 def is_custom_phase_one_config @is_custom_phase_one_config end |
#is_ike_established ⇒ BOOLEAN
Indicates whether IKE phase one is established.
51 52 53 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 51 def is_ike_established @is_ike_established end |
#lifetime ⇒ Integer
The total configured lifetime of the IKE security association.
19 20 21 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 19 def lifetime @lifetime end |
#negotiated_authentication_algorithm ⇒ String
The negotiated authentication algorithm.
31 32 33 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 31 def negotiated_authentication_algorithm @negotiated_authentication_algorithm end |
#negotiated_dh_group ⇒ String
The negotiated Diffie-Hellman group.
47 48 49 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 47 def negotiated_dh_group @negotiated_dh_group end |
#negotiated_encryption_algorithm ⇒ String
The negotiated encryption algorithm.
39 40 41 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 39 def negotiated_encryption_algorithm @negotiated_encryption_algorithm end |
#remaining_lifetime ⇒ Integer
The remaining lifetime before the key is refreshed.
23 24 25 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 23 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.
Example: 2016-08-25T21:10:29.600Z
58 59 60 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 58 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.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 61 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.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 80 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.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 191 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
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 231 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
211 212 213 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 211 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
220 221 222 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 220 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
264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 264 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
258 259 260 |
# File 'lib/oci/vn_monitoring/models/tunnel_phase_one_details.rb', line 258 def to_s to_hash.to_s end |