Class AutomatedBackupPolicy.Builder

  • All Implemented Interfaces:
    AutomatedBackupPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AutomatedBackupPolicy

    public static final class AutomatedBackupPolicy.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AutomatedBackupPolicy.Builder>
    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.v1alpha.AutomatedBackupPolicy
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AutomatedBackupPolicy.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AutomatedBackupPolicy.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

        public AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • clearField

        public AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • clearOneof

        public AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • setRepeatedField

        public AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • addRepeatedField

        public AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • isInitialized

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

        public AutomatedBackupPolicy.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.Builder>
        Throws:
        IOException
      • hasWeeklySchedule

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

        public AutomatedBackupPolicy.Builder clearWeeklySchedule()
         Weekly schedule for the Backup.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.WeeklySchedule weekly_schedule = 2;
      • getWeeklyScheduleBuilder

        public AutomatedBackupPolicy.WeeklySchedule.Builder getWeeklyScheduleBuilder()
         Weekly schedule for the Backup.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.WeeklySchedule weekly_schedule = 2;
      • hasTimeBasedRetention

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

        public AutomatedBackupPolicy.Builder clearTimeBasedRetention()
         Time-based Backup retention policy.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.TimeBasedRetention time_based_retention = 4;
      • getTimeBasedRetentionBuilder

        public AutomatedBackupPolicy.TimeBasedRetention.Builder getTimeBasedRetentionBuilder()
         Time-based Backup retention policy.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.TimeBasedRetention time_based_retention = 4;
      • hasQuantityBasedRetention

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

        public AutomatedBackupPolicy.Builder clearQuantityBasedRetention()
         Quantity-based Backup retention policy to retain recent backups.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
      • getQuantityBasedRetentionBuilder

        public AutomatedBackupPolicy.QuantityBasedRetention.Builder getQuantityBasedRetentionBuilder()
         Quantity-based Backup retention policy to retain recent backups.
         
        .google.cloud.alloydb.v1alpha.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
      • 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.
      • setEnabled

        public AutomatedBackupPolicy.Builder setEnabled​(boolean value)
         Whether automated automated backups are enabled. If not set, defaults to
         true.
         
        optional bool enabled = 1;
        Parameters:
        value - The enabled to set.
        Returns:
        This builder for chaining.
      • clearEnabled

        public AutomatedBackupPolicy.Builder clearEnabled()
         Whether automated automated backups are enabled. If not set, defaults to
         true.
         
        optional bool enabled = 1;
        Returns:
        This builder for chaining.
      • 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.
      • setBackupWindow

        public AutomatedBackupPolicy.Builder setBackupWindow​(com.google.protobuf.Duration value)
         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;
      • setBackupWindow

        public AutomatedBackupPolicy.Builder setBackupWindow​(com.google.protobuf.Duration.Builder builderForValue)
         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;
      • mergeBackupWindow

        public AutomatedBackupPolicy.Builder mergeBackupWindow​(com.google.protobuf.Duration value)
         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;
      • clearBackupWindow

        public AutomatedBackupPolicy.Builder clearBackupWindow()
         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;
      • getBackupWindowBuilder

        public com.google.protobuf.Duration.Builder getBackupWindowBuilder()
         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;
      • 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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEncryptionConfig in interface AutomatedBackupPolicyOrBuilder
        Returns:
        The encryptionConfig.
      • setEncryptionConfig

        public AutomatedBackupPolicy.Builder setEncryptionConfig​(EncryptionConfig value)
         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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      • setEncryptionConfig

        public AutomatedBackupPolicy.Builder setEncryptionConfig​(EncryptionConfig.Builder builderForValue)
         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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      • mergeEncryptionConfig

        public AutomatedBackupPolicy.Builder mergeEncryptionConfig​(EncryptionConfig value)
         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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      • clearEncryptionConfig

        public AutomatedBackupPolicy.Builder clearEncryptionConfig()
         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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      • getEncryptionConfigBuilder

        public EncryptionConfig.Builder getEncryptionConfigBuilder()
         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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.EncryptionConfig encryption_config = 8 [(.google.api.field_behavior) = OPTIONAL];
      • 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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1alpha.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.
      • setLocation

        public AutomatedBackupPolicy.Builder setLocation​(String value)
         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;
        Parameters:
        value - The location to set.
        Returns:
        This builder for chaining.
      • clearLocation

        public AutomatedBackupPolicy.Builder clearLocation()
         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;
        Returns:
        This builder for chaining.
      • setLocationBytes

        public AutomatedBackupPolicy.Builder setLocationBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for location to set.
        Returns:
        This builder for chaining.
      • removeLabels

        public AutomatedBackupPolicy.Builder removeLabels​(String key)
         Labels to apply to backups created using this configuration.
         
        map<string, string> labels = 7;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • setUnknownFields

        public final AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>
      • mergeUnknownFields

        public final AutomatedBackupPolicy.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<AutomatedBackupPolicy.Builder>