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
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 128 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 93 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.
39 40 41 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 39 def authentication_algorithm @authentication_algorithm end |
#diffie_helman_group ⇒ String
The custom Diffie-Hellman group proposed during phase one tunnel negotiation.
49 50 51 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 49 def diffie_helman_group @diffie_helman_group end |
#encryption_algorithm ⇒ String
The custom encryption algorithm proposed during phase one tunnel negotiation.
44 45 46 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 44 def encryption_algorithm @encryption_algorithm end |
#is_custom_phase_one_config ⇒ BOOLEAN
Indicates whether custom configuration is enabled for phase one options.
34 35 36 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 34 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.
54 55 56 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 54 def lifetime_in_seconds @lifetime_in_seconds end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 57 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.
70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 70 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.
161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 161 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
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 195 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
175 176 177 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 175 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
184 185 186 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 184 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
228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 228 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
222 223 224 |
# File 'lib/oci/core/models/phase_one_config_details.rb', line 222 def to_s to_hash.to_s end |