Class UpdateDocumentRequest.Builder (3.28.0)

public static final class UpdateDocumentRequest.Builder extends GeneratedMessageV3.Builder<UpdateDocumentRequest.Builder> implements UpdateDocumentRequestOrBuilder

The request for Firestore.UpdateDocument.

Protobuf type google.firestore.v1.UpdateDocumentRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UpdateDocumentRequest build()
Returns
Type Description
UpdateDocumentRequest

buildPartial()

public UpdateDocumentRequest buildPartial()
Returns
Type Description
UpdateDocumentRequest

clear()

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

clearCurrentDocument()

public UpdateDocumentRequest.Builder clearCurrentDocument()

An optional precondition on the document. The request will fail if this is set and not met by the target document.

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

Returns
Type Description
UpdateDocumentRequest.Builder

clearDocument()

public UpdateDocumentRequest.Builder clearDocument()

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UpdateDocumentRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearMask()

public UpdateDocumentRequest.Builder clearMask()

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Returns
Type Description
UpdateDocumentRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUpdateMask()

public UpdateDocumentRequest.Builder clearUpdateMask()

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Returns
Type Description
UpdateDocumentRequest.Builder

clone()

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

getCurrentDocument()

public Precondition getCurrentDocument()

An optional precondition on the document. The request 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 request 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 request 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 UpdateDocumentRequest getDefaultInstanceForType()
Returns
Type Description
UpdateDocumentRequest

getDescriptorForType()

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

getDocument()

public Document getDocument()

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DocumentOrBuilder

getMask()

public DocumentMask getMask()

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Returns
Type Description
DocumentMask

The mask.

getMaskBuilder()

public DocumentMask.Builder getMaskBuilder()

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Returns
Type Description
DocumentMask.Builder

getMaskOrBuilder()

public DocumentMaskOrBuilder getMaskOrBuilder()

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Returns
Type Description
DocumentMaskOrBuilder

getUpdateMask()

public DocumentMask getUpdateMask()

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Returns
Type Description
DocumentMask

The updateMask.

getUpdateMaskBuilder()

public DocumentMask.Builder getUpdateMaskBuilder()

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Returns
Type Description
DocumentMask.Builder

getUpdateMaskOrBuilder()

public DocumentMaskOrBuilder getUpdateMaskOrBuilder()

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Returns
Type Description
DocumentMaskOrBuilder

hasCurrentDocument()

public boolean hasCurrentDocument()

An optional precondition on the document. The request 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.

hasDocument()

public boolean hasDocument()

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the document field is set.

hasMask()

public boolean hasMask()

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Returns
Type Description
boolean

Whether the mask field is set.

hasUpdateMask()

public boolean hasUpdateMask()

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

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 UpdateDocumentRequest.Builder mergeCurrentDocument(Precondition value)

An optional precondition on the document. The request 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
UpdateDocumentRequest.Builder

mergeDocument(Document value)

public UpdateDocumentRequest.Builder mergeDocument(Document value)

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Document
Returns
Type Description
UpdateDocumentRequest.Builder

mergeFrom(UpdateDocumentRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMask(DocumentMask value)

public UpdateDocumentRequest.Builder mergeMask(DocumentMask value)

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Parameter
Name Description
value DocumentMask
Returns
Type Description
UpdateDocumentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateMask(DocumentMask value)

public UpdateDocumentRequest.Builder mergeUpdateMask(DocumentMask value)

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Parameter
Name Description
value DocumentMask
Returns
Type Description
UpdateDocumentRequest.Builder

setCurrentDocument(Precondition value)

public UpdateDocumentRequest.Builder setCurrentDocument(Precondition value)

An optional precondition on the document. The request 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
UpdateDocumentRequest.Builder

setCurrentDocument(Precondition.Builder builderForValue)

public UpdateDocumentRequest.Builder setCurrentDocument(Precondition.Builder builderForValue)

An optional precondition on the document. The request 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
UpdateDocumentRequest.Builder

setDocument(Document value)

public UpdateDocumentRequest.Builder setDocument(Document value)

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Document
Returns
Type Description
UpdateDocumentRequest.Builder

setDocument(Document.Builder builderForValue)

public UpdateDocumentRequest.Builder setDocument(Document.Builder builderForValue)

Required. The updated document. Creates the document if it does not already exist.

.google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMask(DocumentMask value)

public UpdateDocumentRequest.Builder setMask(DocumentMask value)

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

Parameter
Name Description
value DocumentMask
Returns
Type Description
UpdateDocumentRequest.Builder

setMask(DocumentMask.Builder builderForValue)

public UpdateDocumentRequest.Builder setMask(DocumentMask.Builder builderForValue)

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

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

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateMask(DocumentMask value)

public UpdateDocumentRequest.Builder setUpdateMask(DocumentMask value)

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

Parameter
Name Description
value DocumentMask
Returns
Type Description
UpdateDocumentRequest.Builder

setUpdateMask(DocumentMask.Builder builderForValue)

public UpdateDocumentRequest.Builder setUpdateMask(DocumentMask.Builder builderForValue)

The fields to update. None of the field paths in the mask may contain a reserved name.

If the document exists on the server and has fields not referenced in 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.

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

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