Class Backup.Builder (0.28.0)

public static final class Backup.Builder extends GeneratedMessageV3.Builder<Backup.Builder> implements BackupOrBuilder

A NetApp Backup.

Protobuf type google.cloud.netapp.v1.Backup

Implements

BackupOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Backup build()
Returns
Type Description
Backup

buildPartial()

public Backup buildPartial()
Returns
Type Description
Backup

clear()

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

clearBackupType()

public Backup.Builder clearBackupType()

Output only. Type of backup, manually created or created by a backup policy.

.google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.Builder

This builder for chaining.

clearChainStorageBytes()

public Backup.Builder clearChainStorageBytes()

Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)

int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.Builder

This builder for chaining.

clearCreateTime()

public Backup.Builder clearCreateTime()

Output only. The time when the backup was created.

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

Returns
Type Description
Backup.Builder

clearDescription()

public Backup.Builder clearDescription()

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

string description = 3;

Returns
Type Description
Backup.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Backup.Builder clearLabels()
Returns
Type Description
Backup.Builder

clearName()

public Backup.Builder clearName()

Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.

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

Returns
Type Description
Backup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSourceSnapshot()

public Backup.Builder clearSourceSnapshot()

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
Backup.Builder

This builder for chaining.

clearSourceVolume()

public Backup.Builder clearSourceVolume()

Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}

string source_volume = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
Backup.Builder

This builder for chaining.

clearState()

public Backup.Builder clearState()

Output only. The backup state.

.google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.Builder

This builder for chaining.

clearVolumeUsageBytes()

public Backup.Builder clearVolumeUsageBytes()

Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big.

int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBackupType()

public Backup.Type getBackupType()

Output only. Type of backup, manually created or created by a backup policy.

.google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.Type

The backupType.

getBackupTypeValue()

public int getBackupTypeValue()

Output only. Type of backup, manually created or created by a backup policy.

.google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for backupType.

getChainStorageBytes()

public long getChainStorageBytes()

Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)

int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The chainStorageBytes.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the backup was created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the backup was created.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the backup was created.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Backup getDefaultInstanceForType()
Returns
Type Description
Backup

getDescription()

public String getDescription()

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.

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

Returns
Type Description
ByteString

The bytes for name.

getSourceSnapshot()

public String getSourceSnapshot()

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The sourceSnapshot.

getSourceSnapshotBytes()

public ByteString getSourceSnapshotBytes()

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for sourceSnapshot.

getSourceVolume()

public String getSourceVolume()

Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}

string source_volume = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The sourceVolume.

getSourceVolumeBytes()

public ByteString getSourceVolumeBytes()

Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}

string source_volume = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for sourceVolume.

getState()

public Backup.State getState()

Output only. The backup state.

.google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Backup.State

The state.

getStateValue()

public int getStateValue()

Output only. The backup state.

.google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getVolumeUsageBytes()

public long getVolumeUsageBytes()

Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big.

int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The volumeUsageBytes.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the backup was created.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasSourceSnapshot()

public boolean hasSourceSnapshot()

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the sourceSnapshot field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Backup.Builder mergeCreateTime(Timestamp value)

Output only. The time when the backup was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Backup.Builder

mergeFrom(Backup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public Backup.Builder putAllLabels(Map<String,String> values)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

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

putLabels(String key, String value)

public Backup.Builder putLabels(String key, String value)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

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

removeLabels(String key)

public Backup.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
Name Description
key String
Returns
Type Description
Backup.Builder

setBackupType(Backup.Type value)

public Backup.Builder setBackupType(Backup.Type value)

Output only. Type of backup, manually created or created by a backup policy.

.google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Backup.Type

The backupType to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setBackupTypeValue(int value)

public Backup.Builder setBackupTypeValue(int value)

Output only. Type of backup, manually created or created by a backup policy.

.google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Backup.Builder

This builder for chaining.

setChainStorageBytes(long value)

public Backup.Builder setChainStorageBytes(long value)

Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)

int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The chainStorageBytes to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Backup.Builder setCreateTime(Timestamp value)

Output only. The time when the backup was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Backup.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Backup.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the backup was created.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Backup.Builder

setDescription(String value)

public Backup.Builder setDescription(String value)

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

string description = 3;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Backup.Builder setDescriptionBytes(ByteString value)

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

string description = 3;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Backup.Builder setName(String value)

Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Backup.Builder setNameBytes(ByteString value)

Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

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

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

setSourceSnapshot(String value)

public Backup.Builder setSourceSnapshot(String value)

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The sourceSnapshot to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setSourceSnapshotBytes(ByteString value)

public Backup.Builder setSourceSnapshotBytes(ByteString value)

If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}

optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for sourceSnapshot to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setSourceVolume(String value)

public Backup.Builder setSourceVolume(String value)

Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}

string source_volume = 6 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The sourceVolume to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setSourceVolumeBytes(ByteString value)

public Backup.Builder setSourceVolumeBytes(ByteString value)

Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}

string source_volume = 6 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for sourceVolume to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setState(Backup.State value)

public Backup.Builder setState(Backup.State value)

Output only. The backup state.

.google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Backup.State

The state to set.

Returns
Type Description
Backup.Builder

This builder for chaining.

setStateValue(int value)

public Backup.Builder setStateValue(int value)

Output only. The backup state.

.google.cloud.netapp.v1.Backup.State state = 2 [(.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
Backup.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setVolumeUsageBytes(long value)

public Backup.Builder setVolumeUsageBytes(long value)

Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big.

int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The volumeUsageBytes to set.

Returns
Type Description
Backup.Builder

This builder for chaining.