Class Share.Builder (1.50.0)

public static final class Share.Builder extends GeneratedMessageV3.Builder<Share.Builder> implements ShareOrBuilder

A Filestore share.

Protobuf type google.cloud.filestore.v1beta1.Share

Implements

ShareOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllNfsExportOptions(Iterable<? extends NfsExportOptions> values)

public Share.Builder addAllNfsExportOptions(Iterable<? extends NfsExportOptions> values)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.filestore.v1beta1.NfsExportOptions>
Returns
Type Description
Share.Builder

addNfsExportOptions(NfsExportOptions value)

public Share.Builder addNfsExportOptions(NfsExportOptions value)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
value NfsExportOptions
Returns
Type Description
Share.Builder

addNfsExportOptions(NfsExportOptions.Builder builderForValue)

public Share.Builder addNfsExportOptions(NfsExportOptions.Builder builderForValue)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
builderForValue NfsExportOptions.Builder
Returns
Type Description
Share.Builder

addNfsExportOptions(int index, NfsExportOptions value)

public Share.Builder addNfsExportOptions(int index, NfsExportOptions value)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameters
Name Description
index int
value NfsExportOptions
Returns
Type Description
Share.Builder

addNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)

public Share.Builder addNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameters
Name Description
index int
builderForValue NfsExportOptions.Builder
Returns
Type Description
Share.Builder

addNfsExportOptionsBuilder()

public NfsExportOptions.Builder addNfsExportOptionsBuilder()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
NfsExportOptions.Builder

addNfsExportOptionsBuilder(int index)

public NfsExportOptions.Builder addNfsExportOptionsBuilder(int index)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
index int
Returns
Type Description
NfsExportOptions.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Share build()
Returns
Type Description
Share

buildPartial()

public Share buildPartial()
Returns
Type Description
Share

clear()

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

clearBackup()

public Share.Builder clearBackup()

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
Share.Builder

This builder for chaining.

clearCapacityGb()

public Share.Builder clearCapacityGb()

File share capacity in gigabytes (GB). Filestore defines 1 GB as 1024^3 bytes. Must be greater than 0.

int64 capacity_gb = 4;

Returns
Type Description
Share.Builder

This builder for chaining.

clearCreateTime()

public Share.Builder clearCreateTime()

Output only. The time when the share was created.

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

Returns
Type Description
Share.Builder

clearDescription()

public Share.Builder clearDescription()

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

string description = 3;

Returns
Type Description
Share.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

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

clearMountName()

public Share.Builder clearMountName()

The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.

string mount_name = 2;

Returns
Type Description
Share.Builder

This builder for chaining.

clearName()

public Share.Builder clearName()

Output only. The resource name of the share, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}.

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

Returns
Type Description
Share.Builder

This builder for chaining.

clearNfsExportOptions()

public Share.Builder clearNfsExportOptions()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
Share.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSource()

public Share.Builder clearSource()
Returns
Type Description
Share.Builder

clearState()

public Share.Builder clearState()

Output only. The share state.

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

Returns
Type Description
Share.Builder

This builder for chaining.

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 8;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBackup()

public String getBackup()

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The backup.

getBackupBytes()

public ByteString getBackupBytes()

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for backup.

getCapacityGb()

public long getCapacityGb()

File share capacity in gigabytes (GB). Filestore defines 1 GB as 1024^3 bytes. Must be greater than 0.

int64 capacity_gb = 4;

Returns
Type Description
long

The capacityGb.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the share was created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the share was created.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the share was created.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Share getDefaultInstanceForType()
Returns
Type Description
Share

getDescription()

public String getDescription()

A description of the share 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 share 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 = 8;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Resource labels to represent user provided metadata.

map<string, string> labels = 8;

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

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

Parameter
Name Description
key String
Returns
Type Description
String

getMountName()

public String getMountName()

The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.

string mount_name = 2;

Returns
Type Description
String

The mountName.

getMountNameBytes()

public ByteString getMountNameBytes()

The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.

string mount_name = 2;

Returns
Type Description
ByteString

The bytes for mountName.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Output only. The resource name of the share, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the share, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}.

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

Returns
Type Description
ByteString

The bytes for name.

getNfsExportOptions(int index)

public NfsExportOptions getNfsExportOptions(int index)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
index int
Returns
Type Description
NfsExportOptions

getNfsExportOptionsBuilder(int index)

public NfsExportOptions.Builder getNfsExportOptionsBuilder(int index)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
index int
Returns
Type Description
NfsExportOptions.Builder

getNfsExportOptionsBuilderList()

