Class: OCI::DatabaseManagement::Models::DatabaseBackupSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::DatabaseBackupSummary
- Defined in:
- lib/oci/database_management/models/database_backup_summary.rb
Overview
The summary of the High Availability (HA) and backup for a database.
Constant Summary collapse
- BACKUP_DESTINATION_ENUM =
[ BACKUP_DESTINATION_DISK = 'DISK'.freeze, BACKUP_DESTINATION_TAPE = 'TAPE'.freeze, BACKUP_DESTINATION_NFS = 'NFS'.freeze, BACKUP_DESTINATION_LOCAL = 'LOCAL'.freeze, BACKUP_DESTINATION_DBRS = 'DBRS'.freeze, BACKUP_DESTINATION_OBJECT_STORE = 'OBJECT_STORE'.freeze, BACKUP_DESTINATION_RECOVERY_APPLIANCE = 'RECOVERY_APPLIANCE'.freeze, BACKUP_DESTINATION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#backup_destination ⇒ String
[Required] The backup destination of the database.
-
#backup_duration_in_seconds ⇒ Integer
[Required] The backup duration of the database in seconds.
-
#backup_size_in_gbs ⇒ Float
[Required] The backup size of the database.
-
#backup_status ⇒ String
[Required] The backup status of the database.
-
#backup_type ⇒ String
[Required] The backup type of the database (FULL/INCREMENTAL).
-
#time_backup_completed ⇒ DateTime
[Required] The database backup completion date and time in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
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 = {}) ⇒ DatabaseBackupSummary
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 = {}) ⇒ DatabaseBackupSummary
Initializes the object
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 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 87 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_status = attributes[:'backupStatus'] if attributes[:'backupStatus'] raise 'You cannot provide both :backupStatus and :backup_status' if attributes.key?(:'backupStatus') && attributes.key?(:'backup_status') self.backup_status = attributes[:'backup_status'] if attributes[:'backup_status'] self.time_backup_completed = attributes[:'timeBackupCompleted'] if attributes[:'timeBackupCompleted'] raise 'You cannot provide both :timeBackupCompleted and :time_backup_completed' if attributes.key?(:'timeBackupCompleted') && attributes.key?(:'time_backup_completed') self.time_backup_completed = attributes[:'time_backup_completed'] if attributes[:'time_backup_completed'] self.backup_duration_in_seconds = attributes[:'backupDurationInSeconds'] if attributes[:'backupDurationInSeconds'] raise 'You cannot provide both :backupDurationInSeconds and :backup_duration_in_seconds' if attributes.key?(:'backupDurationInSeconds') && attributes.key?(:'backup_duration_in_seconds') self.backup_duration_in_seconds = attributes[:'backup_duration_in_seconds'] if attributes[:'backup_duration_in_seconds'] self.backup_type = attributes[:'backupType'] if attributes[:'backupType'] raise 'You cannot provide both :backupType and :backup_type' if attributes.key?(:'backupType') && attributes.key?(:'backup_type') self.backup_type = attributes[:'backup_type'] if attributes[:'backup_type'] self.backup_destination = attributes[:'backupDestination'] if attributes[:'backupDestination'] raise 'You cannot provide both :backupDestination and :backup_destination' if attributes.key?(:'backupDestination') && attributes.key?(:'backup_destination') self.backup_destination = attributes[:'backup_destination'] if attributes[:'backup_destination'] self.backup_size_in_gbs = attributes[:'backupSizeInGBs'] if attributes[:'backupSizeInGBs'] raise 'You cannot provide both :backupSizeInGBs and :backup_size_in_gbs' if attributes.key?(:'backupSizeInGBs') && attributes.key?(:'backup_size_in_gbs') self.backup_size_in_gbs = attributes[:'backup_size_in_gbs'] if attributes[:'backup_size_in_gbs'] end |
Instance Attribute Details
#backup_destination ⇒ String
[Required] The backup destination of the database.
41 42 43 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 41 def backup_destination @backup_destination end |
#backup_duration_in_seconds ⇒ Integer
[Required] The backup duration of the database in seconds.
33 34 35 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 33 def backup_duration_in_seconds @backup_duration_in_seconds end |
#backup_size_in_gbs ⇒ Float
[Required] The backup size of the database.
45 46 47 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 45 def backup_size_in_gbs @backup_size_in_gbs end |
#backup_status ⇒ String
[Required] The backup status of the database.
25 26 27 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 25 def backup_status @backup_status end |
#backup_type ⇒ String
[Required] The backup type of the database (FULL/INCREMENTAL).
37 38 39 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 37 def backup_type @backup_type end |
#time_backup_completed ⇒ DateTime
[Required] The database backup completion date and time in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".
29 30 31 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 29 def time_backup_completed @time_backup_completed end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'backup_status': :'backupStatus', 'time_backup_completed': :'timeBackupCompleted', 'backup_duration_in_seconds': :'backupDurationInSeconds', 'backup_type': :'backupType', 'backup_destination': :'backupDestination', 'backup_size_in_gbs': :'backupSizeInGBs' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 62 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'backup_status': :'String', 'time_backup_completed': :'DateTime', 'backup_duration_in_seconds': :'Integer', 'backup_type': :'String', 'backup_destination': :'String', 'backup_size_in_gbs': :'Float' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 150 def ==(other) return true if equal?(other) self.class == other.class && backup_status == other.backup_status && time_backup_completed == other.time_backup_completed && backup_duration_in_seconds == other.backup_duration_in_seconds && backup_type == other.backup_type && backup_destination == other.backup_destination && backup_size_in_gbs == other.backup_size_in_gbs end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 185 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
165 166 167 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 165 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
174 175 176 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 174 def hash [backup_status, time_backup_completed, backup_duration_in_seconds, backup_type, backup_destination, backup_size_in_gbs].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
218 219 220 221 222 223 224 225 226 227 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 218 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
212 213 214 |
# File 'lib/oci/database_management/models/database_backup_summary.rb', line 212 def to_s to_hash.to_s end |