Class: OCI::DatabaseManagement::Models::DatabaseUsageMetrics
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::DatabaseUsageMetrics
- Defined in:
- lib/oci/database_management/models/database_usage_metrics.rb
Overview
The list of aggregated metrics for Managed Databases in the fleet.
Constant Summary collapse
- DATABASE_TYPE_ENUM =
[ DATABASE_TYPE_EXTERNAL_SIDB = 'EXTERNAL_SIDB'.freeze, DATABASE_TYPE_EXTERNAL_RAC = 'EXTERNAL_RAC'.freeze, DATABASE_TYPE_CLOUD_SIDB = 'CLOUD_SIDB'.freeze, DATABASE_TYPE_CLOUD_RAC = 'CLOUD_RAC'.freeze, DATABASE_TYPE_SHARED = 'SHARED'.freeze, DATABASE_TYPE_DEDICATED = 'DEDICATED'.freeze, DATABASE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DATABASE_SUB_TYPE_ENUM =
[ DATABASE_SUB_TYPE_CDB = 'CDB'.freeze, DATABASE_SUB_TYPE_PDB = 'PDB'.freeze, DATABASE_SUB_TYPE_NON_CDB = 'NON_CDB'.freeze, DATABASE_SUB_TYPE_ACD = 'ACD'.freeze, DATABASE_SUB_TYPE_ADB = 'ADB'.freeze, DATABASE_SUB_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DEPLOYMENT_TYPE_ENUM =
[ DEPLOYMENT_TYPE_ONPREMISE = 'ONPREMISE'.freeze, DEPLOYMENT_TYPE_BM = 'BM'.freeze, DEPLOYMENT_TYPE_VM = 'VM'.freeze, DEPLOYMENT_TYPE_EXADATA = 'EXADATA'.freeze, DEPLOYMENT_TYPE_EXADATA_CC = 'EXADATA_CC'.freeze, DEPLOYMENT_TYPE_AUTONOMOUS = 'AUTONOMOUS'.freeze, DEPLOYMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- WORKLOAD_TYPE_ENUM =
[ WORKLOAD_TYPE_OLTP = 'OLTP'.freeze, WORKLOAD_TYPE_DW = 'DW'.freeze, WORKLOAD_TYPE_AJD = 'AJD'.freeze, WORKLOAD_TYPE_APEX = 'APEX'.freeze, WORKLOAD_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
The OCID of the compartment where the Managed Database resides.
-
#database_container_id ⇒ String
The OCID of the parent Container Database, in the case of a Pluggable Database.
-
#database_name ⇒ String
The display name of the Managed Database.
-
#database_sub_type ⇒ String
The subtype of the Oracle Database.
-
#database_type ⇒ String
The type of Oracle Database installation.
-
#database_version ⇒ String
The Oracle Database version.
-
#db_id ⇒ String
The OCID of the Managed Database.
-
#deployment_type ⇒ String
The infrastructure used to deploy the Oracle Database.
-
#metrics ⇒ Array<OCI::DatabaseManagement::Models::FleetMetricDefinition>
A list of the database health metrics like CPU, Storage, and Memory.
-
#workload_type ⇒ String
The workload type of the Autonomous 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 = {}) ⇒ DatabaseUsageMetrics
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 = {}) ⇒ DatabaseUsageMetrics
Initializes the object
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 143 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.db_id = attributes[:'dbId'] if attributes[:'dbId'] raise 'You cannot provide both :dbId and :db_id' if attributes.key?(:'dbId') && attributes.key?(:'db_id') self.db_id = attributes[:'db_id'] if attributes[:'db_id'] 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'] 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.database_sub_type = attributes[:'databaseSubType'] if attributes[:'databaseSubType'] raise 'You cannot provide both :databaseSubType and :database_sub_type' if attributes.key?(:'databaseSubType') && attributes.key?(:'database_sub_type') self.database_sub_type = attributes[:'database_sub_type'] if attributes[:'database_sub_type'] self.deployment_type = attributes[:'deploymentType'] if attributes[:'deploymentType'] raise 'You cannot provide both :deploymentType and :deployment_type' if attributes.key?(:'deploymentType') && attributes.key?(:'deployment_type') self.deployment_type = attributes[:'deployment_type'] if attributes[:'deployment_type'] self.database_version = attributes[:'databaseVersion'] if attributes[:'databaseVersion'] raise 'You cannot provide both :databaseVersion and :database_version' if attributes.key?(:'databaseVersion') && attributes.key?(:'database_version') self.database_version = attributes[:'database_version'] if attributes[:'database_version'] self.workload_type = attributes[:'workloadType'] if attributes[:'workloadType'] raise 'You cannot provide both :workloadType and :workload_type' if attributes.key?(:'workloadType') && attributes.key?(:'workload_type') self.workload_type = attributes[:'workload_type'] if attributes[:'workload_type'] self.database_name = attributes[:'databaseName'] if attributes[:'databaseName'] raise 'You cannot provide both :databaseName and :database_name' if attributes.key?(:'databaseName') && attributes.key?(:'database_name') self.database_name = attributes[:'database_name'] if attributes[:'database_name'] self.database_container_id = attributes[:'databaseContainerId'] if attributes[:'databaseContainerId'] raise 'You cannot provide both :databaseContainerId and :database_container_id' if attributes.key?(:'databaseContainerId') && attributes.key?(:'database_container_id') self.database_container_id = attributes[:'database_container_id'] if attributes[:'database_container_id'] self.metrics = attributes[:'metrics'] if attributes[:'metrics'] end |
Instance Attribute Details
#compartment_id ⇒ String
The OCID of the compartment where the Managed Database resides.
55 56 57 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 55 def compartment_id @compartment_id end |
#database_container_id ⇒ String
The OCID of the parent Container Database, in the case of a Pluggable Database.
85 86 87 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 85 def database_container_id @database_container_id end |
#database_name ⇒ String
The display name of the Managed Database.
81 82 83 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 81 def database_name @database_name end |
#database_sub_type ⇒ String
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.
65 66 67 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 65 def database_sub_type @database_sub_type end |
#database_type ⇒ String
The type of Oracle Database installation.
59 60 61 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 59 def database_type @database_type end |
#database_version ⇒ String
The Oracle Database version.
73 74 75 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 73 def database_version @database_version end |
#db_id ⇒ String
The OCID of the Managed Database.
51 52 53 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 51 def db_id @db_id end |
#deployment_type ⇒ String
The infrastructure used to deploy the Oracle Database.
69 70 71 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 69 def deployment_type @deployment_type end |
#metrics ⇒ Array<OCI::DatabaseManagement::Models::FleetMetricDefinition>
A list of the database health metrics like CPU, Storage, and Memory.
89 90 91 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 89 def metrics @metrics end |
#workload_type ⇒ String
The workload type of the Autonomous Database.
77 78 79 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 77 def workload_type @workload_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 92 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'db_id': :'dbId', 'compartment_id': :'compartmentId', 'database_type': :'databaseType', 'database_sub_type': :'databaseSubType', 'deployment_type': :'deploymentType', 'database_version': :'databaseVersion', 'workload_type': :'workloadType', 'database_name': :'databaseName', 'database_container_id': :'databaseContainerId', 'metrics': :'metrics' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 110 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'db_id': :'String', 'compartment_id': :'String', 'database_type': :'String', 'database_sub_type': :'String', 'deployment_type': :'String', 'database_version': :'String', 'workload_type': :'String', 'database_name': :'String', 'database_container_id': :'String', 'metrics': :'Array<OCI::DatabaseManagement::Models::FleetMetricDefinition>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 265 def ==(other) return true if equal?(other) self.class == other.class && db_id == other.db_id && compartment_id == other.compartment_id && database_type == other.database_type && database_sub_type == other.database_sub_type && deployment_type == other.deployment_type && database_version == other.database_version && workload_type == other.workload_type && database_name == other.database_name && database_container_id == other.database_container_id && metrics == other.metrics end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 304 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
284 285 286 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 284 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
293 294 295 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 293 def hash [db_id, compartment_id, database_type, database_sub_type, deployment_type, database_version, workload_type, database_name, database_container_id, metrics].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
337 338 339 340 341 342 343 344 345 346 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 337 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
331 332 333 |
# File 'lib/oci/database_management/models/database_usage_metrics.rb', line 331 def to_s to_hash.to_s end |