Class Backup.QuantityBasedExpiry.Builder

  • All Implemented Interfaces:
    Backup.QuantityBasedExpiryOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Backup.QuantityBasedExpiry

    public static final class Backup.QuantityBasedExpiry.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Backup.QuantityBasedExpiry.Builder>
    implements Backup.QuantityBasedExpiryOrBuilder
     A backup's position in a quantity-based retention queue, of backups with
     the same source cluster and type, with length, retention, specified by the
     backup's retention policy.
     Once the position is greater than the retention, the backup is eligible to
     be garbage collected.
    
     Example: 5 backups from the same source cluster and type with a
     quantity-based retention of 3 and denoted by backup_id (position,
     retention).
    
     Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3).
     Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
     
    Protobuf type google.cloud.alloydb.v1alpha.Backup.QuantityBasedExpiry
    • Method Detail

      • 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<Backup.QuantityBasedExpiry.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<Backup.QuantityBasedExpiry.Builder>
      • getDefaultInstanceForType

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

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

        public Backup.QuantityBasedExpiry buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

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

        public Backup.QuantityBasedExpiry.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<Backup.QuantityBasedExpiry.Builder>
        Throws:
        IOException
      • getRetentionCount

        public int getRetentionCount()
         Output only. The backup's position among its backups with the same source
         cluster and type, by descending chronological order create time(i.e.
         newest first).
         
        int32 retention_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getRetentionCount in interface Backup.QuantityBasedExpiryOrBuilder
        Returns:
        The retentionCount.
      • setRetentionCount

        public Backup.QuantityBasedExpiry.Builder setRetentionCount​(int value)
         Output only. The backup's position among its backups with the same source
         cluster and type, by descending chronological order create time(i.e.
         newest first).
         
        int32 retention_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The retentionCount to set.
        Returns:
        This builder for chaining.
      • clearRetentionCount

        public Backup.QuantityBasedExpiry.Builder clearRetentionCount()
         Output only. The backup's position among its backups with the same source
         cluster and type, by descending chronological order create time(i.e.
         newest first).
         
        int32 retention_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • getTotalRetentionCount

        public int getTotalRetentionCount()
         Output only. The length of the quantity-based queue, specified by the
         backup's retention policy.
         
        int32 total_retention_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getTotalRetentionCount in interface Backup.QuantityBasedExpiryOrBuilder
        Returns:
        The totalRetentionCount.
      • setTotalRetentionCount

        public Backup.QuantityBasedExpiry.Builder setTotalRetentionCount​(int value)
         Output only. The length of the quantity-based queue, specified by the
         backup's retention policy.
         
        int32 total_retention_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The totalRetentionCount to set.
        Returns:
        This builder for chaining.
      • clearTotalRetentionCount

        public Backup.QuantityBasedExpiry.Builder clearTotalRetentionCount()
         Output only. The length of the quantity-based queue, specified by the
         backup's retention policy.
         
        int32 total_retention_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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