@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Deletes a document. * * <p>Sample code: * * <pre><code> * try (FirestoreClient firestoreClient = FirestoreClient.create()) { * String formattedName = FirestoreClient.formatAnyPathName("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]"); * firestoreClient.deleteDocument(formattedName); * } * </code></pre> * * @param name The resource name of the Document to delete. In the format: * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteDocument(String name) { ANY_PATH_PATH_TEMPLATE.validate(name, "deleteDocument"); DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); deleteDocument(request); }
/** * Deletes a document. * * <p>Sample code: * * <pre><code> * try (FirestoreClient firestoreClient = FirestoreClient.create()) { * String formattedName = FirestoreClient.formatAnyPathName("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]"); * firestoreClient.deleteDocument(formattedName); * } * </code></pre> * * @param name The resource name of the Document to delete. In the format: * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteDocument(String name) { ANY_PATH_PATH_TEMPLATE.validate(name, "deleteDocument"); DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); deleteDocument(request); }