Class Write.Builder (3.24.3)

public static final class Write.Builder extends GeneratedMessageV3.Builder<Write.Builder> implements WriteOrBuilder

A write on a document.

Protobuf type google.firestore.v1.Write

Implements

WriteOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllUpdateTransforms(Iterable<? extends DocumentTransform.FieldTransform> values)

public Write.Builder addAllUpdateTransforms(Iterable<? extends DocumentTransform.FieldTransform> values)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
values Iterable<? extends com.google.firestore.v1.DocumentTransform.FieldTransform>
Returns
Type Description
Write.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addUpdateTransforms(DocumentTransform.FieldTransform value)

public Write.Builder addUpdateTransforms(DocumentTransform.FieldTransform value)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
value DocumentTransform.FieldTransform
Returns
Type Description
Write.Builder

addUpdateTransforms(DocumentTransform.FieldTransform.Builder builderForValue)

public Write.Builder addUpdateTransforms(DocumentTransform.FieldTransform.Builder builderForValue)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
builderForValue DocumentTransform.FieldTransform.Builder
Returns
Type Description
Write.Builder

addUpdateTransforms(int index, DocumentTransform.FieldTransform value)

public Write.Builder addUpdateTransforms(int index, DocumentTransform.FieldTransform value)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameters
Name Description
index int
value DocumentTransform.FieldTransform
Returns
Type Description
Write.Builder

addUpdateTransforms(int index, DocumentTransform.FieldTransform.Builder builderForValue)

public Write.Builder addUpdateTransforms(int index, DocumentTransform.FieldTransform.Builder builderForValue)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameters
Name Description
index int
builderForValue DocumentTransform.FieldTransform.Builder
Returns
Type Description
Write.Builder

addUpdateTransformsBuilder()

public DocumentTransform.FieldTransform.Builder addUpdateTransformsBuilder()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
DocumentTransform.FieldTransform.Builder

addUpdateTransformsBuilder(int index)

public DocumentTransform.FieldTransform.Builder addUpdateTransformsBuilder(int index)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
index int
Returns
Type Description
DocumentTransform.FieldTransform.Builder

build()

public Write build()
Returns
Type Description
Write

buildPartial()

public Write buildPartial()
Returns
Type Description
Write

clear()

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

clearCurrentDocument()

public Write.Builder clearCurrentDocument()

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Returns
Type Description
Write.Builder

clearDelete()

public Write.Builder clearDelete()

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Returns
Type Description
Write.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOperation()

public Write.Builder clearOperation()
Returns
Type Description
Write.Builder

clearTransform()

public Write.Builder clearTransform()

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Returns
Type Description
Write.Builder

clearUpdate()

public Write.Builder clearUpdate()

A document to write.

.google.firestore.v1.Document update = 1;

Returns
Type Description
Write.Builder

clearUpdateMask()

public Write.Builder clearUpdateMask()

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Returns
Type Description
Write.Builder

clearUpdateTransforms()

public Write.Builder clearUpdateTransforms()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
Write.Builder

clone()

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

getCurrentDocument()

public Precondition getCurrentDocument()

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Returns
Type Description
Precondition

The currentDocument.

getCurrentDocumentBuilder()

public Precondition.Builder getCurrentDocumentBuilder()

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Returns
Type Description
Precondition.Builder

getCurrentDocumentOrBuilder()

public PreconditionOrBuilder getCurrentDocumentOrBuilder()

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Returns
Type Description
PreconditionOrBuilder

getDefaultInstanceForType()

public Write getDefaultInstanceForType()
Returns
Type Description
Write

getDelete()

public String getDelete()

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Returns
Type Description
String

The delete.

getDeleteBytes()

public ByteString getDeleteBytes()

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Returns
Type Description
ByteString

The bytes for delete.

getDescriptorForType()

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

getOperationCase()

public Write.OperationCase getOperationCase()
Returns
Type Description
Write.OperationCase

getTransform()

public DocumentTransform getTransform()

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Returns
Type Description
DocumentTransform

The transform.

getTransformBuilder()

public DocumentTransform.Builder getTransformBuilder()

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Returns
Type Description
DocumentTransform.Builder

getTransformOrBuilder()

public DocumentTransformOrBuilder getTransformOrBuilder()

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Returns
Type Description
DocumentTransformOrBuilder

getUpdate()

public Document getUpdate()

A document to write.

.google.firestore.v1.Document update = 1;

Returns
Type Description
Document

The update.

getUpdateBuilder()

public Document.Builder getUpdateBuilder()

A document to write.

.google.firestore.v1.Document update = 1;

Returns
Type Description
Document.Builder

getUpdateMask()

public DocumentMask getUpdateMask()

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Returns
Type Description
DocumentMask

The updateMask.

getUpdateMaskBuilder()

public DocumentMask.Builder getUpdateMaskBuilder()

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Returns
Type Description
DocumentMask.Builder

getUpdateMaskOrBuilder()

public DocumentMaskOrBuilder getUpdateMaskOrBuilder()

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Returns
Type Description
DocumentMaskOrBuilder

getUpdateOrBuilder()

public DocumentOrBuilder getUpdateOrBuilder()

A document to write.

.google.firestore.v1.Document update = 1;

Returns
Type Description
DocumentOrBuilder

getUpdateTransforms(int index)

public DocumentTransform.FieldTransform getUpdateTransforms(int index)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
index int
Returns
Type Description
DocumentTransform.FieldTransform

getUpdateTransformsBuilder(int index)

public DocumentTransform.FieldTransform.Builder getUpdateTransformsBuilder(int index)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
index int
Returns
Type Description
DocumentTransform.FieldTransform.Builder

