Cloud Firestore V1beta1 Client - Class CreateDocumentRequest (1.43.1)

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

The request for Firestore.CreateDocument.

Generated from protobuf message google.firestore.v1beta1.CreateDocumentRequest

Namespace

Google \ Cloud \ Firestore \ V1beta1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The parent resource. For example: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}

↳ collection_id string

Required. The collection ID, relative to parent, to list. For example: chatrooms.

↳ document_id string

The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service.

↳ document Google\Cloud\Firestore\V1beta1\Document

Required. The document to create. name must not be set.

↳ 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.

getParent

Required. The parent resource. For example: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}

Returns
Type Description
string

setParent

Required. The parent resource. For example: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}

Parameter
Name Description
var string
Returns
Type Description
$this

getCollectionId

Required. The collection ID, relative to parent, to list. For example: chatrooms.

Returns
Type Description
string

setCollectionId

Required. The collection ID, relative to parent, to list. For example: chatrooms.

Parameter
Name Description
var string
Returns
Type Description
$this

getDocumentId

The client-assigned document ID to use for this document.

Optional. If not specified, an ID will be assigned by the service.

Returns
Type Description
string

setDocumentId

The client-assigned document ID to use for this document.

Optional. If not specified, an ID will be assigned by the service.

Parameter
Name Description
var string
Returns
Type Description
$this

getDocument

Required. The document to create. name must not be set.

Returns
Type Description
Google\Cloud\Firestore\V1beta1\Document

setDocument

Required. The document to create. name must not be set.

Parameter
Name Description
var Google\Cloud\Firestore\V1beta1\Document
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