public List<NfsExportOptions.Builder> getNfsExportOptionsBuilderList()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
List<Builder>

getNfsExportOptionsCount()

public int getNfsExportOptionsCount()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
int

getNfsExportOptionsList()

public List<NfsExportOptions> getNfsExportOptionsList()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
List<NfsExportOptions>

getNfsExportOptionsOrBuilder(int index)

public NfsExportOptionsOrBuilder getNfsExportOptionsOrBuilder(int index)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
index int
Returns
Type Description
NfsExportOptionsOrBuilder

getNfsExportOptionsOrBuilderList()

public List<? extends NfsExportOptionsOrBuilder> getNfsExportOptionsOrBuilderList()

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Returns
Type Description
List<? extends com.google.cloud.filestore.v1beta1.NfsExportOptionsOrBuilder>

getSourceCase()

public Share.SourceCase getSourceCase()
Returns
Type Description
Share.SourceCase

getState()

public Share.State getState()

Output only. The share state.

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

Returns
Type Description
Share.State

The state.

getStateValue()

public int getStateValue()

Output only. The share state.

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

Returns
Type Description
int

The enum numeric value on the wire for state.

hasBackup()

public boolean hasBackup()

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the backup field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the share was created.

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

Returns
Type Description
boolean

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

Output only. The time when the share was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Share.Builder

mergeFrom(Share other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

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

Resource labels to represent user provided metadata.

map<string, string> labels = 8;

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

putLabels(String key, String value)

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

Resource labels to represent user provided metadata.

map<string, string> labels = 8;

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

removeLabels(String key)

public Share.Builder removeLabels(String key)

Resource labels to represent user provided metadata.

map<string, string> labels = 8;

Parameter
Name Description
key String
Returns
Type Description
Share.Builder

removeNfsExportOptions(int index)

public Share.Builder removeNfsExportOptions(int index)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameter
Name Description
index int
Returns
Type Description
Share.Builder

setBackup(String value)

public Share.Builder setBackup(String value)

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The backup to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setBackupBytes(ByteString value)

public Share.Builder setBackupBytes(ByteString value)

Immutable. Full name of the Cloud Filestore Backup resource that this Share is restored from, in the format of projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if the Share is created from scratch and not restored from a backup.

string backup = 9 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for backup to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setCapacityGb(long value)

public Share.Builder setCapacityGb(long value)

File share capacity in gigabytes (GB). Filestore defines 1 GB as 1024^3 bytes. Must be greater than 0.

int64 capacity_gb = 4;

Parameter
Name Description
value long

The capacityGb to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Share.Builder setCreateTime(Timestamp value)

Output only. The time when the share was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
Share.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Share.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the share was created.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Share.Builder

setDescription(String value)

public Share.Builder setDescription(String value)

A description of the share 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
Share.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Share.Builder setDescriptionBytes(ByteString value)

A description of the share 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
Share.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMountName(String value)

public Share.Builder setMountName(String value)

The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.

string mount_name = 2;

Parameter
Name Description
value String

The mountName to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setMountNameBytes(ByteString value)

public Share.Builder setMountNameBytes(ByteString value)

The mount name of the share. Must be 63 characters or less and consist of uppercase or lowercase letters, numbers, and underscores.

string mount_name = 2;

Parameter
Name Description
value ByteString

The bytes for mountName to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setName(String value)

public Share.Builder setName(String value)

Output only. The resource name of the share, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Share.Builder setNameBytes(ByteString value)

Output only. The resource name of the share, in the format projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares/{share_id}.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setNfsExportOptions(int index, NfsExportOptions value)

public Share.Builder setNfsExportOptions(int index, NfsExportOptions value)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameters
Name Description
index int
value NfsExportOptions
Returns
Type Description
Share.Builder

setNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)

public Share.Builder setNfsExportOptions(int index, NfsExportOptions.Builder builderForValue)

Nfs Export Options. There is a limit of 10 export options per file share.

repeated .google.cloud.filestore.v1beta1.NfsExportOptions nfs_export_options = 5;

Parameters
Name Description
index int
builderForValue NfsExportOptions.Builder
Returns
Type Description
Share.Builder

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

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

setState(Share.State value)

public Share.Builder setState(Share.State value)

Output only. The share state.

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

Parameter
Name Description
value Share.State

The state to set.

Returns
Type Description
Share.Builder

This builder for chaining.

setStateValue(int value)

public Share.Builder setStateValue(int value)

Output only. The share state.

.google.cloud.filestore.v1beta1.Share.State state = 6 [(.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
Share.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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