Class Backup.Builder (0.12.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Backup build()
Returns
TypeDescription
Backup

buildPartial()

public Backup buildPartial()
Returns
TypeDescription
Backup

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Backup.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Backup.Builder
Overrides

clearLabels()

public Backup.Builder clearLabels()
Returns
TypeDescription
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
TypeDescription
Backup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Backup.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Backup.Builder

This builder for chaining.

clone()

public Backup.Builder clone()
Returns
TypeDescription
Backup.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Backup getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Returns
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the sourceSnapshot field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
Backup.Builder

mergeFrom(Backup other)

public Backup.Builder mergeFrom(Backup other)
Parameter
NameDescription
otherBackup
Returns
TypeDescription
Backup.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Backup.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
Backup.Builder

removeLabels(String key)

public Backup.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 9;

Parameter
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
valueBackup.Type

The backupType to set.

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

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

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

The chainStorageBytes to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

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

The bytes for description to set.

Returns
TypeDescription
Backup.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

The name to set.

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

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The sourceSnapshot to set.

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

The bytes for sourceSnapshot to set.

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

The sourceVolume to set.

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

The bytes for sourceVolume to set.

Returns
TypeDescription
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
NameDescription
valueBackup.State

The state to set.

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

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

Returns
TypeDescription
Backup.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Backup.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuelong

The volumeUsageBytes to set.

Returns
TypeDescription
Backup.Builder

This builder for chaining.