Class CrontabSpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
com.google.spanner.admin.database.v1.CrontabSpec.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CrontabSpecOrBuilder, Cloneable
Enclosing class:
CrontabSpec

public static final class CrontabSpec.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder> implements CrontabSpecOrBuilder
 CrontabSpec can be used to specify the version time and frequency at
 which the backup should be created.
 
Protobuf type google.spanner.admin.database.v1.CrontabSpec
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • clear

      public CrontabSpec.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.GeneratedMessageV3.Builder<CrontabSpec.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.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • getDefaultInstanceForType

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

      public CrontabSpec build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CrontabSpec buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public CrontabSpec.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • setField

      public CrontabSpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • clearField

      public CrontabSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • clearOneof

      public CrontabSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • setRepeatedField

      public CrontabSpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • addRepeatedField

      public CrontabSpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • mergeFrom

      public CrontabSpec.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<CrontabSpec.Builder>
    • mergeFrom

      public CrontabSpec.Builder mergeFrom(CrontabSpec other)
    • isInitialized

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

      public CrontabSpec.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<CrontabSpec.Builder>
      Throws:
      IOException
    • getText

      public String getText()
       Required. Textual representation of the crontab. User can customize the
       backup frequency and the backup version time using the cron
       expression. The version time must be in UTC timezone.
      
       The backup will contain an externally consistent copy of the
       database at the version time. Allowed frequencies are 12 hour, 1 day,
       1 week and 1 month. Examples of valid cron specifications:
         * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
         * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
         * `0 2 * * * `    : once a day at 2 past midnight in UTC.
         * `0 2 * * 0 `    : once a week every Sunday at 2 past midnight in UTC.
         * `0 2 8 * * `    : once a month on 8th day at 2 past midnight in UTC.
       
      string text = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getText in interface CrontabSpecOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       Required. Textual representation of the crontab. User can customize the
       backup frequency and the backup version time using the cron
       expression. The version time must be in UTC timezone.
      
       The backup will contain an externally consistent copy of the
       database at the version time. Allowed frequencies are 12 hour, 1 day,
       1 week and 1 month. Examples of valid cron specifications:
         * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
         * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
         * `0 2 * * * `    : once a day at 2 past midnight in UTC.
         * `0 2 * * 0 `    : once a week every Sunday at 2 past midnight in UTC.
         * `0 2 8 * * `    : once a month on 8th day at 2 past midnight in UTC.
       
      string text = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTextBytes in interface CrontabSpecOrBuilder
      Returns:
      The bytes for text.
    • setText

      public CrontabSpec.Builder setText(String value)
       Required. Textual representation of the crontab. User can customize the
       backup frequency and the backup version time using the cron
       expression. The version time must be in UTC timezone.
      
       The backup will contain an externally consistent copy of the
       database at the version time. Allowed frequencies are 12 hour, 1 day,
       1 week and 1 month. Examples of valid cron specifications:
         * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
         * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
         * `0 2 * * * `    : once a day at 2 past midnight in UTC.
         * `0 2 * * 0 `    : once a week every Sunday at 2 past midnight in UTC.
         * `0 2 8 * * `    : once a month on 8th day at 2 past midnight in UTC.
       
      string text = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

      public CrontabSpec.Builder clearText()
       Required. Textual representation of the crontab. User can customize the
       backup frequency and the backup version time using the cron
       expression. The version time must be in UTC timezone.
      
       The backup will contain an externally consistent copy of the
       database at the version time. Allowed frequencies are 12 hour, 1 day,
       1 week and 1 month. Examples of valid cron specifications:
         * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
         * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
         * `0 2 * * * `    : once a day at 2 past midnight in UTC.
         * `0 2 * * 0 `    : once a week every Sunday at 2 past midnight in UTC.
         * `0 2 8 * * `    : once a month on 8th day at 2 past midnight in UTC.
       
      string text = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTextBytes

      public CrontabSpec.Builder setTextBytes(com.google.protobuf.ByteString value)
       Required. Textual representation of the crontab. User can customize the
       backup frequency and the backup version time using the cron
       expression. The version time must be in UTC timezone.
      
       The backup will contain an externally consistent copy of the
       database at the version time. Allowed frequencies are 12 hour, 1 day,
       1 week and 1 month. Examples of valid cron specifications:
         * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
         * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
         * `0 2 * * * `    : once a day at 2 past midnight in UTC.
         * `0 2 * * 0 `    : once a week every Sunday at 2 past midnight in UTC.
         * `0 2 8 * * `    : once a month on 8th day at 2 past midnight in UTC.
       
      string text = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • getTimeZone

      public String getTimeZone()
       Output only. The time zone of the times in `CrontabSpec.text`. Currently
       only UTC is supported.
       
      string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTimeZone in interface CrontabSpecOrBuilder
      Returns:
      The timeZone.
    • getTimeZoneBytes

      public com.google.protobuf.ByteString getTimeZoneBytes()
       Output only. The time zone of the times in `CrontabSpec.text`. Currently
       only UTC is supported.
       
      string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTimeZoneBytes in interface CrontabSpecOrBuilder
      Returns:
      The bytes for timeZone.
    • setTimeZone

      public CrontabSpec.Builder setTimeZone(String value)
       Output only. The time zone of the times in `CrontabSpec.text`. Currently
       only UTC is supported.
       
      string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The timeZone to set.
      Returns:
      This builder for chaining.
    • clearTimeZone

      public CrontabSpec.Builder clearTimeZone()
       Output only. The time zone of the times in `CrontabSpec.text`. Currently
       only UTC is supported.
       
      string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setTimeZoneBytes

      public CrontabSpec.Builder setTimeZoneBytes(com.google.protobuf.ByteString value)
       Output only. The time zone of the times in `CrontabSpec.text`. Currently
       only UTC is supported.
       
      string time_zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for timeZone to set.
      Returns:
      This builder for chaining.
    • hasCreationWindow

      public boolean hasCreationWindow()
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreationWindow in interface CrontabSpecOrBuilder
      Returns:
      Whether the creationWindow field is set.
    • getCreationWindow

      public com.google.protobuf.Duration getCreationWindow()
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreationWindow in interface CrontabSpecOrBuilder
      Returns:
      The creationWindow.
    • setCreationWindow

      public CrontabSpec.Builder setCreationWindow(com.google.protobuf.Duration value)
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreationWindow

      public CrontabSpec.Builder setCreationWindow(com.google.protobuf.Duration.Builder builderForValue)
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreationWindow

      public CrontabSpec.Builder mergeCreationWindow(com.google.protobuf.Duration value)
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreationWindow

      public CrontabSpec.Builder clearCreationWindow()
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreationWindowBuilder

      public com.google.protobuf.Duration.Builder getCreationWindowBuilder()
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreationWindowOrBuilder

      public com.google.protobuf.DurationOrBuilder getCreationWindowOrBuilder()
       Output only. Schedule backups will contain an externally consistent copy
       of the database at the version time specified in
       `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
       of the scheduled backups at that version time. Spanner will initiate
       the creation of scheduled backups within the time window bounded by the
       version_time specified in `schedule_spec.cron_spec` and version_time +
       `creation_window`.
       
      .google.protobuf.Duration creation_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreationWindowOrBuilder in interface CrontabSpecOrBuilder
    • setUnknownFields

      public final CrontabSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>
    • mergeUnknownFields

      public final CrontabSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CrontabSpec.Builder>