From 92224bcd52aa88cc6eb1da28747de0535d776a0f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 Jul 2020 21:14:56 -0700 Subject: [PATCH] chore!: enable gapicv2 (#188) * chore!: enable gapicv2 for firestore/v1beta1 API Committer: @miraleung PiperOrigin-RevId: 305537104 Source-Author: Google APIs Source-Date: Wed Apr 8 12:58:48 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 6f8350c0df231d7e742fa10dbf929f33047715c9 Source-Link: https://github.com/googleapis/googleapis/commit/6f8350c0df231d7e742fa10dbf929f33047715c9 * chore!: enable gapicv2 for firestore/admin/v1 API Committer: @miraleung There are the following breaking changes due to the collection_id discrepancy between [1] and [2] 1. https://github.com/googleapis/googleapis/blob/6f8350c0df231d7e742fa10dbf929f33047715c9/google/firestore/admin/v1/firestore_gapic.yaml#L24-L29 2. https://github.com/googleapis/googleapis/blob/6f8350c0df231d7e742fa10dbf929f33047715c9/google/firestore/admin/v1/field.proto#L39 ``` com.google.firestore.admin.v1.FieldName: Method 'public java.lang.String getCollectionId()' has been removed com.google.firestore.admin.v1.FieldName: Method 'public java.lang.String getFieldId()' has been removed com.google.firestore.admin.v1.FieldName$Builder: Method 'public java.lang.String getCollectionId()' has been removed com.google.firestore.admin.v1.FieldName$Builder: Method 'public java.lang.String getFieldId()' has been removed com.google.firestore.admin.v1.FieldName$Builder: Method 'public com.google.firestore.admin.v1.FieldName$Builder setCollectionId(java.lang.String)' has been removed com.google.firestore.admin.v1.FieldName$Builder: Method 'public com.google.firestore.admin.v1.FieldName$Builder setFieldId(java.lang.String)' has been removed com.google.firestore.admin.v1.IndexName: Method 'public java.lang.String getCollectionId()' has been removed com.google.firestore.admin.v1.IndexName: Method 'public java.lang.String getIndexId()' has been removed com.google.firestore.admin.v1.IndexName$Builder: Method 'public java.lang.String getCollectionId()' has been removed com.google.firestore.admin.v1.IndexName$Builder: Method 'public java.lang.String getIndexId()' has been removed com.google.firestore.admin.v1.IndexName$Builder: Method 'public com.google.firestore.admin.v1.IndexName$Builder setCollectionId(java.lang.String)' has been removed com.google.firestore.admin.v1.IndexName$Builder: Method 'public com.google.firestore.admin.v1.IndexName$Builder setIndexId(java.lang.String)' has been removed ``` PiperOrigin-RevId: 305561114 Source-Author: Google APIs Source-Date: Wed Apr 8 14:57:39 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 0d69cddaa23b556e7299f84ad55a02ec1cad55a9 Source-Link: https://github.com/googleapis/googleapis/commit/0d69cddaa23b556e7299f84ad55a02ec1cad55a9 * chore!: enable gapicv2 for firestore/v1 API Note that this contains breaking Java changes: com.google.cloud.firestore.v1.FirestoreClient: Method 'public void deleteDocument(com.google.firestore.v1.AnyPathName)' has been removed Committer: @miraleung PiperOrigin-RevId: 305561906 Source-Author: Google APIs Source-Date: Wed Apr 8 15:01:42 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: d741cd976975c745d0199987aff0e908b8352992 Source-Link: https://github.com/googleapis/googleapis/commit/d741cd976975c745d0199987aff0e908b8352992 * chore!: add clirr-ignored-differences.xml BREAKING CHANGE: various renames due to generator changes Renamed data model properties * Usage of collectionId replaced with collection * Usage of fieldId replaced with field * Usage of indexId replaced with index * Usage of ParentName replaced with CollectionGroupName * Usage of AnyPathName replaced with String Long running operation renames: * FirestoreAdminClient#createIndex -> FirestoreAdminClient#createIndexAsync * FirestoreAdminClient#exportDocuments -> FirestoreAdminClient#exportDocumentsAsync * FirestoreAdminClient#importDocuments -> FirestoreAdminClient#importDocumentsAsync * FirestoreAdminClient#updateField -> FirestoreAdminClient#updateFieldAsync Co-authored-by: BenWhitehead --- .../clirr-ignored-differences.xml | 98 ++ .../firestore/v1/FirestoreAdminClient.java | 915 +++++++++++------- .../firestore/v1/FirestoreAdminSettings.java | 142 ++- .../cloud/firestore/v1/FirestoreClient.java | 144 +-- .../firestore/v1/stub/FirestoreAdminStub.java | 64 +- .../v1/stub/FirestoreAdminStubSettings.java | 358 +++++-- .../v1/stub/FirestoreStubSettings.java | 6 +- .../v1/stub/GrpcFirestoreAdminStub.java | 277 ++++-- .../firestore/v1beta1/FirestoreClient.java | 895 ++++++++--------- .../firestore/v1beta1/FirestoreSettings.java | 112 +-- .../cloud/firestore/v1beta1/package-info.java | 5 +- .../firestore/v1beta1/stub/FirestoreStub.java | 50 +- .../v1beta1/stub/FirestoreStubSettings.java | 334 +++---- .../v1beta1/stub/GrpcFirestoreStub.java | 278 +++--- .../v1/FirestoreAdminClientTest.java | 293 +++--- .../firestore/v1/FirestoreClientTest.java | 137 ++- .../v1beta1/FirestoreClientTest.java | 569 ++++++----- .../clirr-ignored-differences.xml | 91 ++ .../admin/v1/CollectionGroupName.java | 211 ++++ .../google/firestore/admin/v1/FieldName.java | 80 +- .../google/firestore/admin/v1/IndexName.java | 80 +- synth.metadata | 12 +- 22 files changed, 2989 insertions(+), 2162 deletions(-) create mode 100644 proto-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java diff --git a/google-cloud-firestore/clirr-ignored-differences.xml b/google-cloud-firestore/clirr-ignored-differences.xml index 84adffe46..703537fb5 100644 --- a/google-cloud-firestore/clirr-ignored-differences.xml +++ b/google-cloud-firestore/clirr-ignored-differences.xml @@ -36,4 +36,102 @@ *(com.google.cloud.firestore.FirestoreImpl, *) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation createIndex(com.google.firestore.admin.v1.ParentName, com.google.firestore.admin.v1.Index) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation createIndex(java.lang.String, com.google.firestore.admin.v1.Index) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation createIndex(com.google.firestore.admin.v1.CreateIndexRequest) + + + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation exportDocuments(com.google.firestore.admin.v1.DatabaseName) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation exportDocuments(java.lang.String) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation exportDocuments(com.google.firestore.admin.v1.ExportDocumentsRequest) + + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation importDocuments(com.google.firestore.admin.v1.DatabaseName) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation importDocuments(java.lang.String) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation importDocuments(com.google.firestore.admin.v1.ImportDocumentsRequest) + + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation updateField(com.google.firestore.admin.v1.Field) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation updateField(com.google.firestore.admin.v1.UpdateFieldRequest) + + + 7002 + com/google/cloud/firestore/v1/FirestoreAdminClient + com.google.longrunning.Operation updateField(com.google.firestore.admin.v1.UpdateFieldRequest) + + + + + 7002 + com/google/cloud/firestore/v1/FirestoreClient + void deleteDocument(com.google.firestore.v1.AnyPathName) + + + 7002 + com/google/cloud/firestore/v1beta1/FirestoreClient + void deleteDocument(com.google.firestore.v1beta1.AnyPathName) + + + + + 7005 + com/google/cloud/firestore/v1/FirestoreAdminClient* + com.google.cloud.firestore.v1.FirestoreAdminClient$List*PagedResponse list*(com.google.firestore.admin.v1.ParentName) + com.google.cloud.firestore.v1.FirestoreAdminClient$List*PagedResponse list*(com.google.firestore.admin.v1.CollectionGroupName) + + diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java index 54d21bcb5..d06056bbf 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java @@ -20,32 +20,40 @@ import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.firestore.v1.stub.FirestoreAdminStub; import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.firestore.admin.v1.CollectionGroupName; import com.google.firestore.admin.v1.CreateIndexRequest; import com.google.firestore.admin.v1.DatabaseName; import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsMetadata; import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.ExportDocumentsResponse; import com.google.firestore.admin.v1.Field; import com.google.firestore.admin.v1.FieldName; +import com.google.firestore.admin.v1.FieldOperationMetadata; import com.google.firestore.admin.v1.GetFieldRequest; import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsMetadata; import com.google.firestore.admin.v1.ImportDocumentsRequest; import com.google.firestore.admin.v1.Index; import com.google.firestore.admin.v1.IndexName; +import com.google.firestore.admin.v1.IndexOperationMetadata; import com.google.firestore.admin.v1.ListFieldsRequest; import com.google.firestore.admin.v1.ListFieldsResponse; import com.google.firestore.admin.v1.ListIndexesRequest; import com.google.firestore.admin.v1.ListIndexesResponse; -import com.google.firestore.admin.v1.ParentName; import com.google.firestore.admin.v1.UpdateFieldRequest; import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -63,9 +71,8 @@ *
  * 
  * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
- *   Index index = Index.newBuilder().build();
- *   Operation response = firestoreAdminClient.createIndex(parent, index);
+ *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+ *   firestoreAdminClient.deleteIndex(name);
  * }
  * 
  * 
