Class: OCI::Recovery::Models::Metrics
- Inherits:
-
Object
- Object
- OCI::Recovery::Models::Metrics
- Defined in:
- lib/oci/recovery/models/metrics.rb
Overview
Backup performance and storage utilization metrics for the protected database.
Instance Attribute Summary collapse
-
#backup_space_estimate_in_gbs ⇒ Float
The estimated backup storage space, in gigabytes, required to meet the recovery window goal, including foot print and backups for the protected database.
-
#backup_space_used_in_gbs ⇒ Float
Backup storage space, in gigabytes, utilized by the protected database.
-
#current_retention_period_in_seconds ⇒ Float
Number of seconds backups are currently retained for this database.
-
#db_size_in_gbs ⇒ Float
The estimated space, in gigabytes, consumed by the protected database.
-
#is_redo_logs_enabled ⇒ BOOLEAN
The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service.
-
#retention_period_in_days ⇒ Float
The maximum number of days to retain backups for a protected database.
-
#unprotected_window_in_seconds ⇒ Float
This is the time window when there is data loss exposure.
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 = {}) ⇒ Metrics
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 = {}) ⇒ Metrics
Initializes the object
86 87 88 89 90 91 92 93 94 95 96 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 |
# File 'lib/oci/recovery/models/metrics.rb', line 86 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.backup_space_used_in_gbs = attributes[:'backupSpaceUsedInGBs'] if attributes[:'backupSpaceUsedInGBs'] raise 'You cannot provide both :backupSpaceUsedInGBs and :backup_space_used_in_gbs' if attributes.key?(:'backupSpaceUsedInGBs') && attributes.key?(:'backup_space_used_in_gbs') self.backup_space_used_in_gbs = attributes[:'backup_space_used_in_gbs'] if attributes[:'backup_space_used_in_gbs'] self.backup_space_estimate_in_gbs = attributes[:'backupSpaceEstimateInGBs'] if attributes[:'backupSpaceEstimateInGBs'] raise 'You cannot provide both :backupSpaceEstimateInGBs and :backup_space_estimate_in_gbs' if attributes.key?(:'backupSpaceEstimateInGBs') && attributes.key?(:'backup_space_estimate_in_gbs') self.backup_space_estimate_in_gbs = attributes[:'backup_space_estimate_in_gbs'] if attributes[:'backup_space_estimate_in_gbs'] self.unprotected_window_in_seconds = attributes[:'unprotectedWindowInSeconds'] if attributes[:'unprotectedWindowInSeconds'] raise 'You cannot provide both :unprotectedWindowInSeconds and :unprotected_window_in_seconds' if attributes.key?(:'unprotectedWindowInSeconds') && attributes.key?(:'unprotected_window_in_seconds') self.unprotected_window_in_seconds = attributes[:'unprotected_window_in_seconds'] if attributes[:'unprotected_window_in_seconds'] self.db_size_in_gbs = attributes[:'dbSizeInGBs'] if attributes[:'dbSizeInGBs'] raise 'You cannot provide both :dbSizeInGBs and :db_size_in_gbs' if attributes.key?(:'dbSizeInGBs') && attributes.key?(:'db_size_in_gbs') self.db_size_in_gbs = attributes[:'db_size_in_gbs'] if attributes[:'db_size_in_gbs'] self.is_redo_logs_enabled = attributes[:'isRedoLogsEnabled'] unless attributes[:'isRedoLogsEnabled'].nil? raise 'You cannot provide both :isRedoLogsEnabled and :is_redo_logs_enabled' if attributes.key?(:'isRedoLogsEnabled') && attributes.key?(:'is_redo_logs_enabled') self.is_redo_logs_enabled = attributes[:'is_redo_logs_enabled'] unless attributes[:'is_redo_logs_enabled'].nil? 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.current_retention_period_in_seconds = attributes[:'currentRetentionPeriodInSeconds'] if attributes[:'currentRetentionPeriodInSeconds'] raise 'You cannot provide both :currentRetentionPeriodInSeconds and :current_retention_period_in_seconds' if attributes.key?(:'currentRetentionPeriodInSeconds') && attributes.key?(:'current_retention_period_in_seconds') self.current_retention_period_in_seconds = attributes[:'current_retention_period_in_seconds'] if attributes[:'current_retention_period_in_seconds'] end |
Instance Attribute Details
#backup_space_estimate_in_gbs ⇒ Float
The estimated backup storage space, in gigabytes, required to meet the recovery window goal, including foot print and backups for the protected database.
17 18 19 |
# File 'lib/oci/recovery/models/metrics.rb', line 17 def backup_space_estimate_in_gbs @backup_space_estimate_in_gbs end |
#backup_space_used_in_gbs ⇒ Float
Backup storage space, in gigabytes, utilized by the protected database. Oracle charges for the total storage used.
13 14 15 |
# File 'lib/oci/recovery/models/metrics.rb', line 13 def backup_space_used_in_gbs @backup_space_used_in_gbs end |
#current_retention_period_in_seconds ⇒ Float
Number of seconds backups are currently retained for this database.
41 42 43 |
# File 'lib/oci/recovery/models/metrics.rb', line 41 def current_retention_period_in_seconds @current_retention_period_in_seconds end |
#db_size_in_gbs ⇒ Float
The estimated space, in gigabytes, consumed by the protected database. The database size is based on the size of the data files in the catalog, and does not include archive logs.
27 28 29 |
# File 'lib/oci/recovery/models/metrics.rb', line 27 def db_size_in_gbs @db_size_in_gbs end |
#is_redo_logs_enabled ⇒ BOOLEAN
The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service. Real-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups.
33 34 35 |
# File 'lib/oci/recovery/models/metrics.rb', line 33 def is_redo_logs_enabled @is_redo_logs_enabled end |
#retention_period_in_days ⇒ Float
The maximum number of days to retain backups for a protected database.
37 38 39 |
# File 'lib/oci/recovery/models/metrics.rb', line 37 def retention_period_in_days @retention_period_in_days end |
#unprotected_window_in_seconds ⇒ Float
This is the time window when there is data loss exposure. The point after which recovery is impossible unless additional redo is available. This is the time we received the last backup or last redo-log shipped.
23 24 25 |
# File 'lib/oci/recovery/models/metrics.rb', line 23 def unprotected_window_in_seconds @unprotected_window_in_seconds end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/recovery/models/metrics.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'backup_space_used_in_gbs': :'backupSpaceUsedInGBs', 'backup_space_estimate_in_gbs': :'backupSpaceEstimateInGBs', 'unprotected_window_in_seconds': :'unprotectedWindowInSeconds', 'db_size_in_gbs': :'dbSizeInGBs', 'is_redo_logs_enabled': :'isRedoLogsEnabled', 'retention_period_in_days': :'retentionPeriodInDays', 'current_retention_period_in_seconds': :'currentRetentionPeriodInSeconds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/recovery/models/metrics.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'backup_space_used_in_gbs': :'Float', 'backup_space_estimate_in_gbs': :'Float', 'unprotected_window_in_seconds': :'Float', 'db_size_in_gbs': :'Float', 'is_redo_logs_enabled': :'BOOLEAN', 'retention_period_in_days': :'Float', 'current_retention_period_in_seconds': :'Float' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/oci/recovery/models/metrics.rb', line 142 def ==(other) return true if equal?(other) self.class == other.class && backup_space_used_in_gbs == other.backup_space_used_in_gbs && backup_space_estimate_in_gbs == other.backup_space_estimate_in_gbs && unprotected_window_in_seconds == other.unprotected_window_in_seconds && db_size_in_gbs == other.db_size_in_gbs && is_redo_logs_enabled == other.is_redo_logs_enabled && retention_period_in_days == other.retention_period_in_days && current_retention_period_in_seconds == other.current_retention_period_in_seconds end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/recovery/models/metrics.rb', line 178 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
158 159 160 |
# File 'lib/oci/recovery/models/metrics.rb', line 158 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
167 168 169 |
# File 'lib/oci/recovery/models/metrics.rb', line 167 def hash [backup_space_used_in_gbs, backup_space_estimate_in_gbs, unprotected_window_in_seconds, db_size_in_gbs, is_redo_logs_enabled, retention_period_in_days, current_retention_period_in_seconds].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/recovery/models/metrics.rb', line 211 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
205 206 207 |
# File 'lib/oci/recovery/models/metrics.rb', line 205 def to_s to_hash.to_s end |