Class DocumentMask.Builder (3.1.0)

public static final class DocumentMask.Builder extends GeneratedMessageV3.Builder<DocumentMask.Builder> implements DocumentMaskOrBuilder

A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value.

Protobuf type google.firestore.v1.DocumentMask

Static Methods

getDescriptor()

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

Methods

addAllFieldPaths(Iterable<String> values)

public DocumentMask.Builder addAllFieldPaths(Iterable<String> values)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameter
NameDescription
valuesIterable<String>

The fieldPaths to add.

Returns
TypeDescription
DocumentMask.Builder

This builder for chaining.

addFieldPaths(String value)

public DocumentMask.Builder addFieldPaths(String value)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameter
NameDescription
valueString

The fieldPaths to add.

Returns
TypeDescription
DocumentMask.Builder

This builder for chaining.

addFieldPathsBytes(ByteString value)

public DocumentMask.Builder addFieldPathsBytes(ByteString value)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameter
NameDescription
valueByteString

The bytes of the fieldPaths to add.

Returns
TypeDescription
DocumentMask.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DocumentMask build()
Returns
TypeDescription
DocumentMask

buildPartial()

public DocumentMask buildPartial()
Returns
TypeDescription
DocumentMask

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFieldPaths()

public DocumentMask.Builder clearFieldPaths()

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Returns
TypeDescription
DocumentMask.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public DocumentMask getDefaultInstanceForType()
Returns
TypeDescription
DocumentMask

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFieldPaths(int index)

public String getFieldPaths(int index)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The fieldPaths at the given index.

getFieldPathsBytes(int index)

public ByteString getFieldPathsBytes(int index)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the fieldPaths at the given index.

getFieldPathsCount()

public int getFieldPathsCount()

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Returns
TypeDescription
int

The count of fieldPaths.

getFieldPathsList()

public ProtocolStringList getFieldPathsList()

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the fieldPaths.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DocumentMask other)

public DocumentMask.Builder mergeFrom(DocumentMask other)
Parameter
NameDescription
otherDocumentMask
Returns
TypeDescription
DocumentMask.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setFieldPaths(int index, String value)

public DocumentMask.Builder setFieldPaths(int index, String value)

The list of field paths in the mask. See Document.fields for a field path syntax reference.

repeated string field_paths = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The fieldPaths to set.

Returns
TypeDescription
DocumentMask.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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