public static final class BackupPlan.RetentionPolicy.Builder extends GeneratedMessageV3.Builder<BackupPlan.RetentionPolicy.Builder> implements BackupPlan.RetentionPolicyOrBuilder
RetentionPolicy defines a Backup retention policy for a BackupPlan.
Protobuf type google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public BackupPlan.RetentionPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public BackupPlan.RetentionPolicy build()
Returns
buildPartial()
public BackupPlan.RetentionPolicy buildPartial()
Returns
clear()
public BackupPlan.RetentionPolicy.Builder clear()
Returns
Overrides
clearBackupDeleteLockDays()
public BackupPlan.RetentionPolicy.Builder clearBackupDeleteLockDays()
Minimum age for Backups created via this BackupPlan (in days).
This field MUST be an integer value between 0-90 (inclusive).
A Backup created under this BackupPlan will NOT be deletable until it
reaches Backup's (create_time + backup_delete_lock_days).
Updating this field of a BackupPlan does NOT affect existing Backups
under it. Backups created AFTER a successful update will inherit
the new value.
Default: 0 (no delete blocking)
int32 backup_delete_lock_days = 1;
Returns
clearBackupRetainDays()
public BackupPlan.RetentionPolicy.Builder clearBackupRetainDays()
The default maximum age of a Backup created via this BackupPlan.
This field MUST be an integer value >= 0.
If specified, a Backup created under this BackupPlan will be
automatically deleted after its age reaches (create_time +
backup_retain_days).
If not specified, Backups created under this BackupPlan will NOT be
subject to automatic deletion.
Updating this field does NOT affect existing Backups under it. Backups
created AFTER a successful update will automatically pick up the new
value.
NOTE: backup_retain_days must be >= backup_delete_lock_days.
Default: 0 (no automatic deletion)
int32 backup_retain_days = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public BackupPlan.RetentionPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLocked()
public BackupPlan.RetentionPolicy.Builder clearLocked()
This flag denotes whether the retention policy of this BackupPlan is
locked. If set to True, no further update is allowed on this policy,
including the locked
field itself.
Default: False
bool locked = 3;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public BackupPlan.RetentionPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public BackupPlan.RetentionPolicy.Builder clone()
Returns
Overrides
getBackupDeleteLockDays()
public int getBackupDeleteLockDays()
Minimum age for Backups created via this BackupPlan (in days).
This field MUST be an integer value between 0-90 (inclusive).
A Backup created under this BackupPlan will NOT be deletable until it
reaches Backup's (create_time + backup_delete_lock_days).
Updating this field of a BackupPlan does NOT affect existing Backups
under it. Backups created AFTER a successful update will inherit
the new value.
Default: 0 (no delete blocking)
int32 backup_delete_lock_days = 1;
Returns
Type | Description |
int | The backupDeleteLockDays.
|
getBackupRetainDays()
public int getBackupRetainDays()
The default maximum age of a Backup created via this BackupPlan.
This field MUST be an integer value >= 0.
If specified, a Backup created under this BackupPlan will be
automatically deleted after its age reaches (create_time +
backup_retain_days).
If not specified, Backups created under this BackupPlan will NOT be
subject to automatic deletion.
Updating this field does NOT affect existing Backups under it. Backups
created AFTER a successful update will automatically pick up the new
value.
NOTE: backup_retain_days must be >= backup_delete_lock_days.
Default: 0 (no automatic deletion)
int32 backup_retain_days = 2;
Returns
Type | Description |
int | The backupRetainDays.
|
getDefaultInstanceForType()
public BackupPlan.RetentionPolicy getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getLocked()
public boolean getLocked()
This flag denotes whether the retention policy of this BackupPlan is
locked. If set to True, no further update is allowed on this policy,
including the locked
field itself.
Default: False
bool locked = 3;
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(BackupPlan.RetentionPolicy other)
public BackupPlan.RetentionPolicy.Builder mergeFrom(BackupPlan.RetentionPolicy other)
Parameter
Returns
public BackupPlan.RetentionPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public BackupPlan.RetentionPolicy.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final BackupPlan.RetentionPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setBackupDeleteLockDays(int value)
public BackupPlan.RetentionPolicy.Builder setBackupDeleteLockDays(int value)
Minimum age for Backups created via this BackupPlan (in days).
This field MUST be an integer value between 0-90 (inclusive).
A Backup created under this BackupPlan will NOT be deletable until it
reaches Backup's (create_time + backup_delete_lock_days).
Updating this field of a BackupPlan does NOT affect existing Backups
under it. Backups created AFTER a successful update will inherit
the new value.
Default: 0 (no delete blocking)
int32 backup_delete_lock_days = 1;
Parameter
Name | Description |
value | int
The backupDeleteLockDays to set.
|
Returns
setBackupRetainDays(int value)
public BackupPlan.RetentionPolicy.Builder setBackupRetainDays(int value)
The default maximum age of a Backup created via this BackupPlan.
This field MUST be an integer value >= 0.
If specified, a Backup created under this BackupPlan will be
automatically deleted after its age reaches (create_time +
backup_retain_days).
If not specified, Backups created under this BackupPlan will NOT be
subject to automatic deletion.
Updating this field does NOT affect existing Backups under it. Backups
created AFTER a successful update will automatically pick up the new
value.
NOTE: backup_retain_days must be >= backup_delete_lock_days.
Default: 0 (no automatic deletion)
int32 backup_retain_days = 2;
Parameter
Name | Description |
value | int
The backupRetainDays to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public BackupPlan.RetentionPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setLocked(boolean value)
public BackupPlan.RetentionPolicy.Builder setLocked(boolean value)
This flag denotes whether the retention policy of this BackupPlan is
locked. If set to True, no further update is allowed on this policy,
including the locked
field itself.
Default: False
bool locked = 3;
Parameter
Name | Description |
value | boolean
The locked to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public BackupPlan.RetentionPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final BackupPlan.RetentionPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides