Class AutomatedBackupPolicy

  • All Implemented Interfaces:
    AutomatedBackupPolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AutomatedBackupPolicy
    extends com.google.protobuf.GeneratedMessageV3
    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.v1.AutomatedBackupPolicy
    See Also:
    Serialized Form
    • Field Detail

      • WEEKLY_SCHEDULE_FIELD_NUMBER

        public static final int WEEKLY_SCHEDULE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TIME_BASED_RETENTION_FIELD_NUMBER

        public static final int TIME_BASED_RETENTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • QUANTITY_BASED_RETENTION_FIELD_NUMBER

        public static final int QUANTITY_BASED_RETENTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • BACKUP_WINDOW_FIELD_NUMBER

        public static final int BACKUP_WINDOW_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENCRYPTION_CONFIG_FIELD_NUMBER

        public static final int ENCRYPTION_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasWeeklySchedule

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

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

        public boolean hasQuantityBasedRetention()
         Quantity-based Backup retention policy to retain recent backups.
         
        .google.cloud.alloydb.v1.AutomatedBackupPolicy.QuantityBasedRetention quantity_based_retention = 5;
        Specified by:
        hasQuantityBasedRetention in interface AutomatedBackupPolicyOrBuilder
        Returns:
        Whether the quantityBasedRetention field is set.
      • 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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1.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.v1.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 then use default encryption scheme to
         protect the user data.
         
        .google.cloud.alloydb.v1.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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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
      • newBuilderForType

        public AutomatedBackupPolicy.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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