Class: OCI::GoldenGate::Models::BackupSchedule
- Inherits:
-
Object
- Object
- OCI::GoldenGate::Models::BackupSchedule
- Defined in:
- lib/oci/golden_gate/models/backup_schedule.rb
Overview
Defines the schedule of the deployment backup.
Constant Summary collapse
- FREQUENCY_BACKUP_SCHEDULED_ENUM =
[ FREQUENCY_BACKUP_SCHEDULED_DAILY = 'DAILY'.freeze, FREQUENCY_BACKUP_SCHEDULED_WEEKLY = 'WEEKLY'.freeze, FREQUENCY_BACKUP_SCHEDULED_MONTHLY = 'MONTHLY'.freeze, FREQUENCY_BACKUP_SCHEDULED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
[Required] Name of the bucket where the object is to be uploaded in the object storage.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment being referenced.
-
#frequency_backup_scheduled ⇒ String
[Required] The frequency of the deployment backup schedule.
-
#is_metadata_only ⇒ BOOLEAN
[Required] Parameter to allow users to create backup without trails.
-
#namespace_name ⇒ String
[Required] Name of namespace that serves as a container for all of your buckets.
-
#time_backup_scheduled ⇒ DateTime
[Required] The start timestamp for the deployment 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 = {}) ⇒ BackupSchedule
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 = {}) ⇒ BackupSchedule
Initializes the object
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 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 88 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.time_backup_scheduled = attributes[:'timeBackupScheduled'] if attributes[:'timeBackupScheduled'] raise 'You cannot provide both :timeBackupScheduled and :time_backup_scheduled' if attributes.key?(:'timeBackupScheduled') && attributes.key?(:'time_backup_scheduled') self.time_backup_scheduled = attributes[:'time_backup_scheduled'] if attributes[:'time_backup_scheduled'] self.frequency_backup_scheduled = attributes[:'frequencyBackupScheduled'] if attributes[:'frequencyBackupScheduled'] raise 'You cannot provide both :frequencyBackupScheduled and :frequency_backup_scheduled' if attributes.key?(:'frequencyBackupScheduled') && attributes.key?(:'frequency_backup_scheduled') self.frequency_backup_scheduled = attributes[:'frequency_backup_scheduled'] if attributes[:'frequency_backup_scheduled'] self.bucket_name = attributes[:'bucketName'] if attributes[:'bucketName'] raise 'You cannot provide both :bucketName and :bucket_name' if attributes.key?(:'bucketName') && attributes.key?(:'bucket_name') self.bucket_name = attributes[:'bucket_name'] if attributes[:'bucket_name'] 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.namespace_name = attributes[:'namespaceName'] if attributes[:'namespaceName'] raise 'You cannot provide both :namespaceName and :namespace_name' if attributes.key?(:'namespaceName') && attributes.key?(:'namespace_name') self.namespace_name = attributes[:'namespace_name'] if attributes[:'namespace_name'] self. = attributes[:'isMetadataOnly'] unless attributes[:'isMetadataOnly'].nil? self. = false if .nil? && !attributes.key?(:'isMetadataOnly') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isMetadataOnly and :is_metadata_only' if attributes.key?(:'isMetadataOnly') && attributes.key?(:'is_metadata_only') self. = attributes[:'is_metadata_only'] unless attributes[:'is_metadata_only'].nil? self. = false if .nil? && !attributes.key?(:'isMetadataOnly') && !attributes.key?(:'is_metadata_only') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#bucket_name ⇒ String
[Required] Name of the bucket where the object is to be uploaded in the object storage
33 34 35 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 33 def bucket_name @bucket_name end |
#compartment_id ⇒ String
[Required] The OCID of the compartment being referenced.
38 39 40 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 38 def compartment_id @compartment_id end |
#frequency_backup_scheduled ⇒ String
[Required] The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY.
29 30 31 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 29 def frequency_backup_scheduled @frequency_backup_scheduled end |
#is_metadata_only ⇒ BOOLEAN
[Required] Parameter to allow users to create backup without trails
46 47 48 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 46 def @is_metadata_only end |
#namespace_name ⇒ String
[Required] Name of namespace that serves as a container for all of your buckets
42 43 44 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 42 def namespace_name @namespace_name end |
#time_backup_scheduled ⇒ DateTime
[Required] The start timestamp for the deployment backup schedule. The format is defined by RFC3339, such as 2024-10-25T18:19:29.600Z
.
24 25 26 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 24 def time_backup_scheduled @time_backup_scheduled end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 49 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'time_backup_scheduled': :'timeBackupScheduled', 'frequency_backup_scheduled': :'frequencyBackupScheduled', 'bucket_name': :'bucketName', 'compartment_id': :'compartmentId', 'namespace_name': :'namespaceName', 'is_metadata_only': :'isMetadataOnly' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 63 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'time_backup_scheduled': :'DateTime', 'frequency_backup_scheduled': :'String', 'bucket_name': :'String', 'compartment_id': :'String', 'namespace_name': :'String', 'is_metadata_only': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 153 def ==(other) return true if equal?(other) self.class == other.class && time_backup_scheduled == other.time_backup_scheduled && frequency_backup_scheduled == other.frequency_backup_scheduled && bucket_name == other.bucket_name && compartment_id == other.compartment_id && namespace_name == other.namespace_name && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 188 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
168 169 170 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 168 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
177 178 179 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 177 def hash [time_backup_scheduled, frequency_backup_scheduled, bucket_name, compartment_id, namespace_name, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 221 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
215 216 217 |
# File 'lib/oci/golden_gate/models/backup_schedule.rb', line 215 def to_s to_hash.to_s end |