Class Write (3.7.10)

public final class Write extends GeneratedMessageV3 implements WriteOrBuilder

A write on a document.

Protobuf type google.firestore.v1.Write

Implements

WriteOrBuilder

Static Fields

CURRENT_DOCUMENT_FIELD_NUMBER

public static final int CURRENT_DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

DELETE_FIELD_NUMBER

public static final int DELETE_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSFORM_FIELD_NUMBER

public static final int TRANSFORM_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_FIELD_NUMBER

public static final int UPDATE_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_MASK_FIELD_NUMBER

public static final int UPDATE_MASK_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TRANSFORMS_FIELD_NUMBER

public static final int UPDATE_TRANSFORMS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Write getDefaultInstance()
Returns
TypeDescription
Write

getDescriptor()

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

newBuilder()

public static Write.Builder newBuilder()
Returns
TypeDescription
Write.Builder

newBuilder(Write prototype)

public static Write.Builder newBuilder(Write prototype)
Parameter
NameDescription
prototypeWrite
Returns
TypeDescription
Write.Builder

parseDelimitedFrom(InputStream input)

public static Write parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Write parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Write parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Write parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Write parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Write parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Write parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Write parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Write parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Write parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Write parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Write parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Write
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Write> parser()
Returns
TypeDescription
Parser<Write>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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.

getOperationCase()

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

getParserForType()

public Parser<Write> getParserForType()
Returns
TypeDescription
Parser<Write>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTransform()

public DocumentTransform getTransform()

Applies a transformation to a document.

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

Returns
TypeDescription
DocumentTransform

The transform.

getTransformOrBuilder()

public DocumentTransformOrBuilder getTransformOrBuilder()

Applies a transformation to a document.

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

Returns
TypeDescription
DocumentTransformOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUpdate()

public Document getUpdate()

A document to write.

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

Returns
TypeDescription
Document

The update.

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.

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

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Write.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Write.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException