Class: OCI::DatabaseManagement::Models::MySqlDatabaseConnectorSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::MySqlDatabaseConnectorSummary
- Defined in:
- lib/oci/database_management/models/my_sql_database_connector_summary.rb
Overview
Details of external database connector.
Constant Summary collapse
- SOURCE_DATABASE_TYPE_ENUM =
[ SOURCE_DATABASE_TYPE_EXTERNAL = 'EXTERNAL'.freeze, SOURCE_DATABASE_TYPE_MDS = 'MDS'.freeze, SOURCE_DATABASE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CONNECTOR_TYPE_ENUM =
[ CONNECTOR_TYPE_MACS = 'MACS'.freeze, CONNECTOR_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- NETWORK_PROTOCOL_ENUM =
[ NETWORK_PROTOCOL_TCP = 'TCP'.freeze, NETWORK_PROTOCOL_TCPS = 'TCPS'.freeze, NETWORK_PROTOCOL_SOCKETS = 'SOCKETS'.freeze, NETWORK_PROTOCOL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.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, CREDENTIAL_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#associated_services ⇒ String
OCI Services associated with this connector.
-
#compartment_id ⇒ String
OCID of compartment for the External MySQL connector.
-
#connection_status ⇒ String
Connection Status.
-
#connector_type ⇒ String
Connector Type.
-
#credential_type ⇒ String
Credential type used to connect to database.
-
#host_name ⇒ String
Host name for Connector.
-
#id ⇒ String
[Required] OCID of MySQL Database Connector.
-
#lifecycle_state ⇒ String
Indicates lifecycle state of the resource.
-
#macs_agent_id ⇒ String
Agent Id of the MACS agent.
-
#name ⇒ String
External MySQL Database Connector Name.
-
#network_protocol ⇒ String
Network Protocol.
-
#port ⇒ Integer
Connector port.
-
#source_database ⇒ String
Name of MySQL Database.
-
#source_database_type ⇒ String
Type of MySQL Database.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_connection_status_updated ⇒ DateTime
Time when connection status was last updated.
-
#time_created ⇒ DateTime
Connector creation time.
-
#time_updated ⇒ DateTime
Connector update time.
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 = {}) ⇒ MySqlDatabaseConnectorSummary
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 = {}) ⇒ MySqlDatabaseConnectorSummary
Initializes the object
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 200 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.name = attributes[:'name'] if attributes[:'name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.associated_services = attributes[:'associatedServices'] if attributes[:'associatedServices'] raise 'You cannot provide both :associatedServices and :associated_services' if attributes.key?(:'associatedServices') && attributes.key?(:'associated_services') self.associated_services = attributes[:'associated_services'] if attributes[:'associated_services'] self.id = attributes[:'id'] if attributes[:'id'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.source_database = attributes[:'sourceDatabase'] if attributes[:'sourceDatabase'] raise 'You cannot provide both :sourceDatabase and :source_database' if attributes.key?(:'sourceDatabase') && attributes.key?(:'source_database') self.source_database = attributes[:'source_database'] if attributes[:'source_database'] self.source_database_type = attributes[:'sourceDatabaseType'] if attributes[:'sourceDatabaseType'] raise 'You cannot provide both :sourceDatabaseType and :source_database_type' if attributes.key?(:'sourceDatabaseType') && attributes.key?(:'source_database_type') self.source_database_type = attributes[:'source_database_type'] if attributes[:'source_database_type'] self.connection_status = attributes[:'connectionStatus'] if attributes[:'connectionStatus'] raise 'You cannot provide both :connectionStatus and :connection_status' if attributes.key?(:'connectionStatus') && attributes.key?(:'connection_status') self.connection_status = attributes[:'connection_status'] if attributes[:'connection_status'] self.time_connection_status_updated = attributes[:'timeConnectionStatusUpdated'] if attributes[:'timeConnectionStatusUpdated'] raise 'You cannot provide both :timeConnectionStatusUpdated and :time_connection_status_updated' if attributes.key?(:'timeConnectionStatusUpdated') && attributes.key?(:'time_connection_status_updated') self.time_connection_status_updated = attributes[:'time_connection_status_updated'] if attributes[:'time_connection_status_updated'] 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.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.port = attributes[:'port'] if attributes[:'port'] self.connector_type = attributes[:'connectorType'] if attributes[:'connectorType'] raise 'You cannot provide both :connectorType and :connector_type' if attributes.key?(:'connectorType') && attributes.key?(:'connector_type') self.connector_type = attributes[:'connector_type'] if attributes[:'connector_type'] 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.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. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] end |
Instance Attribute Details
#associated_services ⇒ String
OCI Services associated with this connector.
57 58 59 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 57 def associated_services @associated_services end |
#compartment_id ⇒ String
OCID of compartment for the External MySQL connector.
53 54 55 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 53 def compartment_id @compartment_id end |
#connection_status ⇒ String
Connection Status.
81 82 83 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 81 def connection_status @connection_status end |
#connector_type ⇒ String
Connector Type.
101 102 103 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 101 def connector_type @connector_type end |
#credential_type ⇒ String
Credential type used to connect to database.
109 110 111 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 109 def credential_type @credential_type end |
#host_name ⇒ String
Host name for Connector.
89 90 91 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 89 def host_name @host_name end |
#id ⇒ String
[Required] OCID of MySQL Database Connector.
61 62 63 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 61 def id @id end |
#lifecycle_state ⇒ String
Indicates lifecycle state of the resource.
122 123 124 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 122 def lifecycle_state @lifecycle_state end |
#macs_agent_id ⇒ String
Agent Id of the MACS agent.
93 94 95 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 93 def macs_agent_id @macs_agent_id end |
#name ⇒ String
External MySQL Database Connector Name
49 50 51 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 49 def name @name end |
#network_protocol ⇒ String
Network Protocol.
105 106 107 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 105 def network_protocol @network_protocol end |
#port ⇒ Integer
Connector port.
97 98 99 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 97 def port @port end |
#source_database ⇒ String
Name of MySQL Database.
73 74 75 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 73 def source_database @source_database end |
#source_database_type ⇒ String
Type of MySQL Database.
77 78 79 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 77 def source_database_type @source_database_type end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
118 119 120 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 118 def @system_tags end |
#time_connection_status_updated ⇒ DateTime
Time when connection status was last updated.
85 86 87 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 85 def time_connection_status_updated @time_connection_status_updated end |
#time_created ⇒ DateTime
Connector creation time.
65 66 67 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 65 def time_created @time_created end |
#time_updated ⇒ DateTime
Connector update time.
69 70 71 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 69 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 125 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'compartment_id': :'compartmentId', 'associated_services': :'associatedServices', 'id': :'id', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'source_database': :'sourceDatabase', 'source_database_type': :'sourceDatabaseType', 'connection_status': :'connectionStatus', 'time_connection_status_updated': :'timeConnectionStatusUpdated', 'host_name': :'hostName', 'macs_agent_id': :'macsAgentId', 'port': :'port', 'connector_type': :'connectorType', 'network_protocol': :'networkProtocol', 'credential_type': :'credentialType', 'system_tags': :'systemTags', 'lifecycle_state': :'lifecycleState' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 151 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'compartment_id': :'String', 'associated_services': :'String', 'id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'source_database': :'String', 'source_database_type': :'String', 'connection_status': :'String', 'time_connection_status_updated': :'DateTime', 'host_name': :'String', 'macs_agent_id': :'String', 'port': :'Integer', 'connector_type': :'String', 'network_protocol': :'String', 'credential_type': :'String', 'system_tags': :'Hash<String, Hash<String, Object>>', 'lifecycle_state': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 375 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && compartment_id == other.compartment_id && associated_services == other.associated_services && id == other.id && time_created == other.time_created && time_updated == other.time_updated && source_database == other.source_database && source_database_type == other.source_database_type && connection_status == other.connection_status && time_connection_status_updated == other.time_connection_status_updated && host_name == other.host_name && macs_agent_id == other.macs_agent_id && port == other.port && connector_type == other.connector_type && network_protocol == other.network_protocol && credential_type == other.credential_type && == other. && lifecycle_state == other.lifecycle_state end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 422 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
402 403 404 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 402 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
411 412 413 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 411 def hash [name, compartment_id, associated_services, id, time_created, time_updated, source_database, source_database_type, connection_status, time_connection_status_updated, host_name, macs_agent_id, port, connector_type, network_protocol, credential_type, , lifecycle_state].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
455 456 457 458 459 460 461 462 463 464 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 455 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
449 450 451 |
# File 'lib/oci/database_management/models/my_sql_database_connector_summary.rb', line 449 def to_s to_hash.to_s end |