Class: OCI::DatabaseManagement::Models::DatabaseBackupMetrics
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::DatabaseBackupMetrics
- Defined in:
- lib/oci/database_management/models/database_backup_metrics.rb
Overview
The details of the backup metrics for a single database.
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_EXADATA_XS = 'EXADATA_XS'.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
- DB_ROLE_ENUM =
[ DB_ROLE_SNAPSHOT_STANDBY = 'SNAPSHOT_STANDBY'.freeze, DB_ROLE_LOGICAL_STANDBY = 'LOGICAL_STANDBY'.freeze, DB_ROLE_PHYSICAL_STANDBY = 'PHYSICAL_STANDBY'.freeze, DB_ROLE_PRIMARY = 'PRIMARY'.freeze, DB_ROLE_FAR_SYNC = 'FAR_SYNC'.freeze, DB_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where the Managed Database resides.
-
#database_id ⇒ String
The database ID of the Managed Database.
-
#database_name ⇒ String
[Required] The display name of the Managed Database.
-
#database_sub_type ⇒ String
[Required] The subtype of the Oracle Database.
-
#database_type ⇒ String
[Required] The type of Oracle Database installation.
-
#database_version ⇒ String
The Oracle Database version.
-
#db_id ⇒ String
[Required] The OCID of the Managed Database.
-
#db_role ⇒ String
[Required] The database role of the Managed Database.
-
#db_unique_name ⇒ String
The database unique name of the Managed Database.
-
#deployment_type ⇒ String
[Required] The infrastructure used to deploy the Oracle Database.
-
#is_automatic_backup_enabled ⇒ BOOLEAN
[Required] Indicates whether automatic backup is enabled or not.
-
#is_dataguard_enabled ⇒ BOOLEAN
[Required] Indicates whether Data Guard is enabled for the database.
-
#last_backup_summary ⇒ OCI::DatabaseManagement::Models::DatabaseBackupSummary
This attribute is required.
-
#metrics ⇒ Array<OCI::DatabaseManagement::Models::HaMetricDefinition>
[Required] A list of database health metrics such as BackupDuration and BackupSize.
-
#retention_period_in_days ⇒ String
[Required] The retention period of the database.
-
#time_series_metrics ⇒ Array<OCI::DatabaseManagement::Models::MetricsAggregationRange>
[Required] The array of metric values for different timestamps.
-
#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 = {}) ⇒ DatabaseBackupMetrics
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 = {}) ⇒ DatabaseBackupMetrics
Initializes the object
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 202 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.retention_period_in_days = attributes[:'retentionPeriodInDays'] if attributes[:'retentionPeriodInDays'] raise 'You cannot provide both :retentionPeriodInDays and :retention_period_in_days' if attributes.key?(:'retentionPeriodInDays') && attributes.key?(:'retention_period_in_days') self.retention_period_in_days = attributes[:'retention_period_in_days'] if attributes[:'retention_period_in_days'] self.is_automatic_backup_enabled = attributes[:'isAutomaticBackupEnabled'] unless attributes[:'isAutomaticBackupEnabled'].nil? raise 'You cannot provide both :isAutomaticBackupEnabled and :is_automatic_backup_enabled' if attributes.key?(:'isAutomaticBackupEnabled') && attributes.key?(:'is_automatic_backup_enabled') self.is_automatic_backup_enabled = attributes[:'is_automatic_backup_enabled'] unless attributes[:'is_automatic_backup_enabled'].nil? self.time_series_metrics = attributes[:'timeSeriesMetrics'] if attributes[:'timeSeriesMetrics'] raise 'You cannot provide both :timeSeriesMetrics and :time_series_metrics' if attributes.key?(:'timeSeriesMetrics') && attributes.key?(:'time_series_metrics') self.time_series_metrics = attributes[:'time_series_metrics'] if attributes[:'time_series_metrics'] self.is_dataguard_enabled = attributes[:'isDataguardEnabled'] unless attributes[:'isDataguardEnabled'].nil? raise 'You cannot provide both :isDataguardEnabled and :is_dataguard_enabled' if attributes.key?(:'isDataguardEnabled') && attributes.key?(:'is_dataguard_enabled') self.is_dataguard_enabled = attributes[:'is_dataguard_enabled'] unless attributes[:'is_dataguard_enabled'].nil? self.last_backup_summary = attributes[:'lastBackupSummary'] if attributes[:'lastBackupSummary'] raise 'You cannot provide both :lastBackupSummary and :last_backup_summary' if attributes.key?(:'lastBackupSummary') && attributes.key?(:'last_backup_summary') self.last_backup_summary = attributes[:'last_backup_summary'] if attributes[:'last_backup_summary'] self.metrics = attributes[:'metrics'] if attributes[:'metrics'] 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_id = attributes[:'databaseId'] if attributes[:'databaseId'] raise 'You cannot provide both :databaseId and :database_id' if attributes.key?(:'databaseId') && attributes.key?(:'database_id') self.database_id = attributes[:'database_id'] if attributes[:'database_id'] self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName'] raise 'You cannot provide both :dbUniqueName and :db_unique_name' if attributes.key?(:'dbUniqueName') && attributes.key?(:'db_unique_name') self.db_unique_name = attributes[:'db_unique_name'] if attributes[:'db_unique_name'] self.db_role = attributes[:'dbRole'] if attributes[:'dbRole'] raise 'You cannot provide both :dbRole and :db_role' if attributes.key?(:'dbRole') && attributes.key?(:'db_role') self.db_role = attributes[:'db_role'] if attributes[:'db_role'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment where the Managed Database resides.
89 90 91 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 89 def compartment_id @compartment_id end |
#database_id ⇒ String
The database ID of the Managed Database. Every database had its own ID and that value is captured here.
119 120 121 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 119 def database_id @database_id end |
#database_name ⇒ String
[Required] The display name of the Managed Database.
115 116 117 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 115 def database_name @database_name end |
#database_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.
99 100 101 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 99 def database_sub_type @database_sub_type end |
#database_type ⇒ String
[Required] The type of Oracle Database installation.
93 94 95 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 93 def database_type @database_type end |
#database_version ⇒ String
The Oracle Database version.
107 108 109 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 107 def database_version @database_version end |
#db_id ⇒ String
[Required] The OCID of the Managed Database.
85 86 87 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 85 def db_id @db_id end |
#db_role ⇒ String
[Required] The database role of the Managed Database.
127 128 129 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 127 def db_role @db_role end |
#db_unique_name ⇒ String
The database unique name of the Managed Database.
123 124 125 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 123 def db_unique_name @db_unique_name end |
#deployment_type ⇒ String
[Required] The infrastructure used to deploy the Oracle Database.
103 104 105 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 103 def deployment_type @deployment_type end |
#is_automatic_backup_enabled ⇒ BOOLEAN
[Required] Indicates whether automatic backup is enabled or not. This is only applicable for cloud databases.
65 66 67 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 65 def is_automatic_backup_enabled @is_automatic_backup_enabled end |
#is_dataguard_enabled ⇒ BOOLEAN
[Required] Indicates whether Data Guard is enabled for the database.
73 74 75 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 73 def is_dataguard_enabled @is_dataguard_enabled end |
#last_backup_summary ⇒ OCI::DatabaseManagement::Models::DatabaseBackupSummary
This attribute is required.
77 78 79 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 77 def last_backup_summary @last_backup_summary end |
#metrics ⇒ Array<OCI::DatabaseManagement::Models::HaMetricDefinition>
[Required] A list of database health metrics such as BackupDuration and BackupSize.
81 82 83 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 81 def metrics @metrics end |
#retention_period_in_days ⇒ String
[Required] The retention period of the database.
61 62 63 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 61 def retention_period_in_days @retention_period_in_days end |
#time_series_metrics ⇒ Array<OCI::DatabaseManagement::Models::MetricsAggregationRange>
[Required] The array of metric values for different timestamps.
69 70 71 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 69 def time_series_metrics @time_series_metrics end |
#workload_type ⇒ String
The workload type of the Autonomous Database.
111 112 113 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 111 def workload_type @workload_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 130 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'retention_period_in_days': :'retentionPeriodInDays', 'is_automatic_backup_enabled': :'isAutomaticBackupEnabled', 'time_series_metrics': :'timeSeriesMetrics', 'is_dataguard_enabled': :'isDataguardEnabled', 'last_backup_summary': :'lastBackupSummary', 'metrics': :'metrics', '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_id': :'databaseId', 'db_unique_name': :'dbUniqueName', 'db_role': :'dbRole' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 155 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'retention_period_in_days': :'String', 'is_automatic_backup_enabled': :'BOOLEAN', 'time_series_metrics': :'Array<OCI::DatabaseManagement::Models::MetricsAggregationRange>', 'is_dataguard_enabled': :'BOOLEAN', 'last_backup_summary': :'OCI::DatabaseManagement::Models::DatabaseBackupSummary', 'metrics': :'Array<OCI::DatabaseManagement::Models::HaMetricDefinition>', '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_id': :'String', 'db_unique_name': :'String', 'db_role': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 379 def ==(other) return true if equal?(other) self.class == other.class && retention_period_in_days == other.retention_period_in_days && is_automatic_backup_enabled == other.is_automatic_backup_enabled && time_series_metrics == other.time_series_metrics && is_dataguard_enabled == other.is_dataguard_enabled && last_backup_summary == other.last_backup_summary && metrics == other.metrics && 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_id == other.database_id && db_unique_name == other.db_unique_name && db_role == other.db_role end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 425 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
405 406 407 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 405 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
414 415 416 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 414 def hash [retention_period_in_days, is_automatic_backup_enabled, time_series_metrics, is_dataguard_enabled, last_backup_summary, metrics, db_id, compartment_id, database_type, database_sub_type, deployment_type, database_version, workload_type, database_name, database_id, db_unique_name, db_role].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
458 459 460 461 462 463 464 465 466 467 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 458 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
452 453 454 |
# File 'lib/oci/database_management/models/database_backup_metrics.rb', line 452 def to_s to_hash.to_s end |