Class BackupRule.Builder (0.10.0)

public static final class BackupRule.Builder extends GeneratedMessageV3.Builder<BackupRule.Builder> implements BackupRuleOrBuilder

BackupRule binds the backup schedule to a retention policy.

Protobuf type google.cloud.backupdr.v1.BackupRule

Implements

BackupRuleOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BackupRule build()
Returns
Type Description
BackupRule

buildPartial()

public BackupRule buildPartial()
Returns
Type Description
BackupRule

clear()

public BackupRule.Builder clear()
Returns
Type Description
BackupRule.Builder
Overrides

clearBackupRetentionDays()

public BackupRule.Builder clearBackupRetentionDays()

Required. Configures the duration for which backup data will be kept. It is defined in “days”. The value should be greater than or equal to minimum enforced retention of the backup vault.

int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BackupRule.Builder

This builder for chaining.

clearBackupScheduleOneof()

public BackupRule.Builder clearBackupScheduleOneof()
Returns
Type Description
BackupRule.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRuleId()

public BackupRule.Builder clearRuleId()

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
BackupRule.Builder

This builder for chaining.

clearStandardSchedule()

public BackupRule.Builder clearStandardSchedule()

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BackupRule.Builder

clone()

public BackupRule.Builder clone()
Returns
Type Description
BackupRule.Builder
Overrides

getBackupRetentionDays()

public int getBackupRetentionDays()

Required. Configures the duration for which backup data will be kept. It is defined in “days”. The value should be greater than or equal to minimum enforced retention of the backup vault.

int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The backupRetentionDays.

getBackupScheduleOneofCase()

public BackupRule.BackupScheduleOneofCase getBackupScheduleOneofCase()
Returns
Type Description
BackupRule.BackupScheduleOneofCase

getDefaultInstanceForType()

public BackupRule getDefaultInstanceForType()
Returns
Type Description
BackupRule

getDescriptorForType()

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

getRuleId()

public String getRuleId()

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The ruleId.

getRuleIdBytes()

public ByteString getRuleIdBytes()

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for ruleId.

getStandardSchedule()

public StandardSchedule getStandardSchedule()

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StandardSchedule

The standardSchedule.

getStandardScheduleBuilder()

public StandardSchedule.Builder getStandardScheduleBuilder()

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StandardSchedule.Builder

getStandardScheduleOrBuilder()

public StandardScheduleOrBuilder getStandardScheduleOrBuilder()

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StandardScheduleOrBuilder

hasStandardSchedule()

public boolean hasStandardSchedule()

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the standardSchedule field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BackupRule other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStandardSchedule(StandardSchedule value)

public BackupRule.Builder mergeStandardSchedule(StandardSchedule value)

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value StandardSchedule
Returns
Type Description
BackupRule.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBackupRetentionDays(int value)

public BackupRule.Builder setBackupRetentionDays(int value)

Required. Configures the duration for which backup data will be kept. It is defined in “days”. The value should be greater than or equal to minimum enforced retention of the backup vault.

int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The backupRetentionDays to set.

Returns
Type Description
BackupRule.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setRuleId(String value)

public BackupRule.Builder setRuleId(String value)

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The ruleId to set.

Returns
Type Description
BackupRule.Builder

This builder for chaining.

setRuleIdBytes(ByteString value)

public BackupRule.Builder setRuleIdBytes(ByteString value)

Required. Immutable. The unique id of this BackupRule. The rule_id is unique per BackupPlan.The rule_id must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for ruleId to set.

Returns
Type Description
BackupRule.Builder

This builder for chaining.

setStandardSchedule(StandardSchedule value)

public BackupRule.Builder setStandardSchedule(StandardSchedule value)

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value StandardSchedule
Returns
Type Description
BackupRule.Builder

setStandardSchedule(StandardSchedule.Builder builderForValue)

public BackupRule.Builder setStandardSchedule(StandardSchedule.Builder builderForValue)

Required. Defines a schedule that runs within the confines of a defined window of time.

.google.cloud.backupdr.v1.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue StandardSchedule.Builder
Returns
Type Description
BackupRule.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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