Class UpdateDocumentRequest.Builder (3.2.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public UpdateDocumentRequest build()
Returns
TypeDescription
UpdateDocumentRequest

buildPartial()

public UpdateDocumentRequest buildPartial()
Returns
TypeDescription
UpdateDocumentRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

public UpdateDocumentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
UpdateDocumentRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public UpdateDocumentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
UpdateDocumentRequest.Builder

clone()

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

getDefaultInstanceForType()

public UpdateDocumentRequest getDefaultInstanceForType()
Returns
TypeDescription
UpdateDocumentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
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 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
NameDescription
valuePrecondition
Returns
TypeDescription
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
NameDescription
valueDocument
Returns
TypeDescription
UpdateDocumentRequest.Builder

mergeFrom(UpdateDocumentRequest other)

public UpdateDocumentRequest.Builder mergeFrom(UpdateDocumentRequest other)
Parameter
NameDescription
otherUpdateDocumentRequest
Returns
TypeDescription
UpdateDocumentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UpdateDocumentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
valuePrecondition
Returns
TypeDescription
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
NameDescription
builderForValuePrecondition.Builder
Returns
TypeDescription
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
NameDescription
valueDocument
Returns
TypeDescription
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
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
UpdateDocumentRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public UpdateDocumentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
builderForValueDocumentMask.Builder
Returns
TypeDescription
UpdateDocumentRequest.Builder

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

public UpdateDocumentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UpdateDocumentRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final UpdateDocumentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
builderForValueDocumentMask.Builder
Returns
TypeDescription
UpdateDocumentRequest.Builder