getUpdateTransformsBuilderList()

public List<DocumentTransform.FieldTransform.Builder> getUpdateTransformsBuilderList()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
List<Builder>

getUpdateTransformsCount()

public int getUpdateTransformsCount()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
int

getUpdateTransformsList()

public List<DocumentTransform.FieldTransform> getUpdateTransformsList()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
List<FieldTransform>

getUpdateTransformsOrBuilder(int index)

public DocumentTransform.FieldTransformOrBuilder getUpdateTransformsOrBuilder(int index)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
index int
Returns
Type Description
DocumentTransform.FieldTransformOrBuilder

getUpdateTransformsOrBuilderList()

public List<? extends DocumentTransform.FieldTransformOrBuilder> getUpdateTransformsOrBuilderList()

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Returns
Type Description
List<? extends com.google.firestore.v1.DocumentTransform.FieldTransformOrBuilder>

hasCurrentDocument()

public boolean hasCurrentDocument()

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Returns
Type Description
boolean

Whether the currentDocument field is set.

hasDelete()

public boolean hasDelete()

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Returns
Type Description
boolean

Whether the delete field is set.

hasTransform()

public boolean hasTransform()

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Returns
Type Description
boolean

Whether the transform field is set.

hasUpdate()

public boolean hasUpdate()

A document to write.

.google.firestore.v1.Document update = 1;

Returns
Type Description
boolean

Whether the update field is set.

hasUpdateMask()

public boolean hasUpdateMask()

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Returns
Type Description
boolean

Whether the updateMask field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCurrentDocument(Precondition value)

public Write.Builder mergeCurrentDocument(Precondition value)

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Parameter
Name Description
value Precondition
Returns
Type Description
Write.Builder

mergeFrom(Write other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTransform(DocumentTransform value)

public Write.Builder mergeTransform(DocumentTransform value)

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Parameter
Name Description
value DocumentTransform
Returns
Type Description
Write.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdate(Document value)

public Write.Builder mergeUpdate(Document value)

A document to write.

.google.firestore.v1.Document update = 1;

Parameter
Name Description
value Document
Returns
Type Description
Write.Builder

mergeUpdateMask(DocumentMask value)

public Write.Builder mergeUpdateMask(DocumentMask value)

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Parameter
Name Description
value DocumentMask
Returns
Type Description
Write.Builder

removeUpdateTransforms(int index)

public Write.Builder removeUpdateTransforms(int index)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameter
Name Description
index int
Returns
Type Description
Write.Builder

setCurrentDocument(Precondition value)

public Write.Builder setCurrentDocument(Precondition value)

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Parameter
Name Description
value Precondition
Returns
Type Description
Write.Builder

setCurrentDocument(Precondition.Builder builderForValue)

public Write.Builder setCurrentDocument(Precondition.Builder builderForValue)

An optional precondition on the document.

The write will fail if this is set and not met by the target document.

.google.firestore.v1.Precondition current_document = 4;

Parameter
Name Description
builderForValue Precondition.Builder
Returns
Type Description
Write.Builder

setDelete(String value)

public Write.Builder setDelete(String value)

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Parameter
Name Description
value String

The delete to set.

Returns
Type Description
Write.Builder

This builder for chaining.

setDeleteBytes(ByteString value)

public Write.Builder setDeleteBytes(ByteString value)

A document name to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

string delete = 2;

Parameter
Name Description
value ByteString

The bytes for delete to set.

Returns
Type Description
Write.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTransform(DocumentTransform value)

public Write.Builder setTransform(DocumentTransform value)

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Parameter
Name Description
value DocumentTransform
Returns
Type Description
Write.Builder

setTransform(DocumentTransform.Builder builderForValue)

public Write.Builder setTransform(DocumentTransform.Builder builderForValue)

Applies a transformation to a document.

.google.firestore.v1.DocumentTransform transform = 6;

Parameter
Name Description
builderForValue DocumentTransform.Builder
Returns
Type Description
Write.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdate(Document value)

public Write.Builder setUpdate(Document value)

A document to write.

.google.firestore.v1.Document update = 1;

Parameter
Name Description
value Document
Returns
Type Description
Write.Builder

setUpdate(Document.Builder builderForValue)

public Write.Builder setUpdate(Document.Builder builderForValue)

A document to write.

.google.firestore.v1.Document update = 1;

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
Write.Builder

setUpdateMask(DocumentMask value)

public Write.Builder setUpdateMask(DocumentMask value)

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Parameter
Name Description
value DocumentMask
Returns
Type Description
Write.Builder

setUpdateMask(DocumentMask.Builder builderForValue)

public Write.Builder setUpdateMask(DocumentMask.Builder builderForValue)

The fields to update in this write.

This field can be set only when the operation is update. If the mask is not set for an update and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name.

.google.firestore.v1.DocumentMask update_mask = 3;

Parameter
Name Description
builderForValue DocumentMask.Builder
Returns
Type Description
Write.Builder

setUpdateTransforms(int index, DocumentTransform.FieldTransform value)

public Write.Builder setUpdateTransforms(int index, DocumentTransform.FieldTransform value)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameters
Name Description
index int
value DocumentTransform.FieldTransform
Returns
Type Description
Write.Builder

setUpdateTransforms(int index, DocumentTransform.FieldTransform.Builder builderForValue)

public Write.Builder setUpdateTransforms(int index, DocumentTransform.FieldTransform.Builder builderForValue)

The transforms to perform after update.

This field can be set only when the operation is update. If present, this write is equivalent to performing update and transform to the same document atomically and in order.

repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;

Parameters
Name Description
index int
builderForValue DocumentTransform.FieldTransform.Builder
Returns
Type Description
Write.Builder