Class: OCI::Mysql::Models::BackupValidationDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::BackupValidationDetails
- Defined in:
- lib/oci/mysql/models/backup_validation_details.rb
Overview
Backup validation details.
Constant Summary collapse
- VALIDATION_STATUS_ENUM =
[ VALIDATION_STATUS_NOT_VALIDATED = 'NOT_VALIDATED'.freeze, VALIDATION_STATUS_VALIDATED = 'VALIDATED'.freeze, VALIDATION_STATUS_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, VALIDATION_STATUS_FAILED = 'FAILED'.freeze, VALIDATION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- BACKUP_PREPARATION_STATUS_ENUM =
[ BACKUP_PREPARATION_STATUS_PREPARED = 'PREPARED'.freeze, BACKUP_PREPARATION_STATUS_NOT_PREPARED = 'NOT_PREPARED'.freeze, BACKUP_PREPARATION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#backup_preparation_status ⇒ String
Indicates whether the backup has been prepared successfully.
-
#error_message ⇒ String
Error message if the backup validation has failed.
-
#estimated_restore_duration ⇒ String
The estimated restore duration of the backup.
- #prepared_backup_details ⇒ OCI::Mysql::Models::PreparedBackupDetails
-
#time_last_validated ⇒ DateTime
The date and time of the most recent validation performed on the backup.
-
#validation_status ⇒ String
The status of backup validation: NOT_VALIDATED (Default): The backup has not been validated.
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 = {}) ⇒ BackupValidationDetails
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 = {}) ⇒ BackupValidationDetails
Initializes the object
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 134 135 136 137 138 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 97 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.validation_status = attributes[:'validationStatus'] if attributes[:'validationStatus'] raise 'You cannot provide both :validationStatus and :validation_status' if attributes.key?(:'validationStatus') && attributes.key?(:'validation_status') self.validation_status = attributes[:'validation_status'] if attributes[:'validation_status'] self.time_last_validated = attributes[:'timeLastValidated'] if attributes[:'timeLastValidated'] raise 'You cannot provide both :timeLastValidated and :time_last_validated' if attributes.key?(:'timeLastValidated') && attributes.key?(:'time_last_validated') self.time_last_validated = attributes[:'time_last_validated'] if attributes[:'time_last_validated'] self.estimated_restore_duration = attributes[:'estimatedRestoreDuration'] if attributes[:'estimatedRestoreDuration'] raise 'You cannot provide both :estimatedRestoreDuration and :estimated_restore_duration' if attributes.key?(:'estimatedRestoreDuration') && attributes.key?(:'estimated_restore_duration') self.estimated_restore_duration = attributes[:'estimated_restore_duration'] if attributes[:'estimated_restore_duration'] self. = attributes[:'errorMessage'] if attributes[:'errorMessage'] raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message') self. = attributes[:'error_message'] if attributes[:'error_message'] self.backup_preparation_status = attributes[:'backupPreparationStatus'] if attributes[:'backupPreparationStatus'] raise 'You cannot provide both :backupPreparationStatus and :backup_preparation_status' if attributes.key?(:'backupPreparationStatus') && attributes.key?(:'backup_preparation_status') self.backup_preparation_status = attributes[:'backup_preparation_status'] if attributes[:'backup_preparation_status'] self.prepared_backup_details = attributes[:'preparedBackupDetails'] if attributes[:'preparedBackupDetails'] raise 'You cannot provide both :preparedBackupDetails and :prepared_backup_details' if attributes.key?(:'preparedBackupDetails') && attributes.key?(:'prepared_backup_details') self.prepared_backup_details = attributes[:'prepared_backup_details'] if attributes[:'prepared_backup_details'] end |
Instance Attribute Details
#backup_preparation_status ⇒ String
Indicates whether the backup has been prepared successfully. PREPARED: The backup is prepared one. NOT_PREPARED: The backup is not prepared.
52 53 54 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 52 def backup_preparation_status @backup_preparation_status end |
#error_message ⇒ String
Error message if the backup validation has failed.
45 46 47 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 45 def @error_message end |
#estimated_restore_duration ⇒ String
The estimated restore duration of the backup.
41 42 43 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 41 def estimated_restore_duration @estimated_restore_duration end |
#prepared_backup_details ⇒ OCI::Mysql::Models::PreparedBackupDetails
55 56 57 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 55 def prepared_backup_details @prepared_backup_details end |
#time_last_validated ⇒ DateTime
The date and time of the most recent validation performed on the backup.
37 38 39 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 37 def time_last_validated @time_last_validated end |
#validation_status ⇒ String
The status of backup validation: NOT_VALIDATED (Default): The backup has not been validated. VALIDATED: The backup has been validated successfully. NEEDS_ATTENTION: The backup validation failed due to a transient issue. Validation should be retried. FAILED: The backup cannot be restored.
33 34 35 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 33 def validation_status @validation_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 58 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'validation_status': :'validationStatus', 'time_last_validated': :'timeLastValidated', 'estimated_restore_duration': :'estimatedRestoreDuration', 'error_message': :'errorMessage', 'backup_preparation_status': :'backupPreparationStatus', 'prepared_backup_details': :'preparedBackupDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 72 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'validation_status': :'String', 'time_last_validated': :'DateTime', 'estimated_restore_duration': :'String', 'error_message': :'String', 'backup_preparation_status': :'String', 'prepared_backup_details': :'OCI::Mysql::Models::PreparedBackupDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 173 def ==(other) return true if equal?(other) self.class == other.class && validation_status == other.validation_status && time_last_validated == other.time_last_validated && estimated_restore_duration == other.estimated_restore_duration && == other. && backup_preparation_status == other.backup_preparation_status && prepared_backup_details == other.prepared_backup_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 208 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
188 189 190 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 188 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
197 198 199 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 197 def hash [validation_status, time_last_validated, estimated_restore_duration, , backup_preparation_status, prepared_backup_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 241 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
235 236 237 |
# File 'lib/oci/mysql/models/backup_validation_details.rb', line 235 def to_s to_hash.to_s end |