Class: Google::Apis::BackupdrV1::StandardSchedule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/backupdr_v1/classes.rb,
lib/google/apis/backupdr_v1/representations.rb,
lib/google/apis/backupdr_v1/representations.rb

Overview

StandardSchedule defines a schedule that run within the confines of a defined window of days. We can define recurrence type for schedule as HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StandardSchedule

Returns a new instance of StandardSchedule.



5770
5771
5772
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5770

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backup_windowGoogle::Apis::BackupdrV1::BackupWindow

BackupWindow defines a window of the day during which backup jobs will run. Corresponds to the JSON property backupWindow



5712
5713
5714
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5712

def backup_window
  @backup_window
end

#days_of_monthArray<Fixnum>

Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. Values for days_of_month are only applicable for recurrence_type, MONTHLY and YEARLY. A validation error will occur if other values are supplied. Corresponds to the JSON property daysOfMonth

Returns:

  • (Array<Fixnum>)


5719
5720
5721
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5719

def days_of_month
  @days_of_month
end

#days_of_weekArray<String>

Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs will run. This is required for recurrence_type, WEEKLY and is not applicable otherwise. A validation error will occur if a value is supplied and recurrence_type is not WEEKLY. Corresponds to the JSON property daysOfWeek

Returns:

  • (Array<String>)


5727
5728
5729
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5727

def days_of_week
  @days_of_week
end

#hourly_frequencyFixnum

Optional. Specifies frequency for hourly backups. A hourly frequency of 1 means jobs will run every 1 hour from start time till end time defined. This is required for recurrence_type, HOURLY and is not applicable otherwise. A validation error will occur if a value is supplied and recurrence_type is not HOURLY. The supported values for each resource type are as follows: * compute.googleapis.com/Instance: 4-23 * compute.googleapis.com/Disk: 1-23 * sqladmin.googleapis.com/Instance: 6-23 * alloydb.googleapis.com/Cluster: 1- 23 * file.googleapis.com/Instance: 1-23 Refer to link https://cloud.google. com/backup-disaster-recovery/docs/concepts/cloud_best_practices for more details. Corresponds to the JSON property hourlyFrequency

Returns:

  • (Fixnum)


5741
5742
5743
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5741

def hourly_frequency
  @hourly_frequency
end

#monthsArray<String>

Optional. Specifies the months of year, like FEBRUARY and/or MAY, on which jobs will run. This field is only applicable when recurrence_type is YEARLY . A validation error will occur if other values are supplied. Corresponds to the JSON property months

Returns:

  • (Array<String>)


5748
5749
5750
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5748

def months
  @months
end

#recurrence_typeString

Required. Specifies the RecurrenceType for the schedule. Corresponds to the JSON property recurrenceType

Returns:

  • (String)


5753
5754
5755
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5753

def recurrence_type
  @recurrence_type
end

#time_zoneString

Required. The time zone to be used when interpreting the schedule. The value of this field must be a time zone name from the IANA tz database. See https:// en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list of valid timezone names. For example, Europe/Paris. Corresponds to the JSON property timeZone

Returns:

  • (String)


5761
5762
5763
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5761

def time_zone
  @time_zone
end

#week_day_of_monthGoogle::Apis::BackupdrV1::WeekDayOfMonth

WeekDayOfMonth defines the week day of the month on which the backups will run. The message combines a WeekOfMonth and DayOfWeek to produce values like FIRST/MONDAY or LAST/FRIDAY. Corresponds to the JSON property weekDayOfMonth



5768
5769
5770
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5768

def week_day_of_month
  @week_day_of_month
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
# File 'lib/google/apis/backupdr_v1/classes.rb', line 5775

def update!(**args)
  @backup_window = args[:backup_window] if args.key?(:backup_window)
  @days_of_month = args[:days_of_month] if args.key?(:days_of_month)
  @days_of_week = args[:days_of_week] if args.key?(:days_of_week)
  @hourly_frequency = args[:hourly_frequency] if args.key?(:hourly_frequency)
  @months = args[:months] if args.key?(:months)
  @recurrence_type = args[:recurrence_type] if args.key?(:recurrence_type)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @week_day_of_month = args[:week_day_of_month] if args.key?(:week_day_of_month)
end