Class AutomatedBackupPolicy.WeeklySchedule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
com.google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklySchedule.Builder
All Implemented Interfaces:
AutomatedBackupPolicy.WeeklyScheduleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AutomatedBackupPolicy.WeeklySchedule

public static final class AutomatedBackupPolicy.WeeklySchedule.Builder extends com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder> implements AutomatedBackupPolicy.WeeklyScheduleOrBuilder
 A weekly schedule starts a backup at prescribed start times within a
 day, for the specified days of the week.

 The weekly schedule message is flexible and can be used to create many
 types of schedules. For example, to have a daily backup that starts at
 22:00, configure the `start_times` field to have one element "22:00" and
 the `days_of_week` field to have all seven days of the week.
 
Protobuf type google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklySchedule
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
    • getDefaultInstanceForType

      public AutomatedBackupPolicy.WeeklySchedule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AutomatedBackupPolicy.WeeklySchedule buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AutomatedBackupPolicy.WeeklySchedule.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
    • mergeFrom

      public AutomatedBackupPolicy.WeeklySchedule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AutomatedBackupPolicy.WeeklySchedule.Builder>
      Throws:
      IOException
    • getStartTimesList

      public List<TimeOfDay> getStartTimesList()
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
      Specified by:
      getStartTimesList in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
    • getStartTimesCount

      public int getStartTimesCount()
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
      Specified by:
      getStartTimesCount in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
    • getStartTimes

      public TimeOfDay getStartTimes(int index)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
      Specified by:
      getStartTimes in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
    • setStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder setStartTimes(int index, TimeOfDay value)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • setStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder setStartTimes(int index, TimeOfDay.Builder builderForValue)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addStartTimes

       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder addStartTimes(int index, TimeOfDay value)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder addStartTimes(TimeOfDay.Builder builderForValue)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder addStartTimes(int index, TimeOfDay.Builder builderForValue)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addAllStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder addAllStartTimes(Iterable<? extends TimeOfDay> values)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • clearStartTimes

       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • removeStartTimes

      public AutomatedBackupPolicy.WeeklySchedule.Builder removeStartTimes(int index)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • getStartTimesBuilder

      public TimeOfDay.Builder getStartTimesBuilder(int index)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • getStartTimesOrBuilder

      public TimeOfDayOrBuilder getStartTimesOrBuilder(int index)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
      Specified by:
      getStartTimesOrBuilder in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
    • getStartTimesOrBuilderList

      public List<? extends TimeOfDayOrBuilder> getStartTimesOrBuilderList()
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
      Specified by:
      getStartTimesOrBuilderList in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
    • addStartTimesBuilder

      public TimeOfDay.Builder addStartTimesBuilder()
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • addStartTimesBuilder

      public TimeOfDay.Builder addStartTimesBuilder(int index)
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • getStartTimesBuilderList

      public List<TimeOfDay.Builder> getStartTimesBuilderList()
       The times during the day to start a backup. The start times are assumed
       to be in UTC and to be an exact hour (e.g., 04:00:00).
      
       If no start times are provided, a single fixed start time is chosen
       arbitrarily.
       
      repeated .google.type.TimeOfDay start_times = 1;
    • getDaysOfWeekList

      public List<DayOfWeek> getDaysOfWeekList()
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Specified by:
      getDaysOfWeekList in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
      Returns:
      A list containing the daysOfWeek.
    • getDaysOfWeekCount

      public int getDaysOfWeekCount()
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Specified by:
      getDaysOfWeekCount in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
      Returns:
      The count of daysOfWeek.
    • getDaysOfWeek

      public DayOfWeek getDaysOfWeek(int index)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Specified by:
      getDaysOfWeek in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The daysOfWeek at the given index.
    • setDaysOfWeek

      public AutomatedBackupPolicy.WeeklySchedule.Builder setDaysOfWeek(int index, DayOfWeek value)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      index - The index to set the value at.
      value - The daysOfWeek to set.
      Returns:
      This builder for chaining.
    • addDaysOfWeek

       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      value - The daysOfWeek to add.
      Returns:
      This builder for chaining.
    • addAllDaysOfWeek

      public AutomatedBackupPolicy.WeeklySchedule.Builder addAllDaysOfWeek(Iterable<? extends DayOfWeek> values)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      values - The daysOfWeek to add.
      Returns:
      This builder for chaining.
    • clearDaysOfWeek

       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Returns:
      This builder for chaining.
    • getDaysOfWeekValueList

      public List<Integer> getDaysOfWeekValueList()
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Specified by:
      getDaysOfWeekValueList in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for daysOfWeek.
    • getDaysOfWeekValue

      public int getDaysOfWeekValue(int index)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Specified by:
      getDaysOfWeekValue in interface AutomatedBackupPolicy.WeeklyScheduleOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of daysOfWeek at the given index.
    • setDaysOfWeekValue

      public AutomatedBackupPolicy.WeeklySchedule.Builder setDaysOfWeekValue(int index, int value)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for daysOfWeek to set.
      Returns:
      This builder for chaining.
    • addDaysOfWeekValue

      public AutomatedBackupPolicy.WeeklySchedule.Builder addDaysOfWeekValue(int value)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      value - The enum numeric value on the wire for daysOfWeek to add.
      Returns:
      This builder for chaining.
    • addAllDaysOfWeekValue

      public AutomatedBackupPolicy.WeeklySchedule.Builder addAllDaysOfWeekValue(Iterable<Integer> values)
       The days of the week to perform a backup.
      
       If this field is left empty, the default of every day of the week is
       used.
       
      repeated .google.type.DayOfWeek days_of_week = 2;
      Parameters:
      values - The enum numeric values on the wire for daysOfWeek to add.
      Returns:
      This builder for chaining.