Class: OCI::Database::Models::DatabaseConnectionStringProfile
- Inherits:
-
Object
- Object
- OCI::Database::Models::DatabaseConnectionStringProfile
- Defined in:
- lib/oci/database/models/database_connection_string_profile.rb
Overview
The connection string profile to allow clients to group, filter and select connection string values based on structured metadata.
Constant Summary collapse
- CONSUMER_GROUP_ENUM =
[ CONSUMER_GROUP_HIGH = 'HIGH'.freeze, CONSUMER_GROUP_MEDIUM = 'MEDIUM'.freeze, CONSUMER_GROUP_LOW = 'LOW'.freeze, CONSUMER_GROUP_TP = 'TP'.freeze, CONSUMER_GROUP_TPURGENT = 'TPURGENT'.freeze, CONSUMER_GROUP_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PROTOCOL_ENUM =
[ PROTOCOL_TCP = 'TCP'.freeze, PROTOCOL_TCPS = 'TCPS'.freeze, PROTOCOL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- TLS_AUTHENTICATION_ENUM =
[ TLS_AUTHENTICATION_SERVER = 'SERVER'.freeze, TLS_AUTHENTICATION_MUTUAL = 'MUTUAL'.freeze, TLS_AUTHENTICATION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- HOST_FORMAT_ENUM =
[ HOST_FORMAT_FQDN = 'FQDN'.freeze, HOST_FORMAT_IP = 'IP'.freeze, HOST_FORMAT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SESSION_MODE_ENUM =
[ SESSION_MODE_DIRECT = 'DIRECT'.freeze, SESSION_MODE_REDIRECT = 'REDIRECT'.freeze, SESSION_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SYNTAX_FORMAT_ENUM =
[ SYNTAX_FORMAT_LONG = 'LONG'.freeze, SYNTAX_FORMAT_EZCONNECT = 'EZCONNECT'.freeze, SYNTAX_FORMAT_EZCONNECTPLUS = 'EZCONNECTPLUS'.freeze, SYNTAX_FORMAT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#consumer_group ⇒ String
Consumer group used by the connection.
-
#display_name ⇒ String
[Required] A user-friendly name for the connection.
-
#host_format ⇒ String
[Required] Host format used in connection string.
-
#is_regional ⇒ BOOLEAN
True for a regional connection string, applicable to cross-region DG only.
-
#protocol ⇒ String
[Required] Protocol used by the connection.
-
#session_mode ⇒ String
[Required] Specifies whether the listener performs a direct hand-off of the session, or redirects the session.
-
#syntax_format ⇒ String
[Required] Specifies whether the connection string is using the long (
LONG
), Easy Connect (EZCONNECT
), or Easy Connect Plus (EZCONNECTPLUS
) format. -
#tls_authentication ⇒ String
Specifies whether the TLS handshake is using one-way (
SERVER
) or mutual (MUTUAL
) authentication. -
#value ⇒ String
[Required] Connection string value.
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 = {}) ⇒ DatabaseConnectionStringProfile
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 = {}) ⇒ DatabaseConnectionStringProfile
Initializes the object
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 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 140 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.value = attributes[:'value'] if attributes[:'value'] self.consumer_group = attributes[:'consumerGroup'] if attributes[:'consumerGroup'] raise 'You cannot provide both :consumerGroup and :consumer_group' if attributes.key?(:'consumerGroup') && attributes.key?(:'consumer_group') self.consumer_group = attributes[:'consumer_group'] if attributes[:'consumer_group'] self.protocol = attributes[:'protocol'] if attributes[:'protocol'] self.tls_authentication = attributes[:'tlsAuthentication'] if attributes[:'tlsAuthentication'] raise 'You cannot provide both :tlsAuthentication and :tls_authentication' if attributes.key?(:'tlsAuthentication') && attributes.key?(:'tls_authentication') self.tls_authentication = attributes[:'tls_authentication'] if attributes[:'tls_authentication'] self.host_format = attributes[:'hostFormat'] if attributes[:'hostFormat'] raise 'You cannot provide both :hostFormat and :host_format' if attributes.key?(:'hostFormat') && attributes.key?(:'host_format') self.host_format = attributes[:'host_format'] if attributes[:'host_format'] self.session_mode = attributes[:'sessionMode'] if attributes[:'sessionMode'] raise 'You cannot provide both :sessionMode and :session_mode' if attributes.key?(:'sessionMode') && attributes.key?(:'session_mode') self.session_mode = attributes[:'session_mode'] if attributes[:'session_mode'] self.syntax_format = attributes[:'syntaxFormat'] if attributes[:'syntaxFormat'] raise 'You cannot provide both :syntaxFormat and :syntax_format' if attributes.key?(:'syntaxFormat') && attributes.key?(:'syntax_format') self.syntax_format = attributes[:'syntax_format'] if attributes[:'syntax_format'] self.is_regional = attributes[:'isRegional'] unless attributes[:'isRegional'].nil? raise 'You cannot provide both :isRegional and :is_regional' if attributes.key?(:'isRegional') && attributes.key?(:'is_regional') self.is_regional = attributes[:'is_regional'] unless attributes[:'is_regional'].nil? end |
Instance Attribute Details
#consumer_group ⇒ String
Consumer group used by the connection.
63 64 65 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 63 def consumer_group @consumer_group end |
#display_name ⇒ String
[Required] A user-friendly name for the connection.
55 56 57 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 55 def display_name @display_name end |
#host_format ⇒ String
[Required] Host format used in connection string.
75 76 77 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 75 def host_format @host_format end |
#is_regional ⇒ BOOLEAN
True for a regional connection string, applicable to cross-region DG only.
89 90 91 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 89 def is_regional @is_regional end |
#protocol ⇒ String
[Required] Protocol used by the connection.
67 68 69 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 67 def protocol @protocol end |
#session_mode ⇒ String
[Required] Specifies whether the listener performs a direct hand-off of the session, or redirects the session. In RAC deployments where SCAN is used, sessions are redirected to a Node VIP. Use DIRECT
for direct hand-offs. Use REDIRECT
to redirect the session.
79 80 81 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 79 def session_mode @session_mode end |
#syntax_format ⇒ String
[Required] Specifies whether the connection string is using the long (LONG
), Easy Connect (EZCONNECT
), or Easy Connect Plus (EZCONNECTPLUS
) format. Autonomous Database Serverless instances always use the long format.
85 86 87 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 85 def syntax_format @syntax_format end |
#tls_authentication ⇒ String
Specifies whether the TLS handshake is using one-way (SERVER
) or mutual (MUTUAL
) authentication.
71 72 73 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 71 def tls_authentication @tls_authentication end |
#value ⇒ String
[Required] Connection string value.
59 60 61 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 59 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 92 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'value': :'value', 'consumer_group': :'consumerGroup', 'protocol': :'protocol', 'tls_authentication': :'tlsAuthentication', 'host_format': :'hostFormat', 'session_mode': :'sessionMode', 'syntax_format': :'syntaxFormat', 'is_regional': :'isRegional' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 109 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'value': :'String', 'consumer_group': :'String', 'protocol': :'String', 'tls_authentication': :'String', 'host_format': :'String', 'session_mode': :'String', 'syntax_format': :'String', 'is_regional': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 278 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && value == other.value && consumer_group == other.consumer_group && protocol == other.protocol && tls_authentication == other.tls_authentication && host_format == other.host_format && session_mode == other.session_mode && syntax_format == other.syntax_format && is_regional == other.is_regional end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 316 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
296 297 298 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 296 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
305 306 307 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 305 def hash [display_name, value, consumer_group, protocol, tls_authentication, host_format, session_mode, syntax_format, is_regional].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
349 350 351 352 353 354 355 356 357 358 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 349 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
343 344 345 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 343 def to_s to_hash.to_s end |