Class: OCI::DatabaseManagement::Models::ExternalDbSystemDiscoveryConnector
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::ExternalDbSystemDiscoveryConnector
- Defined in:
- lib/oci/database_management/models/external_db_system_discovery_connector.rb
Overview
The connector details used to connect to the external DB system component. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
Constant Summary collapse
- CONNECTOR_TYPE_ENUM =
[ CONNECTOR_TYPE_MACS = 'MACS'.freeze, CONNECTOR_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#connection_failure_message ⇒ String
The error message indicating the reason for connection failure or
null
if the connection was successful. -
#connection_status ⇒ String
The status of connectivity to the external DB system component.
-
#connector_type ⇒ String
[Required] The type of connector.
-
#display_name ⇒ String
[Required] The user-friendly name for the external connector.
-
#time_connection_status_last_updated ⇒ DateTime
The date and time the connectionStatus of the external DB system connector was last updated.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ ExternalDbSystemDiscoveryConnector
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 = {}) ⇒ ExternalDbSystemDiscoveryConnector
Initializes the object
92 93 94 95 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 124 125 126 127 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 92 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.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.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.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. = attributes[:'connectionFailureMessage'] if attributes[:'connectionFailureMessage'] raise 'You cannot provide both :connectionFailureMessage and :connection_failure_message' if attributes.key?(:'connectionFailureMessage') && attributes.key?(:'connection_failure_message') self. = attributes[:'connection_failure_message'] if attributes[:'connection_failure_message'] self.time_connection_status_last_updated = attributes[:'timeConnectionStatusLastUpdated'] if attributes[:'timeConnectionStatusLastUpdated'] raise 'You cannot provide both :timeConnectionStatusLastUpdated and :time_connection_status_last_updated' if attributes.key?(:'timeConnectionStatusLastUpdated') && attributes.key?(:'time_connection_status_last_updated') self.time_connection_status_last_updated = attributes[:'time_connection_status_last_updated'] if attributes[:'time_connection_status_last_updated'] end |
Instance Attribute Details
#connection_failure_message ⇒ String
The error message indicating the reason for connection failure or null
if the connection was successful.
34 35 36 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 34 def @connection_failure_message end |
#connection_status ⇒ String
The status of connectivity to the external DB system component.
28 29 30 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 28 def connection_status @connection_status end |
#connector_type ⇒ String
[Required] The type of connector.
20 21 22 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 20 def connector_type @connector_type end |
#display_name ⇒ String
[Required] The user-friendly name for the external connector. The name does not have to be unique.
24 25 26 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 24 def display_name @display_name end |
#time_connection_status_last_updated ⇒ DateTime
The date and time the connectionStatus of the external DB system connector was last updated.
38 39 40 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 38 def time_connection_status_last_updated @time_connection_status_last_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'connector_type': :'connectorType', 'display_name': :'displayName', 'connection_status': :'connectionStatus', 'connection_failure_message': :'connectionFailureMessage', 'time_connection_status_last_updated': :'timeConnectionStatusLastUpdated' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
71 72 73 74 75 76 77 78 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 71 def self.get_subtype(object_hash) type = object_hash[:'connectorType'] # rubocop:disable Style/SymbolLiteral return 'OCI::DatabaseManagement::Models::ExternalDbSystemDiscoveryMacsConnector' if type == 'MACS' # TODO: Log a warning when the subtype is not found. 'OCI::DatabaseManagement::Models::ExternalDbSystemDiscoveryConnector' end |
.swagger_types ⇒ Object
Attribute type mapping.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'connector_type': :'String', 'display_name': :'String', 'connection_status': :'String', 'connection_failure_message': :'String', 'time_connection_status_last_updated': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 149 def ==(other) return true if equal?(other) self.class == other.class && connector_type == other.connector_type && display_name == other.display_name && connection_status == other.connection_status && == other. && time_connection_status_last_updated == other.time_connection_status_last_updated end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 183 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
163 164 165 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 172 def hash [connector_type, display_name, connection_status, , time_connection_status_last_updated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 216 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
210 211 212 |
# File 'lib/oci/database_management/models/external_db_system_discovery_connector.rb', line 210 def to_s to_hash.to_s end |