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.
-
#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
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 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 132 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'] end |
Instance Attribute Details
#consumer_group ⇒ String
Consumer group used by the connection.
62 63 64 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 62 def consumer_group @consumer_group end |
#display_name ⇒ String
[Required] A user-friendly name for the connection.
54 55 56 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 54 def display_name @display_name end |
#host_format ⇒ String
[Required] Host format used in connection string.
74 75 76 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 74 def host_format @host_format end |
#protocol ⇒ String
[Required] Protocol used by the connection.
66 67 68 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 66 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.
78 79 80 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 78 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 Databases on shared Exadata infrastructure always use the long format.
84 85 86 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 84 def syntax_format @syntax_format end |
#tls_authentication ⇒ String
Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication.
70 71 72 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 70 def tls_authentication @tls_authentication end |
#value ⇒ String
[Required] Connection string value.
58 59 60 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 58 def value @value end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 87 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 103 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 264 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 301 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
281 282 283 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 281 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
290 291 292 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 290 def hash [display_name, value, consumer_group, protocol, tls_authentication, host_format, session_mode, syntax_format].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 334 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
328 329 330 |
# File 'lib/oci/database/models/database_connection_string_profile.rb', line 328 def to_s to_hash.to_s end |