Class: OCI::DatabaseManagement::Models::CreateMySqlDatabaseConnectorDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::CreateMySqlDatabaseConnectorDetails
- Defined in:
- lib/oci/database_management/models/create_my_sql_database_connector_details.rb
Overview
Create Details of external database connector.
Constant Summary collapse
- NETWORK_PROTOCOL_ENUM =
[ NETWORK_PROTOCOL_TCP = 'TCP'.freeze, NETWORK_PROTOCOL_TCPS = 'TCPS'.freeze, NETWORK_PROTOCOL_SOCKETS = 'SOCKETS'.freeze ].freeze
- CREDENTIAL_TYPE_ENUM =
[ CREDENTIAL_TYPE_MYSQL_EXTERNAL_NON_SSL_CREDENTIALS = 'MYSQL_EXTERNAL_NON_SSL_CREDENTIALS'.freeze, CREDENTIAL_TYPE_MYSQL_EXTERNAL_SSL_CREDENTIALS = 'MYSQL_EXTERNAL_SSL_CREDENTIALS'.freeze, CREDENTIAL_TYPE_MYSQL_EXTERNAL_SOCKET_CREDENTIALS = 'MYSQL_EXTERNAL_SOCKET_CREDENTIALS'.freeze ].freeze
Instance Attribute Summary collapse
-
#credential_type ⇒ String
[Required] Type of the credential.
-
#display_name ⇒ String
[Required] External MySQL Database Connector Name.
-
#external_database_id ⇒ String
[Required] OCID of MySQL Database resource.
-
#host_name ⇒ String
[Required] Host name for Connector.
-
#macs_agent_id ⇒ String
[Required] Agent Id of the MACS agent.
-
#network_protocol ⇒ String
[Required] Protocol to be used to connect to External MySQL Database; TCP, TCP with SSL or Socket.
-
#port ⇒ Integer
[Required] Port number to connect to External MySQL Database.
-
#ssl_secret_id ⇒ String
[Required] If using existing SSL secret to connect, OCID for the secret resource.
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 = {}) ⇒ CreateMySqlDatabaseConnectorDetails
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 = {}) ⇒ CreateMySqlDatabaseConnectorDetails
Initializes the object
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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 101 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.macs_agent_id = attributes[:'macsAgentId'] if attributes[:'macsAgentId'] raise 'You cannot provide both :macsAgentId and :macs_agent_id' if attributes.key?(:'macsAgentId') && attributes.key?(:'macs_agent_id') self.macs_agent_id = attributes[:'macs_agent_id'] if attributes[:'macs_agent_id'] self.host_name = attributes[:'hostName'] if attributes[:'hostName'] raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] if attributes[:'host_name'] self.port = attributes[:'port'] if attributes[:'port'] self.network_protocol = attributes[:'networkProtocol'] if attributes[:'networkProtocol'] raise 'You cannot provide both :networkProtocol and :network_protocol' if attributes.key?(:'networkProtocol') && attributes.key?(:'network_protocol') self.network_protocol = attributes[:'network_protocol'] if attributes[:'network_protocol'] self.external_database_id = attributes[:'externalDatabaseId'] if attributes[:'externalDatabaseId'] raise 'You cannot provide both :externalDatabaseId and :external_database_id' if attributes.key?(:'externalDatabaseId') && attributes.key?(:'external_database_id') self.external_database_id = attributes[:'external_database_id'] if attributes[:'external_database_id'] self.credential_type = attributes[:'credentialType'] if attributes[:'credentialType'] raise 'You cannot provide both :credentialType and :credential_type' if attributes.key?(:'credentialType') && attributes.key?(:'credential_type') self.credential_type = attributes[:'credential_type'] if attributes[:'credential_type'] self.ssl_secret_id = attributes[:'sslSecretId'] if attributes[:'sslSecretId'] raise 'You cannot provide both :sslSecretId and :ssl_secret_id' if attributes.key?(:'sslSecretId') && attributes.key?(:'ssl_secret_id') self.ssl_secret_id = attributes[:'ssl_secret_id'] if attributes[:'ssl_secret_id'] end |
Instance Attribute Details
#credential_type ⇒ String
[Required] Type of the credential.
49 50 51 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 49 def credential_type @credential_type end |
#display_name ⇒ String
[Required] External MySQL Database Connector Name.
25 26 27 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 25 def display_name @display_name end |
#external_database_id ⇒ String
[Required] OCID of MySQL Database resource.
45 46 47 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 45 def external_database_id @external_database_id end |
#host_name ⇒ String
[Required] Host name for Connector.
33 34 35 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 33 def host_name @host_name end |
#macs_agent_id ⇒ String
[Required] Agent Id of the MACS agent.
29 30 31 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 29 def macs_agent_id @macs_agent_id end |
#network_protocol ⇒ String
[Required] Protocol to be used to connect to External MySQL Database; TCP, TCP with SSL or Socket.
41 42 43 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 41 def network_protocol @network_protocol end |
#port ⇒ Integer
[Required] Port number to connect to External MySQL Database.
37 38 39 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 37 def port @port end |
#ssl_secret_id ⇒ String
[Required] If using existing SSL secret to connect, OCID for the secret resource.
53 54 55 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 53 def ssl_secret_id @ssl_secret_id 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 67 68 69 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'macs_agent_id': :'macsAgentId', 'host_name': :'hostName', 'port': :'port', 'network_protocol': :'networkProtocol', 'external_database_id': :'externalDatabaseId', 'credential_type': :'credentialType', 'ssl_secret_id': :'sslSecretId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 72 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'macs_agent_id': :'String', 'host_name': :'String', 'port': :'Integer', 'network_protocol': :'String', 'external_database_id': :'String', 'credential_type': :'String', 'ssl_secret_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 175 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && macs_agent_id == other.macs_agent_id && host_name == other.host_name && port == other.port && network_protocol == other.network_protocol && external_database_id == other.external_database_id && credential_type == other.credential_type && ssl_secret_id == other.ssl_secret_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 212 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
192 193 194 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 192 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
201 202 203 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 201 def hash [display_name, macs_agent_id, host_name, port, network_protocol, external_database_id, credential_type, ssl_secret_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 245 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
239 240 241 |
# File 'lib/oci/database_management/models/create_my_sql_database_connector_details.rb', line 239 def to_s to_hash.to_s end |