Class BackupPlan.Builder (0.32.0)

publicstaticfinalclass BackupPlan.BuilderextendsGeneratedMessageV3.Builder<BackupPlan.Builder>implementsBackupPlanOrBuilder

A BackupPlan specifies some common fields, such as description as well as one or more BackupRule messages. Each BackupRule has a retention policy and defines a schedule by which the system is to perform backup workloads.

Protobuf type google.cloud.backupdr.v1.BackupPlan

Implements

BackupPlanOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBackupRules(Iterable<? extends BackupRule> values)

publicBackupPlan.BuilderaddAllBackupRules(Iterable<?extendsBackupRule>values)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.backupdr.v1.BackupRule>
Returns
Type Description
BackupPlan.Builder

addAllSupportedResourceTypes(Iterable<String> values)

publicBackupPlan.BuilderaddAllSupportedResourceTypes(Iterable<String>values)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The supportedResourceTypes to add.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

addBackupRules(BackupRule value)

publicBackupPlan.BuilderaddBackupRules(BackupRulevalue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value BackupRule
Returns
Type Description
BackupPlan.Builder

addBackupRules(BackupRule.Builder builderForValue)

publicBackupPlan.BuilderaddBackupRules(BackupRule.BuilderbuilderForValue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

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

addBackupRules(int index, BackupRule value)

publicBackupPlan.BuilderaddBackupRules(intindex,BackupRulevalue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value BackupRule
Returns
Type Description
BackupPlan.Builder

addBackupRules(int index, BackupRule.Builder builderForValue)

publicBackupPlan.BuilderaddBackupRules(intindex,BackupRule.BuilderbuilderForValue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue BackupRule.Builder
Returns
Type Description
BackupPlan.Builder

addBackupRulesBuilder()

publicBackupRule.BuilderaddBackupRulesBuilder()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BackupRule.Builder

addBackupRulesBuilder(int index)

publicBackupRule.BuilderaddBackupRulesBuilder(intindex)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BackupRule.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicBackupPlan.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BackupPlan.Builder
Overrides

addSupportedResourceTypes(String value)

publicBackupPlan.BuilderaddSupportedResourceTypes(Stringvalue)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The supportedResourceTypes to add.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

addSupportedResourceTypesBytes(ByteString value)

publicBackupPlan.BuilderaddSupportedResourceTypesBytes(ByteStringvalue)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the supportedResourceTypes to add.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

build()

publicBackupPlanbuild()
Returns
Type Description
BackupPlan

buildPartial()

publicBackupPlanbuildPartial()
Returns
Type Description
BackupPlan

clear()

publicBackupPlan.Builderclear()
Returns
Type Description
BackupPlan.Builder
Overrides

clearBackupRules()

publicBackupPlan.BuilderclearBackupRules()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BackupPlan.Builder

clearBackupVault()

publicBackupPlan.BuilderclearBackupVault()

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearBackupVaultServiceAccount()

publicBackupPlan.BuilderclearBackupVaultServiceAccount()

Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearCreateTime()

publicBackupPlan.BuilderclearCreateTime()

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

clearDescription()

publicBackupPlan.BuilderclearDescription()

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearEtag()

publicBackupPlan.BuilderclearEtag()

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

string etag = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicBackupPlan.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BackupPlan.Builder
Overrides

clearLabels()

publicBackupPlan.BuilderclearLabels()
Returns
Type Description
BackupPlan.Builder

clearLogRetentionDays()

publicBackupPlan.BuilderclearLogRetentionDays()

Optional. Applicable only for CloudSQL resource_type.

Configures how long logs will be stored. It is defined in "days". This value should be greater than or equal to minimum enforced log retention duration of the backup vault.

int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearName()

publicBackupPlan.BuilderclearName()

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicBackupPlan.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BackupPlan.Builder
Overrides

clearResourceType()

publicBackupPlan.BuilderclearResourceType()

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearRevisionId()

publicBackupPlan.BuilderclearRevisionId()

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearRevisionName()

publicBackupPlan.BuilderclearRevisionName()

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearState()

publicBackupPlan.BuilderclearState()

Output only. The State for the BackupPlan.

.google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearSupportedResourceTypes()

publicBackupPlan.BuilderclearSupportedResourceTypes()

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

clearUpdateTime()

publicBackupPlan.BuilderclearUpdateTime()

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.Builder

clone()

publicBackupPlan.Builderclone()
Returns
Type Description
BackupPlan.Builder
Overrides

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getBackupRules(int index)

publicBackupRulegetBackupRules(intindex)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BackupRule

getBackupRulesBuilder(int index)

publicBackupRule.BuildergetBackupRulesBuilder(intindex)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BackupRule.Builder

getBackupRulesBuilderList()

publicList<BackupRule.Builder>getBackupRulesBuilderList()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getBackupRulesCount()

publicintgetBackupRulesCount()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getBackupRulesList()

publicList<BackupRule>getBackupRulesList()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<BackupRule>

getBackupRulesOrBuilder(int index)

publicBackupRuleOrBuildergetBackupRulesOrBuilder(intindex)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BackupRuleOrBuilder

getBackupRulesOrBuilderList()

publicList<?extendsBackupRuleOrBuilder>getBackupRulesOrBuilderList()

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.backupdr.v1.BackupRuleOrBuilder>

getBackupVault()

publicStringgetBackupVault()

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The backupVault.

getBackupVaultBytes()

publicByteStringgetBackupVaultBytes()

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for backupVault.

getBackupVaultServiceAccount()

publicStringgetBackupVaultServiceAccount()

Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The backupVaultServiceAccount.

getBackupVaultServiceAccountBytes()

publicByteStringgetBackupVaultServiceAccountBytes()

Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for backupVaultServiceAccount.

getCreateTime()

publicTimestampgetCreateTime()

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

publicTimestamp.BuildergetCreateTimeBuilder()

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

publicBackupPlangetDefaultInstanceForType()
Returns
Type Description
BackupPlan

getDescription()

publicStringgetDescription()

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEtag()

publicStringgetEtag()

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

string etag = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The etag.

getEtagBytes()

publicByteStringgetEtagBytes()

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

string etag = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for etag.

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getLogRetentionDays()

publiclonggetLogRetentionDays()

Optional. Applicable only for CloudSQL resource_type.

Configures how long logs will be stored. It is defined in "days". This value should be greater than or equal to minimum enforced log retention duration of the backup vault.

int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The logRetentionDays.

getMutableLabels() (deprecated)

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

publicStringgetName()

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getResourceType()

publicStringgetResourceType()

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The resourceType.

getResourceTypeBytes()

publicByteStringgetResourceTypeBytes()

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for resourceType.

getRevisionId()

publicStringgetRevisionId()

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The revisionId.

getRevisionIdBytes()

publicByteStringgetRevisionIdBytes()

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for revisionId.

getRevisionName()

publicStringgetRevisionName()

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The revisionName.

getRevisionNameBytes()

publicByteStringgetRevisionNameBytes()

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for revisionName.

getState()

publicBackupPlan.StategetState()

Output only. The State for the BackupPlan.

.google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BackupPlan.State

The state.

getStateValue()

publicintgetStateValue()

Output only. The State for the BackupPlan.

.google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getSupportedResourceTypes(int index)

publicStringgetSupportedResourceTypes(intindex)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The supportedResourceTypes at the given index.

getSupportedResourceTypesBytes(int index)

publicByteStringgetSupportedResourceTypesBytes(intindex)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the supportedResourceTypes at the given index.

getSupportedResourceTypesCount()

publicintgetSupportedResourceTypesCount()

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of supportedResourceTypes.

getSupportedResourceTypesList()

publicProtocolStringListgetSupportedResourceTypesList()

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the supportedResourceTypes.

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

publicTimestamp.BuildergetUpdateTimeBuilder()

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

publicbooleanhasCreateTime()

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

publicBackupPlan.BuildermergeCreateTime(Timestampvalue)

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BackupPlan.Builder

mergeFrom(BackupPlan other)

publicBackupPlan.BuildermergeFrom(BackupPlanother)
Parameter
Name Description
other BackupPlan
Returns
Type Description
BackupPlan.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicBackupPlan.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackupPlan.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicBackupPlan.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
BackupPlan.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalBackupPlan.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BackupPlan.Builder
Overrides

mergeUpdateTime(Timestamp value)

publicBackupPlan.BuildermergeUpdateTime(Timestampvalue)

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BackupPlan.Builder

putAllLabels(Map<String,String> values)

publicBackupPlan.BuilderputAllLabels(Map<String,String>values)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
BackupPlan.Builder

putLabels(String key, String value)

publicBackupPlan.BuilderputLabels(Stringkey,Stringvalue)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
BackupPlan.Builder

removeBackupRules(int index)

publicBackupPlan.BuilderremoveBackupRules(intindex)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BackupPlan.Builder

removeLabels(String key)

publicBackupPlan.BuilderremoveLabels(Stringkey)

Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
BackupPlan.Builder

setBackupRules(int index, BackupRule value)

publicBackupPlan.BuildersetBackupRules(intindex,BackupRulevalue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value BackupRule
Returns
Type Description
BackupPlan.Builder

setBackupRules(int index, BackupRule.Builder builderForValue)

publicBackupPlan.BuildersetBackupRules(intindex,BackupRule.BuilderbuilderForValue)

Required. The backup rules for this BackupPlan. There must be at least one BackupRule message.

repeated .google.cloud.backupdr.v1.BackupRule backup_rules = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue BackupRule.Builder
Returns
Type Description
BackupPlan.Builder

setBackupVault(String value)

publicBackupPlan.BuildersetBackupVault(Stringvalue)

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The backupVault to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setBackupVaultBytes(ByteString value)

publicBackupPlan.BuildersetBackupVaultBytes(ByteStringvalue)

Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}

string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for backupVault to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setBackupVaultServiceAccount(String value)

publicBackupPlan.BuildersetBackupVaultServiceAccount(Stringvalue)

Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The backupVaultServiceAccount to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setBackupVaultServiceAccountBytes(ByteString value)

publicBackupPlan.BuildersetBackupVaultServiceAccountBytes(ByteStringvalue)

Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.

string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for backupVaultServiceAccount to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setCreateTime(Timestamp value)

publicBackupPlan.BuildersetCreateTime(Timestampvalue)

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BackupPlan.Builder

setCreateTime(Timestamp.Builder builderForValue)

publicBackupPlan.BuildersetCreateTime(Timestamp.BuilderbuilderForValue)

Output only. When the BackupPlan was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BackupPlan.Builder

setDescription(String value)

publicBackupPlan.BuildersetDescription(Stringvalue)

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

publicBackupPlan.BuildersetDescriptionBytes(ByteStringvalue)

Optional. The description of the BackupPlan resource.

The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters.

string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setEtag(String value)

publicBackupPlan.BuildersetEtag(Stringvalue)

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

string etag = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setEtagBytes(ByteString value)

publicBackupPlan.BuildersetEtagBytes(ByteStringvalue)

Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources.

string etag = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicBackupPlan.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BackupPlan.Builder
Overrides

setLogRetentionDays(long value)

publicBackupPlan.BuildersetLogRetentionDays(longvalue)

Optional. Applicable only for CloudSQL resource_type.

Configures how long logs will be stored. It is defined in "days". This value should be greater than or equal to minimum enforced log retention duration of the backup vault.

int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The logRetentionDays to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setName(String value)

publicBackupPlan.BuildersetName(Stringvalue)

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicBackupPlan.BuildersetNameBytes(ByteStringvalue)

Output only. Identifier. The resource name of the BackupPlan.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

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

publicBackupPlan.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BackupPlan.Builder
Overrides

setResourceType(String value)

publicBackupPlan.BuildersetResourceType(Stringvalue)

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The resourceType to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setResourceTypeBytes(ByteString value)

publicBackupPlan.BuildersetResourceTypeBytes(ByteStringvalue)

Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk".

string resource_type = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for resourceType to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setRevisionId(String value)

publicBackupPlan.BuildersetRevisionId(Stringvalue)

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The revisionId to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setRevisionIdBytes(ByteString value)

publicBackupPlan.BuildersetRevisionIdBytes(ByteStringvalue)

Output only. The user friendly revision ID of the BackupPlanRevision.

Example: v0, v1, v2, etc.

string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for revisionId to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setRevisionName(String value)

publicBackupPlan.BuildersetRevisionName(Stringvalue)

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The revisionName to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setRevisionNameBytes(ByteString value)

publicBackupPlan.BuildersetRevisionNameBytes(ByteStringvalue)

Output only. The resource id of the BackupPlanRevision.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}

string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for revisionName to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setState(BackupPlan.State value)

publicBackupPlan.BuildersetState(BackupPlan.Statevalue)

Output only. The State for the BackupPlan.

.google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value BackupPlan.State

The state to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setStateValue(int value)

publicBackupPlan.BuildersetStateValue(intvalue)

Output only. The State for the BackupPlan.

.google.cloud.backupdr.v1.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setSupportedResourceTypes(int index, String value)

publicBackupPlan.BuildersetSupportedResourceTypes(intindex,Stringvalue)

Output only. All resource types to which backupPlan can be applied.

repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The supportedResourceTypes to set.

Returns
Type Description
BackupPlan.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalBackupPlan.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BackupPlan.Builder
Overrides

setUpdateTime(Timestamp value)

publicBackupPlan.BuildersetUpdateTime(Timestampvalue)

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
BackupPlan.Builder

setUpdateTime(Timestamp.Builder builderForValue)

publicBackupPlan.BuildersetUpdateTime(Timestamp.BuilderbuilderForValue)

Output only. When the BackupPlan was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BackupPlan.Builder

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.