Class AutomatedBackupPolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.alloydb.v1beta.AutomatedBackupPolicy
All Implemented Interfaces:
AutomatedBackupPolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class AutomatedBackupPolicy extends com.google.protobuf.GeneratedMessage implements AutomatedBackupPolicyOrBuilder
 Message describing the user-specified automated backup policy.

 All fields in the automated backup policy are optional. Defaults for each
 field are provided if they are not set.
 
Protobuf type google.cloud.alloydb.v1beta.AutomatedBackupPolicy
See Also:
  • Field Details

    • WEEKLY_SCHEDULE_FIELD_NUMBER

      public static final int WEEKLY_SCHEDULE_FIELD_NUMBER
      See Also:
    • TIME_BASED_RETENTION_FIELD_NUMBER

      public static final int TIME_BASED_RETENTION_FIELD_NUMBER
      See Also:
    • QUANTITY_BASED_RETENTION_FIELD_NUMBER

      public static final int QUANTITY_BASED_RETENTION_FIELD_NUMBER
      See Also:
    • ENABLED_FIELD_NUMBER

      public static final int ENABLED_FIELD_NUMBER
      See Also:
    • BACKUP_WINDOW_FIELD_NUMBER

      public static final int BACKUP_WINDOW_FIELD_NUMBER
      See Also:
    • ENCRYPTION_CONFIG_FIELD_NUMBER

      public static final int ENCRYPTION_CONFIG_FIELD_NUMBER
      See Also:
    • LOCATION_FIELD_NUMBER

      public static final int LOCATION_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getScheduleCase

      public AutomatedBackupPolicy.ScheduleCase getScheduleCase()
      Specified by:
      getScheduleCase in interface AutomatedBackupPolicyOrBuilder
    • getRetentionCase

      public AutomatedBackupPolicy.RetentionCase getRetentionCase()
      Specified by:
      getRetentionCase in interface AutomatedBackupPolicyOrBuilder
    • hasWeeklySchedule

      public boolean hasWeeklySchedule()
       Weekly schedule for the Backup.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklySchedule weekly_schedule = 2;
      Specified by:
      hasWeeklySchedule in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the weeklySchedule field is set.
    • getWeeklySchedule

      public AutomatedBackupPolicy.WeeklySchedule getWeeklySchedule()
       Weekly schedule for the Backup.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklySchedule weekly_schedule = 2;
      Specified by:
      getWeeklySchedule in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The weeklySchedule.
    • getWeeklyScheduleOrBuilder

      public AutomatedBackupPolicy.WeeklyScheduleOrBuilder getWeeklyScheduleOrBuilder()
       Weekly schedule for the Backup.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.WeeklySchedule weekly_schedule = 2;
      Specified by:
      getWeeklyScheduleOrBuilder in interface AutomatedBackupPolicyOrBuilder
    • hasTimeBasedRetention

      public boolean hasTimeBasedRetention()
       Time-based Backup retention policy.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.TimeBasedRetention time_based_retention = 4;
      Specified by:
      hasTimeBasedRetention in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the timeBasedRetention field is set.
    • getTimeBasedRetention

      public AutomatedBackupPolicy.TimeBasedRetention getTimeBasedRetention()
       Time-based Backup retention policy.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.TimeBasedRetention time_based_retention = 4;
      Specified by:
      getTimeBasedRetention in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The timeBasedRetention.
    • getTimeBasedRetentionOrBuilder

      public AutomatedBackupPolicy.TimeBasedRetentionOrBuilder getTimeBasedRetentionOrBuilder()
       Time-based Backup retention policy.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.TimeBasedRetention time_based_retention = 4;
      Specified by:
      getTimeBasedRetentionOrBuilder in interface AutomatedBackupPolicyOrBuilder
    • hasQuantityBasedRetention

      public boolean hasQuantityBasedRetention()
       Quantity-based Backup retention policy to retain recent backups.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
      Specified by:
      hasQuantityBasedRetention in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the quantityBasedRetention field is set.
    • getQuantityBasedRetention

      public AutomatedBackupPolicy.QuantityBasedRetention getQuantityBasedRetention()
       Quantity-based Backup retention policy to retain recent backups.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
      Specified by:
      getQuantityBasedRetention in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The quantityBasedRetention.
    • getQuantityBasedRetentionOrBuilder

      public AutomatedBackupPolicy.QuantityBasedRetentionOrBuilder getQuantityBasedRetentionOrBuilder()
       Quantity-based Backup retention policy to retain recent backups.
       
      .google.cloud.alloydb.v1beta.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
      Specified by:
      getQuantityBasedRetentionOrBuilder in interface AutomatedBackupPolicyOrBuilder
    • hasEnabled

      public boolean hasEnabled()
       Whether automated automated backups are enabled. If not set, defaults to
       true.
       
      optional bool enabled = 1;
      Specified by:
      hasEnabled in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the enabled field is set.
    • getEnabled

      public boolean getEnabled()
       Whether automated automated backups are enabled. If not set, defaults to
       true.
       
      optional bool enabled = 1;
      Specified by:
      getEnabled in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The enabled.
    • hasBackupWindow

      public boolean hasBackupWindow()
       The length of the time window during which a backup can be
       taken. If a backup does not succeed within this time window, it will be
       canceled and considered failed.
      
       The backup window must be at least 5 minutes long. There is no upper bound
       on the window. If not set, it defaults to 1 hour.
       
      .google.protobuf.Duration backup_window = 3;
      Specified by:
      hasBackupWindow in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the backupWindow field is set.
    • getBackupWindow

      public com.google.protobuf.Duration getBackupWindow()
       The length of the time window during which a backup can be
       taken. If a backup does not succeed within this time window, it will be
       canceled and considered failed.
      
       The backup window must be at least 5 minutes long. There is no upper bound
       on the window. If not set, it defaults to 1 hour.
       
      .google.protobuf.Duration backup_window = 3;
      Specified by:
      getBackupWindow in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The backupWindow.
    • getBackupWindowOrBuilder

      public com.google.protobuf.DurationOrBuilder getBackupWindowOrBuilder()
       The length of the time window during which a backup can be
       taken. If a backup does not succeed within this time window, it will be
       canceled and considered failed.
      
       The backup window must be at least 5 minutes long. There is no upper bound
       on the window. If not set, it defaults to 1 hour.
       
      .google.protobuf.Duration backup_window = 3;
      Specified by:
      getBackupWindowOrBuilder in interface AutomatedBackupPolicyOrBuilder
    • hasEncryptionConfig

      public boolean hasEncryptionConfig()
       Optional. The encryption config can be specified to encrypt the
       backups with a customer-managed encryption key (CMEK). When this field is
       not specified, the backup will use the cluster's encryption config.
       
      .google.cloud.alloydb.v1beta.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasEncryptionConfig in interface AutomatedBackupPolicyOrBuilder
      Returns:
      Whether the encryptionConfig field is set.
    • getEncryptionConfig

      public EncryptionConfig getEncryptionConfig()
       Optional. The encryption config can be specified to encrypt the
       backups with a customer-managed encryption key (CMEK). When this field is
       not specified, the backup will use the cluster's encryption config.
       
      .google.cloud.alloydb.v1beta.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEncryptionConfig in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The encryptionConfig.
    • getEncryptionConfigOrBuilder

      public EncryptionConfigOrBuilder getEncryptionConfigOrBuilder()
       Optional. The encryption config can be specified to encrypt the
       backups with a customer-managed encryption key (CMEK). When this field is
       not specified, the backup will use the cluster's encryption config.
       
      .google.cloud.alloydb.v1beta.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEncryptionConfigOrBuilder in interface AutomatedBackupPolicyOrBuilder
    • getLocation

      public String getLocation()
       The location where the backup will be stored. Currently, the only supported
       option is to store the backup in the same region as the cluster.
      
       If empty, defaults to the region of the cluster.
       
      string location = 6;
      Specified by:
      getLocation in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The location.
    • getLocationBytes

      public com.google.protobuf.ByteString getLocationBytes()
       The location where the backup will be stored. Currently, the only supported
       option is to store the backup in the same region as the cluster.
      
       If empty, defaults to the region of the cluster.
       
      string location = 6;
      Specified by:
      getLocationBytes in interface AutomatedBackupPolicyOrBuilder
      Returns:
      The bytes for location.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: AutomatedBackupPolicyOrBuilder
       Labels to apply to backups created using this configuration.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsCount in interface AutomatedBackupPolicyOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels to apply to backups created using this configuration.
       
      map<string, string> labels = 7;
      Specified by:
      containsLabels in interface AutomatedBackupPolicyOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface AutomatedBackupPolicyOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels to apply to backups created using this configuration.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsMap in interface AutomatedBackupPolicyOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels to apply to backups created using this configuration.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrDefault in interface AutomatedBackupPolicyOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels to apply to backups created using this configuration.
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrThrow in interface AutomatedBackupPolicyOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AutomatedBackupPolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AutomatedBackupPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AutomatedBackupPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public AutomatedBackupPolicy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static AutomatedBackupPolicy.Builder newBuilder()
    • newBuilder

      public static AutomatedBackupPolicy.Builder newBuilder(AutomatedBackupPolicy prototype)
    • toBuilder

      public AutomatedBackupPolicy.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AutomatedBackupPolicy.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AutomatedBackupPolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AutomatedBackupPolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<AutomatedBackupPolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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