Class: OCI::DatabaseManagement::Models::OptimizerDatabase
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::OptimizerDatabase
- Defined in:
- lib/oci/database_management/models/optimizer_database.rb
Overview
The subset information of the Managed Database resource, which is used by Optimizer Statistics.
Constant Summary collapse
- DB_TYPE_ENUM =
[ DB_TYPE_EXTERNAL_SIDB = 'EXTERNAL_SIDB'.freeze, DB_TYPE_EXTERNAL_RAC = 'EXTERNAL_RAC'.freeze, DB_TYPE_CLOUD_SIDB = 'CLOUD_SIDB'.freeze, DB_TYPE_CLOUD_RAC = 'CLOUD_RAC'.freeze, DB_TYPE_SHARED = 'SHARED'.freeze, DB_TYPE_DEDICATED = 'DEDICATED'.freeze, DB_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DB_SUB_TYPE_ENUM =
[ DB_SUB_TYPE_CDB = 'CDB'.freeze, DB_SUB_TYPE_PDB = 'PDB'.freeze, DB_SUB_TYPE_NON_CDB = 'NON_CDB'.freeze, DB_SUB_TYPE_ACD = 'ACD'.freeze, DB_SUB_TYPE_ADB = 'ADB'.freeze, DB_SUB_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DB_DEPLOYMENT_TYPE_ENUM =
[ DB_DEPLOYMENT_TYPE_ONPREMISE = 'ONPREMISE'.freeze, DB_DEPLOYMENT_TYPE_BM = 'BM'.freeze, DB_DEPLOYMENT_TYPE_VM = 'VM'.freeze, DB_DEPLOYMENT_TYPE_EXADATA = 'EXADATA'.freeze, DB_DEPLOYMENT_TYPE_EXADATA_CC = 'EXADATA_CC'.freeze, DB_DEPLOYMENT_TYPE_AUTONOMOUS = 'AUTONOMOUS'.freeze, DB_DEPLOYMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment in which the Managed Database resides.
-
#db_deployment_type ⇒ String
[Required] The infrastructure used to deploy the Oracle Database.
-
#db_sub_type ⇒ String
[Required] The subtype of the Oracle Database.
-
#db_type ⇒ String
[Required] The type of Oracle Database installation.
-
#db_version ⇒ String
[Required] The version of the Oracle Database.
-
#id ⇒ String
[Required] The OCID of the Managed Database.
-
#name ⇒ String
[Required] The name of the Managed Database.
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 = {}) ⇒ OptimizerDatabase
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 = {}) ⇒ OptimizerDatabase
Initializes the object
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 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 114 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.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.db_type = attributes[:'dbType'] if attributes[:'dbType'] raise 'You cannot provide both :dbType and :db_type' if attributes.key?(:'dbType') && attributes.key?(:'db_type') self.db_type = attributes[:'db_type'] if attributes[:'db_type'] self.db_sub_type = attributes[:'dbSubType'] if attributes[:'dbSubType'] raise 'You cannot provide both :dbSubType and :db_sub_type' if attributes.key?(:'dbSubType') && attributes.key?(:'db_sub_type') self.db_sub_type = attributes[:'db_sub_type'] if attributes[:'db_sub_type'] self.db_deployment_type = attributes[:'dbDeploymentType'] if attributes[:'dbDeploymentType'] raise 'You cannot provide both :dbDeploymentType and :db_deployment_type' if attributes.key?(:'dbDeploymentType') && attributes.key?(:'db_deployment_type') self.db_deployment_type = attributes[:'db_deployment_type'] if attributes[:'db_deployment_type'] self.db_version = attributes[:'dbVersion'] if attributes[:'dbVersion'] raise 'You cannot provide both :dbVersion and :db_version' if attributes.key?(:'dbVersion') && attributes.key?(:'db_version') self.db_version = attributes[:'db_version'] if attributes[:'db_version'] 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'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment in which the Managed Database resides.
69 70 71 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 69 def compartment_id @compartment_id end |
#db_deployment_type ⇒ String
[Required] The infrastructure used to deploy the Oracle Database.
61 62 63 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 61 def db_deployment_type @db_deployment_type end |
#db_sub_type ⇒ String
[Required] The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
57 58 59 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 57 def db_sub_type @db_sub_type end |
#db_type ⇒ String
[Required] The type of Oracle Database installation.
51 52 53 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 51 def db_type @db_type end |
#db_version ⇒ String
[Required] The version of the Oracle Database.
65 66 67 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 65 def db_version @db_version end |
#id ⇒ String
[Required] The OCID of the Managed Database.
43 44 45 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 43 def id @id end |
#name ⇒ String
[Required] The name of the Managed Database.
47 48 49 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 47 def name @name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'name': :'name', 'db_type': :'dbType', 'db_sub_type': :'dbSubType', 'db_deployment_type': :'dbDeploymentType', 'db_version': :'dbVersion', 'compartment_id': :'compartmentId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 87 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'name': :'String', 'db_type': :'String', 'db_sub_type': :'String', 'db_deployment_type': :'String', 'db_version': :'String', 'compartment_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 201 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && name == other.name && db_type == other.db_type && db_sub_type == other.db_sub_type && db_deployment_type == other.db_deployment_type && db_version == other.db_version && compartment_id == other.compartment_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 237 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
217 218 219 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 217 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
226 227 228 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 226 def hash [id, name, db_type, db_sub_type, db_deployment_type, db_version, compartment_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 270 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
264 265 266 |
# File 'lib/oci/database_management/models/optimizer_database.rb', line 264 def to_s to_hash.to_s end |