Class: OCI::Database::Models::LongTermBackUpScheduleDetails
- Inherits:
-
Object
- Object
- OCI::Database::Models::LongTermBackUpScheduleDetails
- Defined in:
- lib/oci/database/models/long_term_back_up_schedule_details.rb
Overview
Details for the long-term backup schedule.
Constant Summary collapse
- REPEAT_CADENCE_ENUM =
[ REPEAT_CADENCE_ONE_TIME = 'ONE_TIME'.freeze, REPEAT_CADENCE_WEEKLY = 'WEEKLY'.freeze, REPEAT_CADENCE_MONTHLY = 'MONTHLY'.freeze, REPEAT_CADENCE_YEARLY = 'YEARLY'.freeze, REPEAT_CADENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#is_disabled ⇒ BOOLEAN
Indicates if the long-term backup schedule should be deleted.
-
#repeat_cadence ⇒ String
The frequency of the long-term backup schedule.
-
#retention_period_in_days ⇒ Integer
Retention period, in days, for long-term backups.
-
#time_of_backup ⇒ DateTime
The timestamp for the long-term backup schedule.
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 = {}) ⇒ LongTermBackUpScheduleDetails
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 = {}) ⇒ LongTermBackUpScheduleDetails
Initializes the object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 71 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.repeat_cadence = attributes[:'repeatCadence'] if attributes[:'repeatCadence'] raise 'You cannot provide both :repeatCadence and :repeat_cadence' if attributes.key?(:'repeatCadence') && attributes.key?(:'repeat_cadence') self.repeat_cadence = attributes[:'repeat_cadence'] if attributes[:'repeat_cadence'] self.time_of_backup = attributes[:'timeOfBackup'] if attributes[:'timeOfBackup'] raise 'You cannot provide both :timeOfBackup and :time_of_backup' if attributes.key?(:'timeOfBackup') && attributes.key?(:'time_of_backup') self.time_of_backup = attributes[:'time_of_backup'] if attributes[:'time_of_backup'] 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_disabled = attributes[:'isDisabled'] unless attributes[:'isDisabled'].nil? self.is_disabled = false if is_disabled.nil? && !attributes.key?(:'isDisabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isDisabled and :is_disabled' if attributes.key?(:'isDisabled') && attributes.key?(:'is_disabled') self.is_disabled = attributes[:'is_disabled'] unless attributes[:'is_disabled'].nil? self.is_disabled = false if is_disabled.nil? && !attributes.key?(:'isDisabled') && !attributes.key?(:'is_disabled') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#is_disabled ⇒ BOOLEAN
Indicates if the long-term backup schedule should be deleted. The default value is FALSE
.
35 36 37 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 35 def is_disabled @is_disabled end |
#repeat_cadence ⇒ String
The frequency of the long-term backup schedule
22 23 24 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 22 def repeat_cadence @repeat_cadence end |
#retention_period_in_days ⇒ Integer
Retention period, in days, for long-term backups
30 31 32 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 30 def retention_period_in_days @retention_period_in_days end |
#time_of_backup ⇒ DateTime
The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.
26 27 28 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 26 def time_of_backup @time_of_backup end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'repeat_cadence': :'repeatCadence', 'time_of_backup': :'timeOfBackup', 'retention_period_in_days': :'retentionPeriodInDays', 'is_disabled': :'isDisabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'repeat_cadence': :'String', 'time_of_backup': :'DateTime', 'retention_period_in_days': :'Integer', 'is_disabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 132 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 124 def ==(other) return true if equal?(other) self.class == other.class && repeat_cadence == other.repeat_cadence && time_of_backup == other.time_of_backup && retention_period_in_days == other.retention_period_in_days && is_disabled == other.is_disabled end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 157 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
137 138 139 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 137 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
146 147 148 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 146 def hash [repeat_cadence, time_of_backup, retention_period_in_days, is_disabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 190 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
184 185 186 |
# File 'lib/oci/database/models/long_term_back_up_schedule_details.rb', line 184 def to_s to_hash.to_s end |