Class: OCI::Core::Models::PhaseOneConfigDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::PhaseOneConfigDetails
- Defined in:
- lib/oci/core/models/phase_one_config_details.rb
Overview
Configuration details for IKE phase one (ISAKMP) configuration parameters.
Constant Summary collapse
- AUTHENTICATION_ALGORITHM_ENUM =
[ AUTHENTICATION_ALGORITHM_SHA2_384 = 'SHA2_384'.freeze, AUTHENTICATION_ALGORITHM_SHA2_256 = 'SHA2_256'.freeze, AUTHENTICATION_ALGORITHM_SHA1_96 = 'SHA1_96'.freeze ].freeze
- ENCRYPTION_ALGORITHM_ENUM =
[ ENCRYPTION_ALGORITHM_AES_256_CBC = 'AES_256_CBC'.freeze, ENCRYPTION_ALGORITHM_AES_192_CBC = 'AES_192_CBC'.freeze, ENCRYPTION_ALGORITHM_AES_128_CBC = 'AES_128_CBC'.freeze ].freeze
- DIFFIE_HELMAN_GROUP_ENUM =
[ DIFFIE_HELMAN_GROUP_GROUP2 = 'GROUP2'.freeze, DIFFIE_HELMAN_GROUP_GROUP5 = 'GROUP5'.freeze, DIFFIE_HELMAN_GROUP_GROUP14 = 'GROUP14'.freeze, DIFFIE_HELMAN_GROUP_GROUP19 = 'GROUP19'.freeze, DIFFIE_HELMAN_GROUP_GROUP20 = 'GROUP20'.freeze, DIFFIE_HELMAN_GROUP_GROUP24 = 'GROUP24'.freeze ].freeze
Instance Attribute Summary collapse
-
#authentication_algorithm ⇒ String
The custom authentication algorithm proposed during phase one tunnel negotiation.
-
#diffie_helman_group ⇒ String
The custom Diffie-Hellman group proposed during phase one tunnel negotiation.
-
#encryption_algorithm ⇒ String
The custom encryption algorithm proposed during phase one tunnel negotiation.
-
#is_custom_phase_one_config ⇒ BOOLEAN
Indicates whether custom configuration is enabled for phase one options.
-
#lifetime_in_seconds ⇒ Integer
Internet key association (IKE) session key lifetime in seconds for IPSec phase one.
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 = {}) ⇒ PhaseOneConfigDetails
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 = {}) ⇒ PhaseOneConfigDetails
Initializes the object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 92 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.authentication_algorithm = attributes[:'authenticationAlgorithm'] if attributes[:'authenticationAlgorithm'] raise 'You cannot provide both :authenticationAlgorithm and :authentication_algorithm' if attributes.key?(:'authenticationAlgorithm') && attributes.key?(:'authentication_algorithm') self.authentication_algorithm = attributes[:'authentication_algorithm'] if attributes[:'authentication_algorithm'] self.encryption_algorithm = attributes[:'encryptionAlgorithm'] if attributes[:'encryptionAlgorithm'] raise 'You cannot provide both :encryptionAlgorithm and :encryption_algorithm' if attributes.key?(:'encryptionAlgorithm') && attributes.key?(:'encryption_algorithm') self.encryption_algorithm = attributes[:'encryption_algorithm'] if attributes[:'encryption_algorithm'] self.diffie_helman_group = attributes[:'diffieHelmanGroup'] if attributes[:'diffieHelmanGroup'] raise 'You cannot provide both :diffieHelmanGroup and :diffie_helman_group' if attributes.key?(:'diffieHelmanGroup') && attributes.key?(:'diffie_helman_group') self.diffie_helman_group = attributes[:'diffie_helman_group'] if attributes[:'diffie_helman_group'] self.lifetime_in_seconds = attributes[:'lifetimeInSeconds'] if attributes[:'lifetimeInSeconds'] raise 'You cannot provide both :lifetimeInSeconds and :lifetime_in_seconds' if attributes.key?(:'lifetimeInSeconds') && attributes.key?(:'lifetime_in_seconds') self.lifetime_in_seconds = attributes[:'lifetime_in_seconds'] if attributes[:'lifetime_in_seconds'] end |
Instance Attribute Details
#authentication_algorithm ⇒ String
The custom authentication algorithm proposed during phase one tunnel negotiation.
38 39 40 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 38 def authentication_algorithm @authentication_algorithm end |
#diffie_helman_group ⇒ String
The custom Diffie-Hellman group proposed during phase one tunnel negotiation.
48 49 50 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 48 def diffie_helman_group @diffie_helman_group end |
#encryption_algorithm ⇒ String
The custom encryption algorithm proposed during phase one tunnel negotiation.
43 44 45 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 43 def encryption_algorithm @encryption_algorithm end |
#is_custom_phase_one_config ⇒ BOOLEAN
Indicates whether custom configuration is enabled for phase one options.
33 34 35 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 33 def is_custom_phase_one_config @is_custom_phase_one_config end |
#lifetime_in_seconds ⇒ Integer
Internet key association (IKE) session key lifetime in seconds for IPSec phase one. The default is 28800 which is equivalent to 8 hours.
53 54 55 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 53 def lifetime_in_seconds @lifetime_in_seconds end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_custom_phase_one_config': :'isCustomPhaseOneConfig', 'authentication_algorithm': :'authenticationAlgorithm', 'encryption_algorithm': :'encryptionAlgorithm', 'diffie_helman_group': :'diffieHelmanGroup', 'lifetime_in_seconds': :'lifetimeInSeconds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 69 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_custom_phase_one_config': :'BOOLEAN', 'authentication_algorithm': :'String', 'encryption_algorithm': :'String', 'diffie_helman_group': :'String', 'lifetime_in_seconds': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 160 def ==(other) return true if equal?(other) self.class == other.class && is_custom_phase_one_config == other.is_custom_phase_one_config && authentication_algorithm == other.authentication_algorithm && encryption_algorithm == other.encryption_algorithm && diffie_helman_group == other.diffie_helman_group && lifetime_in_seconds == other.lifetime_in_seconds end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 194 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
174 175 176 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 174 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
183 184 185 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 183 def hash [is_custom_phase_one_config, authentication_algorithm, encryption_algorithm, diffie_helman_group, lifetime_in_seconds].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 227 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
221 222 223 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 221 def to_s to_hash.to_s end |