Class Snapshot.Builder

public static final class Snapshot.Builder extends GeneratedMessageV3.Builder<Snapshot.Builder> implements SnapshotOrBuilder

A Cloud Filestore snapshot.

Protobuf type google.cloud.filestore.v1beta1.Snapshot

Implements

SnapshotOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Snapshot build()
Returns
TypeDescription
Snapshot

buildPartial()

public Snapshot buildPartial()
Returns
TypeDescription
Snapshot

clear()

public Snapshot.Builder clear()
Returns
TypeDescription
Snapshot.Builder
Overrides

clearCreateTime()

public Snapshot.Builder clearCreateTime()

Output only. The time when the snapshot was created.

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

Returns
TypeDescription
Snapshot.Builder

clearDescription()

public Snapshot.Builder clearDescription()

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

string description = 2;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFilesystemUsedBytes()

public Snapshot.Builder clearFilesystemUsedBytes()

Output only. The amount of bytes needed to allocate a full copy of the snapshot content

int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearLabels()

public Snapshot.Builder clearLabels()
Returns
TypeDescription
Snapshot.Builder

clearName()

public Snapshot.Builder clearName()

Output only. The resource name of the snapshot, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}.

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

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearState()

public Snapshot.Builder clearState()

Output only. The snapshot state.

.google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the snapshot was created.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the snapshot was created.

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the snapshot was created.

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Snapshot getDefaultInstanceForType()
Returns
TypeDescription
Snapshot

getDescription()

public String getDescription()

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

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

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

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFilesystemUsedBytes()

public long getFilesystemUsedBytes()

Output only. The amount of bytes needed to allocate a full copy of the snapshot content

int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The filesystemUsedBytes.

getLabels()

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 = 5;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 5;

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 = 5;

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 = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Output only. The resource name of the snapshot, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}.

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the snapshot, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}.

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

Returns
TypeDescription
ByteString

The bytes for name.

getState()

public Snapshot.State getState()

Output only. The snapshot state.

.google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Snapshot.State

The state.

getStateValue()

public int getStateValue()

Output only. The snapshot state.

.google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the snapshot was created.

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

Returns
TypeDescription
boolean

Whether the createTime 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 Snapshot.Builder mergeCreateTime(Timestamp value)

Output only. The time when the snapshot was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Snapshot.Builder

mergeFrom(Snapshot other)

public Snapshot.Builder mergeFrom(Snapshot other)
Parameter
NameDescription
otherSnapshot
Returns
TypeDescription
Snapshot.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Snapshot.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Snapshot.Builder
Overrides

putAllLabels(Map<String,String> values)

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

Resource labels to represent user provided metadata.

map<string, string> labels = 5;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Snapshot.Builder

putLabels(String key, String value)

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

Resource labels to represent user provided metadata.

map<string, string> labels = 5;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Snapshot.Builder

removeLabels(String key)

public Snapshot.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
Snapshot.Builder

setCreateTime(Timestamp value)

public Snapshot.Builder setCreateTime(Timestamp value)

Output only. The time when the snapshot was created.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Snapshot.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Snapshot.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the snapshot was created.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Snapshot.Builder

setDescription(String value)

public Snapshot.Builder setDescription(String value)

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

string description = 2;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Snapshot.Builder setDescriptionBytes(ByteString value)

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

string description = 2;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFilesystemUsedBytes(long value)

public Snapshot.Builder setFilesystemUsedBytes(long value)

Output only. The amount of bytes needed to allocate a full copy of the snapshot content

int64 filesystem_used_bytes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuelong

The filesystemUsedBytes to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setName(String value)

public Snapshot.Builder setName(String value)

Output only. The resource name of the snapshot, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Snapshot.Builder setNameBytes(ByteString value)

Output only. The resource name of the snapshot, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

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

public Snapshot.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Snapshot.Builder
Overrides

setState(Snapshot.State value)

public Snapshot.Builder setState(Snapshot.State value)

Output only. The snapshot state.

.google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueSnapshot.State

The state to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStateValue(int value)

public Snapshot.Builder setStateValue(int value)

Output only. The snapshot state.

.google.cloud.filestore.v1beta1.Snapshot.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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