Class: OCI::DataSafe::Models::TlsConfig
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::TlsConfig
- Defined in:
- lib/oci/data_safe/models/tls_config.rb
Overview
The details required to establish a TLS enabled connection.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_ENABLED = 'ENABLED'.freeze, STATUS_DISABLED = 'DISABLED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CERTIFICATE_STORE_TYPE_ENUM =
[ CERTIFICATE_STORE_TYPE_JKS = 'JKS'.freeze, CERTIFICATE_STORE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#certificate_store_type ⇒ String
The format of the certificate store.
-
#key_store_content ⇒ String
Base64 encoded string of key store file content.
-
#status ⇒ String
[Required] Status to represent whether the database connection is TLS enabled or not.
-
#store_password ⇒ String
The password to read the trust store and key store files, if they are password protected.
-
#trust_store_content ⇒ String
Base64 encoded string of trust store file content.
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 = {}) ⇒ TlsConfig
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 = {}) ⇒ TlsConfig
Initializes the object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 79 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.status = attributes[:'status'] if attributes[:'status'] self.certificate_store_type = attributes[:'certificateStoreType'] if attributes[:'certificateStoreType'] raise 'You cannot provide both :certificateStoreType and :certificate_store_type' if attributes.key?(:'certificateStoreType') && attributes.key?(:'certificate_store_type') self.certificate_store_type = attributes[:'certificate_store_type'] if attributes[:'certificate_store_type'] self.store_password = attributes[:'storePassword'] if attributes[:'storePassword'] raise 'You cannot provide both :storePassword and :store_password' if attributes.key?(:'storePassword') && attributes.key?(:'store_password') self.store_password = attributes[:'store_password'] if attributes[:'store_password'] self.trust_store_content = attributes[:'trustStoreContent'] if attributes[:'trustStoreContent'] raise 'You cannot provide both :trustStoreContent and :trust_store_content' if attributes.key?(:'trustStoreContent') && attributes.key?(:'trust_store_content') self.trust_store_content = attributes[:'trust_store_content'] if attributes[:'trust_store_content'] self.key_store_content = attributes[:'keyStoreContent'] if attributes[:'keyStoreContent'] raise 'You cannot provide both :keyStoreContent and :key_store_content' if attributes.key?(:'keyStoreContent') && attributes.key?(:'key_store_content') self.key_store_content = attributes[:'key_store_content'] if attributes[:'key_store_content'] end |
Instance Attribute Details
#certificate_store_type ⇒ String
The format of the certificate store.
28 29 30 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 28 def certificate_store_type @certificate_store_type end |
#key_store_content ⇒ String
Base64 encoded string of key store file content.
40 41 42 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 40 def key_store_content @key_store_content end |
#status ⇒ String
[Required] Status to represent whether the database connection is TLS enabled or not.
24 25 26 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 24 def status @status end |
#store_password ⇒ String
The password to read the trust store and key store files, if they are password protected.
32 33 34 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 32 def store_password @store_password end |
#trust_store_content ⇒ String
Base64 encoded string of trust store file content.
36 37 38 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 36 def trust_store_content @trust_store_content end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'status': :'status', 'certificate_store_type': :'certificateStoreType', 'store_password': :'storePassword', 'trust_store_content': :'trustStoreContent', 'key_store_content': :'keyStoreContent' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 56 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'status': :'String', 'certificate_store_type': :'String', 'store_password': :'String', 'trust_store_content': :'String', 'key_store_content': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 145 def ==(other) return true if equal?(other) self.class == other.class && status == other.status && certificate_store_type == other.certificate_store_type && store_password == other.store_password && trust_store_content == other.trust_store_content && key_store_content == other.key_store_content end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 179 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
159 160 161 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 168 def hash [status, certificate_store_type, store_password, trust_store_content, key_store_content].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 212 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
206 207 208 |
# File 'lib/oci/data_safe/models/tls_config.rb', line 206 def to_s to_hash.to_s end |