Class: OCI::GoldenGate::Models::UpdateBackupScheduleDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/update_backup_schedule_details.rb

Overview

Defines the backup schedule details for update operation.

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
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateBackupScheduleDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.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.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_nameString

Name of the bucket where the object is to be uploaded in the object storage

Returns:

  • (String)


31
32
33
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 31

def bucket_name
  @bucket_name
end

#compartment_idString

The OCID of the compartment being referenced.

Returns:

  • (String)


36
37
38
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 36

def compartment_id
  @compartment_id
end

#frequency_backup_scheduledString

The frequency of the deployment backup schedule. Frequency can be DAILY, WEEKLY or MONTHLY.

Returns:

  • (String)


27
28
29
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 27

def frequency_backup_scheduled
  @frequency_backup_scheduled
end

#is_metadata_onlyBOOLEAN

Parameter to allow users to create backup without trails

Returns:

  • (BOOLEAN)


44
45
46
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 44

def 
  @is_metadata_only
end

#namespace_nameString

Name of namespace that serves as a container for all of your buckets

Returns:

  • (String)


40
41
42
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 40

def namespace_name
  @namespace_name
end

#time_backup_scheduledDateTime

The start timestamp for the deployment backup schedule. The format is defined by RFC3339, such as 2024-10-25T18:19:29.600Z.

Returns:

  • (DateTime)


22
23
24
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 22

def time_backup_scheduled
  @time_backup_scheduled
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 47

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_typesObject

Attribute type mapping.



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 61

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.

Parameters:

  • other (Object)

    the other object to be compared



146
147
148
149
150
151
152
153
154
155
156
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 146

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 181

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


161
162
163
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 161

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



170
171
172
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 170

def hash
  [time_backup_scheduled, frequency_backup_scheduled, bucket_name, compartment_id, namespace_name, ].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



214
215
216
217
218
219
220
221
222
223
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 214

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



208
209
210
# File 'lib/oci/golden_gate/models/update_backup_schedule_details.rb', line 208

def to_s
  to_hash.to_s
end