@@ -125,6 +132,7 @@ public class FirestoreAdminClient implements BackgroundResource { private final FirestoreAdminSettings settings; private final FirestoreAdminStub stub; + private final OperationsClient operationsClient; /** Constructs an instance of FirestoreAdminClient with default settings. */ public static final FirestoreAdminClient create() throws IOException { @@ -157,12 +165,14 @@ public static final FirestoreAdminClient create(FirestoreAdminStub stub) { protected FirestoreAdminClient(FirestoreAdminSettings settings) throws IOException { this.settings = settings; this.stub = ((FirestoreAdminStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected FirestoreAdminClient(FirestoreAdminStub stub) { this.settings = null; this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } public final FirestoreAdminSettings getSettings() { @@ -174,6 +184,249 @@ public FirestoreAdminStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+   *   firestoreAdminClient.deleteIndex(name);
+   * }
+   * 
+ * + * @param name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIndex(IndexName name) { + DeleteIndexRequest request = + DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+   *   firestoreAdminClient.deleteIndex(name.toString());
+   * }
+   * 
+ * + * @param name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIndex(String name) { + DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build(); + deleteIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   firestoreAdminClient.deleteIndex(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIndex(DeleteIndexRequest request) { + deleteIndexCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a composite index. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = firestoreAdminClient.deleteIndexCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteIndexCallable() { + return stub.deleteIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   Field response = firestoreAdminClient.updateFieldAsync(field).get();
+   * }
+   * 
+ * + * @param field Required. The field to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture updateFieldAsync(Field field) { + UpdateFieldRequest request = UpdateFieldRequest.newBuilder().setField(field).build(); + return updateFieldAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
+   *     .setField(field)
+   *     .build();
+   *   Field response = firestoreAdminClient.updateFieldAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture updateFieldAsync( + UpdateFieldRequest request) { + return updateFieldOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
+   *     .setField(field)
+   *     .build();
+   *   OperationFuture<Field, FieldOperationMetadata> future = firestoreAdminClient.updateFieldOperationCallable().futureCall(request);
+   *   // Do something
+   *   Field response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + updateFieldOperationCallable() { + return stub.updateFieldOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a field configuration. Currently, field updates apply only to single field index + * configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should + * provide a field mask to avoid changing any configuration that the caller isn't aware of. The + * field mask should be specified as: `{ paths: "index_config" }`. + * + *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *

To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   Field field = Field.newBuilder().build();
+   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
+   *     .setField(field)
+   *     .build();
+   *   ApiFuture<Operation> future = firestoreAdminClient.updateFieldCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateFieldCallable() { + return stub.updateFieldCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a composite index. This returns a @@ -185,9 +438,9 @@ public FirestoreAdminStub getStub() { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   Index index = Index.newBuilder().build();
-   *   Operation response = firestoreAdminClient.createIndex(parent, index);
+   *   Index response = firestoreAdminClient.createIndexAsync(parent, index).get();
    * }
    * 
* @@ -196,13 +449,16 @@ public FirestoreAdminStub getStub() { * @param index Required. The composite index to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation createIndex(ParentName parent, Index index) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createIndexAsync( + CollectionGroupName parent, Index index) { CreateIndexRequest request = CreateIndexRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setIndex(index) .build(); - return createIndex(request); + return createIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -216,9 +472,9 @@ public final Operation createIndex(ParentName parent, Index index) { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   Index index = Index.newBuilder().build();
-   *   Operation response = firestoreAdminClient.createIndex(parent.toString(), index);
+   *   Index response = firestoreAdminClient.createIndexAsync(parent.toString(), index).get();
    * }
    * 
* @@ -227,10 +483,13 @@ public final Operation createIndex(ParentName parent, Index index) { * @param index Required. The composite index to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation createIndex(String parent, Index index) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createIndexAsync( + String parent, Index index) { CreateIndexRequest request = CreateIndexRequest.newBuilder().setParent(parent).setIndex(index).build(); - return createIndex(request); + return createIndexAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -244,21 +503,53 @@ public final Operation createIndex(String parent, Index index) { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   Index index = Index.newBuilder().build();
    *   CreateIndexRequest request = CreateIndexRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .setIndex(index)
    *     .build();
-   *   Operation response = firestoreAdminClient.createIndex(request);
+   *   Index response = firestoreAdminClient.createIndexAsync(request).get();
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation createIndex(CreateIndexRequest request) { - return createIndexCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createIndexAsync( + CreateIndexRequest request) { + return createIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be used to track the + * status of the creation. The metadata for the operation will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   Index index = Index.newBuilder().build();
+   *   CreateIndexRequest request = CreateIndexRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setIndex(index)
+   *     .build();
+   *   OperationFuture<Index, IndexOperationMetadata> future = firestoreAdminClient.createIndexOperationCallable().futureCall(request);
+   *   // Do something
+   *   Index response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + createIndexOperationCallable() { + return stub.createIndexOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -272,7 +563,7 @@ public final Operation createIndex(CreateIndexRequest request) { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   Index index = Index.newBuilder().build();
    *   CreateIndexRequest request = CreateIndexRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -296,7 +587,7 @@ public final UnaryCallable createIndexCallable()
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   for (Index element : firestoreAdminClient.listIndexes(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -307,7 +598,7 @@ public final UnaryCallable createIndexCallable()
    *     `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListIndexesPagedResponse listIndexes(ParentName parent) {
+  public final ListIndexesPagedResponse listIndexes(CollectionGroupName parent) {
     ListIndexesRequest request =
         ListIndexesRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -323,7 +614,7 @@ public final ListIndexesPagedResponse listIndexes(ParentName parent) {
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   for (Index element : firestoreAdminClient.listIndexes(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -347,7 +638,7 @@ public final ListIndexesPagedResponse listIndexes(String parent) {
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -372,7 +663,7 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) {
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -397,7 +688,7 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) {
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
    *   ListIndexesRequest request = ListIndexesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -428,7 +719,7 @@ public final UnaryCallable listIndexesC
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
    *   Index response = firestoreAdminClient.getIndex(name);
    * }
    * 
@@ -451,7 +742,7 @@ public final Index getIndex(IndexName name) { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
    *   Index response = firestoreAdminClient.getIndex(name.toString());
    * }
    * 
@@ -473,7 +764,7 @@ public final Index getIndex(String name) { * *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
    *   GetIndexRequest request = GetIndexRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -496,7 +787,7 @@ public final Index getIndex(GetIndexRequest request) {
    *
    * 

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
    *   GetIndexRequest request = GetIndexRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -512,194 +803,246 @@ public final UnaryCallable getIndexCallable() {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Deletes a composite index.
+   * Gets the metadata and configuration for a Field.
    *
    * 

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
-   *   firestoreAdminClient.deleteIndex(name);
+   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+   *   Field response = firestoreAdminClient.getField(name);
    * }
    * 
* * @param name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIndex(IndexName name) { - DeleteIndexRequest request = - DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteIndex(request); + public final Field getField(FieldName name) { + GetFieldRequest request = + GetFieldRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getField(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a composite index. + * Gets the metadata and configuration for a Field. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
-   *   firestoreAdminClient.deleteIndex(name.toString());
+   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+   *   Field response = firestoreAdminClient.getField(name.toString());
    * }
    * 
* * @param name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIndex(String name) { - DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build(); - deleteIndex(request); + public final Field getField(String name) { + GetFieldRequest request = GetFieldRequest.newBuilder().setName(name).build(); + return getField(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a composite index. + * Gets the metadata and configuration for a Field. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
-   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+   *   GetFieldRequest request = GetFieldRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
-   *   firestoreAdminClient.deleteIndex(request);
+   *   Field response = firestoreAdminClient.getField(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIndex(DeleteIndexRequest request) { - deleteIndexCallable().call(request); + public final Field getField(GetFieldRequest request) { + return getFieldCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a composite index. + * Gets the metadata and configuration for a Field. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
-   *   DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
+   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+   *   GetFieldRequest request = GetFieldRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<Void> future = firestoreAdminClient.deleteIndexCallable().futureCall(request);
+   *   ApiFuture<Field> future = firestoreAdminClient.getFieldCallable().futureCall(request);
    *   // Do something
-   *   future.get();
+   *   Field response = future.get();
    * }
    * 
*/ - public final UnaryCallable deleteIndexCallable() { - return stub.deleteIndexCallable(); + public final UnaryCallable getFieldCallable() { + return stub.getFieldCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports documents into Google Cloud Firestore. Existing documents with the same name are - * overwritten. The import occurs in the background and its progress can be monitored and managed - * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud Firestore. + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   Operation response = firestoreAdminClient.importDocuments(name);
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   for (Field element : firestoreAdminClient.listFields(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. + * @param parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation importDocuments(DatabaseName name) { - ImportDocumentsRequest request = - ImportDocumentsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return importDocuments(request); + public final ListFieldsPagedResponse listFields(CollectionGroupName parent) { + ListFieldsRequest request = + ListFieldsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listFields(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports documents into Google Cloud Firestore. Existing documents with the same name are - * overwritten. The import occurs in the background and its progress can be monitored and managed - * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud Firestore. + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   Operation response = firestoreAdminClient.importDocuments(name.toString());
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   for (Field element : firestoreAdminClient.listFields(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* - * @param name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. + * @param parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation importDocuments(String name) { - ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder().setName(name).build(); - return importDocuments(request); + public final ListFieldsPagedResponse listFields(String parent) { + ListFieldsRequest request = ListFieldsRequest.newBuilder().setParent(parent).build(); + return listFields(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports documents into Google Cloud Firestore. Existing documents with the same name are - * overwritten. The import occurs in the background and its progress can be monitored and managed - * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud Firestore. + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
-   *     .setName(name.toString())
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(parent.toString())
    *     .build();
-   *   Operation response = firestoreAdminClient.importDocuments(request);
+   *   for (Field element : firestoreAdminClient.listFields(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation importDocuments(ImportDocumentsRequest request) { - return importDocumentsCallable().call(request); + public final ListFieldsPagedResponse listFields(ListFieldsRequest request) { + return listFieldsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports documents into Google Cloud Firestore. Existing documents with the same name are - * overwritten. The import occurs in the background and its progress can be monitored and managed - * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is - * possible that a subset of the data has already been imported to Cloud Firestore. + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
-   *     .setName(name.toString())
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(parent.toString())
    *     .build();
-   *   ApiFuture<Operation> future = firestoreAdminClient.importDocumentsCallable().futureCall(request);
+   *   ApiFuture<ListFieldsPagedResponse> future = firestoreAdminClient.listFieldsPagedCallable().futureCall(request);
    *   // Do something
-   *   Operation response = future.get();
+   *   for (Field element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
*/ - public final UnaryCallable importDocumentsCallable() { - return stub.importDocumentsCallable(); + public final UnaryCallable listFieldsPagedCallable() { + return stub.listFieldsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the field configuration and metadata for this database. + * + *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the + * filter set to `indexConfig.usesAncestorConfig:false`. + * + *

Sample code: + * + *


+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListFieldsResponse response = firestoreAdminClient.listFieldsCallable().call(request);
+   *     for (Field element : response.getFieldsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listFieldsCallable() { + return stub.listFieldsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -716,7 +1059,7 @@ public final UnaryCallable importDocumentsCal *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
    *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   Operation response = firestoreAdminClient.exportDocuments(name);
+   *   ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(name).get();
    * }
    * 
* @@ -724,10 +1067,13 @@ public final UnaryCallable importDocumentsCal * `projects/{project_id}/databases/{database_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation exportDocuments(DatabaseName name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportDocumentsAsync(DatabaseName name) { ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return exportDocuments(request); + return exportDocumentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -744,7 +1090,7 @@ public final Operation exportDocuments(DatabaseName name) { *

    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
    *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
-   *   Operation response = firestoreAdminClient.exportDocuments(name.toString());
+   *   ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(name.toString()).get();
    * }
    * 
* @@ -752,9 +1098,12 @@ public final Operation exportDocuments(DatabaseName name) { * `projects/{project_id}/databases/{database_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation exportDocuments(String name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportDocumentsAsync(String name) { ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder().setName(name).build(); - return exportDocuments(request); + return exportDocumentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -774,15 +1123,18 @@ public final Operation exportDocuments(String name) { * ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder() * .setName(name.toString()) * .build(); - * Operation response = firestoreAdminClient.exportDocuments(request); + * ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(request).get(); * } *
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation exportDocuments(ExportDocumentsRequest request) { - return exportDocumentsCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportDocumentsAsync(ExportDocumentsRequest request) { + return exportDocumentsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -802,360 +1154,181 @@ public final Operation exportDocuments(ExportDocumentsRequest request) { * ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder() * .setName(name.toString()) * .build(); - * ApiFuture<Operation> future = firestoreAdminClient.exportDocumentsCallable().futureCall(request); + * OperationFuture<ExportDocumentsResponse, ExportDocumentsMetadata> future = firestoreAdminClient.exportDocumentsOperationCallable().futureCall(request); * // Do something - * Operation response = future.get(); + * ExportDocumentsResponse response = future.get(); * } *
*/ - public final UnaryCallable exportDocumentsCallable() { - return stub.exportDocumentsCallable(); + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata> + exportDocumentsOperationCallable() { + return stub.exportDocumentsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the metadata and configuration for a Field. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
-   *   Field response = firestoreAdminClient.getField(name);
-   * }
-   * 
- * - * @param name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Field getField(FieldName name) { - GetFieldRequest request = - GetFieldRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getField(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the metadata and configuration for a Field. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
-   *   Field response = firestoreAdminClient.getField(name.toString());
-   * }
-   * 
- * - * @param name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Field getField(String name) { - GetFieldRequest request = GetFieldRequest.newBuilder().setName(name).build(); - return getField(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the metadata and configuration for a Field. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
-   *   GetFieldRequest request = GetFieldRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   Field response = firestoreAdminClient.getField(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Field getField(GetFieldRequest request) { - return getFieldCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the metadata and configuration for a Field. + * Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage + * system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the + * export. The export occurs in the background and its progress can be monitored and managed via + * the Operation resource that is created. The output of an export may only be used once the + * associated operation is done. If an export operation is cancelled before completion it may + * leave partial data behind in Google Cloud Storage. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
-   *   GetFieldRequest request = GetFieldRequest.newBuilder()
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<Field> future = firestoreAdminClient.getFieldCallable().futureCall(request);
+   *   ApiFuture<Operation> future = firestoreAdminClient.exportDocumentsCallable().futureCall(request);
    *   // Do something
-   *   Field response = future.get();
+   *   Operation response = future.get();
    * }
    * 
*/ - public final UnaryCallable getFieldCallable() { - return stub.getFieldCallable(); + public final UnaryCallable exportDocumentsCallable() { + return stub.exportDocumentsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the field configuration and metadata for this database. - * - *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the - * filter set to `indexConfig.usesAncestorConfig:false`. + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-   *   for (Field element : firestoreAdminClient.listFields(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   firestoreAdminClient.importDocumentsAsync(name).get();
    * }
    * 
* - * @param parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param name Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFieldsPagedResponse listFields(ParentName parent) { - ListFieldsRequest request = - ListFieldsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return listFields(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture importDocumentsAsync( + DatabaseName name) { + ImportDocumentsRequest request = + ImportDocumentsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return importDocumentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the field configuration and metadata for this database. - * - *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the - * filter set to `indexConfig.usesAncestorConfig:false`. + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-   *   for (Field element : firestoreAdminClient.listFields(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   firestoreAdminClient.importDocumentsAsync(name.toString()).get();
    * }
    * 
* - * @param parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @param name Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFieldsPagedResponse listFields(String parent) { - ListFieldsRequest request = ListFieldsRequest.newBuilder().setParent(parent).build(); - return listFields(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture importDocumentsAsync(String name) { + ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder().setName(name).build(); + return importDocumentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the field configuration and metadata for this database. - * - *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the - * filter set to `indexConfig.usesAncestorConfig:false`. + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   for (Field element : firestoreAdminClient.listFields(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   firestoreAdminClient.importDocumentsAsync(request).get();
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListFieldsPagedResponse listFields(ListFieldsRequest request) { - return listFieldsPagedCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture importDocumentsAsync( + ImportDocumentsRequest request) { + return importDocumentsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists the field configuration and metadata for this database. - * - *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the - * filter set to `indexConfig.usesAncestorConfig:false`. + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<ListFieldsPagedResponse> future = firestoreAdminClient.listFieldsPagedCallable().futureCall(request);
+   *   OperationFuture<Empty, ImportDocumentsMetadata> future = firestoreAdminClient.importDocumentsOperationCallable().futureCall(request);
    *   // Do something
-   *   for (Field element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable listFieldsPagedCallable() { - return stub.listFieldsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists the field configuration and metadata for this database. - * - *

Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the - * filter set to `indexConfig.usesAncestorConfig:false`. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-   *   ListFieldsRequest request = ListFieldsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListFieldsResponse response = firestoreAdminClient.listFieldsCallable().call(request);
-   *     for (Field element : response.getFieldsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable listFieldsCallable() { - return stub.listFieldsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a field configuration. Currently, field updates apply only to single field index - * configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should - * provide a field mask to avoid changing any configuration that the caller isn't aware of. The - * field mask should be specified as: `{ paths: "index_config" }`. - * - *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *

To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   Field field = Field.newBuilder().build();
-   *   Operation response = firestoreAdminClient.updateField(field);
-   * }
-   * 
- * - * @param field Required. The field to be updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Operation updateField(Field field) { - UpdateFieldRequest request = UpdateFieldRequest.newBuilder().setField(field).build(); - return updateField(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a field configuration. Currently, field updates apply only to single field index - * configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should - * provide a field mask to avoid changing any configuration that the caller isn't aware of. The - * field mask should be specified as: `{ paths: "index_config" }`. - * - *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *

To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *

Sample code: - * - *


-   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   Field field = Field.newBuilder().build();
-   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
-   *     .setField(field)
-   *     .build();
-   *   Operation response = firestoreAdminClient.updateField(request);
+   *   future.get();
    * }
    * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation updateField(UpdateFieldRequest request) { - return updateFieldCallable().call(request); + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + importDocumentsOperationCallable() { + return stub.importDocumentsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a field configuration. Currently, field updates apply only to single field index - * configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] should - * provide a field mask to avoid changing any configuration that the caller isn't aware of. The - * field mask should be specified as: `{ paths: "index_config" }`. - * - *

This call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *

To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * Imports documents into Google Cloud Firestore. Existing documents with the same name are + * overwritten. The import occurs in the background and its progress can be monitored and managed + * via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is + * possible that a subset of the data has already been imported to Cloud Firestore. * *

Sample code: * *


    * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
-   *   Field field = Field.newBuilder().build();
-   *   UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
-   *     .setField(field)
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
+   *     .setName(name.toString())
    *     .build();
-   *   ApiFuture<Operation> future = firestoreAdminClient.updateFieldCallable().futureCall(request);
+   *   ApiFuture<Operation> future = firestoreAdminClient.importDocumentsCallable().futureCall(request);
    *   // Do something
-   *   Operation response = future.get();
+   *   future.get();
    * }
    * 
*/ - public final UnaryCallable updateFieldCallable() { - return stub.updateFieldCallable(); + public final UnaryCallable importDocumentsCallable() { + return stub.importDocumentsCallable(); } @Override diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java index f06f5e6ed..0f295bac1 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java @@ -26,18 +26,24 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings; import com.google.firestore.admin.v1.CreateIndexRequest; import com.google.firestore.admin.v1.DeleteIndexRequest; +import com.google.firestore.admin.v1.ExportDocumentsMetadata; import com.google.firestore.admin.v1.ExportDocumentsRequest; +import com.google.firestore.admin.v1.ExportDocumentsResponse; import com.google.firestore.admin.v1.Field; +import com.google.firestore.admin.v1.FieldOperationMetadata; import com.google.firestore.admin.v1.GetFieldRequest; import com.google.firestore.admin.v1.GetIndexRequest; +import com.google.firestore.admin.v1.ImportDocumentsMetadata; import com.google.firestore.admin.v1.ImportDocumentsRequest; import com.google.firestore.admin.v1.Index; +import com.google.firestore.admin.v1.IndexOperationMetadata; import com.google.firestore.admin.v1.ListFieldsRequest; import com.google.firestore.admin.v1.ListFieldsResponse; import com.google.firestore.admin.v1.ListIndexesRequest; @@ -64,16 +70,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createIndex to 30 seconds: + *

For example, to set the total timeout of deleteIndex to 30 seconds: * *

  * 
  * FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
  *     FirestoreAdminSettings.newBuilder();
  * firestoreAdminSettingsBuilder
- *     .createIndexSettings()
+ *     .deleteIndexSettings()
  *     .setRetrySettings(
- *         firestoreAdminSettingsBuilder.createIndexSettings().getRetrySettings().toBuilder()
+ *         firestoreAdminSettingsBuilder.deleteIndexSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * FirestoreAdminSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
@@ -83,11 +89,37 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class FirestoreAdminSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteIndex. */
+  public UnaryCallSettings deleteIndexSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).deleteIndexSettings();
+  }
+
+  /** Returns the object with the settings used for calls to updateField. */
+  public UnaryCallSettings updateFieldSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).updateFieldSettings();
+  }
+
+  /** Returns the object with the settings used for calls to updateField. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      updateFieldOperationSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).updateFieldOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to createIndex. */
   public UnaryCallSettings createIndexSettings() {
     return ((FirestoreAdminStubSettings) getStubSettings()).createIndexSettings();
   }
 
+  /** Returns the object with the settings used for calls to createIndex. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      createIndexOperationSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).createIndexOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to listIndexes. */
   public PagedCallSettings
       listIndexesSettings() {
@@ -99,14 +131,15 @@ public UnaryCallSettings getIndexSettings() {
     return ((FirestoreAdminStubSettings) getStubSettings()).getIndexSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteIndex. */
-  public UnaryCallSettings deleteIndexSettings() {
-    return ((FirestoreAdminStubSettings) getStubSettings()).deleteIndexSettings();
+  /** Returns the object with the settings used for calls to getField. */
+  public UnaryCallSettings getFieldSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).getFieldSettings();
   }
 
-  /** Returns the object with the settings used for calls to importDocuments. */
-  public UnaryCallSettings importDocumentsSettings() {
-    return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsSettings();
+  /** Returns the object with the settings used for calls to listFields. */
+  public PagedCallSettings
+      listFieldsSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).listFieldsSettings();
   }
 
   /** Returns the object with the settings used for calls to exportDocuments. */
@@ -114,20 +147,26 @@ public UnaryCallSettings exportDocumentsSetti
     return ((FirestoreAdminStubSettings) getStubSettings()).exportDocumentsSettings();
   }
 
-  /** Returns the object with the settings used for calls to getField. */
-  public UnaryCallSettings getFieldSettings() {
-    return ((FirestoreAdminStubSettings) getStubSettings()).getFieldSettings();
+  /** Returns the object with the settings used for calls to exportDocuments. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings<
+          ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+      exportDocumentsOperationSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).exportDocumentsOperationSettings();
   }
 
-  /** Returns the object with the settings used for calls to listFields. */
-  public PagedCallSettings
-      listFieldsSettings() {
-    return ((FirestoreAdminStubSettings) getStubSettings()).listFieldsSettings();
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public UnaryCallSettings importDocumentsSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsSettings();
   }
 
-  /** Returns the object with the settings used for calls to updateField. */
-  public UnaryCallSettings updateFieldSettings() {
-    return ((FirestoreAdminStubSettings) getStubSettings()).updateFieldSettings();
+  /** Returns the object with the settings used for calls to importDocuments. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      importDocumentsOperationSettings() {
+    return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsOperationSettings();
   }
 
   public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub)
@@ -227,11 +266,37 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteIndex. */
+    public UnaryCallSettings.Builder deleteIndexSettings() {
+      return getStubSettingsBuilder().deleteIndexSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to updateField. */
+    public UnaryCallSettings.Builder updateFieldSettings() {
+      return getStubSettingsBuilder().updateFieldSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to updateField. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        updateFieldOperationSettings() {
+      return getStubSettingsBuilder().updateFieldOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to createIndex. */
     public UnaryCallSettings.Builder createIndexSettings() {
       return getStubSettingsBuilder().createIndexSettings();
     }
 
+    /** Returns the builder for the settings used for calls to createIndex. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        createIndexOperationSettings() {
+      return getStubSettingsBuilder().createIndexOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listIndexes. */
     public PagedCallSettings.Builder<
             ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>
@@ -244,14 +309,15 @@ public UnaryCallSettings.Builder getIndexSettings() {
       return getStubSettingsBuilder().getIndexSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteIndex. */
-    public UnaryCallSettings.Builder deleteIndexSettings() {
-      return getStubSettingsBuilder().deleteIndexSettings();
+    /** Returns the builder for the settings used for calls to getField. */
+    public UnaryCallSettings.Builder getFieldSettings() {
+      return getStubSettingsBuilder().getFieldSettings();
     }
 
-    /** Returns the builder for the settings used for calls to importDocuments. */
-    public UnaryCallSettings.Builder importDocumentsSettings() {
-      return getStubSettingsBuilder().importDocumentsSettings();
+    /** Returns the builder for the settings used for calls to listFields. */
+    public PagedCallSettings.Builder
+        listFieldsSettings() {
+      return getStubSettingsBuilder().listFieldsSettings();
     }
 
     /** Returns the builder for the settings used for calls to exportDocuments. */
@@ -259,20 +325,26 @@ public UnaryCallSettings.Builder exportDocume
       return getStubSettingsBuilder().exportDocumentsSettings();
     }
 
-    /** Returns the builder for the settings used for calls to getField. */
-    public UnaryCallSettings.Builder getFieldSettings() {
-      return getStubSettingsBuilder().getFieldSettings();
+    /** Returns the builder for the settings used for calls to exportDocuments. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder<
+            ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+        exportDocumentsOperationSettings() {
+      return getStubSettingsBuilder().exportDocumentsOperationSettings();
     }
 
-    /** Returns the builder for the settings used for calls to listFields. */
-    public PagedCallSettings.Builder
-        listFieldsSettings() {
-      return getStubSettingsBuilder().listFieldsSettings();
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    public UnaryCallSettings.Builder importDocumentsSettings() {
+      return getStubSettingsBuilder().importDocumentsSettings();
     }
 
-    /** Returns the builder for the settings used for calls to updateField. */
-    public UnaryCallSettings.Builder updateFieldSettings() {
-      return getStubSettingsBuilder().updateFieldSettings();
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        importDocumentsOperationSettings() {
+      return getStubSettingsBuilder().importDocumentsOperationSettings();
     }
 
     @Override
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
index cb3a43c77..705c9d537 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreClient.java
@@ -30,7 +30,6 @@
 import com.google.cloud.firestore.v1.stub.FirestoreStub;
 import com.google.cloud.firestore.v1.stub.FirestoreStubSettings;
 import com.google.common.util.concurrent.MoreExecutors;
-import com.google.firestore.v1.AnyPathName;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
@@ -194,9 +193,9 @@ public FirestoreStub getStub() {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String name = "";
    *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *     .setName(name)
    *     .build();
    *   Document response = firestoreClient.getDocument(request);
    * }
@@ -217,9 +216,9 @@ public final Document getDocument(GetDocumentRequest request) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String name = "";
    *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *     .setName(name)
    *     .build();
    *   ApiFuture<Document> future = firestoreClient.getDocumentCallable().futureCall(request);
    *   // Do something
@@ -239,10 +238,10 @@ public final UnaryCallable getDocumentCallable() {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   String collectionId = "";
    *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .setCollectionId(collectionId)
    *     .build();
    *   for (Document element : firestoreClient.listDocuments(request).iterateAll()) {
@@ -266,10 +265,10 @@ public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest reque
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   String collectionId = "";
    *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .setCollectionId(collectionId)
    *     .build();
    *   ApiFuture<ListDocumentsPagedResponse> future = firestoreClient.listDocumentsPagedCallable().futureCall(request);
@@ -293,10 +292,10 @@ public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest reque
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   String collectionId = "";
    *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .setCollectionId(collectionId)
    *     .build();
    *   while (true) {
@@ -326,14 +325,12 @@ public final UnaryCallable listDocu
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   String collectionId = "";
-   *   String documentId = "";
    *   Document document = Document.newBuilder().build();
    *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .setCollectionId(collectionId)
-   *     .setDocumentId(documentId)
    *     .setDocument(document)
    *     .build();
    *   Document response = firestoreClient.createDocument(request);
@@ -355,14 +352,12 @@ public final Document createDocument(CreateDocumentRequest request) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   String collectionId = "";
-   *   String documentId = "";
    *   Document document = Document.newBuilder().build();
    *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .setCollectionId(collectionId)
-   *     .setDocumentId(documentId)
    *     .setDocument(document)
    *     .build();
    *   ApiFuture<Document> future = firestoreClient.createDocumentCallable().futureCall(request);
@@ -413,10 +408,8 @@ public final Document updateDocument(Document document, DocumentMask updateMask)
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
    *   Document document = Document.newBuilder().build();
-   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
    *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
    *     .setDocument(document)
-   *     .setUpdateMask(updateMask)
    *     .build();
    *   Document response = firestoreClient.updateDocument(request);
    * }
@@ -438,10 +431,8 @@ public final Document updateDocument(UpdateDocumentRequest request) {
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
    *   Document document = Document.newBuilder().build();
-   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
    *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
    *     .setDocument(document)
-   *     .setUpdateMask(updateMask)
    *     .build();
    *   ApiFuture<Document> future = firestoreClient.updateDocumentCallable().futureCall(request);
    *   // Do something
@@ -461,7 +452,7 @@ public final UnaryCallable updateDocumentCallab
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String name = "";
    *   firestoreClient.deleteDocument(name);
    * }
    * 
@@ -470,29 +461,6 @@ public final UnaryCallable updateDocumentCallab * `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(AnyPathName name) { - DeleteDocumentRequest request = - DeleteDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteDocument(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a document. - * - *

Sample code: - * - *


-   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   firestoreClient.deleteDocument(name.toString());
-   * }
-   * 
- * - * @param name Required. 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) { DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); deleteDocument(request); @@ -506,9 +474,9 @@ public final void deleteDocument(String name) { * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String name = "";
    *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *     .setName(name)
    *     .build();
    *   firestoreClient.deleteDocument(request);
    * }
@@ -529,9 +497,9 @@ public final void deleteDocument(DeleteDocumentRequest request) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String name = "";
    *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *     .setName(name)
    *     .build();
    *   ApiFuture<Void> future = firestoreClient.deleteDocumentCallable().futureCall(request);
    *   // Do something
@@ -554,11 +522,9 @@ public final UnaryCallable deleteDocumentCallable(
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<String> documents = new ArrayList<>();
+   *   String database = "";
    *   BatchGetDocumentsRequest request = BatchGetDocumentsRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllDocuments(documents)
+   *     .setDatabase(database)
    *     .build();
    *
    *   ServerStream<BatchGetDocumentsResponse> stream = firestoreClient.batchGetDocumentsCallable().call(request);
@@ -581,8 +547,8 @@ public final UnaryCallable deleteDocumentCallable(
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   BeginTransactionResponse response = firestoreClient.beginTransaction(formattedDatabase);
+   *   String database = "";
+   *   BeginTransactionResponse response = firestoreClient.beginTransaction(database);
    * }
    * 
* @@ -604,9 +570,9 @@ public final BeginTransactionResponse beginTransaction(String database) { * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .build();
    *   BeginTransactionResponse response = firestoreClient.beginTransaction(request);
    * }
@@ -627,9 +593,9 @@ public final BeginTransactionResponse beginTransaction(BeginTransactionRequest r
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .build();
    *   ApiFuture<BeginTransactionResponse> future = firestoreClient.beginTransactionCallable().futureCall(request);
    *   // Do something
@@ -650,9 +616,9 @@ public final BeginTransactionResponse beginTransaction(BeginTransactionRequest r
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   List<Write> writes = new ArrayList<>();
-   *   CommitResponse response = firestoreClient.commit(formattedDatabase, writes);
+   *   CommitResponse response = firestoreClient.commit(database, writes);
    * }
    * 
* @@ -676,11 +642,9 @@ public final CommitResponse commit(String database, List writes) { * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<Write> writes = new ArrayList<>();
+   *   String database = "";
    *   CommitRequest request = CommitRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllWrites(writes)
+   *     .setDatabase(database)
    *     .build();
    *   CommitResponse response = firestoreClient.commit(request);
    * }
@@ -701,11 +665,9 @@ public final CommitResponse commit(CommitRequest request) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<Write> writes = new ArrayList<>();
+   *   String database = "";
    *   CommitRequest request = CommitRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllWrites(writes)
+   *     .setDatabase(database)
    *     .build();
    *   ApiFuture<CommitResponse> future = firestoreClient.commitCallable().futureCall(request);
    *   // Do something
@@ -725,9 +687,9 @@ public final UnaryCallable commitCallable() {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   ByteString transaction = ByteString.copyFromUtf8("");
-   *   firestoreClient.rollback(formattedDatabase, transaction);
+   *   firestoreClient.rollback(database, transaction);
    * }
    * 
* @@ -750,10 +712,10 @@ public final void rollback(String database, ByteString transaction) { * *

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   ByteString transaction = ByteString.copyFromUtf8("");
    *   RollbackRequest request = RollbackRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .setTransaction(transaction)
    *     .build();
    *   firestoreClient.rollback(request);
@@ -775,10 +737,10 @@ public final void rollback(RollbackRequest request) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   ByteString transaction = ByteString.copyFromUtf8("");
    *   RollbackRequest request = RollbackRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .setTransaction(transaction)
    *     .build();
    *   ApiFuture<Void> future = firestoreClient.rollbackCallable().futureCall(request);
@@ -799,9 +761,9 @@ public final UnaryCallable rollbackCallable() {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   RunQueryRequest request = RunQueryRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .build();
    *
    *   ServerStream<RunQueryResponse> stream = firestoreClient.runQueryCallable().call(request);
@@ -826,9 +788,9 @@ public final ServerStreamingCallable runQuery
    *   BidiStream<WriteRequest, WriteResponse> bidiStream =
    *       firestoreClient.writeCallable().call();
    *
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   WriteRequest request = WriteRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .build();
    *   bidiStream.send(request);
    *   for (WriteResponse response : bidiStream) {
@@ -852,9 +814,9 @@ public final BidiStreamingCallable writeCallable()
    *   BidiStream<ListenRequest, ListenResponse> bidiStream =
    *       firestoreClient.listenCallable().call();
    *
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+   *   String database = "";
    *   ListenRequest request = ListenRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *     .setDatabase(database)
    *     .build();
    *   bidiStream.send(request);
    *   for (ListenResponse response : bidiStream) {
@@ -875,8 +837,8 @@ public final BidiStreamingCallable listenCallable
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   for (String element : firestoreClient.listCollectionIds(formattedParent).iterateAll()) {
+   *   String parent = "";
+   *   for (String element : firestoreClient.listCollectionIds(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -901,9 +863,9 @@ public final ListCollectionIdsPagedResponse listCollectionIds(String parent) {
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .build();
    *   for (String element : firestoreClient.listCollectionIds(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -926,9 +888,9 @@ public final ListCollectionIdsPagedResponse listCollectionIds(ListCollectionIdsR
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .build();
    *   ApiFuture<ListCollectionIdsPagedResponse> future = firestoreClient.listCollectionIdsPagedCallable().futureCall(request);
    *   // Do something
@@ -951,9 +913,9 @@ public final ListCollectionIdsPagedResponse listCollectionIds(ListCollectionIdsR
    *
    * 

    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+   *   String parent = "";
    *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent)
    *     .build();
    *   while (true) {
    *     ListCollectionIdsResponse response = firestoreClient.listCollectionIdsCallable().call(request);
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
index d847aaad5..579adc2c3 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
@@ -20,21 +20,28 @@
 
 import com.google.api.core.BetaApi;
 import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.firestore.admin.v1.CreateIndexRequest;
 import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.ExportDocumentsMetadata;
 import com.google.firestore.admin.v1.ExportDocumentsRequest;
+import com.google.firestore.admin.v1.ExportDocumentsResponse;
 import com.google.firestore.admin.v1.Field;
+import com.google.firestore.admin.v1.FieldOperationMetadata;
 import com.google.firestore.admin.v1.GetFieldRequest;
 import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.ImportDocumentsMetadata;
 import com.google.firestore.admin.v1.ImportDocumentsRequest;
 import com.google.firestore.admin.v1.Index;
+import com.google.firestore.admin.v1.IndexOperationMetadata;
 import com.google.firestore.admin.v1.ListFieldsRequest;
 import com.google.firestore.admin.v1.ListFieldsResponse;
 import com.google.firestore.admin.v1.ListIndexesRequest;
 import com.google.firestore.admin.v1.ListIndexesResponse;
 import com.google.firestore.admin.v1.UpdateFieldRequest;
 import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
 import com.google.protobuf.Empty;
 import javax.annotation.Generated;
 
@@ -48,6 +55,31 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public abstract class FirestoreAdminStub implements BackgroundResource {
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationsStub getOperationsStub() {
+    throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+  }
+
+  public UnaryCallable deleteIndexCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      updateFieldOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: updateFieldOperationCallable()");
+  }
+
+  public UnaryCallable updateFieldCallable() {
+    throw new UnsupportedOperationException("Not implemented: updateFieldCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      createIndexOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: createIndexOperationCallable()");
+  }
+
   public UnaryCallable createIndexCallable() {
     throw new UnsupportedOperationException("Not implemented: createIndexCallable()");
   }
@@ -64,18 +96,6 @@ public UnaryCallable getIndexCallable() {
     throw new UnsupportedOperationException("Not implemented: getIndexCallable()");
   }
 
-  public UnaryCallable deleteIndexCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()");
-  }
-
-  public UnaryCallable importDocumentsCallable() {
-    throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()");
-  }
-
-  public UnaryCallable exportDocumentsCallable() {
-    throw new UnsupportedOperationException("Not implemented: exportDocumentsCallable()");
-  }
-
   public UnaryCallable getFieldCallable() {
     throw new UnsupportedOperationException("Not implemented: getFieldCallable()");
   }
@@ -88,8 +108,24 @@ public UnaryCallable listFieldsCallable()
     throw new UnsupportedOperationException("Not implemented: listFieldsCallable()");
   }
 
-  public UnaryCallable updateFieldCallable() {
-    throw new UnsupportedOperationException("Not implemented: updateFieldCallable()");
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportDocumentsOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: exportDocumentsOperationCallable()");
+  }
+
+  public UnaryCallable exportDocumentsCallable() {
+    throw new UnsupportedOperationException("Not implemented: exportDocumentsCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      importDocumentsOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: importDocumentsOperationCallable()");
+  }
+
+  public UnaryCallable importDocumentsCallable() {
+    throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()");
   }
 
   @Override
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
index def68553b..a249a4256 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java
@@ -27,10 +27,14 @@
 import com.google.api.gax.grpc.GaxGrpcProperties;
 import com.google.api.gax.grpc.GrpcTransportChannel;
 import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.longrunning.OperationSnapshot;
+import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
 import com.google.api.gax.retrying.RetrySettings;
 import com.google.api.gax.rpc.ApiCallContext;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
 import com.google.api.gax.rpc.PageContext;
 import com.google.api.gax.rpc.PagedCallSettings;
 import com.google.api.gax.rpc.PagedListDescriptor;
@@ -46,12 +50,17 @@
 import com.google.common.collect.Lists;
 import com.google.firestore.admin.v1.CreateIndexRequest;
 import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.ExportDocumentsMetadata;
 import com.google.firestore.admin.v1.ExportDocumentsRequest;
+import com.google.firestore.admin.v1.ExportDocumentsResponse;
 import com.google.firestore.admin.v1.Field;
+import com.google.firestore.admin.v1.FieldOperationMetadata;
 import com.google.firestore.admin.v1.GetFieldRequest;
 import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.ImportDocumentsMetadata;
 import com.google.firestore.admin.v1.ImportDocumentsRequest;
 import com.google.firestore.admin.v1.Index;
+import com.google.firestore.admin.v1.IndexOperationMetadata;
 import com.google.firestore.admin.v1.ListFieldsRequest;
 import com.google.firestore.admin.v1.ListFieldsResponse;
 import com.google.firestore.admin.v1.ListIndexesRequest;
@@ -79,16 +88,16 @@
  * 

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of createIndex to 30 seconds: + *

For example, to set the total timeout of deleteIndex to 30 seconds: * *

  * 
  * FirestoreAdminStubSettings.Builder firestoreAdminSettingsBuilder =
  *     FirestoreAdminStubSettings.newBuilder();
  * firestoreAdminSettingsBuilder
- *     .createIndexSettings()
+ *     .deleteIndexSettings()
  *     .setRetrySettings(
- *         firestoreAdminSettingsBuilder.createIndexSettings().getRetrySettings().toBuilder()
+ *         firestoreAdminSettingsBuilder.deleteIndexSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * FirestoreAdminStubSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
@@ -105,23 +114,56 @@ public class FirestoreAdminStubSettings extends StubSettings deleteIndexSettings;
+  private final UnaryCallSettings updateFieldSettings;
+  private final OperationCallSettings
+      updateFieldOperationSettings;
   private final UnaryCallSettings createIndexSettings;
+  private final OperationCallSettings
+      createIndexOperationSettings;
   private final PagedCallSettings
       listIndexesSettings;
   private final UnaryCallSettings getIndexSettings;
-  private final UnaryCallSettings deleteIndexSettings;
-  private final UnaryCallSettings importDocumentsSettings;
-  private final UnaryCallSettings exportDocumentsSettings;
   private final UnaryCallSettings getFieldSettings;
   private final PagedCallSettings
       listFieldsSettings;
-  private final UnaryCallSettings updateFieldSettings;
+  private final UnaryCallSettings exportDocumentsSettings;
+  private final OperationCallSettings<
+          ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+      exportDocumentsOperationSettings;
+  private final UnaryCallSettings importDocumentsSettings;
+  private final OperationCallSettings
+      importDocumentsOperationSettings;
+
+  /** Returns the object with the settings used for calls to deleteIndex. */
+  public UnaryCallSettings deleteIndexSettings() {
+    return deleteIndexSettings;
+  }
+
+  /** Returns the object with the settings used for calls to updateField. */
+  public UnaryCallSettings updateFieldSettings() {
+    return updateFieldSettings;
+  }
+
+  /** Returns the object with the settings used for calls to updateField. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      updateFieldOperationSettings() {
+    return updateFieldOperationSettings;
+  }
 
   /** Returns the object with the settings used for calls to createIndex. */
   public UnaryCallSettings createIndexSettings() {
     return createIndexSettings;
   }
 
+  /** Returns the object with the settings used for calls to createIndex. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      createIndexOperationSettings() {
+    return createIndexOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to listIndexes. */
   public PagedCallSettings
       listIndexesSettings() {
@@ -133,14 +175,15 @@ public UnaryCallSettings getIndexSettings() {
     return getIndexSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteIndex. */
-  public UnaryCallSettings deleteIndexSettings() {
-    return deleteIndexSettings;
+  /** Returns the object with the settings used for calls to getField. */
+  public UnaryCallSettings getFieldSettings() {
+    return getFieldSettings;
   }
 
-  /** Returns the object with the settings used for calls to importDocuments. */
-  public UnaryCallSettings importDocumentsSettings() {
-    return importDocumentsSettings;
+  /** Returns the object with the settings used for calls to listFields. */
+  public PagedCallSettings
+      listFieldsSettings() {
+    return listFieldsSettings;
   }
 
   /** Returns the object with the settings used for calls to exportDocuments. */
@@ -148,20 +191,24 @@ public UnaryCallSettings exportDocumentsSetti
     return exportDocumentsSettings;
   }
 
-  /** Returns the object with the settings used for calls to getField. */
-  public UnaryCallSettings getFieldSettings() {
-    return getFieldSettings;
+  /** Returns the object with the settings used for calls to exportDocuments. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings<
+          ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+      exportDocumentsOperationSettings() {
+    return exportDocumentsOperationSettings;
   }
 
-  /** Returns the object with the settings used for calls to listFields. */
-  public PagedCallSettings
-      listFieldsSettings() {
-    return listFieldsSettings;
+  /** Returns the object with the settings used for calls to importDocuments. */
+  public UnaryCallSettings importDocumentsSettings() {
+    return importDocumentsSettings;
   }
 
-  /** Returns the object with the settings used for calls to updateField. */
-  public UnaryCallSettings updateFieldSettings() {
-    return updateFieldSettings;
+  /** Returns the object with the settings used for calls to importDocuments. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      importDocumentsOperationSettings() {
+    return importDocumentsOperationSettings;
   }
 
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
@@ -233,15 +280,19 @@ public Builder toBuilder() {
   protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteIndexSettings = settingsBuilder.deleteIndexSettings().build();
+    updateFieldSettings = settingsBuilder.updateFieldSettings().build();
+    updateFieldOperationSettings = settingsBuilder.updateFieldOperationSettings().build();
     createIndexSettings = settingsBuilder.createIndexSettings().build();
+    createIndexOperationSettings = settingsBuilder.createIndexOperationSettings().build();
     listIndexesSettings = settingsBuilder.listIndexesSettings().build();
     getIndexSettings = settingsBuilder.getIndexSettings().build();
-    deleteIndexSettings = settingsBuilder.deleteIndexSettings().build();
-    importDocumentsSettings = settingsBuilder.importDocumentsSettings().build();
-    exportDocumentsSettings = settingsBuilder.exportDocumentsSettings().build();
     getFieldSettings = settingsBuilder.getFieldSettings().build();
     listFieldsSettings = settingsBuilder.listFieldsSettings().build();
-    updateFieldSettings = settingsBuilder.updateFieldSettings().build();
+    exportDocumentsSettings = settingsBuilder.exportDocumentsSettings().build();
+    exportDocumentsOperationSettings = settingsBuilder.exportDocumentsOperationSettings().build();
+    importDocumentsSettings = settingsBuilder.importDocumentsSettings().build();
+    importDocumentsOperationSettings = settingsBuilder.importDocumentsOperationSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -354,21 +405,31 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder deleteIndexSettings;
+    private final UnaryCallSettings.Builder updateFieldSettings;
+    private final OperationCallSettings.Builder
+        updateFieldOperationSettings;
     private final UnaryCallSettings.Builder createIndexSettings;
+    private final OperationCallSettings.Builder
+        createIndexOperationSettings;
     private final PagedCallSettings.Builder<
             ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>
         listIndexesSettings;
     private final UnaryCallSettings.Builder getIndexSettings;
-    private final UnaryCallSettings.Builder deleteIndexSettings;
-    private final UnaryCallSettings.Builder
-        importDocumentsSettings;
-    private final UnaryCallSettings.Builder
-        exportDocumentsSettings;
     private final UnaryCallSettings.Builder getFieldSettings;
     private final PagedCallSettings.Builder<
             ListFieldsRequest, ListFieldsResponse, ListFieldsPagedResponse>
         listFieldsSettings;
-    private final UnaryCallSettings.Builder updateFieldSettings;
+    private final UnaryCallSettings.Builder
+        exportDocumentsSettings;
+    private final OperationCallSettings.Builder<
+            ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+        exportDocumentsOperationSettings;
+    private final UnaryCallSettings.Builder
+        importDocumentsSettings;
+    private final OperationCallSettings.Builder<
+            ImportDocumentsRequest, Empty, ImportDocumentsMetadata>
+        importDocumentsOperationSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -380,9 +441,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(
-                  StatusCode.Code.DEADLINE_EXCEEDED,
-                  StatusCode.Code.INTERNAL,
-                  StatusCode.Code.UNAVAILABLE)));
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
@@ -413,35 +472,43 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      updateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      updateFieldOperationSettings = OperationCallSettings.newBuilder();
+
       createIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      createIndexOperationSettings = OperationCallSettings.newBuilder();
+
       listIndexesSettings = PagedCallSettings.newBuilder(LIST_INDEXES_PAGE_STR_FACT);
 
       getIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      getFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      listFieldsSettings = PagedCallSettings.newBuilder(LIST_FIELDS_PAGE_STR_FACT);
 
       exportDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      getFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      exportDocumentsOperationSettings = OperationCallSettings.newBuilder();
 
-      listFieldsSettings = PagedCallSettings.newBuilder(LIST_FIELDS_PAGE_STR_FACT);
+      importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      updateFieldSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      importDocumentsOperationSettings = OperationCallSettings.newBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteIndexSettings,
+              updateFieldSettings,
               createIndexSettings,
               listIndexesSettings,
               getIndexSettings,
-              deleteIndexSettings,
-              importDocumentsSettings,
-              exportDocumentsSettings,
               getFieldSettings,
               listFieldsSettings,
-              updateFieldSettings);
+              exportDocumentsSettings,
+              importDocumentsSettings);
 
       initDefaults(this);
     }
@@ -457,6 +524,16 @@ private static Builder createDefault() {
 
     private static Builder initDefaults(Builder builder) {
 
+      builder
+          .deleteIndexSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .updateFieldSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .createIndexSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
@@ -473,13 +550,13 @@ private static Builder initDefaults(Builder builder) {
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteIndexSettings()
+          .getFieldSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .importDocumentsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .listFieldsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -488,19 +565,99 @@ private static Builder initDefaults(Builder builder) {
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getFieldSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .importDocumentsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
-          .listFieldsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
+          .updateFieldOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings.newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Field.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(FieldOperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
       builder
-          .updateFieldSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .createIndexOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings.newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Index.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(IndexOperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+      builder
+          .exportDocumentsOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(ExportDocumentsResponse.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(ExportDocumentsMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+      builder
+          .importDocumentsOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(ImportDocumentsMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
 
       return builder;
     }
@@ -508,27 +665,31 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(FirestoreAdminStubSettings settings) {
       super(settings);
 
+      deleteIndexSettings = settings.deleteIndexSettings.toBuilder();
+      updateFieldSettings = settings.updateFieldSettings.toBuilder();
+      updateFieldOperationSettings = settings.updateFieldOperationSettings.toBuilder();
       createIndexSettings = settings.createIndexSettings.toBuilder();
+      createIndexOperationSettings = settings.createIndexOperationSettings.toBuilder();
       listIndexesSettings = settings.listIndexesSettings.toBuilder();
       getIndexSettings = settings.getIndexSettings.toBuilder();
-      deleteIndexSettings = settings.deleteIndexSettings.toBuilder();
-      importDocumentsSettings = settings.importDocumentsSettings.toBuilder();
-      exportDocumentsSettings = settings.exportDocumentsSettings.toBuilder();
       getFieldSettings = settings.getFieldSettings.toBuilder();
       listFieldsSettings = settings.listFieldsSettings.toBuilder();
-      updateFieldSettings = settings.updateFieldSettings.toBuilder();
+      exportDocumentsSettings = settings.exportDocumentsSettings.toBuilder();
+      exportDocumentsOperationSettings = settings.exportDocumentsOperationSettings.toBuilder();
+      importDocumentsSettings = settings.importDocumentsSettings.toBuilder();
+      importDocumentsOperationSettings = settings.importDocumentsOperationSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteIndexSettings,
+              updateFieldSettings,
               createIndexSettings,
               listIndexesSettings,
               getIndexSettings,
-              deleteIndexSettings,
-              importDocumentsSettings,
-              exportDocumentsSettings,
               getFieldSettings,
               listFieldsSettings,
-              updateFieldSettings);
+              exportDocumentsSettings,
+              importDocumentsSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -547,11 +708,37 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteIndex. */
+    public UnaryCallSettings.Builder deleteIndexSettings() {
+      return deleteIndexSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to updateField. */
+    public UnaryCallSettings.Builder updateFieldSettings() {
+      return updateFieldSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to updateField. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        updateFieldOperationSettings() {
+      return updateFieldOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to createIndex. */
     public UnaryCallSettings.Builder createIndexSettings() {
       return createIndexSettings;
     }
 
+    /** Returns the builder for the settings used for calls to createIndex. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        createIndexOperationSettings() {
+      return createIndexOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listIndexes. */
     public PagedCallSettings.Builder<
             ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>
@@ -564,14 +751,15 @@ public UnaryCallSettings.Builder getIndexSettings() {
       return getIndexSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteIndex. */
-    public UnaryCallSettings.Builder deleteIndexSettings() {
-      return deleteIndexSettings;
+    /** Returns the builder for the settings used for calls to getField. */
+    public UnaryCallSettings.Builder getFieldSettings() {
+      return getFieldSettings;
     }
 
-    /** Returns the builder for the settings used for calls to importDocuments. */
-    public UnaryCallSettings.Builder importDocumentsSettings() {
-      return importDocumentsSettings;
+    /** Returns the builder for the settings used for calls to listFields. */
+    public PagedCallSettings.Builder
+        listFieldsSettings() {
+      return listFieldsSettings;
     }
 
     /** Returns the builder for the settings used for calls to exportDocuments. */
@@ -579,20 +767,26 @@ public UnaryCallSettings.Builder exportDocume
       return exportDocumentsSettings;
     }
 
-    /** Returns the builder for the settings used for calls to getField. */
-    public UnaryCallSettings.Builder getFieldSettings() {
-      return getFieldSettings;
+    /** Returns the builder for the settings used for calls to exportDocuments. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder<
+            ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+        exportDocumentsOperationSettings() {
+      return exportDocumentsOperationSettings;
     }
 
-    /** Returns the builder for the settings used for calls to listFields. */
-    public PagedCallSettings.Builder
-        listFieldsSettings() {
-      return listFieldsSettings;
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    public UnaryCallSettings.Builder importDocumentsSettings() {
+      return importDocumentsSettings;
     }
 
-    /** Returns the builder for the settings used for calls to updateField. */
-    public UnaryCallSettings.Builder updateFieldSettings() {
-      return updateFieldSettings;
+    /** Returns the builder for the settings used for calls to importDocuments. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        importDocumentsOperationSettings() {
+      return importDocumentsOperationSettings;
     }
 
     @Override
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java
index 6272c4e94..22f861ec8 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStubSettings.java
@@ -434,9 +434,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(
-                  StatusCode.Code.DEADLINE_EXCEEDED,
-                  StatusCode.Code.INTERNAL,
-                  StatusCode.Code.UNAVAILABLE)));
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
@@ -582,7 +580,7 @@ private static Builder initDefaults(Builder builder) {
 
       builder
           .listCollectionIdsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       return builder;
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
index 90396949d..010701dc9 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java
@@ -24,23 +24,30 @@
 import com.google.api.gax.grpc.GrpcCallSettings;
 import com.google.api.gax.grpc.GrpcStubCallableFactory;
 import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.RequestParamsExtractor;
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.common.collect.ImmutableMap;
 import com.google.firestore.admin.v1.CreateIndexRequest;
 import com.google.firestore.admin.v1.DeleteIndexRequest;
+import com.google.firestore.admin.v1.ExportDocumentsMetadata;
 import com.google.firestore.admin.v1.ExportDocumentsRequest;
+import com.google.firestore.admin.v1.ExportDocumentsResponse;
 import com.google.firestore.admin.v1.Field;
+import com.google.firestore.admin.v1.FieldOperationMetadata;
 import com.google.firestore.admin.v1.GetFieldRequest;
 import com.google.firestore.admin.v1.GetIndexRequest;
+import com.google.firestore.admin.v1.ImportDocumentsMetadata;
 import com.google.firestore.admin.v1.ImportDocumentsRequest;
 import com.google.firestore.admin.v1.Index;
+import com.google.firestore.admin.v1.IndexOperationMetadata;
 import com.google.firestore.admin.v1.ListFieldsRequest;
 import com.google.firestore.admin.v1.ListFieldsResponse;
 import com.google.firestore.admin.v1.ListIndexesRequest;
 import com.google.firestore.admin.v1.ListIndexesResponse;
 import com.google.firestore.admin.v1.UpdateFieldRequest;
 import com.google.longrunning.Operation;
+import com.google.longrunning.stub.GrpcOperationsStub;
 import com.google.protobuf.Empty;
 import io.grpc.MethodDescriptor;
 import io.grpc.protobuf.ProtoUtils;
@@ -59,6 +66,20 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
 
+  private static final MethodDescriptor deleteIndexMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteIndex")
+          .setRequestMarshaller(ProtoUtils.marshaller(DeleteIndexRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor updateFieldMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/UpdateField")
+          .setRequestMarshaller(ProtoUtils.marshaller(UpdateFieldRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+          .build();
   private static final MethodDescriptor createIndexMethodDescriptor =
       MethodDescriptor.newBuilder()
           .setType(MethodDescriptor.MethodType.UNARY)
@@ -82,31 +103,6 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
           .setRequestMarshaller(ProtoUtils.marshaller(GetIndexRequest.getDefaultInstance()))
           .setResponseMarshaller(ProtoUtils.marshaller(Index.getDefaultInstance()))
           .build();
-  private static final MethodDescriptor deleteIndexMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/DeleteIndex")
-          .setRequestMarshaller(ProtoUtils.marshaller(DeleteIndexRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-          .build();
-  private static final MethodDescriptor
-      importDocumentsMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ImportDocuments")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
-              .build();
-  private static final MethodDescriptor
-      exportDocumentsMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ExportDocuments")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(ExportDocumentsRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor getFieldMethodDescriptor =
       MethodDescriptor.newBuilder()
           .setType(MethodDescriptor.MethodType.UNARY)
@@ -122,28 +118,49 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
               .setRequestMarshaller(ProtoUtils.marshaller(ListFieldsRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(ListFieldsResponse.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor updateFieldMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/UpdateField")
-          .setRequestMarshaller(ProtoUtils.marshaller(UpdateFieldRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
-          .build();
+  private static final MethodDescriptor
+      exportDocumentsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ExportDocuments")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(ExportDocumentsRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      importDocumentsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/ImportDocuments")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(ImportDocumentsRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+              .build();
 
   private final BackgroundResource backgroundResources;
+  private final GrpcOperationsStub operationsStub;
 
+  private final UnaryCallable deleteIndexCallable;
+  private final UnaryCallable updateFieldCallable;
+  private final OperationCallable
+      updateFieldOperationCallable;
   private final UnaryCallable createIndexCallable;
+  private final OperationCallable
+      createIndexOperationCallable;
   private final UnaryCallable listIndexesCallable;
   private final UnaryCallable
       listIndexesPagedCallable;
   private final UnaryCallable getIndexCallable;
-  private final UnaryCallable deleteIndexCallable;
-  private final UnaryCallable importDocumentsCallable;
-  private final UnaryCallable exportDocumentsCallable;
   private final UnaryCallable getFieldCallable;
   private final UnaryCallable listFieldsCallable;
   private final UnaryCallable listFieldsPagedCallable;
-  private final UnaryCallable updateFieldCallable;
+  private final UnaryCallable exportDocumentsCallable;
+  private final OperationCallable<
+          ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
+      exportDocumentsOperationCallable;
+  private final UnaryCallable importDocumentsCallable;
+  private final OperationCallable
+      importDocumentsOperationCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -185,7 +202,34 @@ protected GrpcFirestoreAdminStub(
       GrpcStubCallableFactory callableFactory)
       throws IOException {
     this.callableFactory = callableFactory;
+    this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
 
+    GrpcCallSettings deleteIndexTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteIndexMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteIndexRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings updateFieldTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateFieldMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateFieldRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("field.name", String.valueOf(request.getField().getName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings createIndexTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(createIndexMethodDescriptor)
@@ -225,28 +269,28 @@ public Map extract(GetIndexRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings deleteIndexTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteIndexMethodDescriptor)
+    GrpcCallSettings getFieldTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(getFieldMethodDescriptor)
             .setParamsExtractor(
-                new RequestParamsExtractor() {
+                new RequestParamsExtractor() {
                   @Override
-                  public Map extract(DeleteIndexRequest request) {
+                  public Map extract(GetFieldRequest request) {
                     ImmutableMap.Builder params = ImmutableMap.builder();
                     params.put("name", String.valueOf(request.getName()));
                     return params.build();
                   }
                 })
             .build();
-    GrpcCallSettings importDocumentsTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(importDocumentsMethodDescriptor)
+    GrpcCallSettings listFieldsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(listFieldsMethodDescriptor)
             .setParamsExtractor(
-                new RequestParamsExtractor() {
+                new RequestParamsExtractor() {
                   @Override
-                  public Map extract(ImportDocumentsRequest request) {
+                  public Map extract(ListFieldsRequest request) {
                     ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
+                    params.put("parent", String.valueOf(request.getParent()));
                     return params.build();
                   }
                 })
@@ -264,49 +308,41 @@ public Map extract(ExportDocumentsRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings getFieldTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(getFieldMethodDescriptor)
+    GrpcCallSettings importDocumentsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(importDocumentsMethodDescriptor)
             .setParamsExtractor(
-                new RequestParamsExtractor() {
+                new RequestParamsExtractor() {
                   @Override
-                  public Map extract(GetFieldRequest request) {
+                  public Map extract(ImportDocumentsRequest request) {
                     ImmutableMap.Builder params = ImmutableMap.builder();
                     params.put("name", String.valueOf(request.getName()));
                     return params.build();
                   }
                 })
             .build();
-    GrpcCallSettings listFieldsTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(listFieldsMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(ListFieldsRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("parent", String.valueOf(request.getParent()));
-                    return params.build();
-                  }
-                })
-            .build();
-    GrpcCallSettings updateFieldTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(updateFieldMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(UpdateFieldRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("field.name", String.valueOf(request.getField().getName()));
-                    return params.build();
-                  }
-                })
-            .build();
 
+    this.deleteIndexCallable =
+        callableFactory.createUnaryCallable(
+            deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext);
+    this.updateFieldCallable =
+        callableFactory.createUnaryCallable(
+            updateFieldTransportSettings, settings.updateFieldSettings(), clientContext);
+    this.updateFieldOperationCallable =
+        callableFactory.createOperationCallable(
+            updateFieldTransportSettings,
+            settings.updateFieldOperationSettings(),
+            clientContext,
+            this.operationsStub);
     this.createIndexCallable =
         callableFactory.createUnaryCallable(
             createIndexTransportSettings, settings.createIndexSettings(), clientContext);
+    this.createIndexOperationCallable =
+        callableFactory.createOperationCallable(
+            createIndexTransportSettings,
+            settings.createIndexOperationSettings(),
+            clientContext,
+            this.operationsStub);
     this.listIndexesCallable =
         callableFactory.createUnaryCallable(
             listIndexesTransportSettings, settings.listIndexesSettings(), clientContext);
@@ -316,15 +352,6 @@ public Map extract(UpdateFieldRequest request) {
     this.getIndexCallable =
         callableFactory.createUnaryCallable(
             getIndexTransportSettings, settings.getIndexSettings(), clientContext);
-    this.deleteIndexCallable =
-        callableFactory.createUnaryCallable(
-            deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext);
-    this.importDocumentsCallable =
-        callableFactory.createUnaryCallable(
-            importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext);
-    this.exportDocumentsCallable =
-        callableFactory.createUnaryCallable(
-            exportDocumentsTransportSettings, settings.exportDocumentsSettings(), clientContext);
     this.getFieldCallable =
         callableFactory.createUnaryCallable(
             getFieldTransportSettings, settings.getFieldSettings(), clientContext);
@@ -334,13 +361,53 @@ public Map extract(UpdateFieldRequest request) {
     this.listFieldsPagedCallable =
         callableFactory.createPagedCallable(
             listFieldsTransportSettings, settings.listFieldsSettings(), clientContext);
-    this.updateFieldCallable =
+    this.exportDocumentsCallable =
         callableFactory.createUnaryCallable(
-            updateFieldTransportSettings, settings.updateFieldSettings(), clientContext);
+            exportDocumentsTransportSettings, settings.exportDocumentsSettings(), clientContext);
+    this.exportDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            exportDocumentsTransportSettings,
+            settings.exportDocumentsOperationSettings(),
+            clientContext,
+            this.operationsStub);
+    this.importDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            importDocumentsTransportSettings, settings.importDocumentsSettings(), clientContext);
+    this.importDocumentsOperationCallable =
+        callableFactory.createOperationCallable(
+            importDocumentsTransportSettings,
+            settings.importDocumentsOperationSettings(),
+            clientContext,
+            this.operationsStub);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public GrpcOperationsStub getOperationsStub() {
+    return operationsStub;
+  }
+
+  public UnaryCallable deleteIndexCallable() {
+    return deleteIndexCallable;
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      updateFieldOperationCallable() {
+    return updateFieldOperationCallable;
+  }
+
+  public UnaryCallable updateFieldCallable() {
+    return updateFieldCallable;
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      createIndexOperationCallable() {
+    return createIndexOperationCallable;
+  }
+
   public UnaryCallable createIndexCallable() {
     return createIndexCallable;
   }
@@ -357,18 +424,6 @@ public UnaryCallable getIndexCallable() {
     return getIndexCallable;
   }
 
-  public UnaryCallable deleteIndexCallable() {
-    return deleteIndexCallable;
-  }
-
-  public UnaryCallable importDocumentsCallable() {
-    return importDocumentsCallable;
-  }
-
-  public UnaryCallable exportDocumentsCallable() {
-    return exportDocumentsCallable;
-  }
-
   public UnaryCallable getFieldCallable() {
     return getFieldCallable;
   }
@@ -381,8 +436,24 @@ public UnaryCallable listFieldsCallable()
     return listFieldsCallable;
   }
 
-  public UnaryCallable updateFieldCallable() {
-    return updateFieldCallable;
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportDocumentsOperationCallable() {
+    return exportDocumentsOperationCallable;
+  }
+
+  public UnaryCallable exportDocumentsCallable() {
+    return exportDocumentsCallable;
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      importDocumentsOperationCallable() {
+    return importDocumentsOperationCallable;
+  }
+
+  public UnaryCallable importDocumentsCallable() {
+    return importDocumentsCallable;
   }
 
   @Override
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java
index 741c06ba1..4dc528b39 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java
@@ -30,7 +30,6 @@
 import com.google.cloud.firestore.v1beta1.stub.FirestoreStub;
 import com.google.cloud.firestore.v1beta1.stub.FirestoreStubSettings;
 import com.google.common.util.concurrent.MoreExecutors;
-import com.google.firestore.v1beta1.AnyPathName;
 import com.google.firestore.v1beta1.BatchGetDocumentsRequest;
 import com.google.firestore.v1beta1.BatchGetDocumentsResponse;
 import com.google.firestore.v1beta1.BeginTransactionRequest;
@@ -83,9 +82,8 @@
  * 
  * 
  * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
- *   Document document = Document.newBuilder().build();
- *   DocumentMask updateMask = DocumentMask.newBuilder().build();
- *   Document response = firestoreClient.updateDocument(document, updateMask);
+ *   String name = "";
+ *   firestoreClient.deleteDocument(name);
  * }
  * 
  * 
@@ -197,791 +195,754 @@ public FirestoreStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a single document. + * Deletes a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   Document response = firestoreClient.getDocument(request);
+   *   String name = "";
+   *   firestoreClient.deleteDocument(name);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param name Required. 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 Document getDocument(GetDocumentRequest request) { - return getDocumentCallable().call(request); + public final void deleteDocument(String name) { + DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); + deleteDocument(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a single document. + * Deletes a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *   String name = "";
+   *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
+   *     .setName(name)
    *     .build();
-   *   ApiFuture<Document> future = firestoreClient.getDocumentCallable().futureCall(request);
-   *   // Do something
-   *   Document response = future.get();
+   *   firestoreClient.deleteDocument(request);
    * }
    * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getDocumentCallable() { - return stub.getDocumentCallable(); + public final void deleteDocument(DeleteDocumentRequest request) { + deleteDocumentCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists documents. + * Deletes a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   String collectionId = "";
-   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .setCollectionId(collectionId)
+   *   String name = "";
+   *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
+   *     .setName(name)
    *     .build();
-   *   for (Document element : firestoreClient.listDocuments(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   ApiFuture<Void> future = firestoreClient.deleteDocumentCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
    * }
    * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest request) { - return listDocumentsPagedCallable().call(request); + public final UnaryCallable deleteDocumentCallable() { + return stub.deleteDocumentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists documents. + * Gets multiple documents. + * + *

Documents returned by this method are not guaranteed to be returned in the same order that + * they were requested. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   String collectionId = "";
-   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .setCollectionId(collectionId)
+   *   String database = "";
+   *   BatchGetDocumentsRequest request = BatchGetDocumentsRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   ApiFuture<ListDocumentsPagedResponse> future = firestoreClient.listDocumentsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Document element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
+   *
+   *   ServerStream<BatchGetDocumentsResponse> stream = firestoreClient.batchGetDocumentsCallable().call(request);
+   *   for (BatchGetDocumentsResponse response : stream) {
+   *     // Do something when receive a response
    *   }
    * }
    * 
*/ - public final UnaryCallable - listDocumentsPagedCallable() { - return stub.listDocumentsPagedCallable(); + public final ServerStreamingCallable + batchGetDocumentsCallable() { + return stub.batchGetDocumentsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists documents. + * Starts a new transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   String collectionId = "";
-   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .setCollectionId(collectionId)
-   *     .build();
-   *   while (true) {
-   *     ListDocumentsResponse response = firestoreClient.listDocumentsCallable().call(request);
-   *     for (Document element : response.getDocumentsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
+   *   String database = "";
+   *   BeginTransactionResponse response = firestoreClient.beginTransaction(database);
    * }
    * 
+ * + * @param database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable listDocumentsCallable() { - return stub.listDocumentsCallable(); + public final BeginTransactionResponse beginTransaction(String database) { + BeginTransactionRequest request = + BeginTransactionRequest.newBuilder().setDatabase(database).build(); + return beginTransaction(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a new document. + * Starts a new transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   String collectionId = "";
-   *   String documentId = "";
-   *   Document document = Document.newBuilder().build();
-   *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .setCollectionId(collectionId)
-   *     .setDocumentId(documentId)
-   *     .setDocument(document)
+   *   String database = "";
+   *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   Document response = firestoreClient.createDocument(request);
+   *   BeginTransactionResponse response = firestoreClient.beginTransaction(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Document createDocument(CreateDocumentRequest request) { - return createDocumentCallable().call(request); + public final BeginTransactionResponse beginTransaction(BeginTransactionRequest request) { + return beginTransactionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a new document. + * Starts a new transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   String collectionId = "";
-   *   String documentId = "";
-   *   Document document = Document.newBuilder().build();
-   *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .setCollectionId(collectionId)
-   *     .setDocumentId(documentId)
-   *     .setDocument(document)
+   *   String database = "";
+   *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   ApiFuture<Document> future = firestoreClient.createDocumentCallable().futureCall(request);
+   *   ApiFuture<BeginTransactionResponse> future = firestoreClient.beginTransactionCallable().futureCall(request);
    *   // Do something
-   *   Document response = future.get();
+   *   BeginTransactionResponse response = future.get();
    * }
    * 
*/ - public final UnaryCallable createDocumentCallable() { - return stub.createDocumentCallable(); + public final UnaryCallable + beginTransactionCallable() { + return stub.beginTransactionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates or inserts a document. + * Rolls back a transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   Document document = Document.newBuilder().build();
-   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
-   *   Document response = firestoreClient.updateDocument(document, updateMask);
+   *   String database = "";
+   *   ByteString transaction = ByteString.copyFromUtf8("");
+   *   firestoreClient.rollback(database, transaction);
    * }
    * 
* - * @param document Required. The updated document. Creates the document if it does not already - * exist. - * @param updateMask 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. + * @param database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param transaction Required. The transaction to roll back. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Document updateDocument(Document document, DocumentMask updateMask) { - UpdateDocumentRequest request = - UpdateDocumentRequest.newBuilder().setDocument(document).setUpdateMask(updateMask).build(); - return updateDocument(request); + public final void rollback(String database, ByteString transaction) { + RollbackRequest request = + RollbackRequest.newBuilder().setDatabase(database).setTransaction(transaction).build(); + rollback(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates or inserts a document. + * Rolls back a transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   Document document = Document.newBuilder().build();
-   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
-   *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
-   *     .setDocument(document)
-   *     .setUpdateMask(updateMask)
+   *   String database = "";
+   *   ByteString transaction = ByteString.copyFromUtf8("");
+   *   RollbackRequest request = RollbackRequest.newBuilder()
+   *     .setDatabase(database)
+   *     .setTransaction(transaction)
    *     .build();
-   *   Document response = firestoreClient.updateDocument(request);
+   *   firestoreClient.rollback(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Document updateDocument(UpdateDocumentRequest request) { - return updateDocumentCallable().call(request); + public final void rollback(RollbackRequest request) { + rollbackCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates or inserts a document. + * Rolls back a transaction. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   Document document = Document.newBuilder().build();
-   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
-   *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
-   *     .setDocument(document)
-   *     .setUpdateMask(updateMask)
+   *   String database = "";
+   *   ByteString transaction = ByteString.copyFromUtf8("");
+   *   RollbackRequest request = RollbackRequest.newBuilder()
+   *     .setDatabase(database)
+   *     .setTransaction(transaction)
    *     .build();
-   *   ApiFuture<Document> future = firestoreClient.updateDocumentCallable().futureCall(request);
+   *   ApiFuture<Void> future = firestoreClient.rollbackCallable().futureCall(request);
    *   // Do something
-   *   Document response = future.get();
+   *   future.get();
    * }
    * 
*/ - public final UnaryCallable updateDocumentCallable() { - return stub.updateDocumentCallable(); + public final UnaryCallable rollbackCallable() { + return stub.rollbackCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a document. + * Runs a query. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   firestoreClient.deleteDocument(name);
+   *   String parent = "";
+   *   RunQueryRequest request = RunQueryRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *
+   *   ServerStream<RunQueryResponse> stream = firestoreClient.runQueryCallable().call(request);
+   *   for (RunQueryResponse response : stream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
- * - * @param name Required. 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(AnyPathName name) { - DeleteDocumentRequest request = - DeleteDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteDocument(request); + public final ServerStreamingCallable runQueryCallable() { + return stub.runQueryCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a document. + * Streams batches of document updates and deletes, in order. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   firestoreClient.deleteDocument(name.toString());
+   *   BidiStream<WriteRequest, WriteResponse> bidiStream =
+   *       firestoreClient.writeCallable().call();
+   *
+   *   String database = "";
+   *   WriteRequest request = WriteRequest.newBuilder()
+   *     .setDatabase(database)
+   *     .build();
+   *   bidiStream.send(request);
+   *   for (WriteResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
- * - * @param name Required. 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) { - DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder().setName(name).build(); - deleteDocument(request); + public final BidiStreamingCallable writeCallable() { + return stub.writeCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a document. + * Listens to changes. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
-   *     .setName(name.toString())
+   *   BidiStream<ListenRequest, ListenResponse> bidiStream =
+   *       firestoreClient.listenCallable().call();
+   *
+   *   String database = "";
+   *   ListenRequest request = ListenRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   firestoreClient.deleteDocument(request);
+   *   bidiStream.send(request);
+   *   for (ListenResponse response : bidiStream) {
+   *     // Do something when receive a response
+   *   }
    * }
    * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteDocument(DeleteDocumentRequest request) { - deleteDocumentCallable().call(request); + public final BidiStreamingCallable listenCallable() { + return stub.listenCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a document. + * Lists all the collection IDs underneath a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   DeleteDocumentRequest request = DeleteDocumentRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = firestoreClient.deleteDocumentCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
+   *   String parent = "";
+   *   for (String element : firestoreClient.listCollectionIds(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
+ * + * @param parent Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteDocumentCallable() { - return stub.deleteDocumentCallable(); + public final ListCollectionIdsPagedResponse listCollectionIds(String parent) { + ListCollectionIdsRequest request = + ListCollectionIdsRequest.newBuilder().setParent(parent).build(); + return listCollectionIds(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets multiple documents. - * - *

Documents returned by this method are not guaranteed to be returned in the same order that - * they were requested. + * Lists all the collection IDs underneath a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<String> documents = new ArrayList<>();
-   *   BatchGetDocumentsRequest request = BatchGetDocumentsRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllDocuments(documents)
+   *   String parent = "";
+   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
+   *     .setParent(parent)
    *     .build();
-   *
-   *   ServerStream<BatchGetDocumentsResponse> stream = firestoreClient.batchGetDocumentsCallable().call(request);
-   *   for (BatchGetDocumentsResponse response : stream) {
-   *     // Do something when receive a response
+   *   for (String element : firestoreClient.listCollectionIds(request).iterateAll()) {
+   *     // doThingsWith(element);
    *   }
    * }
    * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ServerStreamingCallable - batchGetDocumentsCallable() { - return stub.batchGetDocumentsCallable(); + public final ListCollectionIdsPagedResponse listCollectionIds(ListCollectionIdsRequest request) { + return listCollectionIdsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Starts a new transaction. + * Lists all the collection IDs underneath a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   BeginTransactionResponse response = firestoreClient.beginTransaction(formattedDatabase);
+   *   String parent = "";
+   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   ApiFuture<ListCollectionIdsPagedResponse> future = firestoreClient.listCollectionIdsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (String element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
- * - * @param database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BeginTransactionResponse beginTransaction(String database) { - BeginTransactionRequest request = - BeginTransactionRequest.newBuilder().setDatabase(database).build(); - return beginTransaction(request); + public final UnaryCallable + listCollectionIdsPagedCallable() { + return stub.listCollectionIdsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Starts a new transaction. + * Lists all the collection IDs underneath a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *   String parent = "";
+   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
+   *     .setParent(parent)
    *     .build();
-   *   BeginTransactionResponse response = firestoreClient.beginTransaction(request);
+   *   while (true) {
+   *     ListCollectionIdsResponse response = firestoreClient.listCollectionIdsCallable().call(request);
+   *     for (String element : response.getCollectionIdsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
    * }
    * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BeginTransactionResponse beginTransaction(BeginTransactionRequest request) { - return beginTransactionCallable().call(request); + public final UnaryCallable + listCollectionIdsCallable() { + return stub.listCollectionIdsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Starts a new transaction. + * Gets a single document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   BeginTransactionRequest request = BeginTransactionRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *   String name = "";
+   *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
+   *     .setName(name)
    *     .build();
-   *   ApiFuture<BeginTransactionResponse> future = firestoreClient.beginTransactionCallable().futureCall(request);
-   *   // Do something
-   *   BeginTransactionResponse response = future.get();
+   *   Document response = firestoreClient.getDocument(request);
    * }
    * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - beginTransactionCallable() { - return stub.beginTransactionCallable(); + public final Document getDocument(GetDocumentRequest request) { + return getDocumentCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Commits a transaction, while optionally updating documents. + * Gets a single document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<Write> writes = new ArrayList<>();
-   *   CommitResponse response = firestoreClient.commit(formattedDatabase, writes);
+   *   String name = "";
+   *   GetDocumentRequest request = GetDocumentRequest.newBuilder()
+   *     .setName(name)
+   *     .build();
+   *   ApiFuture<Document> future = firestoreClient.getDocumentCallable().futureCall(request);
+   *   // Do something
+   *   Document response = future.get();
    * }
    * 
- * - * @param database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param writes The writes to apply. - *

Always executed atomically and in order. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CommitResponse commit(String database, List writes) { - CommitRequest request = - CommitRequest.newBuilder().setDatabase(database).addAllWrites(writes).build(); - return commit(request); + public final UnaryCallable getDocumentCallable() { + return stub.getDocumentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Commits a transaction, while optionally updating documents. + * Lists documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<Write> writes = new ArrayList<>();
-   *   CommitRequest request = CommitRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllWrites(writes)
+   *   String parent = "";
+   *   String collectionId = "";
+   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setCollectionId(collectionId)
    *     .build();
-   *   CommitResponse response = firestoreClient.commit(request);
+   *   for (Document element : firestoreClient.listDocuments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final CommitResponse commit(CommitRequest request) { - return commitCallable().call(request); + public final ListDocumentsPagedResponse listDocuments(ListDocumentsRequest request) { + return listDocumentsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Commits a transaction, while optionally updating documents. + * Lists documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   List<Write> writes = new ArrayList<>();
-   *   CommitRequest request = CommitRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .addAllWrites(writes)
+   *   String parent = "";
+   *   String collectionId = "";
+   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setCollectionId(collectionId)
    *     .build();
-   *   ApiFuture<CommitResponse> future = firestoreClient.commitCallable().futureCall(request);
+   *   ApiFuture<ListDocumentsPagedResponse> future = firestoreClient.listDocumentsPagedCallable().futureCall(request);
    *   // Do something
-   *   CommitResponse response = future.get();
+   *   for (Document element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
*/ - public final UnaryCallable commitCallable() { - return stub.commitCallable(); + public final UnaryCallable + listDocumentsPagedCallable() { + return stub.listDocumentsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Rolls back a transaction. + * Lists documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   ByteString transaction = ByteString.copyFromUtf8("");
-   *   firestoreClient.rollback(formattedDatabase, transaction);
+   *   String parent = "";
+   *   String collectionId = "";
+   *   ListDocumentsRequest request = ListDocumentsRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setCollectionId(collectionId)
+   *     .build();
+   *   while (true) {
+   *     ListDocumentsResponse response = firestoreClient.listDocumentsCallable().call(request);
+   *     for (Document element : response.getDocumentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
    * }
    * 
- * - * @param database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param transaction Required. The transaction to roll back. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void rollback(String database, ByteString transaction) { - RollbackRequest request = - RollbackRequest.newBuilder().setDatabase(database).setTransaction(transaction).build(); - rollback(request); + public final UnaryCallable listDocumentsCallable() { + return stub.listDocumentsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Rolls back a transaction. + * Creates a new document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   ByteString transaction = ByteString.copyFromUtf8("");
-   *   RollbackRequest request = RollbackRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .setTransaction(transaction)
+   *   String parent = "";
+   *   String collectionId = "";
+   *   Document document = Document.newBuilder().build();
+   *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setCollectionId(collectionId)
+   *     .setDocument(document)
    *     .build();
-   *   firestoreClient.rollback(request);
+   *   Document response = firestoreClient.createDocument(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void rollback(RollbackRequest request) { - rollbackCallable().call(request); + public final Document createDocument(CreateDocumentRequest request) { + return createDocumentCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Rolls back a transaction. + * Creates a new document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   ByteString transaction = ByteString.copyFromUtf8("");
-   *   RollbackRequest request = RollbackRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
-   *     .setTransaction(transaction)
+   *   String parent = "";
+   *   String collectionId = "";
+   *   Document document = Document.newBuilder().build();
+   *   CreateDocumentRequest request = CreateDocumentRequest.newBuilder()
+   *     .setParent(parent)
+   *     .setCollectionId(collectionId)
+   *     .setDocument(document)
    *     .build();
-   *   ApiFuture<Void> future = firestoreClient.rollbackCallable().futureCall(request);
+   *   ApiFuture<Document> future = firestoreClient.createDocumentCallable().futureCall(request);
    *   // Do something
-   *   future.get();
+   *   Document response = future.get();
    * }
    * 
*/ - public final UnaryCallable rollbackCallable() { - return stub.rollbackCallable(); + public final UnaryCallable createDocumentCallable() { + return stub.createDocumentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Runs a query. + * Updates or inserts a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   RunQueryRequest request = RunQueryRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .build();
-   *
-   *   ServerStream<RunQueryResponse> stream = firestoreClient.runQueryCallable().call(request);
-   *   for (RunQueryResponse response : stream) {
-   *     // Do something when receive a response
-   *   }
+   *   Document document = Document.newBuilder().build();
+   *   DocumentMask updateMask = DocumentMask.newBuilder().build();
+   *   Document response = firestoreClient.updateDocument(document, updateMask);
    * }
    * 
+ * + * @param document Required. The updated document. Creates the document if it does not already + * exist. + * @param updateMask 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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ServerStreamingCallable runQueryCallable() { - return stub.runQueryCallable(); + public final Document updateDocument(Document document, DocumentMask updateMask) { + UpdateDocumentRequest request = + UpdateDocumentRequest.newBuilder().setDocument(document).setUpdateMask(updateMask).build(); + return updateDocument(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Streams batches of document updates and deletes, in order. + * Updates or inserts a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   BidiStream<WriteRequest, WriteResponse> bidiStream =
-   *       firestoreClient.writeCallable().call();
-   *
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   WriteRequest request = WriteRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *   Document document = Document.newBuilder().build();
+   *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
+   *     .setDocument(document)
    *     .build();
-   *   bidiStream.send(request);
-   *   for (WriteResponse response : bidiStream) {
-   *     // Do something when receive a response
-   *   }
+   *   Document response = firestoreClient.updateDocument(request);
    * }
    * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final BidiStreamingCallable writeCallable() { - return stub.writeCallable(); + public final Document updateDocument(UpdateDocumentRequest request) { + return updateDocumentCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Listens to changes. + * Updates or inserts a document. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   BidiStream<ListenRequest, ListenResponse> bidiStream =
-   *       firestoreClient.listenCallable().call();
-   *
-   *   String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-   *   ListenRequest request = ListenRequest.newBuilder()
-   *     .setDatabase(formattedDatabase)
+   *   Document document = Document.newBuilder().build();
+   *   UpdateDocumentRequest request = UpdateDocumentRequest.newBuilder()
+   *     .setDocument(document)
    *     .build();
-   *   bidiStream.send(request);
-   *   for (ListenResponse response : bidiStream) {
-   *     // Do something when receive a response
-   *   }
+   *   ApiFuture<Document> future = firestoreClient.updateDocumentCallable().futureCall(request);
+   *   // Do something
+   *   Document response = future.get();
    * }
    * 
*/ - public final BidiStreamingCallable listenCallable() { - return stub.listenCallable(); + public final UnaryCallable updateDocumentCallable() { + return stub.updateDocumentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists all the collection IDs underneath a document. + * Commits a transaction, while optionally updating documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   for (String element : firestoreClient.listCollectionIds(formattedParent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   String database = "";
+   *   List<Write> writes = new ArrayList<>();
+   *   CommitResponse response = firestoreClient.commit(database, writes);
    * }
    * 
* - * @param parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @param database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param writes The writes to apply. + *

Always executed atomically and in order. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCollectionIdsPagedResponse listCollectionIds(String parent) { - ListCollectionIdsRequest request = - ListCollectionIdsRequest.newBuilder().setParent(parent).build(); - return listCollectionIds(request); + public final CommitResponse commit(String database, List writes) { + CommitRequest request = + CommitRequest.newBuilder().setDatabase(database).addAllWrites(writes).build(); + return commit(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists all the collection IDs underneath a document. + * Commits a transaction, while optionally updating documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *   String database = "";
+   *   CommitRequest request = CommitRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   for (String element : firestoreClient.listCollectionIds(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   CommitResponse response = firestoreClient.commit(request);
    * }
    * 
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListCollectionIdsPagedResponse listCollectionIds(ListCollectionIdsRequest request) { - return listCollectionIdsPagedCallable().call(request); + public final CommitResponse commit(CommitRequest request) { + return commitCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists all the collection IDs underneath a document. + * Commits a transaction, while optionally updating documents. * *

Sample code: * *


    * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *   String database = "";
+   *   CommitRequest request = CommitRequest.newBuilder()
+   *     .setDatabase(database)
    *     .build();
-   *   ApiFuture<ListCollectionIdsPagedResponse> future = firestoreClient.listCollectionIdsPagedCallable().futureCall(request);
+   *   ApiFuture<CommitResponse> future = firestoreClient.commitCallable().futureCall(request);
    *   // Do something
-   *   for (String element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listCollectionIdsPagedCallable() { - return stub.listCollectionIdsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists all the collection IDs underneath a document. - * - *

Sample code: - * - *


-   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
-   *   String formattedParent = AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-   *   ListCollectionIdsRequest request = ListCollectionIdsRequest.newBuilder()
-   *     .setParent(formattedParent)
-   *     .build();
-   *   while (true) {
-   *     ListCollectionIdsResponse response = firestoreClient.listCollectionIdsCallable().call(request);
-   *     for (String element : response.getCollectionIdsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
+   *   CommitResponse response = future.get();
    * }
    * 
*/ - public final UnaryCallable - listCollectionIdsCallable() { - return stub.listCollectionIdsCallable(); + public final UnaryCallable commitCallable() { + return stub.commitCallable(); } @Override @@ -1014,87 +975,6 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted return stub.awaitTermination(duration, unit); } - public static class ListDocumentsPagedResponse - extends AbstractPagedListResponse< - ListDocumentsRequest, - ListDocumentsResponse, - Document, - ListDocumentsPage, - ListDocumentsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListDocumentsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListDocumentsPagedResponse apply(ListDocumentsPage input) { - return new ListDocumentsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListDocumentsPagedResponse(ListDocumentsPage page) { - super(page, ListDocumentsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListDocumentsPage - extends AbstractPage< - ListDocumentsRequest, ListDocumentsResponse, Document, ListDocumentsPage> { - - private ListDocumentsPage( - PageContext context, - ListDocumentsResponse response) { - super(context, response); - } - - private static ListDocumentsPage createEmptyPage() { - return new ListDocumentsPage(null, null); - } - - @Override - protected ListDocumentsPage createPage( - PageContext context, - ListDocumentsResponse response) { - return new ListDocumentsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListDocumentsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListDocumentsRequest, - ListDocumentsResponse, - Document, - ListDocumentsPage, - ListDocumentsFixedSizeCollection> { - - private ListDocumentsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListDocumentsFixedSizeCollection createEmptyCollection() { - return new ListDocumentsFixedSizeCollection(null, 0); - } - - @Override - protected ListDocumentsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListDocumentsFixedSizeCollection(pages, collectionSize); - } - } - public static class ListCollectionIdsPagedResponse extends AbstractPagedListResponse< ListCollectionIdsRequest, @@ -1176,4 +1056,85 @@ protected ListCollectionIdsFixedSizeCollection createCollection( return new ListCollectionIdsFixedSizeCollection(pages, collectionSize); } } + + public static class ListDocumentsPagedResponse + extends AbstractPagedListResponse< + ListDocumentsRequest, + ListDocumentsResponse, + Document, + ListDocumentsPage, + ListDocumentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDocumentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDocumentsPagedResponse apply(ListDocumentsPage input) { + return new ListDocumentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDocumentsPagedResponse(ListDocumentsPage page) { + super(page, ListDocumentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDocumentsPage + extends AbstractPage< + ListDocumentsRequest, ListDocumentsResponse, Document, ListDocumentsPage> { + + private ListDocumentsPage( + PageContext context, + ListDocumentsResponse response) { + super(context, response); + } + + private static ListDocumentsPage createEmptyPage() { + return new ListDocumentsPage(null, null); + } + + @Override + protected ListDocumentsPage createPage( + PageContext context, + ListDocumentsResponse response) { + return new ListDocumentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDocumentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDocumentsRequest, + ListDocumentsResponse, + Document, + ListDocumentsPage, + ListDocumentsFixedSizeCollection> { + + private ListDocumentsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDocumentsFixedSizeCollection createEmptyCollection() { + return new ListDocumentsFixedSizeCollection(null, 0); + } + + @Override + protected ListDocumentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDocumentsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreSettings.java index f832e1afa..7ccecc2da 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreSettings.java @@ -74,16 +74,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of updateDocument to 30 seconds: + *

For example, to set the total timeout of deleteDocument to 30 seconds: * *

  * 
  * FirestoreSettings.Builder firestoreSettingsBuilder =
  *     FirestoreSettings.newBuilder();
  * firestoreSettingsBuilder
- *     .updateDocumentSettings()
+ *     .deleteDocumentSettings()
  *     .setRetrySettings(
- *         firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
+ *         firestoreSettingsBuilder.deleteDocumentSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * FirestoreSettings firestoreSettings = firestoreSettingsBuilder.build();
@@ -96,27 +96,6 @@
 @BetaApi
 @Deprecated
 public class FirestoreSettings extends ClientSettings {
-  /** Returns the object with the settings used for calls to getDocument. */
-  public UnaryCallSettings getDocumentSettings() {
-    return ((FirestoreStubSettings) getStubSettings()).getDocumentSettings();
-  }
-
-  /** Returns the object with the settings used for calls to listDocuments. */
-  public PagedCallSettings
-      listDocumentsSettings() {
-    return ((FirestoreStubSettings) getStubSettings()).listDocumentsSettings();
-  }
-
-  /** Returns the object with the settings used for calls to createDocument. */
-  public UnaryCallSettings createDocumentSettings() {
-    return ((FirestoreStubSettings) getStubSettings()).createDocumentSettings();
-  }
-
-  /** Returns the object with the settings used for calls to updateDocument. */
-  public UnaryCallSettings updateDocumentSettings() {
-    return ((FirestoreStubSettings) getStubSettings()).updateDocumentSettings();
-  }
-
   /** Returns the object with the settings used for calls to deleteDocument. */
   public UnaryCallSettings deleteDocumentSettings() {
     return ((FirestoreStubSettings) getStubSettings()).deleteDocumentSettings();
@@ -134,11 +113,6 @@ public UnaryCallSettings deleteDocumentSettings()
     return ((FirestoreStubSettings) getStubSettings()).beginTransactionSettings();
   }
 
-  /** Returns the object with the settings used for calls to commit. */
-  public UnaryCallSettings commitSettings() {
-    return ((FirestoreStubSettings) getStubSettings()).commitSettings();
-  }
-
   /** Returns the object with the settings used for calls to rollback. */
   public UnaryCallSettings rollbackSettings() {
     return ((FirestoreStubSettings) getStubSettings()).rollbackSettings();
@@ -166,6 +140,32 @@ public StreamingCallSettings listenSettings() {
     return ((FirestoreStubSettings) getStubSettings()).listCollectionIdsSettings();
   }
 
+  /** Returns the object with the settings used for calls to getDocument. */
+  public UnaryCallSettings getDocumentSettings() {
+    return ((FirestoreStubSettings) getStubSettings()).getDocumentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to listDocuments. */
+  public PagedCallSettings
+      listDocumentsSettings() {
+    return ((FirestoreStubSettings) getStubSettings()).listDocumentsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to createDocument. */
+  public UnaryCallSettings createDocumentSettings() {
+    return ((FirestoreStubSettings) getStubSettings()).createDocumentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to updateDocument. */
+  public UnaryCallSettings updateDocumentSettings() {
+    return ((FirestoreStubSettings) getStubSettings()).updateDocumentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to commit. */
+  public UnaryCallSettings commitSettings() {
+    return ((FirestoreStubSettings) getStubSettings()).commitSettings();
+  }
+
   public static final FirestoreSettings create(FirestoreStubSettings stub) throws IOException {
     return new FirestoreSettings.Builder(stub.toBuilder()).build();
   }
@@ -262,28 +262,6 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
-    /** Returns the builder for the settings used for calls to getDocument. */
-    public UnaryCallSettings.Builder getDocumentSettings() {
-      return getStubSettingsBuilder().getDocumentSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to listDocuments. */
-    public PagedCallSettings.Builder<
-            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
-        listDocumentsSettings() {
-      return getStubSettingsBuilder().listDocumentsSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to createDocument. */
-    public UnaryCallSettings.Builder createDocumentSettings() {
-      return getStubSettingsBuilder().createDocumentSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to updateDocument. */
-    public UnaryCallSettings.Builder updateDocumentSettings() {
-      return getStubSettingsBuilder().updateDocumentSettings();
-    }
-
     /** Returns the builder for the settings used for calls to deleteDocument. */
     public UnaryCallSettings.Builder deleteDocumentSettings() {
       return getStubSettingsBuilder().deleteDocumentSettings();
@@ -301,11 +279,6 @@ public UnaryCallSettings.Builder deleteDocumentSet
       return getStubSettingsBuilder().beginTransactionSettings();
     }
 
-    /** Returns the builder for the settings used for calls to commit. */
-    public UnaryCallSettings.Builder commitSettings() {
-      return getStubSettingsBuilder().commitSettings();
-    }
-
     /** Returns the builder for the settings used for calls to rollback. */
     public UnaryCallSettings.Builder rollbackSettings() {
       return getStubSettingsBuilder().rollbackSettings();
@@ -334,6 +307,33 @@ public StreamingCallSettings.Builder listenSettin
       return getStubSettingsBuilder().listCollectionIdsSettings();
     }
 
+    /** Returns the builder for the settings used for calls to getDocument. */
+    public UnaryCallSettings.Builder getDocumentSettings() {
+      return getStubSettingsBuilder().getDocumentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to listDocuments. */
+    public PagedCallSettings.Builder<
+            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
+        listDocumentsSettings() {
+      return getStubSettingsBuilder().listDocumentsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to createDocument. */
+    public UnaryCallSettings.Builder createDocumentSettings() {
+      return getStubSettingsBuilder().createDocumentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to updateDocument. */
+    public UnaryCallSettings.Builder updateDocumentSettings() {
+      return getStubSettingsBuilder().updateDocumentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to commit. */
+    public UnaryCallSettings.Builder commitSettings() {
+      return getStubSettingsBuilder().commitSettings();
+    }
+
     @Override
     public FirestoreSettings build() throws IOException {
       return new FirestoreSettings(this);
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/package-info.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/package-info.java
index c9ce16acf..f2ae43399 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/package-info.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/package-info.java
@@ -39,9 +39,8 @@
  * 
  * 
  * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
- *   Document document = Document.newBuilder().build();
- *   DocumentMask updateMask = DocumentMask.newBuilder().build();
- *   Document response = firestoreClient.updateDocument(document, updateMask);
+ *   String name = "";
+ *   firestoreClient.deleteDocument(name);
  * }
  * 
  * 
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStub.java index 5906ff98d..4e1b1c50a 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStub.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStub.java @@ -58,27 +58,6 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class FirestoreStub implements BackgroundResource { - public UnaryCallable getDocumentCallable() { - throw new UnsupportedOperationException("Not implemented: getDocumentCallable()"); - } - - public UnaryCallable - listDocumentsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listDocumentsPagedCallable()"); - } - - public UnaryCallable listDocumentsCallable() { - throw new UnsupportedOperationException("Not implemented: listDocumentsCallable()"); - } - - public UnaryCallable createDocumentCallable() { - throw new UnsupportedOperationException("Not implemented: createDocumentCallable()"); - } - - public UnaryCallable updateDocumentCallable() { - throw new UnsupportedOperationException("Not implemented: updateDocumentCallable()"); - } - public UnaryCallable deleteDocumentCallable() { throw new UnsupportedOperationException("Not implemented: deleteDocumentCallable()"); } @@ -93,10 +72,6 @@ public UnaryCallable deleteDocumentCallable() { throw new UnsupportedOperationException("Not implemented: beginTransactionCallable()"); } - public UnaryCallable commitCallable() { - throw new UnsupportedOperationException("Not implemented: commitCallable()"); - } - public UnaryCallable rollbackCallable() { throw new UnsupportedOperationException("Not implemented: rollbackCallable()"); } @@ -123,6 +98,31 @@ public BidiStreamingCallable listenCallable() { throw new UnsupportedOperationException("Not implemented: listCollectionIdsCallable()"); } + public UnaryCallable getDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: getDocumentCallable()"); + } + + public UnaryCallable + listDocumentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDocumentsPagedCallable()"); + } + + public UnaryCallable listDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: listDocumentsCallable()"); + } + + public UnaryCallable createDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: createDocumentCallable()"); + } + + public UnaryCallable updateDocumentCallable() { + throw new UnsupportedOperationException("Not implemented: updateDocumentCallable()"); + } + + public UnaryCallable commitCallable() { + throw new UnsupportedOperationException("Not implemented: commitCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java index edbe88a66..c15014b44 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/FirestoreStubSettings.java @@ -89,16 +89,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

For example, to set the total timeout of updateDocument to 30 seconds: + *

For example, to set the total timeout of deleteDocument to 30 seconds: * *

  * 
  * FirestoreStubSettings.Builder firestoreSettingsBuilder =
  *     FirestoreStubSettings.newBuilder();
  * firestoreSettingsBuilder
- *     .updateDocumentSettings()
+ *     .deleteDocumentSettings()
  *     .setRetrySettings(
- *         firestoreSettingsBuilder.updateDocumentSettings().getRetrySettings().toBuilder()
+ *         firestoreSettingsBuilder.deleteDocumentSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * FirestoreStubSettings firestoreSettings = firestoreSettingsBuilder.build();
@@ -115,18 +115,11 @@ public class FirestoreStubSettings extends StubSettings {
           .add("https://www.googleapis.com/auth/datastore")
           .build();
 
-  private final UnaryCallSettings getDocumentSettings;
-  private final PagedCallSettings<
-          ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
-      listDocumentsSettings;
-  private final UnaryCallSettings createDocumentSettings;
-  private final UnaryCallSettings updateDocumentSettings;
   private final UnaryCallSettings deleteDocumentSettings;
   private final ServerStreamingCallSettings
       batchGetDocumentsSettings;
   private final UnaryCallSettings
       beginTransactionSettings;
-  private final UnaryCallSettings commitSettings;
   private final UnaryCallSettings rollbackSettings;
   private final ServerStreamingCallSettings runQuerySettings;
   private final StreamingCallSettings writeSettings;
@@ -134,27 +127,13 @@ public class FirestoreStubSettings extends StubSettings {
   private final PagedCallSettings<
           ListCollectionIdsRequest, ListCollectionIdsResponse, ListCollectionIdsPagedResponse>
       listCollectionIdsSettings;
-
-  /** Returns the object with the settings used for calls to getDocument. */
-  public UnaryCallSettings getDocumentSettings() {
-    return getDocumentSettings;
-  }
-
-  /** Returns the object with the settings used for calls to listDocuments. */
-  public PagedCallSettings
-      listDocumentsSettings() {
-    return listDocumentsSettings;
-  }
-
-  /** Returns the object with the settings used for calls to createDocument. */
-  public UnaryCallSettings createDocumentSettings() {
-    return createDocumentSettings;
-  }
-
-  /** Returns the object with the settings used for calls to updateDocument. */
-  public UnaryCallSettings updateDocumentSettings() {
-    return updateDocumentSettings;
-  }
+  private final UnaryCallSettings getDocumentSettings;
+  private final PagedCallSettings<
+          ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
+      listDocumentsSettings;
+  private final UnaryCallSettings createDocumentSettings;
+  private final UnaryCallSettings updateDocumentSettings;
+  private final UnaryCallSettings commitSettings;
 
   /** Returns the object with the settings used for calls to deleteDocument. */
   public UnaryCallSettings deleteDocumentSettings() {
@@ -173,11 +152,6 @@ public UnaryCallSettings deleteDocumentSettings()
     return beginTransactionSettings;
   }
 
-  /** Returns the object with the settings used for calls to commit. */
-  public UnaryCallSettings commitSettings() {
-    return commitSettings;
-  }
-
   /** Returns the object with the settings used for calls to rollback. */
   public UnaryCallSettings rollbackSettings() {
     return rollbackSettings;
@@ -205,6 +179,32 @@ public StreamingCallSettings listenSettings() {
     return listCollectionIdsSettings;
   }
 
+  /** Returns the object with the settings used for calls to getDocument. */
+  public UnaryCallSettings getDocumentSettings() {
+    return getDocumentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to listDocuments. */
+  public PagedCallSettings
+      listDocumentsSettings() {
+    return listDocumentsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to createDocument. */
+  public UnaryCallSettings createDocumentSettings() {
+    return createDocumentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to updateDocument. */
+  public UnaryCallSettings updateDocumentSettings() {
+    return updateDocumentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to commit. */
+  public UnaryCallSettings commitSettings() {
+    return commitSettings;
+  }
+
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public FirestoreStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -273,110 +273,93 @@ public Builder toBuilder() {
   protected FirestoreStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
-    getDocumentSettings = settingsBuilder.getDocumentSettings().build();
-    listDocumentsSettings = settingsBuilder.listDocumentsSettings().build();
-    createDocumentSettings = settingsBuilder.createDocumentSettings().build();
-    updateDocumentSettings = settingsBuilder.updateDocumentSettings().build();
     deleteDocumentSettings = settingsBuilder.deleteDocumentSettings().build();
     batchGetDocumentsSettings = settingsBuilder.batchGetDocumentsSettings().build();
     beginTransactionSettings = settingsBuilder.beginTransactionSettings().build();
-    commitSettings = settingsBuilder.commitSettings().build();
     rollbackSettings = settingsBuilder.rollbackSettings().build();
     runQuerySettings = settingsBuilder.runQuerySettings().build();
     writeSettings = settingsBuilder.writeSettings().build();
     listenSettings = settingsBuilder.listenSettings().build();
     listCollectionIdsSettings = settingsBuilder.listCollectionIdsSettings().build();
+    getDocumentSettings = settingsBuilder.getDocumentSettings().build();
+    listDocumentsSettings = settingsBuilder.listDocumentsSettings().build();
+    createDocumentSettings = settingsBuilder.createDocumentSettings().build();
+    updateDocumentSettings = settingsBuilder.updateDocumentSettings().build();
+    commitSettings = settingsBuilder.commitSettings().build();
   }
 
-  private static final PagedListDescriptor
-      LIST_DOCUMENTS_PAGE_STR_DESC =
-          new PagedListDescriptor() {
+  private static final PagedListDescriptor<
+          ListCollectionIdsRequest, ListCollectionIdsResponse, String>
+      LIST_COLLECTION_IDS_PAGE_STR_DESC =
+          new PagedListDescriptor() {
             @Override
             public String emptyToken() {
               return "";
             }
 
             @Override
-            public ListDocumentsRequest injectToken(ListDocumentsRequest payload, String token) {
-              return ListDocumentsRequest.newBuilder(payload).setPageToken(token).build();
+            public ListCollectionIdsRequest injectToken(
+                ListCollectionIdsRequest payload, String token) {
+              return ListCollectionIdsRequest.newBuilder(payload).setPageToken(token).build();
             }
 
             @Override
-            public ListDocumentsRequest injectPageSize(ListDocumentsRequest payload, int pageSize) {
-              return ListDocumentsRequest.newBuilder(payload).setPageSize(pageSize).build();
+            public ListCollectionIdsRequest injectPageSize(
+                ListCollectionIdsRequest payload, int pageSize) {
+              return ListCollectionIdsRequest.newBuilder(payload).setPageSize(pageSize).build();
             }
 
             @Override
-            public Integer extractPageSize(ListDocumentsRequest payload) {
+            public Integer extractPageSize(ListCollectionIdsRequest payload) {
               return payload.getPageSize();
             }
 
             @Override
-            public String extractNextToken(ListDocumentsResponse payload) {
+            public String extractNextToken(ListCollectionIdsResponse payload) {
               return payload.getNextPageToken();
             }
 
             @Override
-            public Iterable extractResources(ListDocumentsResponse payload) {
-              return payload.getDocumentsList() != null
-                  ? payload.getDocumentsList()
-                  : ImmutableList.of();
+            public Iterable extractResources(ListCollectionIdsResponse payload) {
+              return payload.getCollectionIdsList() != null
+                  ? payload.getCollectionIdsList()
+                  : ImmutableList.of();
             }
           };
 
-  private static final PagedListDescriptor<
-          ListCollectionIdsRequest, ListCollectionIdsResponse, String>
-      LIST_COLLECTION_IDS_PAGE_STR_DESC =
-          new PagedListDescriptor() {
+  private static final PagedListDescriptor
+      LIST_DOCUMENTS_PAGE_STR_DESC =
+          new PagedListDescriptor() {
             @Override
             public String emptyToken() {
               return "";
             }
 
             @Override
-            public ListCollectionIdsRequest injectToken(
-                ListCollectionIdsRequest payload, String token) {
-              return ListCollectionIdsRequest.newBuilder(payload).setPageToken(token).build();
+            public ListDocumentsRequest injectToken(ListDocumentsRequest payload, String token) {
+              return ListDocumentsRequest.newBuilder(payload).setPageToken(token).build();
             }
 
             @Override
-            public ListCollectionIdsRequest injectPageSize(
-                ListCollectionIdsRequest payload, int pageSize) {
-              return ListCollectionIdsRequest.newBuilder(payload).setPageSize(pageSize).build();
+            public ListDocumentsRequest injectPageSize(ListDocumentsRequest payload, int pageSize) {
+              return ListDocumentsRequest.newBuilder(payload).setPageSize(pageSize).build();
             }
 
             @Override
-            public Integer extractPageSize(ListCollectionIdsRequest payload) {
+            public Integer extractPageSize(ListDocumentsRequest payload) {
               return payload.getPageSize();
             }
 
             @Override
-            public String extractNextToken(ListCollectionIdsResponse payload) {
+            public String extractNextToken(ListDocumentsResponse payload) {
               return payload.getNextPageToken();
             }
 
             @Override
-            public Iterable extractResources(ListCollectionIdsResponse payload) {
-              return payload.getCollectionIdsList() != null
-                  ? payload.getCollectionIdsList()
-                  : ImmutableList.of();
-            }
-          };
-
-  private static final PagedListResponseFactory<
-          ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
-      LIST_DOCUMENTS_PAGE_STR_FACT =
-          new PagedListResponseFactory<
-              ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>() {
-            @Override
-            public ApiFuture getFuturePagedResponse(
-                UnaryCallable callable,
-                ListDocumentsRequest request,
-                ApiCallContext context,
-                ApiFuture futureResponse) {
-              PageContext pageContext =
-                  PageContext.create(callable, LIST_DOCUMENTS_PAGE_STR_DESC, request, context);
-              return ListDocumentsPagedResponse.createAsync(pageContext, futureResponse);
+            public Iterable extractResources(ListDocumentsResponse payload) {
+              return payload.getDocumentsList() != null
+                  ? payload.getDocumentsList()
+                  : ImmutableList.of();
             }
           };
 
@@ -399,23 +382,33 @@ public ApiFuture getFuturePagedResponse(
             }
           };
 
+  private static final PagedListResponseFactory<
+          ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
+      LIST_DOCUMENTS_PAGE_STR_FACT =
+          new PagedListResponseFactory<
+              ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>() {
+            @Override
+            public ApiFuture getFuturePagedResponse(
+                UnaryCallable callable,
+                ListDocumentsRequest request,
+                ApiCallContext context,
+                ApiFuture futureResponse) {
+              PageContext pageContext =
+                  PageContext.create(callable, LIST_DOCUMENTS_PAGE_STR_DESC, request, context);
+              return ListDocumentsPagedResponse.createAsync(pageContext, futureResponse);
+            }
+          };
+
   /** Builder for FirestoreStubSettings. */
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
-    private final UnaryCallSettings.Builder getDocumentSettings;
-    private final PagedCallSettings.Builder<
-            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
-        listDocumentsSettings;
-    private final UnaryCallSettings.Builder createDocumentSettings;
-    private final UnaryCallSettings.Builder updateDocumentSettings;
     private final UnaryCallSettings.Builder deleteDocumentSettings;
     private final ServerStreamingCallSettings.Builder<
             BatchGetDocumentsRequest, BatchGetDocumentsResponse>
         batchGetDocumentsSettings;
     private final UnaryCallSettings.Builder
         beginTransactionSettings;
-    private final UnaryCallSettings.Builder commitSettings;
     private final UnaryCallSettings.Builder rollbackSettings;
     private final ServerStreamingCallSettings.Builder
         runQuerySettings;
@@ -424,6 +417,13 @@ public static class Builder extends StubSettings.Builder
         listCollectionIdsSettings;
+    private final UnaryCallSettings.Builder getDocumentSettings;
+    private final PagedCallSettings.Builder<
+            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
+        listDocumentsSettings;
+    private final UnaryCallSettings.Builder createDocumentSettings;
+    private final UnaryCallSettings.Builder updateDocumentSettings;
+    private final UnaryCallSettings.Builder commitSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -477,22 +477,12 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
-      getDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      listDocumentsSettings = PagedCallSettings.newBuilder(LIST_DOCUMENTS_PAGE_STR_FACT);
-
-      createDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      updateDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       deleteDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       batchGetDocumentsSettings = ServerStreamingCallSettings.newBuilder();
 
       beginTransactionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      commitSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       rollbackSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       runQuerySettings = ServerStreamingCallSettings.newBuilder();
@@ -503,17 +493,27 @@ protected Builder(ClientContext clientContext) {
 
       listCollectionIdsSettings = PagedCallSettings.newBuilder(LIST_COLLECTION_IDS_PAGE_STR_FACT);
 
+      getDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      listDocumentsSettings = PagedCallSettings.newBuilder(LIST_DOCUMENTS_PAGE_STR_FACT);
+
+      createDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      updateDocumentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      commitSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteDocumentSettings,
+              beginTransactionSettings,
+              rollbackSettings,
+              listCollectionIdsSettings,
               getDocumentSettings,
               listDocumentsSettings,
               createDocumentSettings,
               updateDocumentSettings,
-              deleteDocumentSettings,
-              beginTransactionSettings,
-              commitSettings,
-              rollbackSettings,
-              listCollectionIdsSettings);
+              commitSettings);
 
       initDefaults(this);
     }
@@ -530,58 +530,58 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .getDocumentSettings()
+          .deleteDocumentSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .listDocumentsSettings()
+          .batchGetDocumentsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      builder
-          .createDocumentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("streaming"));
 
       builder
-          .updateDocumentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .beginTransactionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteDocumentSettings()
+          .rollbackSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchGetDocumentsSettings()
+          .runQuerySettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("streaming"));
 
       builder
-          .beginTransactionSettings()
+          .listCollectionIdsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .commitSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .getDocumentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .rollbackSettings()
+          .listDocumentsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .runQuerySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("streaming"));
+          .createDocumentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .listCollectionIdsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .updateDocumentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .commitSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       return builder;
@@ -590,31 +590,31 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(FirestoreStubSettings settings) {
       super(settings);
 
-      getDocumentSettings = settings.getDocumentSettings.toBuilder();
-      listDocumentsSettings = settings.listDocumentsSettings.toBuilder();
-      createDocumentSettings = settings.createDocumentSettings.toBuilder();
-      updateDocumentSettings = settings.updateDocumentSettings.toBuilder();
       deleteDocumentSettings = settings.deleteDocumentSettings.toBuilder();
       batchGetDocumentsSettings = settings.batchGetDocumentsSettings.toBuilder();
       beginTransactionSettings = settings.beginTransactionSettings.toBuilder();
-      commitSettings = settings.commitSettings.toBuilder();
       rollbackSettings = settings.rollbackSettings.toBuilder();
       runQuerySettings = settings.runQuerySettings.toBuilder();
       writeSettings = settings.writeSettings.toBuilder();
       listenSettings = settings.listenSettings.toBuilder();
       listCollectionIdsSettings = settings.listCollectionIdsSettings.toBuilder();
+      getDocumentSettings = settings.getDocumentSettings.toBuilder();
+      listDocumentsSettings = settings.listDocumentsSettings.toBuilder();
+      createDocumentSettings = settings.createDocumentSettings.toBuilder();
+      updateDocumentSettings = settings.updateDocumentSettings.toBuilder();
+      commitSettings = settings.commitSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteDocumentSettings,
+              beginTransactionSettings,
+              rollbackSettings,
+              listCollectionIdsSettings,
               getDocumentSettings,
               listDocumentsSettings,
               createDocumentSettings,
               updateDocumentSettings,
-              deleteDocumentSettings,
-              beginTransactionSettings,
-              commitSettings,
-              rollbackSettings,
-              listCollectionIdsSettings);
+              commitSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -633,28 +633,6 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
-    /** Returns the builder for the settings used for calls to getDocument. */
-    public UnaryCallSettings.Builder getDocumentSettings() {
-      return getDocumentSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to listDocuments. */
-    public PagedCallSettings.Builder<
-            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
-        listDocumentsSettings() {
-      return listDocumentsSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to createDocument. */
-    public UnaryCallSettings.Builder createDocumentSettings() {
-      return createDocumentSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to updateDocument. */
-    public UnaryCallSettings.Builder updateDocumentSettings() {
-      return updateDocumentSettings;
-    }
-
     /** Returns the builder for the settings used for calls to deleteDocument. */
     public UnaryCallSettings.Builder deleteDocumentSettings() {
       return deleteDocumentSettings;
@@ -672,11 +650,6 @@ public UnaryCallSettings.Builder deleteDocumentSet
       return beginTransactionSettings;
     }
 
-    /** Returns the builder for the settings used for calls to commit. */
-    public UnaryCallSettings.Builder commitSettings() {
-      return commitSettings;
-    }
-
     /** Returns the builder for the settings used for calls to rollback. */
     public UnaryCallSettings.Builder rollbackSettings() {
       return rollbackSettings;
@@ -705,6 +678,33 @@ public StreamingCallSettings.Builder listenSettin
       return listCollectionIdsSettings;
     }
 
+    /** Returns the builder for the settings used for calls to getDocument. */
+    public UnaryCallSettings.Builder getDocumentSettings() {
+      return getDocumentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to listDocuments. */
+    public PagedCallSettings.Builder<
+            ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
+        listDocumentsSettings() {
+      return listDocumentsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to createDocument. */
+    public UnaryCallSettings.Builder createDocumentSettings() {
+      return createDocumentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to updateDocument. */
+    public UnaryCallSettings.Builder updateDocumentSettings() {
+      return updateDocumentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to commit. */
+    public UnaryCallSettings.Builder commitSettings() {
+      return commitSettings;
+    }
+
     @Override
     public FirestoreStubSettings build() throws IOException {
       return new FirestoreStubSettings(this);
diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/GrpcFirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/GrpcFirestoreStub.java
index 789d7806e..80c8da929 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/GrpcFirestoreStub.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/stub/GrpcFirestoreStub.java
@@ -69,41 +69,6 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcFirestoreStub extends FirestoreStub {
 
-  private static final MethodDescriptor getDocumentMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.firestore.v1beta1.Firestore/GetDocument")
-          .setRequestMarshaller(ProtoUtils.marshaller(GetDocumentRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
-          .build();
-  private static final MethodDescriptor
-      listDocumentsMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.firestore.v1beta1.Firestore/ListDocuments")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(ListDocumentsRequest.getDefaultInstance()))
-              .setResponseMarshaller(
-                  ProtoUtils.marshaller(ListDocumentsResponse.getDefaultInstance()))
-              .build();
-  private static final MethodDescriptor
-      createDocumentMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.firestore.v1beta1.Firestore/CreateDocument")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(CreateDocumentRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
-              .build();
-  private static final MethodDescriptor
-      updateDocumentMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.firestore.v1beta1.Firestore/UpdateDocument")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(UpdateDocumentRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor
       deleteDocumentMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -133,13 +98,6 @@ public class GrpcFirestoreStub extends FirestoreStub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(BeginTransactionResponse.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor commitMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.firestore.v1beta1.Firestore/Commit")
-          .setRequestMarshaller(ProtoUtils.marshaller(CommitRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(CommitResponse.getDefaultInstance()))
-          .build();
   private static final MethodDescriptor rollbackMethodDescriptor =
       MethodDescriptor.newBuilder()
           .setType(MethodDescriptor.MethodType.UNARY)
@@ -179,21 +137,56 @@ public class GrpcFirestoreStub extends FirestoreStub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(ListCollectionIdsResponse.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor getDocumentMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.firestore.v1beta1.Firestore/GetDocument")
+          .setRequestMarshaller(ProtoUtils.marshaller(GetDocumentRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor
+      listDocumentsMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.v1beta1.Firestore/ListDocuments")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(ListDocumentsRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(ListDocumentsResponse.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      createDocumentMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.v1beta1.Firestore/CreateDocument")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(CreateDocumentRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      updateDocumentMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.v1beta1.Firestore/UpdateDocument")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(UpdateDocumentRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Document.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor commitMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.firestore.v1beta1.Firestore/Commit")
+          .setRequestMarshaller(ProtoUtils.marshaller(CommitRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(CommitResponse.getDefaultInstance()))
+          .build();
 
   private final BackgroundResource backgroundResources;
 
-  private final UnaryCallable getDocumentCallable;
-  private final UnaryCallable listDocumentsCallable;
-  private final UnaryCallable
-      listDocumentsPagedCallable;
-  private final UnaryCallable createDocumentCallable;
-  private final UnaryCallable updateDocumentCallable;
   private final UnaryCallable deleteDocumentCallable;
   private final ServerStreamingCallable
       batchGetDocumentsCallable;
   private final UnaryCallable
       beginTransactionCallable;
-  private final UnaryCallable commitCallable;
   private final UnaryCallable rollbackCallable;
   private final ServerStreamingCallable runQueryCallable;
   private final BidiStreamingCallable writeCallable;
@@ -202,6 +195,13 @@ public class GrpcFirestoreStub extends FirestoreStub {
       listCollectionIdsCallable;
   private final UnaryCallable
       listCollectionIdsPagedCallable;
+  private final UnaryCallable getDocumentCallable;
+  private final UnaryCallable listDocumentsCallable;
+  private final UnaryCallable
+      listDocumentsPagedCallable;
+  private final UnaryCallable createDocumentCallable;
+  private final UnaryCallable updateDocumentCallable;
+  private final UnaryCallable commitCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -241,40 +241,6 @@ protected GrpcFirestoreStub(
       throws IOException {
     this.callableFactory = callableFactory;
 
-    GrpcCallSettings getDocumentTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(getDocumentMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(GetDocumentRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
-    GrpcCallSettings listDocumentsTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(listDocumentsMethodDescriptor)
-            .build();
-    GrpcCallSettings createDocumentTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(createDocumentMethodDescriptor)
-            .build();
-    GrpcCallSettings updateDocumentTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(updateDocumentMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(UpdateDocumentRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("document.name", String.valueOf(request.getDocument().getName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings deleteDocumentTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(deleteDocumentMethodDescriptor)
@@ -316,19 +282,6 @@ public Map extract(BeginTransactionRequest request) {
                       }
                     })
                 .build();
-    GrpcCallSettings commitTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(commitMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(CommitRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("database", String.valueOf(request.getDatabase()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings rollbackTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(rollbackMethodDescriptor)
@@ -377,22 +330,54 @@ public Map extract(ListCollectionIdsRequest request) {
                       }
                     })
                 .build();
+    GrpcCallSettings getDocumentTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(getDocumentMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(GetDocumentRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings listDocumentsTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(listDocumentsMethodDescriptor)
+            .build();
+    GrpcCallSettings createDocumentTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(createDocumentMethodDescriptor)
+            .build();
+    GrpcCallSettings updateDocumentTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateDocumentMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateDocumentRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("document.name", String.valueOf(request.getDocument().getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings commitTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(commitMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(CommitRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("database", String.valueOf(request.getDatabase()));
+                    return params.build();
+                  }
+                })
+            .build();
 
-    this.getDocumentCallable =
-        callableFactory.createUnaryCallable(
-            getDocumentTransportSettings, settings.getDocumentSettings(), clientContext);
-    this.listDocumentsCallable =
-        callableFactory.createUnaryCallable(
-            listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext);
-    this.listDocumentsPagedCallable =
-        callableFactory.createPagedCallable(
-            listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext);
-    this.createDocumentCallable =
-        callableFactory.createUnaryCallable(
-            createDocumentTransportSettings, settings.createDocumentSettings(), clientContext);
-    this.updateDocumentCallable =
-        callableFactory.createUnaryCallable(
-            updateDocumentTransportSettings, settings.updateDocumentSettings(), clientContext);
     this.deleteDocumentCallable =
         callableFactory.createUnaryCallable(
             deleteDocumentTransportSettings, settings.deleteDocumentSettings(), clientContext);
@@ -404,9 +389,6 @@ public Map extract(ListCollectionIdsRequest request) {
     this.beginTransactionCallable =
         callableFactory.createUnaryCallable(
             beginTransactionTransportSettings, settings.beginTransactionSettings(), clientContext);
-    this.commitCallable =
-        callableFactory.createUnaryCallable(
-            commitTransportSettings, settings.commitSettings(), clientContext);
     this.rollbackCallable =
         callableFactory.createUnaryCallable(
             rollbackTransportSettings, settings.rollbackSettings(), clientContext);
@@ -429,31 +411,28 @@ public Map extract(ListCollectionIdsRequest request) {
             listCollectionIdsTransportSettings,
             settings.listCollectionIdsSettings(),
             clientContext);
+    this.getDocumentCallable =
+        callableFactory.createUnaryCallable(
+            getDocumentTransportSettings, settings.getDocumentSettings(), clientContext);
+    this.listDocumentsCallable =
+        callableFactory.createUnaryCallable(
+            listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext);
+    this.listDocumentsPagedCallable =
+        callableFactory.createPagedCallable(
+            listDocumentsTransportSettings, settings.listDocumentsSettings(), clientContext);
+    this.createDocumentCallable =
+        callableFactory.createUnaryCallable(
+            createDocumentTransportSettings, settings.createDocumentSettings(), clientContext);
+    this.updateDocumentCallable =
+        callableFactory.createUnaryCallable(
+            updateDocumentTransportSettings, settings.updateDocumentSettings(), clientContext);
+    this.commitCallable =
+        callableFactory.createUnaryCallable(
+            commitTransportSettings, settings.commitSettings(), clientContext);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
-  public UnaryCallable getDocumentCallable() {
-    return getDocumentCallable;
-  }
-
-  public UnaryCallable
-      listDocumentsPagedCallable() {
-    return listDocumentsPagedCallable;
-  }
-
-  public UnaryCallable listDocumentsCallable() {
-    return listDocumentsCallable;
-  }
-
-  public UnaryCallable createDocumentCallable() {
-    return createDocumentCallable;
-  }
-
-  public UnaryCallable updateDocumentCallable() {
-    return updateDocumentCallable;
-  }
-
   public UnaryCallable deleteDocumentCallable() {
     return deleteDocumentCallable;
   }
@@ -468,10 +447,6 @@ public UnaryCallable deleteDocumentCallable() {
     return beginTransactionCallable;
   }
 
-  public UnaryCallable commitCallable() {
-    return commitCallable;
-  }
-
   public UnaryCallable rollbackCallable() {
     return rollbackCallable;
   }
@@ -498,6 +473,31 @@ public BidiStreamingCallable listenCallable() {
     return listCollectionIdsCallable;
   }
 
+  public UnaryCallable getDocumentCallable() {
+    return getDocumentCallable;
+  }
+
+  public UnaryCallable
+      listDocumentsPagedCallable() {
+    return listDocumentsPagedCallable;
+  }
+
+  public UnaryCallable listDocumentsCallable() {
+    return listDocumentsCallable;
+  }
+
+  public UnaryCallable createDocumentCallable() {
+    return createDocumentCallable;
+  }
+
+  public UnaryCallable updateDocumentCallable() {
+    return updateDocumentCallable;
+  }
+
+  public UnaryCallable commitCallable() {
+    return commitCallable;
+  }
+
   @Override
   public final void close() {
     shutdown();
diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java
index d2dc7b171..818da5f6b 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java
@@ -25,11 +25,14 @@
 import com.google.api.gax.grpc.testing.MockServiceHelper;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.InvalidArgumentException;
+import com.google.api.gax.rpc.StatusCode;
 import com.google.common.collect.Lists;
+import com.google.firestore.admin.v1.CollectionGroupName;
 import com.google.firestore.admin.v1.CreateIndexRequest;
 import com.google.firestore.admin.v1.DatabaseName;
 import com.google.firestore.admin.v1.DeleteIndexRequest;
 import com.google.firestore.admin.v1.ExportDocumentsRequest;
+import com.google.firestore.admin.v1.ExportDocumentsResponse;
 import com.google.firestore.admin.v1.Field;
 import com.google.firestore.admin.v1.FieldName;
 import com.google.firestore.admin.v1.GetFieldRequest;
@@ -41,10 +44,10 @@
 import com.google.firestore.admin.v1.ListFieldsResponse;
 import com.google.firestore.admin.v1.ListIndexesRequest;
 import com.google.firestore.admin.v1.ListIndexesResponse;
-import com.google.firestore.admin.v1.ParentName;
 import com.google.firestore.admin.v1.UpdateFieldRequest;
 import com.google.longrunning.Operation;
 import com.google.protobuf.AbstractMessage;
+import com.google.protobuf.Any;
 import com.google.protobuf.Empty;
 import io.grpc.Status;
 import io.grpc.StatusRuntimeException;
@@ -52,6 +55,7 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
+import java.util.concurrent.ExecutionException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -99,24 +103,19 @@ public void tearDown() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void createIndexTest() {
-    String name = "name3373707";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name).setDone(done).build();
+  public void deleteIndexTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
     mockFirestoreAdmin.addResponse(expectedResponse);
 
-    ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-    Index index = Index.newBuilder().build();
+    IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
 
-    Operation actualResponse = client.createIndex(parent, index);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    client.deleteIndex(name);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateIndexRequest actualRequest = (CreateIndexRequest) actualRequests.get(0);
+    DeleteIndexRequest actualRequest = (DeleteIndexRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentName.parse(actualRequest.getParent()));
-    Assert.assertEquals(index, actualRequest.getIndex());
+    Assert.assertEquals(name, IndexName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -125,15 +124,14 @@ public void createIndexTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createIndexExceptionTest() throws Exception {
+  public void deleteIndexExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
-      Index index = Index.newBuilder().build();
+      IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
 
-      client.createIndex(parent, index);
+      client.deleteIndex(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -142,30 +140,27 @@ public void createIndexExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void listIndexesTest() {
-    String nextPageToken = "";
-    Index indexesElement = Index.newBuilder().build();
-    List indexes = Arrays.asList(indexesElement);
-    ListIndexesResponse expectedResponse =
-        ListIndexesResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .addAllIndexes(indexes)
+  public void updateFieldTest() throws Exception {
+    FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+    Field expectedResponse = Field.newBuilder().setName(name.toString()).build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("updateFieldTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
             .build();
-    mockFirestoreAdmin.addResponse(expectedResponse);
-
-    ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+    mockFirestoreAdmin.addResponse(resultOperation);
 
-    ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent);
+    Field field = Field.newBuilder().build();
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0));
+    Field actualResponse = client.updateFieldAsync(field).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListIndexesRequest actualRequest = (ListIndexesRequest) actualRequests.get(0);
+    UpdateFieldRequest actualRequest = (UpdateFieldRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentName.parse(actualRequest.getParent()));
+    Assert.assertEquals(field, actualRequest.getField());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -174,37 +169,47 @@ public void listIndexesTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void listIndexesExceptionTest() throws Exception {
+  public void updateFieldExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+      Field field = Field.newBuilder().build();
 
-      client.listIndexes(parent);
+      client.updateFieldAsync(field).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 
   @Test
   @SuppressWarnings("all")
-  public void getIndexTest() {
-    String name2 = "name2-1052831874";
-    Index expectedResponse = Index.newBuilder().setName(name2).build();
-    mockFirestoreAdmin.addResponse(expectedResponse);
+  public void createIndexTest() throws Exception {
+    IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+    Index expectedResponse = Index.newBuilder().setName(name.toString()).build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("createIndexTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockFirestoreAdmin.addResponse(resultOperation);
 
-    IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+    CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+    Index index = Index.newBuilder().build();
 
-    Index actualResponse = client.getIndex(name);
+    Index actualResponse = client.createIndexAsync(parent, index).get();
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetIndexRequest actualRequest = (GetIndexRequest) actualRequests.get(0);
+    CreateIndexRequest actualRequest = (CreateIndexRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, IndexName.parse(actualRequest.getName()));
+    Assert.assertEquals(parent, CollectionGroupName.parse(actualRequest.getParent()));
+    Assert.assertEquals(index, actualRequest.getIndex());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -213,35 +218,50 @@ public void getIndexTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getIndexExceptionTest() throws Exception {
+  public void createIndexExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+      CollectionGroupName parent =
+          CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+      Index index = Index.newBuilder().build();
 
-      client.getIndex(name);
+      client.createIndexAsync(parent, index).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 
   @Test
   @SuppressWarnings("all")
-  public void deleteIndexTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
+  public void listIndexesTest() {
+    String nextPageToken = "";
+    Index indexesElement = Index.newBuilder().build();
+    List indexes = Arrays.asList(indexesElement);
+    ListIndexesResponse expectedResponse =
+        ListIndexesResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllIndexes(indexes)
+            .build();
     mockFirestoreAdmin.addResponse(expectedResponse);
 
-    IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+    CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
 
-    client.deleteIndex(name);
+    ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0));
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    DeleteIndexRequest actualRequest = (DeleteIndexRequest) actualRequests.get(0);
+    ListIndexesRequest actualRequest = (ListIndexesRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, IndexName.parse(actualRequest.getName()));
+    Assert.assertEquals(parent, CollectionGroupName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -250,14 +270,15 @@ public void deleteIndexTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void deleteIndexExceptionTest() throws Exception {
+  public void listIndexesExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[INDEX_ID]");
+      CollectionGroupName parent =
+          CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
 
-      client.deleteIndex(name);
+      client.listIndexes(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -266,22 +287,21 @@ public void deleteIndexExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void importDocumentsTest() {
-    String name2 = "name2-1052831874";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build();
+  public void getIndexTest() {
+    IndexName name2 = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+    Index expectedResponse = Index.newBuilder().setName(name2.toString()).build();
     mockFirestoreAdmin.addResponse(expectedResponse);
 
-    DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+    IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
 
-    Operation actualResponse = client.importDocuments(name);
+    Index actualResponse = client.getIndex(name);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ImportDocumentsRequest actualRequest = (ImportDocumentsRequest) actualRequests.get(0);
+    GetIndexRequest actualRequest = (GetIndexRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, DatabaseName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, IndexName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -290,14 +310,14 @@ public void importDocumentsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void importDocumentsExceptionTest() throws Exception {
+  public void getIndexExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+      IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
 
-      client.importDocuments(name);
+      client.getIndex(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -306,22 +326,21 @@ public void importDocumentsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void exportDocumentsTest() {
-    String name2 = "name2-1052831874";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build();
+  public void getFieldTest() {
+    FieldName name2 = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
+    Field expectedResponse = Field.newBuilder().setName(name2.toString()).build();
     mockFirestoreAdmin.addResponse(expectedResponse);
 
-    DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+    FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
 
-    Operation actualResponse = client.exportDocuments(name);
+    Field actualResponse = client.getField(name);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ExportDocumentsRequest actualRequest = (ExportDocumentsRequest) actualRequests.get(0);
+    GetFieldRequest actualRequest = (GetFieldRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, DatabaseName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, FieldName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -330,14 +349,14 @@ public void exportDocumentsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void exportDocumentsExceptionTest() throws Exception {
+  public void getFieldExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+      FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
 
-      client.exportDocuments(name);
+      client.getField(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -346,21 +365,30 @@ public void exportDocumentsExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void getFieldTest() {
-    String name2 = "name2-1052831874";
-    Field expectedResponse = Field.newBuilder().setName(name2).build();
+  public void listFieldsTest() {
+    String nextPageToken = "";
+    Field fieldsElement = Field.newBuilder().build();
+    List fields = Arrays.asList(fieldsElement);
+    ListFieldsResponse expectedResponse =
+        ListFieldsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllFields(fields)
+            .build();
     mockFirestoreAdmin.addResponse(expectedResponse);
 
-    FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
+    CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
 
-    Field actualResponse = client.getField(name);
-    Assert.assertEquals(expectedResponse, actualResponse);
+    ListFieldsPagedResponse pagedListResponse = client.listFields(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getFieldsList().get(0), resources.get(0));
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    GetFieldRequest actualRequest = (GetFieldRequest) actualRequests.get(0);
+    ListFieldsRequest actualRequest = (ListFieldsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, FieldName.parse(actualRequest.getName()));
+    Assert.assertEquals(parent, CollectionGroupName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -369,14 +397,15 @@ public void getFieldTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void getFieldExceptionTest() throws Exception {
+  public void listFieldsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]", "[FIELD_ID]");
+      CollectionGroupName parent =
+          CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
 
-      client.getField(name);
+      client.listFields(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -385,30 +414,28 @@ public void getFieldExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void listFieldsTest() {
-    String nextPageToken = "";
-    Field fieldsElement = Field.newBuilder().build();
-    List fields = Arrays.asList(fieldsElement);
-    ListFieldsResponse expectedResponse =
-        ListFieldsResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .addAllFields(fields)
+  public void exportDocumentsTest() throws Exception {
+    String outputUriPrefix = "outputUriPrefix124746435";
+    ExportDocumentsResponse expectedResponse =
+        ExportDocumentsResponse.newBuilder().setOutputUriPrefix(outputUriPrefix).build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("exportDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
             .build();
-    mockFirestoreAdmin.addResponse(expectedResponse);
-
-    ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+    mockFirestoreAdmin.addResponse(resultOperation);
 
-    ListFieldsPagedResponse pagedListResponse = client.listFields(parent);
+    DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
 
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getFieldsList().get(0), resources.get(0));
+    ExportDocumentsResponse actualResponse = client.exportDocumentsAsync(name).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    ListFieldsRequest actualRequest = (ListFieldsRequest) actualRequests.get(0);
+    ExportDocumentsRequest actualRequest = (ExportDocumentsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(parent, ParentName.parse(actualRequest.getParent()));
+    Assert.assertEquals(name, DatabaseName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -417,38 +444,44 @@ public void listFieldsTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void listFieldsExceptionTest() throws Exception {
+  public void exportDocumentsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      ParentName parent = ParentName.of("[PROJECT]", "[DATABASE]", "[COLLECTION_ID]");
+      DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
 
-      client.listFields(parent);
+      client.exportDocumentsAsync(name).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 
   @Test
   @SuppressWarnings("all")
-  public void updateFieldTest() {
-    String name = "name3373707";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name).setDone(done).build();
-    mockFirestoreAdmin.addResponse(expectedResponse);
+  public void importDocumentsTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("importDocumentsTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockFirestoreAdmin.addResponse(resultOperation);
 
-    Field field = Field.newBuilder().build();
+    DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
 
-    Operation actualResponse = client.updateField(field);
+    Empty actualResponse = client.importDocumentsAsync(name).get();
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestoreAdmin.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    UpdateFieldRequest actualRequest = (UpdateFieldRequest) actualRequests.get(0);
+    ImportDocumentsRequest actualRequest = (ImportDocumentsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(field, actualRequest.getField());
+    Assert.assertEquals(name, DatabaseName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -457,17 +490,19 @@ public void updateFieldTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void updateFieldExceptionTest() throws Exception {
+  public void importDocumentsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestoreAdmin.addException(exception);
 
     try {
-      Field field = Field.newBuilder().build();
+      DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
 
-      client.updateField(field);
+      client.importDocumentsAsync(name).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 }
diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java
index 2b884be29..8600dd0ae 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/FirestoreClientTest.java
@@ -31,7 +31,6 @@
 import com.google.api.gax.rpc.ServerStreamingCallable;
 import com.google.api.gax.rpc.StatusCode;
 import com.google.common.collect.Lists;
-import com.google.firestore.v1.AnyPathName;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
@@ -39,7 +38,6 @@
 import com.google.firestore.v1.CommitRequest;
 import com.google.firestore.v1.CommitResponse;
 import com.google.firestore.v1.CreateDocumentRequest;
-import com.google.firestore.v1.DatabaseRootName;
 import com.google.firestore.v1.DeleteDocumentRequest;
 import com.google.firestore.v1.Document;
 import com.google.firestore.v1.DocumentMask;
@@ -120,8 +118,8 @@ public void getDocumentTest() {
     Document expectedResponse = Document.newBuilder().setName(name2).build();
     mockFirestore.addResponse(expectedResponse);
 
-    AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name.toString()).build();
+    String name = "name3373707";
+    GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
 
     Document actualResponse = client.getDocument(request);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -130,7 +128,7 @@ public void getDocumentTest() {
     Assert.assertEquals(1, actualRequests.size());
     GetDocumentRequest actualRequest = (GetDocumentRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, AnyPathName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, actualRequest.getName());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -144,8 +142,8 @@ public void getDocumentExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-      GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name.toString()).build();
+      String name = "name3373707";
+      GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
 
       client.getDocument(request);
       Assert.fail("No exception raised");
@@ -167,14 +165,10 @@ public void listDocumentsTest() {
             .build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String parent = "parent-995424086";
     String collectionId = "collectionId-821242276";
     ListDocumentsRequest request =
-        ListDocumentsRequest.newBuilder()
-            .setParent(formattedParent)
-            .setCollectionId(collectionId)
-            .build();
+        ListDocumentsRequest.newBuilder().setParent(parent).setCollectionId(collectionId).build();
 
     ListDocumentsPagedResponse pagedListResponse = client.listDocuments(request);
 
@@ -186,7 +180,7 @@ public void listDocumentsTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListDocumentsRequest actualRequest = (ListDocumentsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
+    Assert.assertEquals(parent, actualRequest.getParent());
     Assert.assertEquals(collectionId, actualRequest.getCollectionId());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -201,14 +195,10 @@ public void listDocumentsExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String parent = "parent-995424086";
       String collectionId = "collectionId-821242276";
       ListDocumentsRequest request =
-          ListDocumentsRequest.newBuilder()
-              .setParent(formattedParent)
-              .setCollectionId(collectionId)
-              .build();
+          ListDocumentsRequest.newBuilder().setParent(parent).setCollectionId(collectionId).build();
 
       client.listDocuments(request);
       Assert.fail("No exception raised");
@@ -224,16 +214,13 @@ public void createDocumentTest() {
     Document expectedResponse = Document.newBuilder().setName(name).build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String parent = "parent-995424086";
     String collectionId = "collectionId-821242276";
-    String documentId = "documentId506676927";
     Document document = Document.newBuilder().build();
     CreateDocumentRequest request =
         CreateDocumentRequest.newBuilder()
-            .setParent(formattedParent)
+            .setParent(parent)
             .setCollectionId(collectionId)
-            .setDocumentId(documentId)
             .setDocument(document)
             .build();
 
@@ -244,9 +231,8 @@ public void createDocumentTest() {
     Assert.assertEquals(1, actualRequests.size());
     CreateDocumentRequest actualRequest = (CreateDocumentRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
+    Assert.assertEquals(parent, actualRequest.getParent());
     Assert.assertEquals(collectionId, actualRequest.getCollectionId());
-    Assert.assertEquals(documentId, actualRequest.getDocumentId());
     Assert.assertEquals(document, actualRequest.getDocument());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -261,16 +247,13 @@ public void createDocumentExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String parent = "parent-995424086";
       String collectionId = "collectionId-821242276";
-      String documentId = "documentId506676927";
       Document document = Document.newBuilder().build();
       CreateDocumentRequest request =
           CreateDocumentRequest.newBuilder()
-              .setParent(formattedParent)
+              .setParent(parent)
               .setCollectionId(collectionId)
-              .setDocumentId(documentId)
               .setDocument(document)
               .build();
 
@@ -329,7 +312,7 @@ public void deleteDocumentTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
 
-    AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String name = "name3373707";
 
     client.deleteDocument(name);
 
@@ -337,7 +320,7 @@ public void deleteDocumentTest() {
     Assert.assertEquals(1, actualRequests.size());
     DeleteDocumentRequest actualRequest = (DeleteDocumentRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, AnyPathName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, actualRequest.getName());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -351,7 +334,7 @@ public void deleteDocumentExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String name = "name3373707";
 
       client.deleteDocument(name);
       Assert.fail("No exception raised");
@@ -371,13 +354,9 @@ public void batchGetDocumentsTest() throws Exception {
             .setTransaction(transaction)
             .build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    List documents = new ArrayList<>();
+    String database = "database1789464955";
     BatchGetDocumentsRequest request =
-        BatchGetDocumentsRequest.newBuilder()
-            .setDatabase(formattedDatabase)
-            .addAllDocuments(documents)
-            .build();
+        BatchGetDocumentsRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -395,13 +374,9 @@ public void batchGetDocumentsTest() throws Exception {
   public void batchGetDocumentsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    List documents = new ArrayList<>();
+    String database = "database1789464955";
     BatchGetDocumentsRequest request =
-        BatchGetDocumentsRequest.newBuilder()
-            .setDatabase(formattedDatabase)
-            .addAllDocuments(documents)
-            .build();
+        BatchGetDocumentsRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -427,16 +402,16 @@ public void beginTransactionTest() {
         BeginTransactionResponse.newBuilder().setTransaction(transaction).build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+    String database = "database1789464955";
 
-    BeginTransactionResponse actualResponse = client.beginTransaction(formattedDatabase);
+    BeginTransactionResponse actualResponse = client.beginTransaction(database);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestore.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     BeginTransactionRequest actualRequest = (BeginTransactionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
+    Assert.assertEquals(database, actualRequest.getDatabase());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -450,9 +425,9 @@ public void beginTransactionExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+      String database = "database1789464955";
 
-      client.beginTransaction(formattedDatabase);
+      client.beginTransaction(database);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -465,17 +440,17 @@ public void commitTest() {
     CommitResponse expectedResponse = CommitResponse.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+    String database = "database1789464955";
     List writes = new ArrayList<>();
 
-    CommitResponse actualResponse = client.commit(formattedDatabase, writes);
+    CommitResponse actualResponse = client.commit(database, writes);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestore.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     CommitRequest actualRequest = (CommitRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
+    Assert.assertEquals(database, actualRequest.getDatabase());
     Assert.assertEquals(writes, actualRequest.getWritesList());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -490,10 +465,10 @@ public void commitExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+      String database = "database1789464955";
       List writes = new ArrayList<>();
 
-      client.commit(formattedDatabase, writes);
+      client.commit(database, writes);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -506,16 +481,16 @@ public void rollbackTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+    String database = "database1789464955";
     ByteString transaction = ByteString.copyFromUtf8("-34");
 
-    client.rollback(formattedDatabase, transaction);
+    client.rollback(database, transaction);
 
     List actualRequests = mockFirestore.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     RollbackRequest actualRequest = (RollbackRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
+    Assert.assertEquals(database, actualRequest.getDatabase());
     Assert.assertEquals(transaction, actualRequest.getTransaction());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -530,10 +505,10 @@ public void rollbackExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+      String database = "database1789464955";
       ByteString transaction = ByteString.copyFromUtf8("-34");
 
-      client.rollback(formattedDatabase, transaction);
+      client.rollback(database, transaction);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -551,9 +526,8 @@ public void runQueryTest() throws Exception {
             .setSkippedResults(skippedResults)
             .build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(formattedParent).build();
+    String parent = "parent-995424086";
+    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(parent).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -570,9 +544,8 @@ public void runQueryTest() throws Exception {
   public void runQueryExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(formattedParent).build();
+    String parent = "parent-995424086";
+    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(parent).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -597,8 +570,8 @@ public void writeTest() throws Exception {
     WriteResponse expectedResponse =
         WriteResponse.newBuilder().setStreamId(streamId).setStreamToken(streamToken).build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    WriteRequest request = WriteRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    WriteRequest request = WriteRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -618,8 +591,8 @@ public void writeTest() throws Exception {
   public void writeExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    WriteRequest request = WriteRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    WriteRequest request = WriteRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -643,8 +616,8 @@ public void writeExceptionTest() throws Exception {
   public void listenTest() throws Exception {
     ListenResponse expectedResponse = ListenResponse.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    ListenRequest request = ListenRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    ListenRequest request = ListenRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -664,8 +637,8 @@ public void listenTest() throws Exception {
   public void listenExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    ListenRequest request = ListenRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    ListenRequest request = ListenRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -697,10 +670,9 @@ public void listCollectionIdsTest() {
             .build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String parent = "parent-995424086";
 
-    ListCollectionIdsPagedResponse pagedListResponse = client.listCollectionIds(formattedParent);
+    ListCollectionIdsPagedResponse pagedListResponse = client.listCollectionIds(parent);
 
     List resources = Lists.newArrayList(pagedListResponse.iterateAll());
     Assert.assertEquals(1, resources.size());
@@ -710,7 +682,7 @@ public void listCollectionIdsTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListCollectionIdsRequest actualRequest = (ListCollectionIdsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
+    Assert.assertEquals(parent, actualRequest.getParent());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -724,10 +696,9 @@ public void listCollectionIdsExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String parent = "parent-995424086";
 
-      client.listCollectionIds(formattedParent);
+      client.listCollectionIds(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/FirestoreClientTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/FirestoreClientTest.java
index 09a3cf899..3cf40b064 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/FirestoreClientTest.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/FirestoreClientTest.java
@@ -31,7 +31,6 @@
 import com.google.api.gax.rpc.ServerStreamingCallable;
 import com.google.api.gax.rpc.StatusCode;
 import com.google.common.collect.Lists;
-import com.google.firestore.v1beta1.AnyPathName;
 import com.google.firestore.v1beta1.BatchGetDocumentsRequest;
 import com.google.firestore.v1beta1.BatchGetDocumentsResponse;
 import com.google.firestore.v1beta1.BeginTransactionRequest;
@@ -39,7 +38,6 @@
 import com.google.firestore.v1beta1.CommitRequest;
 import com.google.firestore.v1beta1.CommitResponse;
 import com.google.firestore.v1beta1.CreateDocumentRequest;
-import com.google.firestore.v1beta1.DatabaseRootName;
 import com.google.firestore.v1beta1.DeleteDocumentRequest;
 import com.google.firestore.v1beta1.Document;
 import com.google.firestore.v1beta1.DocumentMask;
@@ -113,223 +111,13 @@ public void tearDown() throws Exception {
     client.close();
   }
 
-  @Test
-  @SuppressWarnings("all")
-  public void getDocumentTest() {
-    String name2 = "name2-1052831874";
-    Document expectedResponse = Document.newBuilder().setName(name2).build();
-    mockFirestore.addResponse(expectedResponse);
-
-    AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name.toString()).build();
-
-    Document actualResponse = client.getDocument(request);
-    Assert.assertEquals(expectedResponse, actualResponse);
-
-    List actualRequests = mockFirestore.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    GetDocumentRequest actualRequest = (GetDocumentRequest) actualRequests.get(0);
-
-    Assert.assertEquals(name, AnyPathName.parse(actualRequest.getName()));
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void getDocumentExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockFirestore.addException(exception);
-
-    try {
-      AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-      GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name.toString()).build();
-
-      client.getDocument(request);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void listDocumentsTest() {
-    String nextPageToken = "";
-    Document documentsElement = Document.newBuilder().build();
-    List documents = Arrays.asList(documentsElement);
-    ListDocumentsResponse expectedResponse =
-        ListDocumentsResponse.newBuilder()
-            .setNextPageToken(nextPageToken)
-            .addAllDocuments(documents)
-            .build();
-    mockFirestore.addResponse(expectedResponse);
-
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    String collectionId = "collectionId-821242276";
-    ListDocumentsRequest request =
-        ListDocumentsRequest.newBuilder()
-            .setParent(formattedParent)
-            .setCollectionId(collectionId)
-            .build();
-
-    ListDocumentsPagedResponse pagedListResponse = client.listDocuments(request);
-
-    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
-    Assert.assertEquals(1, resources.size());
-    Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0));
-
-    List actualRequests = mockFirestore.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    ListDocumentsRequest actualRequest = (ListDocumentsRequest) actualRequests.get(0);
-
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
-    Assert.assertEquals(collectionId, actualRequest.getCollectionId());
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void listDocumentsExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockFirestore.addException(exception);
-
-    try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-      String collectionId = "collectionId-821242276";
-      ListDocumentsRequest request =
-          ListDocumentsRequest.newBuilder()
-              .setParent(formattedParent)
-              .setCollectionId(collectionId)
-              .build();
-
-      client.listDocuments(request);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void createDocumentTest() {
-    String name = "name3373707";
-    Document expectedResponse = Document.newBuilder().setName(name).build();
-    mockFirestore.addResponse(expectedResponse);
-
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    String collectionId = "collectionId-821242276";
-    String documentId = "documentId506676927";
-    Document document = Document.newBuilder().build();
-    CreateDocumentRequest request =
-        CreateDocumentRequest.newBuilder()
-            .setParent(formattedParent)
-            .setCollectionId(collectionId)
-            .setDocumentId(documentId)
-            .setDocument(document)
-            .build();
-
-    Document actualResponse = client.createDocument(request);
-    Assert.assertEquals(expectedResponse, actualResponse);
-
-    List actualRequests = mockFirestore.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    CreateDocumentRequest actualRequest = (CreateDocumentRequest) actualRequests.get(0);
-
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
-    Assert.assertEquals(collectionId, actualRequest.getCollectionId());
-    Assert.assertEquals(documentId, actualRequest.getDocumentId());
-    Assert.assertEquals(document, actualRequest.getDocument());
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void createDocumentExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockFirestore.addException(exception);
-
-    try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-      String collectionId = "collectionId-821242276";
-      String documentId = "documentId506676927";
-      Document document = Document.newBuilder().build();
-      CreateDocumentRequest request =
-          CreateDocumentRequest.newBuilder()
-              .setParent(formattedParent)
-              .setCollectionId(collectionId)
-              .setDocumentId(documentId)
-              .setDocument(document)
-              .build();
-
-      client.createDocument(request);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void updateDocumentTest() {
-    String name = "name3373707";
-    Document expectedResponse = Document.newBuilder().setName(name).build();
-    mockFirestore.addResponse(expectedResponse);
-
-    Document document = Document.newBuilder().build();
-    DocumentMask updateMask = DocumentMask.newBuilder().build();
-
-    Document actualResponse = client.updateDocument(document, updateMask);
-    Assert.assertEquals(expectedResponse, actualResponse);
-
-    List actualRequests = mockFirestore.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    UpdateDocumentRequest actualRequest = (UpdateDocumentRequest) actualRequests.get(0);
-
-    Assert.assertEquals(document, actualRequest.getDocument());
-    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void updateDocumentExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockFirestore.addException(exception);
-
-    try {
-      Document document = Document.newBuilder().build();
-      DocumentMask updateMask = DocumentMask.newBuilder().build();
-
-      client.updateDocument(document, updateMask);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
   @Test
   @SuppressWarnings("all")
   public void deleteDocumentTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
 
-    AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String name = "name3373707";
 
     client.deleteDocument(name);
 
@@ -337,7 +125,7 @@ public void deleteDocumentTest() {
     Assert.assertEquals(1, actualRequests.size());
     DeleteDocumentRequest actualRequest = (DeleteDocumentRequest) actualRequests.get(0);
 
-    Assert.assertEquals(name, AnyPathName.parse(actualRequest.getName()));
+    Assert.assertEquals(name, actualRequest.getName());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -351,7 +139,7 @@ public void deleteDocumentExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      AnyPathName name = AnyPathName.of("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String name = "name3373707";
 
       client.deleteDocument(name);
       Assert.fail("No exception raised");
@@ -371,13 +159,9 @@ public void batchGetDocumentsTest() throws Exception {
             .setTransaction(transaction)
             .build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    List documents = new ArrayList<>();
+    String database = "database1789464955";
     BatchGetDocumentsRequest request =
-        BatchGetDocumentsRequest.newBuilder()
-            .setDatabase(formattedDatabase)
-            .addAllDocuments(documents)
-            .build();
+        BatchGetDocumentsRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -395,13 +179,9 @@ public void batchGetDocumentsTest() throws Exception {
   public void batchGetDocumentsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    List documents = new ArrayList<>();
+    String database = "database1789464955";
     BatchGetDocumentsRequest request =
-        BatchGetDocumentsRequest.newBuilder()
-            .setDatabase(formattedDatabase)
-            .addAllDocuments(documents)
-            .build();
+        BatchGetDocumentsRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -427,16 +207,16 @@ public void beginTransactionTest() {
         BeginTransactionResponse.newBuilder().setTransaction(transaction).build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+    String database = "database1789464955";
 
-    BeginTransactionResponse actualResponse = client.beginTransaction(formattedDatabase);
+    BeginTransactionResponse actualResponse = client.beginTransaction(database);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockFirestore.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     BeginTransactionRequest actualRequest = (BeginTransactionRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
+    Assert.assertEquals(database, actualRequest.getDatabase());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -450,50 +230,9 @@ public void beginTransactionExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-
-      client.beginTransaction(formattedDatabase);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void commitTest() {
-    CommitResponse expectedResponse = CommitResponse.newBuilder().build();
-    mockFirestore.addResponse(expectedResponse);
-
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    List writes = new ArrayList<>();
-
-    CommitResponse actualResponse = client.commit(formattedDatabase, writes);
-    Assert.assertEquals(expectedResponse, actualResponse);
-
-    List actualRequests = mockFirestore.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    CommitRequest actualRequest = (CommitRequest) actualRequests.get(0);
-
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
-    Assert.assertEquals(writes, actualRequest.getWritesList());
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void commitExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockFirestore.addException(exception);
-
-    try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-      List writes = new ArrayList<>();
+      String database = "database1789464955";
 
-      client.commit(formattedDatabase, writes);
+      client.beginTransaction(database);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -506,16 +245,16 @@ public void rollbackTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+    String database = "database1789464955";
     ByteString transaction = ByteString.copyFromUtf8("-34");
 
-    client.rollback(formattedDatabase, transaction);
+    client.rollback(database, transaction);
 
     List actualRequests = mockFirestore.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     RollbackRequest actualRequest = (RollbackRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedDatabase, actualRequest.getDatabase());
+    Assert.assertEquals(database, actualRequest.getDatabase());
     Assert.assertEquals(transaction, actualRequest.getTransaction());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -530,10 +269,10 @@ public void rollbackExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
+      String database = "database1789464955";
       ByteString transaction = ByteString.copyFromUtf8("-34");
 
-      client.rollback(formattedDatabase, transaction);
+      client.rollback(database, transaction);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -551,9 +290,8 @@ public void runQueryTest() throws Exception {
             .setSkippedResults(skippedResults)
             .build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(formattedParent).build();
+    String parent = "parent-995424086";
+    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(parent).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -570,9 +308,8 @@ public void runQueryTest() throws Exception {
   public void runQueryExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
-    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(formattedParent).build();
+    String parent = "parent-995424086";
+    RunQueryRequest request = RunQueryRequest.newBuilder().setParent(parent).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -597,8 +334,8 @@ public void writeTest() throws Exception {
     WriteResponse expectedResponse =
         WriteResponse.newBuilder().setStreamId(streamId).setStreamToken(streamToken).build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    WriteRequest request = WriteRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    WriteRequest request = WriteRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -618,8 +355,8 @@ public void writeTest() throws Exception {
   public void writeExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    WriteRequest request = WriteRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    WriteRequest request = WriteRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -643,8 +380,8 @@ public void writeExceptionTest() throws Exception {
   public void listenTest() throws Exception {
     ListenResponse expectedResponse = ListenResponse.newBuilder().build();
     mockFirestore.addResponse(expectedResponse);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    ListenRequest request = ListenRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    ListenRequest request = ListenRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -664,8 +401,8 @@ public void listenTest() throws Exception {
   public void listenExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockFirestore.addException(exception);
-    String formattedDatabase = DatabaseRootName.format("[PROJECT]", "[DATABASE]");
-    ListenRequest request = ListenRequest.newBuilder().setDatabase(formattedDatabase).build();
+    String database = "database1789464955";
+    ListenRequest request = ListenRequest.newBuilder().setDatabase(database).build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -697,10 +434,9 @@ public void listCollectionIdsTest() {
             .build();
     mockFirestore.addResponse(expectedResponse);
 
-    String formattedParent =
-        AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+    String parent = "parent-995424086";
 
-    ListCollectionIdsPagedResponse pagedListResponse = client.listCollectionIds(formattedParent);
+    ListCollectionIdsPagedResponse pagedListResponse = client.listCollectionIds(parent);
 
     List resources = Lists.newArrayList(pagedListResponse.iterateAll());
     Assert.assertEquals(1, resources.size());
@@ -710,7 +446,7 @@ public void listCollectionIdsTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListCollectionIdsRequest actualRequest = (ListCollectionIdsRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
+    Assert.assertEquals(parent, actualRequest.getParent());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -724,10 +460,245 @@ public void listCollectionIdsExceptionTest() throws Exception {
     mockFirestore.addException(exception);
 
     try {
-      String formattedParent =
-          AnyPathName.format("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
+      String parent = "parent-995424086";
+
+      client.listCollectionIds(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getDocumentTest() {
+    String name2 = "name2-1052831874";
+    Document expectedResponse = Document.newBuilder().setName(name2).build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String name = "name3373707";
+    GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
+
+    Document actualResponse = client.getDocument(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetDocumentRequest actualRequest = (GetDocumentRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getDocumentExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String name = "name3373707";
+      GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
+
+      client.getDocument(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listDocumentsTest() {
+    String nextPageToken = "";
+    Document documentsElement = Document.newBuilder().build();
+    List documents = Arrays.asList(documentsElement);
+    ListDocumentsResponse expectedResponse =
+        ListDocumentsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllDocuments(documents)
+            .build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+    String collectionId = "collectionId-821242276";
+    ListDocumentsRequest request =
+        ListDocumentsRequest.newBuilder().setParent(parent).setCollectionId(collectionId).build();
+
+    ListDocumentsPagedResponse pagedListResponse = client.listDocuments(request);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getDocumentsList().get(0), resources.get(0));
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListDocumentsRequest actualRequest = (ListDocumentsRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertEquals(collectionId, actualRequest.getCollectionId());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listDocumentsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      String collectionId = "collectionId-821242276";
+      ListDocumentsRequest request =
+          ListDocumentsRequest.newBuilder().setParent(parent).setCollectionId(collectionId).build();
+
+      client.listDocuments(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void createDocumentTest() {
+    String name = "name3373707";
+    Document expectedResponse = Document.newBuilder().setName(name).build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+    String collectionId = "collectionId-821242276";
+    Document document = Document.newBuilder().build();
+    CreateDocumentRequest request =
+        CreateDocumentRequest.newBuilder()
+            .setParent(parent)
+            .setCollectionId(collectionId)
+            .setDocument(document)
+            .build();
+
+    Document actualResponse = client.createDocument(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateDocumentRequest actualRequest = (CreateDocumentRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertEquals(collectionId, actualRequest.getCollectionId());
+    Assert.assertEquals(document, actualRequest.getDocument());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void createDocumentExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      String collectionId = "collectionId-821242276";
+      Document document = Document.newBuilder().build();
+      CreateDocumentRequest request =
+          CreateDocumentRequest.newBuilder()
+              .setParent(parent)
+              .setCollectionId(collectionId)
+              .setDocument(document)
+              .build();
+
+      client.createDocument(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateDocumentTest() {
+    String name = "name3373707";
+    Document expectedResponse = Document.newBuilder().setName(name).build();
+    mockFirestore.addResponse(expectedResponse);
+
+    Document document = Document.newBuilder().build();
+    DocumentMask updateMask = DocumentMask.newBuilder().build();
+
+    Document actualResponse = client.updateDocument(document, updateMask);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateDocumentRequest actualRequest = (UpdateDocumentRequest) actualRequests.get(0);
+
+    Assert.assertEquals(document, actualRequest.getDocument());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateDocumentExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      Document document = Document.newBuilder().build();
+      DocumentMask updateMask = DocumentMask.newBuilder().build();
+
+      client.updateDocument(document, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void commitTest() {
+    CommitResponse expectedResponse = CommitResponse.newBuilder().build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String database = "database1789464955";
+    List writes = new ArrayList<>();
+
+    CommitResponse actualResponse = client.commit(database, writes);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CommitRequest actualRequest = (CommitRequest) actualRequests.get(0);
+
+    Assert.assertEquals(database, actualRequest.getDatabase());
+    Assert.assertEquals(writes, actualRequest.getWritesList());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void commitExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String database = "database1789464955";
+      List writes = new ArrayList<>();
 
-      client.listCollectionIds(formattedParent);
+      client.commit(database, writes);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/proto-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml b/proto-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml
new file mode 100644
index 000000000..28ed47355
--- /dev/null
+++ b/proto-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+  
+  
+  
+    7002
+    com/google/firestore/admin/v1/FieldName
+    java.lang.String getCollectionId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/FieldName
+    java.lang.String getFieldId()
+  
+
+  
+    7002
+    com/google/firestore/admin/v1/FieldName$Builder
+    java.lang.String getCollectionId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/FieldName$Builder
+    java.lang.String getFieldId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/FieldName$Builder
+    com.google.firestore.admin.v1.FieldName$Builder setCollectionId(java.lang.String)
+  
+  
+    7002
+    com/google/firestore/admin/v1/FieldName$Builder
+    com.google.firestore.admin.v1.FieldName$Builder setFieldId(java.lang.String)
+  
+
+  
+    7002
+    com/google/firestore/admin/v1/IndexName
+    java.lang.String getCollectionId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/IndexName
+    java.lang.String getIndexId()
+  
+
+  
+    7002
+    com/google/firestore/admin/v1/IndexName$Builder
+    java.lang.String getCollectionId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/IndexName$Builder
+    java.lang.String getIndexId()
+  
+  
+    7002
+    com/google/firestore/admin/v1/IndexName$Builder
+    com.google.firestore.admin.v1.IndexName$Builder setCollectionId(java.lang.String)
+  
+  
+    7002
+    com/google/firestore/admin/v1/IndexName$Builder
+    com.google.firestore.admin.v1.IndexName$Builder setIndexId(java.lang.String)
+  
+
+
+
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java
new file mode 100644
index 000000000..28c6212c4
--- /dev/null
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CollectionGroupName.java
@@ -0,0 +1,211 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.firestore.admin.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class CollectionGroupName implements ResourceName {
+
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "projects/{project}/databases/{database}/collectionGroups/{collection}");
+
+  private volatile Map fieldValuesMap;
+
+  private final String project;
+  private final String database;
+  private final String collection;
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getDatabase() {
+    return database;
+  }
+
+  public String getCollection() {
+    return collection;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private CollectionGroupName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    database = Preconditions.checkNotNull(builder.getDatabase());
+    collection = Preconditions.checkNotNull(builder.getCollection());
+  }
+
+  public static CollectionGroupName of(String project, String database, String collection) {
+    return newBuilder().setProject(project).setDatabase(database).setCollection(collection).build();
+  }
+
+  public static String format(String project, String database, String collection) {
+    return newBuilder()
+        .setProject(project)
+        .setDatabase(database)
+        .setCollection(collection)
+        .build()
+        .toString();
+  }
+
+  public static CollectionGroupName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            formattedString, "CollectionGroupName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"), matchMap.get("database"), matchMap.get("collection"));
+  }
+
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  public static List toStringList(List values) {
+    List list = new ArrayList(values.size());
+    for (CollectionGroupName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return PATH_TEMPLATE.matches(formattedString);
+  }
+
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("database", database);
+          fieldMapBuilder.put("collection", collection);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return PATH_TEMPLATE.instantiate(
+        "project", project, "database", database, "collection", collection);
+  }
+
+  /** Builder for CollectionGroupName. */
+  public static class Builder {
+
+    private String project;
+    private String database;
+    private String collection;
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getDatabase() {
+      return database;
+    }
+
+    public String getCollection() {
+      return collection;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setDatabase(String database) {
+      this.database = database;
+      return this;
+    }
+
+    public Builder setCollection(String collection) {
+      this.collection = collection;
+      return this;
+    }
+
+    private Builder() {}
+
+    private Builder(CollectionGroupName collectionGroupName) {
+      project = collectionGroupName.project;
+      database = collectionGroupName.database;
+      collection = collectionGroupName.collection;
+    }
+
+    public CollectionGroupName build() {
+      return new CollectionGroupName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof CollectionGroupName) {
+      CollectionGroupName that = (CollectionGroupName) o;
+      return (this.project.equals(that.project))
+          && (this.database.equals(that.database))
+          && (this.collection.equals(that.collection));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= project.hashCode();
+    h *= 1000003;
+    h ^= database.hashCode();
+    h *= 1000003;
+    h ^= collection.hashCode();
+    return h;
+  }
+}
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java
index 34a833443..4bbe3d74f 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldName.java
@@ -30,14 +30,14 @@ public class FieldName implements ResourceName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding(
-          "projects/{project}/databases/{database}/collectionGroups/{collection_id}/fields/{field_id}");
+          "projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}");
 
   private volatile Map fieldValuesMap;
 
   private final String project;
   private final String database;
-  private final String collectionId;
-  private final String fieldId;
+  private final String collection;
+  private final String field;
 
   public String getProject() {
     return project;
@@ -47,12 +47,12 @@ public String getDatabase() {
     return database;
   }
 
-  public String getCollectionId() {
-    return collectionId;
+  public String getCollection() {
+    return collection;
   }
 
-  public String getFieldId() {
-    return fieldId;
+  public String getField() {
+    return field;
   }
 
   public static Builder newBuilder() {
@@ -66,26 +66,25 @@ public Builder toBuilder() {
   private FieldName(Builder builder) {
     project = Preconditions.checkNotNull(builder.getProject());
     database = Preconditions.checkNotNull(builder.getDatabase());
-    collectionId = Preconditions.checkNotNull(builder.getCollectionId());
-    fieldId = Preconditions.checkNotNull(builder.getFieldId());
+    collection = Preconditions.checkNotNull(builder.getCollection());
+    field = Preconditions.checkNotNull(builder.getField());
   }
 
-  public static FieldName of(String project, String database, String collectionId, String fieldId) {
+  public static FieldName of(String project, String database, String collection, String field) {
     return newBuilder()
         .setProject(project)
         .setDatabase(database)
-        .setCollectionId(collectionId)
-        .setFieldId(fieldId)
+        .setCollection(collection)
+        .setField(field)
         .build();
   }
 
-  public static String format(
-      String project, String database, String collectionId, String fieldId) {
+  public static String format(String project, String database, String collection, String field) {
     return newBuilder()
         .setProject(project)
         .setDatabase(database)
-        .setCollectionId(collectionId)
-        .setFieldId(fieldId)
+        .setCollection(collection)
+        .setField(field)
         .build()
         .toString();
   }
@@ -100,8 +99,8 @@ public static FieldName parse(String formattedString) {
     return of(
         matchMap.get("project"),
         matchMap.get("database"),
-        matchMap.get("collection_id"),
-        matchMap.get("field_id"));
+        matchMap.get("collection"),
+        matchMap.get("field"));
   }
 
   public static List parseList(List formattedStrings) {
@@ -135,8 +134,8 @@ public Map getFieldValuesMap() {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
           fieldMapBuilder.put("project", project);
           fieldMapBuilder.put("database", database);
-          fieldMapBuilder.put("collectionId", collectionId);
-          fieldMapBuilder.put("fieldId", fieldId);
+          fieldMapBuilder.put("collection", collection);
+          fieldMapBuilder.put("field", field);
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -151,14 +150,7 @@ public String getFieldValue(String fieldName) {
   @Override
   public String toString() {
     return PATH_TEMPLATE.instantiate(
-        "project",
-        project,
-        "database",
-        database,
-        "collection_id",
-        collectionId,
-        "field_id",
-        fieldId);
+        "project", project, "database", database, "collection", collection, "field", field);
   }
 
   /** Builder for FieldName. */
@@ -166,8 +158,8 @@ public static class Builder {
 
     private String project;
     private String database;
-    private String collectionId;
-    private String fieldId;
+    private String collection;
+    private String field;
 
     public String getProject() {
       return project;
@@ -177,12 +169,12 @@ public String getDatabase() {
       return database;
     }
 
-    public String getCollectionId() {
-      return collectionId;
+    public String getCollection() {
+      return collection;
     }
 
-    public String getFieldId() {
-      return fieldId;
+    public String getField() {
+      return field;
     }
 
     public Builder setProject(String project) {
@@ -195,13 +187,13 @@ public Builder setDatabase(String database) {
       return this;
     }
 
-    public Builder setCollectionId(String collectionId) {
-      this.collectionId = collectionId;
+    public Builder setCollection(String collection) {
+      this.collection = collection;
       return this;
     }
 
-    public Builder setFieldId(String fieldId) {
-      this.fieldId = fieldId;
+    public Builder setField(String field) {
+      this.field = field;
       return this;
     }
 
@@ -210,8 +202,8 @@ private Builder() {}
     private Builder(FieldName fieldName) {
       project = fieldName.project;
       database = fieldName.database;
-      collectionId = fieldName.collectionId;
-      fieldId = fieldName.fieldId;
+      collection = fieldName.collection;
+      field = fieldName.field;
     }
 
     public FieldName build() {
@@ -228,8 +220,8 @@ public boolean equals(Object o) {
       FieldName that = (FieldName) o;
       return (this.project.equals(that.project))
           && (this.database.equals(that.database))
-          && (this.collectionId.equals(that.collectionId))
-          && (this.fieldId.equals(that.fieldId));
+          && (this.collection.equals(that.collection))
+          && (this.field.equals(that.field));
     }
     return false;
   }
@@ -242,9 +234,9 @@ public int hashCode() {
     h *= 1000003;
     h ^= database.hashCode();
     h *= 1000003;
-    h ^= collectionId.hashCode();
+    h ^= collection.hashCode();
     h *= 1000003;
-    h ^= fieldId.hashCode();
+    h ^= field.hashCode();
     return h;
   }
 }
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java
index 87c4e7e53..ea2bdc363 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexName.java
@@ -30,14 +30,14 @@ public class IndexName implements ResourceName {
 
   private static final PathTemplate PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding(
-          "projects/{project}/databases/{database}/collectionGroups/{collection_id}/indexes/{index_id}");
+          "projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}");
 
   private volatile Map fieldValuesMap;
 
   private final String project;
   private final String database;
-  private final String collectionId;
-  private final String indexId;
+  private final String collection;
+  private final String index;
 
   public String getProject() {
     return project;
@@ -47,12 +47,12 @@ public String getDatabase() {
     return database;
   }
 
-  public String getCollectionId() {
-    return collectionId;
+  public String getCollection() {
+    return collection;
   }
 
-  public String getIndexId() {
-    return indexId;
+  public String getIndex() {
+    return index;
   }
 
   public static Builder newBuilder() {
@@ -66,26 +66,25 @@ public Builder toBuilder() {
   private IndexName(Builder builder) {
     project = Preconditions.checkNotNull(builder.getProject());
     database = Preconditions.checkNotNull(builder.getDatabase());
-    collectionId = Preconditions.checkNotNull(builder.getCollectionId());
-    indexId = Preconditions.checkNotNull(builder.getIndexId());
+    collection = Preconditions.checkNotNull(builder.getCollection());
+    index = Preconditions.checkNotNull(builder.getIndex());
   }
 
-  public static IndexName of(String project, String database, String collectionId, String indexId) {
+  public static IndexName of(String project, String database, String collection, String index) {
     return newBuilder()
         .setProject(project)
         .setDatabase(database)
-        .setCollectionId(collectionId)
-        .setIndexId(indexId)
+        .setCollection(collection)
+        .setIndex(index)
         .build();
   }
 
-  public static String format(
-      String project, String database, String collectionId, String indexId) {
+  public static String format(String project, String database, String collection, String index) {
     return newBuilder()
         .setProject(project)
         .setDatabase(database)
-        .setCollectionId(collectionId)
-        .setIndexId(indexId)
+        .setCollection(collection)
+        .setIndex(index)
         .build()
         .toString();
   }
@@ -100,8 +99,8 @@ public static IndexName parse(String formattedString) {
     return of(
         matchMap.get("project"),
         matchMap.get("database"),
-        matchMap.get("collection_id"),
-        matchMap.get("index_id"));
+        matchMap.get("collection"),
+        matchMap.get("index"));
   }
 
   public static List parseList(List formattedStrings) {
@@ -135,8 +134,8 @@ public Map getFieldValuesMap() {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
           fieldMapBuilder.put("project", project);
           fieldMapBuilder.put("database", database);
-          fieldMapBuilder.put("collectionId", collectionId);
-          fieldMapBuilder.put("indexId", indexId);
+          fieldMapBuilder.put("collection", collection);
+          fieldMapBuilder.put("index", index);
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -151,14 +150,7 @@ public String getFieldValue(String fieldName) {
   @Override
   public String toString() {
     return PATH_TEMPLATE.instantiate(
-        "project",
-        project,
-        "database",
-        database,
-        "collection_id",
-        collectionId,
-        "index_id",
-        indexId);
+        "project", project, "database", database, "collection", collection, "index", index);
   }
 
   /** Builder for IndexName. */
@@ -166,8 +158,8 @@ public static class Builder {
 
     private String project;
     private String database;
-    private String collectionId;
-    private String indexId;
+    private String collection;
+    private String index;
 
     public String getProject() {
       return project;
@@ -177,12 +169,12 @@ public String getDatabase() {
       return database;
     }
 
-    public String getCollectionId() {
-      return collectionId;
+    public String getCollection() {
+      return collection;
     }
 
-    public String getIndexId() {
-      return indexId;
+    public String getIndex() {
+      return index;
     }
 
     public Builder setProject(String project) {
@@ -195,13 +187,13 @@ public Builder setDatabase(String database) {
       return this;
     }
 
-    public Builder setCollectionId(String collectionId) {
-      this.collectionId = collectionId;
+    public Builder setCollection(String collection) {
+      this.collection = collection;
       return this;
     }
 
-    public Builder setIndexId(String indexId) {
-      this.indexId = indexId;
+    public Builder setIndex(String index) {
+      this.index = index;
       return this;
     }
 
@@ -210,8 +202,8 @@ private Builder() {}
     private Builder(IndexName indexName) {
       project = indexName.project;
       database = indexName.database;
-      collectionId = indexName.collectionId;
-      indexId = indexName.indexId;
+      collection = indexName.collection;
+      index = indexName.index;
     }
 
     public IndexName build() {
@@ -228,8 +220,8 @@ public boolean equals(Object o) {
       IndexName that = (IndexName) o;
       return (this.project.equals(that.project))
           && (this.database.equals(that.database))
-          && (this.collectionId.equals(that.collectionId))
-          && (this.indexId.equals(that.indexId));
+          && (this.collection.equals(that.collection))
+          && (this.index.equals(that.index));
     }
     return false;
   }
@@ -242,9 +234,9 @@ public int hashCode() {
     h *= 1000003;
     h ^= database.hashCode();
     h *= 1000003;
-    h ^= collectionId.hashCode();
+    h ^= collection.hashCode();
     h *= 1000003;
-    h ^= indexId.hashCode();
+    h ^= index.hashCode();
     return h;
   }
 }
diff --git a/synth.metadata b/synth.metadata
index cffc5bc59..e967bfa0a 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -3,23 +3,23 @@
     {
       "git": {
         "name": ".",
-        "remote": "git@github.com:googleapis/java-firestore.git",
-        "sha": "dbb17be9bacd4876d5249678401f5fb38460b2af"
+        "remote": "https://github.com/googleapis/java-firestore.git",
+        "sha": "495f7f97405fcd2bff4d09e67ddbeb51615ea843"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "c1fae183ddeef0c59538863eac611fd679d1b7fb",
-        "internalRef": "314634470"
+        "sha": "d741cd976975c745d0199987aff0e908b8352992",
+        "internalRef": "305561906"
       }
     },
     {
       "git": {
         "name": "synthtool",
         "remote": "https://github.com/googleapis/synthtool.git",
-        "sha": "8b65daa222d193b689279162781baf0aa1f0ffd2"
+        "sha": "52638600f387deb98efb5f9c85fec39e82aa9052"
       }
     }
   ],
@@ -52,4 +52,4 @@
       }
     }
   ]
-}
\ No newline at end of file
+}