Class: OCI::Opsi::Models::EnableAutonomousDatabaseInsightDetails
- Inherits:
-
EnableDatabaseInsightDetails
- Object
- EnableDatabaseInsightDetails
- OCI::Opsi::Models::EnableAutonomousDatabaseInsightDetails
- Defined in:
- lib/oci/opsi/models/enable_autonomous_database_insight_details.rb
Overview
The information about database to be analyzed. When isAdvancedFeaturesEnabled is set to false, parameters connectionDetails, credentialDetails and opsiPrivateEndpoint are optional. Otherwise, connectionDetails and crendetialDetails are required to enable full OPSI service features. If the Autonomouse Database is configured with private, restricted or dedicated access, opsiPrivateEndpoint parameter is required.
Constant Summary
Constants inherited from EnableDatabaseInsightDetails
OCI::Opsi::Models::EnableDatabaseInsightDetails::ENTITY_SOURCE_ENUM
Instance Attribute Summary collapse
- #connection_details ⇒ OCI::Opsi::Models::ConnectionDetails
- #credential_details ⇒ OCI::Opsi::Models::CredentialDetails
-
#database_resource_type ⇒ String
OCI database resource type.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#is_advanced_features_enabled ⇒ BOOLEAN
[Required] Flag is to identify if advanced features for autonomous database is enabled or not.
-
#opsi_private_endpoint_id ⇒ String
The OCID of the OPSI private endpoint.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
Attributes inherited from EnableDatabaseInsightDetails
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 = {}) ⇒ EnableAutonomousDatabaseInsightDetails
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 EnableDatabaseInsightDetails
Constructor Details
#initialize(attributes = {}) ⇒ EnableAutonomousDatabaseInsightDetails
Initializes the object
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 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 97 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['entitySource'] = 'AUTONOMOUS_DATABASE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.database_resource_type = attributes[:'databaseResourceType'] if attributes[:'databaseResourceType'] raise 'You cannot provide both :databaseResourceType and :database_resource_type' if attributes.key?(:'databaseResourceType') && attributes.key?(:'database_resource_type') self.database_resource_type = attributes[:'database_resource_type'] if attributes[:'database_resource_type'] self.is_advanced_features_enabled = attributes[:'isAdvancedFeaturesEnabled'] unless attributes[:'isAdvancedFeaturesEnabled'].nil? self.is_advanced_features_enabled = false if is_advanced_features_enabled.nil? && !attributes.key?(:'isAdvancedFeaturesEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isAdvancedFeaturesEnabled and :is_advanced_features_enabled' if attributes.key?(:'isAdvancedFeaturesEnabled') && attributes.key?(:'is_advanced_features_enabled') self.is_advanced_features_enabled = attributes[:'is_advanced_features_enabled'] unless attributes[:'is_advanced_features_enabled'].nil? self.is_advanced_features_enabled = false if is_advanced_features_enabled.nil? && !attributes.key?(:'isAdvancedFeaturesEnabled') && !attributes.key?(:'is_advanced_features_enabled') # rubocop:disable Style/StringLiterals self.connection_details = attributes[:'connectionDetails'] if attributes[:'connectionDetails'] raise 'You cannot provide both :connectionDetails and :connection_details' if attributes.key?(:'connectionDetails') && attributes.key?(:'connection_details') self.connection_details = attributes[:'connection_details'] if attributes[:'connection_details'] self.credential_details = attributes[:'credentialDetails'] if attributes[:'credentialDetails'] raise 'You cannot provide both :credentialDetails and :credential_details' if attributes.key?(:'credentialDetails') && attributes.key?(:'credential_details') self.credential_details = attributes[:'credential_details'] if attributes[:'credential_details'] self.opsi_private_endpoint_id = attributes[:'opsiPrivateEndpointId'] if attributes[:'opsiPrivateEndpointId'] raise 'You cannot provide both :opsiPrivateEndpointId and :opsi_private_endpoint_id' if attributes.key?(:'opsiPrivateEndpointId') && attributes.key?(:'opsi_private_endpoint_id') self.opsi_private_endpoint_id = attributes[:'opsi_private_endpoint_id'] if attributes[:'opsi_private_endpoint_id'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] 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'] end |
Instance Attribute Details
#connection_details ⇒ OCI::Opsi::Models::ConnectionDetails
22 23 24 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 22 def connection_details @connection_details end |
#credential_details ⇒ OCI::Opsi::Models::CredentialDetails
25 26 27 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 25 def credential_details @credential_details end |
#database_resource_type ⇒ String
OCI database resource type
15 16 17 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 15 def database_resource_type @database_resource_type end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
41 42 43 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 41 def @defined_tags end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
35 36 37 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 35 def @freeform_tags end |
#is_advanced_features_enabled ⇒ BOOLEAN
[Required] Flag is to identify if advanced features for autonomous database is enabled or not
19 20 21 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 19 def is_advanced_features_enabled @is_advanced_features_enabled end |
#opsi_private_endpoint_id ⇒ String
The OCID of the OPSI private endpoint
29 30 31 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 29 def opsi_private_endpoint_id @opsi_private_endpoint_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
47 48 49 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 47 def @system_tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'entity_source': :'entitySource', 'database_resource_type': :'databaseResourceType', 'is_advanced_features_enabled': :'isAdvancedFeaturesEnabled', 'connection_details': :'connectionDetails', 'credential_details': :'credentialDetails', 'opsi_private_endpoint_id': :'opsiPrivateEndpointId', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 67 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'entity_source': :'String', 'database_resource_type': :'String', 'is_advanced_features_enabled': :'BOOLEAN', 'connection_details': :'OCI::Opsi::Models::ConnectionDetails', 'credential_details': :'OCI::Opsi::Models::CredentialDetails', 'opsi_private_endpoint_id': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 165 def ==(other) return true if equal?(other) self.class == other.class && entity_source == other.entity_source && database_resource_type == other.database_resource_type && is_advanced_features_enabled == other.is_advanced_features_enabled && connection_details == other.connection_details && credential_details == other.credential_details && opsi_private_endpoint_id == other.opsi_private_endpoint_id && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 203 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
183 184 185 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 183 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
192 193 194 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 192 def hash [entity_source, database_resource_type, is_advanced_features_enabled, connection_details, credential_details, opsi_private_endpoint_id, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
236 237 238 239 240 241 242 243 244 245 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 236 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
230 231 232 |
# File 'lib/oci/opsi/models/enable_autonomous_database_insight_details.rb', line 230 def to_s to_hash.to_s end |