Class BackupPlan.RetentionPolicy.Builder (0.39.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BackupPlan.RetentionPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides

build()

public BackupPlan.RetentionPolicy build()
Returns
TypeDescription
BackupPlan.RetentionPolicy

buildPartial()

public BackupPlan.RetentionPolicy buildPartial()
Returns
TypeDescription
BackupPlan.RetentionPolicy

clear()

public BackupPlan.RetentionPolicy.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BackupPlan.RetentionPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BackupPlan.RetentionPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides

clone()

public BackupPlan.RetentionPolicy.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The backupRetainDays.

getDefaultInstanceForType()

public BackupPlan.RetentionPolicy getDefaultInstanceForType()
Returns
TypeDescription
BackupPlan.RetentionPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
boolean

The locked.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(BackupPlan.RetentionPolicy other)

public BackupPlan.RetentionPolicy.Builder mergeFrom(BackupPlan.RetentionPolicy other)
Parameter
NameDescription
otherBackupPlan.RetentionPolicy
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BackupPlan.RetentionPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BackupPlan.RetentionPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BackupPlan.RetentionPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The backupDeleteLockDays to set.

Returns
TypeDescription
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
NameDescription
valueint

The backupRetainDays to set.

Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BackupPlan.RetentionPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The locked to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BackupPlan.RetentionPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BackupPlan.RetentionPolicy.Builder
Overrides