Class Write.Builder (3.0.21)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.firestore.v1.DocumentTransform.FieldTransform>
Returns
TypeDescription
Write.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Write.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueDocumentTransform.FieldTransform
Returns
TypeDescription
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
NameDescription
builderForValueDocumentTransform.FieldTransform.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueDocumentTransform.FieldTransform
Returns
TypeDescription
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
NameDescription
indexint
builderForValueDocumentTransform.FieldTransform.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
DocumentTransform.FieldTransform.Builder

build()

public Write build()
Returns
TypeDescription
Write

buildPartial()

public Write buildPartial()
Returns
TypeDescription
Write

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOperation()

public Write.Builder clearOperation()
Returns
TypeDescription
Write.Builder

clearTransform()

public Write.Builder clearTransform()

Applies a transformation to a document.

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

Returns
TypeDescription
Write.Builder

clearUpdate()

public Write.Builder clearUpdate()

A document to write.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Write.Builder

clone()

public Write.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
PreconditionOrBuilder

getDefaultInstanceForType()

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

The bytes for delete.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOperationCase()

public Write.OperationCase getOperationCase()
Returns
TypeDescription
Write.OperationCase

getTransform()

public DocumentTransform getTransform()

Applies a transformation to a document.

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

Returns
TypeDescription
DocumentTransform

The transform.

getTransformBuilder()

public DocumentTransform.Builder getTransformBuilder()

Applies a transformation to a document.

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

Returns
TypeDescription
DocumentTransform.Builder

getTransformOrBuilder()

public DocumentTransformOrBuilder getTransformOrBuilder()

Applies a transformation to a document.

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

Returns
TypeDescription
DocumentTransformOrBuilder

getUpdate()

public Document getUpdate()

A document to write.

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

Returns
TypeDescription
Document

The update.

getUpdateBuilder()

public Document.Builder getUpdateBuilder()

A document to write.

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

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

getUpdateOrBuilder()

public DocumentOrBuilder getUpdateOrBuilder()

A document to write.

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

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

Whether the delete field is set.

hasTransform()

public boolean hasTransform()

Applies a transformation to a document.

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

Returns
TypeDescription
boolean

Whether the transform field is set.

hasUpdate()

public boolean hasUpdate()

A document to write.

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

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

Whether the updateMask field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

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

mergeFrom(Write other)

public Write.Builder mergeFrom(Write other)
Parameter
NameDescription
otherWrite
Returns
TypeDescription
Write.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Write.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueDocumentTransform
Returns
TypeDescription
Write.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdate(Document value)

public Write.Builder mergeUpdate(Document value)

A document to write.

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

Parameter
NameDescription
valueDocument
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valuePrecondition
Returns
TypeDescription
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
NameDescription
builderForValuePrecondition.Builder
Returns
TypeDescription
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
NameDescription
valueString

The delete to set.

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

The bytes for delete to set.

Returns
TypeDescription
Write.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public Write.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueDocumentTransform
Returns
TypeDescription
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
NameDescription
builderForValueDocumentTransform.Builder
Returns
TypeDescription
Write.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdate(Document value)

public Write.Builder setUpdate(Document value)

A document to write.

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

Parameter
NameDescription
valueDocument
Returns
TypeDescription
Write.Builder

setUpdate(Document.Builder builderForValue)

public Write.Builder setUpdate(Document.Builder builderForValue)

A document to write.

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

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
builderForValueDocumentMask.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueDocumentTransform.FieldTransform
Returns
TypeDescription
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
NameDescription
indexint
builderForValueDocumentTransform.FieldTransform.Builder
Returns
TypeDescription
Write.Builder