Class: OCI::ApmSynthetics::Models::SqlMonitorConfiguration
- Inherits:
-
MonitorConfiguration
- Object
- MonitorConfiguration
- OCI::ApmSynthetics::Models::SqlMonitorConfiguration
- Defined in:
- lib/oci/apm_synthetics/models/sql_monitor_configuration.rb
Overview
Request configuration details for the SQL monitor type.
Constant Summary collapse
- DATABASE_TYPE_ENUM =
[ DATABASE_TYPE_ORACLE = 'ORACLE'.freeze, DATABASE_TYPE_MYSQL = 'MYSQL'.freeze, DATABASE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DATABASE_CONNECTION_TYPE_ENUM =
[ DATABASE_CONNECTION_TYPE_CLOUD_WALLET = 'CLOUD_WALLET'.freeze, DATABASE_CONNECTION_TYPE_CUSTOM_JDBC = 'CUSTOM_JDBC'.freeze, DATABASE_CONNECTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from MonitorConfiguration
MonitorConfiguration::CONFIG_TYPE_ENUM
Instance Attribute Summary collapse
-
#connection_string ⇒ String
Database connection string.
- #database_authentication_details ⇒ OCI::ApmSynthetics::Models::BasicAuthenticationDetails
-
#database_connection_type ⇒ String
Database connection type.
-
#database_role ⇒ String
Database role.
-
#database_type ⇒ String
Database type.
- #database_wallet_details ⇒ OCI::ApmSynthetics::Models::DatabaseWalletDetails
-
#query ⇒ String
SQL query to be executed.
Attributes inherited from MonitorConfiguration
#config_type, #dns_configuration, #is_failure_retried
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 = {}) ⇒ SqlMonitorConfiguration
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 MonitorConfiguration
Constructor Details
#initialize(attributes = {}) ⇒ SqlMonitorConfiguration
Initializes the object
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 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 102 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['configType'] = 'SQL_CONFIG' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.database_type = attributes[:'databaseType'] if attributes[:'databaseType'] raise 'You cannot provide both :databaseType and :database_type' if attributes.key?(:'databaseType') && attributes.key?(:'database_type') self.database_type = attributes[:'database_type'] if attributes[:'database_type'] self.query = attributes[:'query'] if attributes[:'query'] self.database_authentication_details = attributes[:'databaseAuthenticationDetails'] if attributes[:'databaseAuthenticationDetails'] raise 'You cannot provide both :databaseAuthenticationDetails and :database_authentication_details' if attributes.key?(:'databaseAuthenticationDetails') && attributes.key?(:'database_authentication_details') self.database_authentication_details = attributes[:'database_authentication_details'] if attributes[:'database_authentication_details'] self.database_role = attributes[:'databaseRole'] if attributes[:'databaseRole'] raise 'You cannot provide both :databaseRole and :database_role' if attributes.key?(:'databaseRole') && attributes.key?(:'database_role') self.database_role = attributes[:'database_role'] if attributes[:'database_role'] self.database_connection_type = attributes[:'databaseConnectionType'] if attributes[:'databaseConnectionType'] raise 'You cannot provide both :databaseConnectionType and :database_connection_type' if attributes.key?(:'databaseConnectionType') && attributes.key?(:'database_connection_type') self.database_connection_type = attributes[:'database_connection_type'] if attributes[:'database_connection_type'] 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.database_wallet_details = attributes[:'databaseWalletDetails'] if attributes[:'databaseWalletDetails'] raise 'You cannot provide both :databaseWalletDetails and :database_wallet_details' if attributes.key?(:'databaseWalletDetails') && attributes.key?(:'database_wallet_details') self.database_wallet_details = attributes[:'database_wallet_details'] if attributes[:'database_wallet_details'] end |
Instance Attribute Details
#connection_string ⇒ String
Database connection string.
46 47 48 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 46 def connection_string @connection_string end |
#database_authentication_details ⇒ OCI::ApmSynthetics::Models::BasicAuthenticationDetails
34 35 36 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 34 def database_authentication_details @database_authentication_details end |
#database_connection_type ⇒ String
Database connection type. Only CUSTOM_JDBC is supported for MYSQL database type.
42 43 44 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 42 def database_connection_type @database_connection_type end |
#database_role ⇒ String
Database role.
38 39 40 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 38 def database_role @database_role end |
#database_type ⇒ String
Database type.
27 28 29 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 27 def database_type @database_type end |
#database_wallet_details ⇒ OCI::ApmSynthetics::Models::DatabaseWalletDetails
49 50 51 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 49 def database_wallet_details @database_wallet_details end |
#query ⇒ String
SQL query to be executed.
31 32 33 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 31 def query @query end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_type': :'configType', 'is_failure_retried': :'isFailureRetried', 'dns_configuration': :'dnsConfiguration', 'database_type': :'databaseType', 'query': :'query', 'database_authentication_details': :'databaseAuthenticationDetails', 'database_role': :'databaseRole', 'database_connection_type': :'databaseConnectionType', 'connection_string': :'connectionString', 'database_wallet_details': :'databaseWalletDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 70 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_type': :'String', 'is_failure_retried': :'BOOLEAN', 'dns_configuration': :'OCI::ApmSynthetics::Models::DnsConfiguration', 'database_type': :'String', 'query': :'String', 'database_authentication_details': :'OCI::ApmSynthetics::Models::BasicAuthenticationDetails', 'database_role': :'String', 'database_connection_type': :'String', 'connection_string': :'String', 'database_wallet_details': :'OCI::ApmSynthetics::Models::DatabaseWalletDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 184 def ==(other) return true if equal?(other) self.class == other.class && config_type == other.config_type && is_failure_retried == other.is_failure_retried && dns_configuration == other.dns_configuration && database_type == other.database_type && query == other.query && database_authentication_details == other.database_authentication_details && database_role == other.database_role && database_connection_type == other.database_connection_type && connection_string == other.connection_string && database_wallet_details == other.database_wallet_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 223 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
203 204 205 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 203 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
212 213 214 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 212 def hash [config_type, is_failure_retried, dns_configuration, database_type, query, database_authentication_details, database_role, database_connection_type, connection_string, database_wallet_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
256 257 258 259 260 261 262 263 264 265 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 256 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
250 251 252 |
# File 'lib/oci/apm_synthetics/models/sql_monitor_configuration.rb', line 250 def to_s to_hash.to_s end |