Class: OCI::Database::Models::ExternalMacsConnectorSummary
- Inherits:
-
ExternalDatabaseConnectorSummary
- Object
- ExternalDatabaseConnectorSummary
- OCI::Database::Models::ExternalMacsConnectorSummary
- Defined in:
- lib/oci/database/models/external_macs_connector_summary.rb
Overview
An Oracle Cloud Infrastructure resource that uses the Management Agent cloud service (MACS) to connect to an external Oracle Database.
Constant Summary
Constants inherited from ExternalDatabaseConnectorSummary
OCI::Database::Models::ExternalDatabaseConnectorSummary::CONNECTOR_TYPE_ENUM
Instance Attribute Summary collapse
-
#connection_credentials ⇒ OCI::Database::Models::DatabaseConnectionCredentials
This attribute is required.
-
#connection_string ⇒ OCI::Database::Models::DatabaseConnectionString
This attribute is required.
-
#connector_agent_id ⇒ String
[Required] The ID of the agent used for the create_external_database_connector_details.
Attributes inherited from ExternalDatabaseConnectorSummary
#compartment_id, #connection_status, #connector_type, #defined_tags, #display_name, #external_database_id, #freeform_tags, #id, #lifecycle_details, #lifecycle_state, #system_tags, #time_connection_status_last_updated, #time_created
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 = {}) ⇒ ExternalMacsConnectorSummary
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.
Methods inherited from ExternalDatabaseConnectorSummary
Constructor Details
#initialize(attributes = {}) ⇒ ExternalMacsConnectorSummary
Initializes the object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 96 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['connectorType'] = 'MACS' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.connection_string = attributes[:'connectionString'] if attributes[:'connectionString'] raise 'You cannot provide both :connectionString and :connection_string' if attributes.key?(:'connectionString') && attributes.key?(:'connection_string') self.connection_string = attributes[:'connection_string'] if attributes[:'connection_string'] self.connection_credentials = attributes[:'connectionCredentials'] if attributes[:'connectionCredentials'] raise 'You cannot provide both :connectionCredentials and :connection_credentials' if attributes.key?(:'connectionCredentials') && attributes.key?(:'connection_credentials') self.connection_credentials = attributes[:'connection_credentials'] if attributes[:'connection_credentials'] self.connector_agent_id = attributes[:'connectorAgentId'] if attributes[:'connectorAgentId'] raise 'You cannot provide both :connectorAgentId and :connector_agent_id' if attributes.key?(:'connectorAgentId') && attributes.key?(:'connector_agent_id') self.connector_agent_id = attributes[:'connector_agent_id'] if attributes[:'connector_agent_id'] end |
Instance Attribute Details
#connection_credentials ⇒ OCI::Database::Models::DatabaseConnectionCredentials
This attribute is required.
19 20 21 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 19 def connection_credentials @connection_credentials end |
#connection_string ⇒ OCI::Database::Models::DatabaseConnectionString
This attribute is required.
15 16 17 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 15 def connection_string @connection_string end |
#connector_agent_id ⇒ String
[Required] The ID of the agent used for the create_external_database_connector_details.
25 26 27 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 25 def connector_agent_id @connector_agent_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 28 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'display_name': :'displayName', 'id': :'id', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_created': :'timeCreated', 'connector_type': :'connectorType', 'external_database_id': :'externalDatabaseId', 'connection_status': :'connectionStatus', 'time_connection_status_last_updated': :'timeConnectionStatusLastUpdated', 'connection_string': :'connectionString', 'connection_credentials': :'connectionCredentials', 'connector_agent_id': :'connectorAgentId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'id': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_created': :'DateTime', 'connector_type': :'String', 'external_database_id': :'String', 'connection_status': :'String', 'time_connection_status_last_updated': :'DateTime', 'connection_string': :'OCI::Database::Models::DatabaseConnectionString', 'connection_credentials': :'OCI::Database::Models::DatabaseConnectionCredentials', 'connector_agent_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 132 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && == other. && == other. && == other. && display_name == other.display_name && id == other.id && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && time_created == other.time_created && connector_type == other.connector_type && external_database_id == other.external_database_id && connection_status == other.connection_status && time_connection_status_last_updated == other.time_connection_status_last_updated && connection_string == other.connection_string && connection_credentials == other.connection_credentials && connector_agent_id == other.connector_agent_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 177 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
157 158 159 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 157 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
166 167 168 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 166 def hash [compartment_id, , , , display_name, id, lifecycle_state, lifecycle_details, time_created, connector_type, external_database_id, connection_status, time_connection_status_last_updated, connection_string, connection_credentials, connector_agent_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 210 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
204 205 206 |
# File 'lib/oci/database/models/external_macs_connector_summary.rb', line 204 def to_s to_hash.to_s end |