Cloud Firestore V1beta1 Client - Class UpdateDocumentRequest (1.37.7)

Reference documentation and code samples for the Cloud Firestore V1beta1 Client class UpdateDocumentRequest.

The request for Firestore.UpdateDocument.

Generated from protobuf message google.firestore.v1beta1.UpdateDocumentRequest

Namespace

Google \ Cloud \ Firestore \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ document Google\Cloud\Firestore\V1beta1\Document

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

↳ update_mask Google\Cloud\Firestore\V1beta1\DocumentMask

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.

↳ mask Google\Cloud\Firestore\V1beta1\DocumentMask

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.

↳ current_document Google\Cloud\Firestore\V1beta1\Precondition

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

getDocument

Required. The updated document.

Creates the document if it does not already exist.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\Document

setDocument

Required. The updated document.

Creates the document if it does not already exist.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\Document
Returns
TypeDescription
$this

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.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\DocumentMask

setUpdateMask

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.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\DocumentMask
Returns
TypeDescription
$this

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.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\DocumentMask

setMask

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.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\DocumentMask
Returns
TypeDescription
$this

getCurrentDocument

An optional precondition on the document.

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

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\Precondition

setCurrentDocument

An optional precondition on the document.

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

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\Precondition
Returns
TypeDescription
$this