public final class Write extends GeneratedMessageV3 implements WriteOrBuilder
A write on a document.
Protobuf type google.firestore.v1.Write
Static Fields
CURRENT_DOCUMENT_FIELD_NUMBER
public static final int CURRENT_DOCUMENT_FIELD_NUMBER
Field Value
DELETE_FIELD_NUMBER
public static final int DELETE_FIELD_NUMBER
Field Value
public static final int TRANSFORM_FIELD_NUMBER
Field Value
UPDATE_FIELD_NUMBER
public static final int UPDATE_FIELD_NUMBER
Field Value
UPDATE_MASK_FIELD_NUMBER
public static final int UPDATE_MASK_FIELD_NUMBER
Field Value
public static final int UPDATE_TRANSFORMS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Write getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Write.Builder newBuilder()
Returns
newBuilder(Write prototype)
public static Write.Builder newBuilder(Write prototype)
Parameter
Name | Description |
prototype | Write
|
Returns
public static Write parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Write parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Write parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Write parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Write parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Write parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Write parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Write parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Write parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Write parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Write parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Write parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Write> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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
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
getDefaultInstanceForType()
public Write getDefaultInstanceForType()
Returns
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
getOperationCase()
public Write.OperationCase getOperationCase()
Returns
getParserForType()
public Parser<Write> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
public DocumentTransform getTransform()
Applies a transformation to a document.
.google.firestore.v1.DocumentTransform transform = 6;
Returns
public DocumentTransformOrBuilder getTransformOrBuilder()
Applies a transformation to a document.
.google.firestore.v1.DocumentTransform transform = 6;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUpdate()
public Document getUpdate()
A document to write.
.google.firestore.v1.Document update = 1;
Returns
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
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
getUpdateOrBuilder()
public DocumentOrBuilder getUpdateOrBuilder()
A document to write.
.google.firestore.v1.Document update = 1;
Returns
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
Returns
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
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
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
Returns
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.
|
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.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Write.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Write.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Write.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions