Class BackupPlan.RetentionPolicy.Builder (0.42.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BackupPlan.RetentionPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

build()

public BackupPlan.RetentionPolicy build()
Returns
Type Description
BackupPlan.RetentionPolicy

buildPartial()

public BackupPlan.RetentionPolicy buildPartial()
Returns
Type Description
BackupPlan.RetentionPolicy

clear()

public BackupPlan.RetentionPolicy.Builder clear()
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

clearBackupDeleteLockDays()

public BackupPlan.RetentionPolicy.Builder clearBackupDeleteLockDays()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

clearBackupRetainDays()

public BackupPlan.RetentionPolicy.Builder clearBackupRetainDays()

Optional. The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. 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. If cron_schedule is defined, then this must be <= 360 * the creation interval. If rpo_config is defined, then this must be <= 360 * target_rpo_minutes / (1440minutes/day).

Default: 0 (no automatic deletion)

int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BackupPlan.RetentionPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

clearLocked()

public BackupPlan.RetentionPolicy.Builder clearLocked()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BackupPlan.RetentionPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

clone()

public BackupPlan.RetentionPolicy.Builder clone()
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

getBackupDeleteLockDays()

public int getBackupDeleteLockDays()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The backupDeleteLockDays.

getBackupRetainDays()

public int getBackupRetainDays()

Optional. The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. 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. If cron_schedule is defined, then this must be <= 360 * the creation interval. If rpo_config is defined, then this must be <= 360 * target_rpo_minutes / (1440minutes/day).

Default: 0 (no automatic deletion)

int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The backupRetainDays.

getDefaultInstanceForType()

public BackupPlan.RetentionPolicy getDefaultInstanceForType()
Returns
Type Description
BackupPlan.RetentionPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLocked()

public boolean getLocked()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The locked.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BackupPlan.RetentionPolicy other)

public BackupPlan.RetentionPolicy.Builder mergeFrom(BackupPlan.RetentionPolicy other)
Parameter
Name Description
other BackupPlan.RetentionPolicy
Returns
Type Description
BackupPlan.RetentionPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BackupPlan.RetentionPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BackupPlan.RetentionPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BackupPlan.RetentionPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

setBackupDeleteLockDays(int value)

public BackupPlan.RetentionPolicy.Builder setBackupDeleteLockDays(int value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The backupDeleteLockDays to set.

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

setBackupRetainDays(int value)

public BackupPlan.RetentionPolicy.Builder setBackupRetainDays(int value)

Optional. The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. 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. If cron_schedule is defined, then this must be <= 360 * the creation interval. If rpo_config is defined, then this must be <= 360 * target_rpo_minutes / (1440minutes/day).

Default: 0 (no automatic deletion)

int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The backupRetainDays to set.

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BackupPlan.RetentionPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

setLocked(boolean value)

public BackupPlan.RetentionPolicy.Builder setLocked(boolean value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The locked to set.

Returns
Type Description
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BackupPlan.RetentionPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BackupPlan.RetentionPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BackupPlan.RetentionPolicy.Builder
Overrides