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
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
Google\Cloud\Firestore\V1beta1\Document |
setDocument
Required. The updated document.
Creates the document if it does not already exist.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Firestore\V1beta1\Document
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
Google\Cloud\Firestore\V1beta1\DocumentMask
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
Google\Cloud\Firestore\V1beta1\DocumentMask
|
Returns | |
---|---|
Type | Description |
$this |
getCurrentDocument
An optional precondition on the document.
The request will fail if this is set and not met by the target document.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
Google\Cloud\Firestore\V1beta1\Precondition
|
Returns | |
---|---|
Type | Description |
$this |