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..833eb4914 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,14 +30,16 @@
 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.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 import com.google.firestore.v1.CommitRequest;
 import com.google.firestore.v1.CommitResponse;
 import com.google.firestore.v1.CreateDocumentRequest;
+import com.google.firestore.v1.Cursor;
 import com.google.firestore.v1.DeleteDocumentRequest;
 import com.google.firestore.v1.Document;
 import com.google.firestore.v1.DocumentMask;
@@ -48,6 +50,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -194,9 +198,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 +221,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 +243,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 +270,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 +297,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 +330,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 +357,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 +413,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 +436,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 +457,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 +466,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 +479,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 +502,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 +527,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 +552,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 +575,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 +598,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 +621,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 +647,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 +670,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 +692,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 +717,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 +742,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 +766,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 +793,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 +819,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 +842,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 +868,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 +893,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 +918,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);
@@ -975,6 +942,155 @@ public final ListCollectionIdsPagedResponse listCollectionIds(ListCollectionIdsR
     return stub.listCollectionIdsCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Partitions a query by returning partition cursors that can be used to run the query in
+   * parallel. The returned partition cursors are split points that can be used by RunQuery as
+   * starting/end points for the query results.
+   *
+   * 

Sample code: + * + *


+   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   String parent = "";
+   *   PartitionQueryRequest request = PartitionQueryRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   for (Cursor element : firestoreClient.partitionQuery(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 PartitionQueryPagedResponse partitionQuery(PartitionQueryRequest request) { + return partitionQueryPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Partitions a query by returning partition cursors that can be used to run the query in + * parallel. The returned partition cursors are split points that can be used by RunQuery as + * starting/end points for the query results. + * + *

Sample code: + * + *


+   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   String parent = "";
+   *   PartitionQueryRequest request = PartitionQueryRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   ApiFuture<PartitionQueryPagedResponse> future = firestoreClient.partitionQueryPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Cursor element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + partitionQueryPagedCallable() { + return stub.partitionQueryPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Partitions a query by returning partition cursors that can be used to run the query in + * parallel. The returned partition cursors are split points that can be used by RunQuery as + * starting/end points for the query results. + * + *

Sample code: + * + *


+   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   String parent = "";
+   *   PartitionQueryRequest request = PartitionQueryRequest.newBuilder()
+   *     .setParent(parent)
+   *     .build();
+   *   while (true) {
+   *     PartitionQueryResponse response = firestoreClient.partitionQueryCallable().call(request);
+   *     for (Cursor element : response.getPartitionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + partitionQueryCallable() { + return stub.partitionQueryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Applies a batch of write operations. + * + *

The BatchWrite method does not apply the write operations atomically and can apply them out + * of order. Method does not allow more than one write per document. Each write succeeds or fails + * independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the + * success status of each write. + * + *

If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * + *

Sample code: + * + *


+   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   String database = "";
+   *   BatchWriteRequest request = BatchWriteRequest.newBuilder()
+   *     .setDatabase(database)
+   *     .build();
+   *   BatchWriteResponse response = firestoreClient.batchWrite(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 BatchWriteResponse batchWrite(BatchWriteRequest request) { + return batchWriteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Applies a batch of write operations. + * + *

The BatchWrite method does not apply the write operations atomically and can apply them out + * of order. Method does not allow more than one write per document. Each write succeeds or fails + * independently. See the [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the + * success status of each write. + * + *

If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * + *

Sample code: + * + *


+   * try (FirestoreClient firestoreClient = FirestoreClient.create()) {
+   *   String database = "";
+   *   BatchWriteRequest request = BatchWriteRequest.newBuilder()
+   *     .setDatabase(database)
+   *     .build();
+   *   ApiFuture<BatchWriteResponse> future = firestoreClient.batchWriteCallable().futureCall(request);
+   *   // Do something
+   *   BatchWriteResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchWriteCallable() { + return stub.batchWriteCallable(); + } + @Override public final void close() { stub.close(); @@ -1167,4 +1283,85 @@ protected ListCollectionIdsFixedSizeCollection createCollection( return new ListCollectionIdsFixedSizeCollection(pages, collectionSize); } } + + public static class PartitionQueryPagedResponse + extends AbstractPagedListResponse< + PartitionQueryRequest, + PartitionQueryResponse, + Cursor, + PartitionQueryPage, + PartitionQueryFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + PartitionQueryPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public PartitionQueryPagedResponse apply(PartitionQueryPage input) { + return new PartitionQueryPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private PartitionQueryPagedResponse(PartitionQueryPage page) { + super(page, PartitionQueryFixedSizeCollection.createEmptyCollection()); + } + } + + public static class PartitionQueryPage + extends AbstractPage< + PartitionQueryRequest, PartitionQueryResponse, Cursor, PartitionQueryPage> { + + private PartitionQueryPage( + PageContext context, + PartitionQueryResponse response) { + super(context, response); + } + + private static PartitionQueryPage createEmptyPage() { + return new PartitionQueryPage(null, null); + } + + @Override + protected PartitionQueryPage createPage( + PageContext context, + PartitionQueryResponse response) { + return new PartitionQueryPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class PartitionQueryFixedSizeCollection + extends AbstractFixedSizeCollection< + PartitionQueryRequest, + PartitionQueryResponse, + Cursor, + PartitionQueryPage, + PartitionQueryFixedSizeCollection> { + + private PartitionQueryFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static PartitionQueryFixedSizeCollection createEmptyCollection() { + return new PartitionQueryFixedSizeCollection(null, 0); + } + + @Override + protected PartitionQueryFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new PartitionQueryFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java index fc4d44bb2..c01d0cce6 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/FirestoreSettings.java @@ -17,6 +17,7 @@ import static com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse; import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse; +import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -34,6 +35,8 @@ import com.google.cloud.firestore.v1.stub.FirestoreStubSettings; import com.google.firestore.v1.BatchGetDocumentsRequest; import com.google.firestore.v1.BatchGetDocumentsResponse; +import com.google.firestore.v1.BatchWriteRequest; +import com.google.firestore.v1.BatchWriteResponse; import com.google.firestore.v1.BeginTransactionRequest; import com.google.firestore.v1.BeginTransactionResponse; import com.google.firestore.v1.CommitRequest; @@ -48,6 +51,8 @@ import com.google.firestore.v1.ListDocumentsResponse; import com.google.firestore.v1.ListenRequest; import com.google.firestore.v1.ListenResponse; +import com.google.firestore.v1.PartitionQueryRequest; +import com.google.firestore.v1.PartitionQueryResponse; import com.google.firestore.v1.RollbackRequest; import com.google.firestore.v1.RunQueryRequest; import com.google.firestore.v1.RunQueryResponse; @@ -162,6 +167,18 @@ public StreamingCallSettings listenSettings() { return ((FirestoreStubSettings) getStubSettings()).listCollectionIdsSettings(); } + /** Returns the object with the settings used for calls to partitionQuery. */ + public PagedCallSettings< + PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse> + partitionQuerySettings() { + return ((FirestoreStubSettings) getStubSettings()).partitionQuerySettings(); + } + + /** Returns the object with the settings used for calls to batchWrite. */ + public UnaryCallSettings batchWriteSettings() { + return ((FirestoreStubSettings) getStubSettings()).batchWriteSettings(); + } + public static final FirestoreSettings create(FirestoreStubSettings stub) throws IOException { return new FirestoreSettings.Builder(stub.toBuilder()).build(); } @@ -330,6 +347,18 @@ public StreamingCallSettings.Builder listenSettin return getStubSettingsBuilder().listCollectionIdsSettings(); } + /** Returns the builder for the settings used for calls to partitionQuery. */ + public PagedCallSettings.Builder< + PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse> + partitionQuerySettings() { + return getStubSettingsBuilder().partitionQuerySettings(); + } + + /** Returns the builder for the settings used for calls to batchWrite. */ + public UnaryCallSettings.Builder batchWriteSettings() { + return getStubSettingsBuilder().batchWriteSettings(); + } + @Override public FirestoreSettings build() throws IOException { return new FirestoreSettings(this); 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..e681e64fb 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;
@@ -384,6 +445,11 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
+      definitions.put(
+          "idempotent2",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -413,35 +479,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 +531,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"))
@@ -464,22 +548,22 @@ private static Builder initDefaults(Builder builder) {
 
       builder
           .listIndexesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
           .getIndexSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteIndexSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .getFieldSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .importDocumentsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .listFieldsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -488,19 +572,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 +672,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 +715,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 +758,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 +774,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/FirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java
index 50456e9ef..6711c2a14 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreStub.java
@@ -17,6 +17,7 @@
 
 import static com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse;
 import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse;
+import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse;
 
 import com.google.api.core.BetaApi;
 import com.google.api.gax.core.BackgroundResource;
@@ -25,6 +26,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
+import com.google.firestore.v1.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 import com.google.firestore.v1.CommitRequest;
@@ -39,6 +42,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -123,6 +128,19 @@ public BidiStreamingCallable listenCallable() {
     throw new UnsupportedOperationException("Not implemented: listCollectionIdsCallable()");
   }
 
+  public UnaryCallable
+      partitionQueryPagedCallable() {
+    throw new UnsupportedOperationException("Not implemented: partitionQueryPagedCallable()");
+  }
+
+  public UnaryCallable partitionQueryCallable() {
+    throw new UnsupportedOperationException("Not implemented: partitionQueryCallable()");
+  }
+
+  public UnaryCallable batchWriteCallable() {
+    throw new UnsupportedOperationException("Not implemented: batchWriteCallable()");
+  }
+
   @Override
   public abstract void close();
 }
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..eab7bf699 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
@@ -17,6 +17,7 @@
 
 import static com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse;
 import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse;
+import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse;
 
 import com.google.api.core.ApiFunction;
 import com.google.api.core.ApiFuture;
@@ -48,11 +49,14 @@
 import com.google.common.collect.Lists;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
+import com.google.firestore.v1.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 import com.google.firestore.v1.CommitRequest;
 import com.google.firestore.v1.CommitResponse;
 import com.google.firestore.v1.CreateDocumentRequest;
+import com.google.firestore.v1.Cursor;
 import com.google.firestore.v1.DeleteDocumentRequest;
 import com.google.firestore.v1.Document;
 import com.google.firestore.v1.GetDocumentRequest;
@@ -62,6 +66,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -133,6 +139,10 @@ public class FirestoreStubSettings extends StubSettings {
   private final PagedCallSettings<
           ListCollectionIdsRequest, ListCollectionIdsResponse, ListCollectionIdsPagedResponse>
       listCollectionIdsSettings;
+  private final PagedCallSettings<
+          PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>
+      partitionQuerySettings;
+  private final UnaryCallSettings batchWriteSettings;
 
   /** Returns the object with the settings used for calls to getDocument. */
   public UnaryCallSettings getDocumentSettings() {
@@ -204,6 +214,18 @@ public StreamingCallSettings listenSettings() {
     return listCollectionIdsSettings;
   }
 
+  /** Returns the object with the settings used for calls to partitionQuery. */
+  public PagedCallSettings<
+          PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>
+      partitionQuerySettings() {
+    return partitionQuerySettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchWrite. */
+  public UnaryCallSettings batchWriteSettings() {
+    return batchWriteSettings;
+  }
+
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public FirestoreStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -285,6 +307,8 @@ protected FirestoreStubSettings(Builder settingsBuilder) throws IOException {
     writeSettings = settingsBuilder.writeSettings().build();
     listenSettings = settingsBuilder.listenSettings().build();
     listCollectionIdsSettings = settingsBuilder.listCollectionIdsSettings().build();
+    partitionQuerySettings = settingsBuilder.partitionQuerySettings().build();
+    batchWriteSettings = settingsBuilder.batchWriteSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -362,6 +386,43 @@ public Iterable extractResources(ListCollectionIdsResponse payload) {
             }
           };
 
+  private static final PagedListDescriptor
+      PARTITION_QUERY_PAGE_STR_DESC =
+          new PagedListDescriptor() {
+            @Override
+            public String emptyToken() {
+              return "";
+            }
+
+            @Override
+            public PartitionQueryRequest injectToken(PartitionQueryRequest payload, String token) {
+              return PartitionQueryRequest.newBuilder(payload).setPageToken(token).build();
+            }
+
+            @Override
+            public PartitionQueryRequest injectPageSize(
+                PartitionQueryRequest payload, int pageSize) {
+              return PartitionQueryRequest.newBuilder(payload).setPageSize(pageSize).build();
+            }
+
+            @Override
+            public Integer extractPageSize(PartitionQueryRequest payload) {
+              return payload.getPageSize();
+            }
+
+            @Override
+            public String extractNextToken(PartitionQueryResponse payload) {
+              return payload.getNextPageToken();
+            }
+
+            @Override
+            public Iterable extractResources(PartitionQueryResponse payload) {
+              return payload.getPartitionsList() != null
+                  ? payload.getPartitionsList()
+                  : ImmutableList.of();
+            }
+          };
+
   private static final PagedListResponseFactory<
           ListDocumentsRequest, ListDocumentsResponse, ListDocumentsPagedResponse>
       LIST_DOCUMENTS_PAGE_STR_FACT =
@@ -398,6 +459,23 @@ public ApiFuture getFuturePagedResponse(
             }
           };
 
+  private static final PagedListResponseFactory<
+          PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>
+      PARTITION_QUERY_PAGE_STR_FACT =
+          new PagedListResponseFactory<
+              PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>() {
+            @Override
+            public ApiFuture getFuturePagedResponse(
+                UnaryCallable callable,
+                PartitionQueryRequest request,
+                ApiCallContext context,
+                ApiFuture futureResponse) {
+              PageContext pageContext =
+                  PageContext.create(callable, PARTITION_QUERY_PAGE_STR_DESC, request, context);
+              return PartitionQueryPagedResponse.createAsync(pageContext, futureResponse);
+            }
+          };
+
   /** Builder for FirestoreStubSettings. */
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
@@ -423,6 +501,11 @@ public static class Builder extends StubSettings.Builder
         listCollectionIdsSettings;
+    private final PagedCallSettings.Builder<
+            PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>
+        partitionQuerySettings;
+    private final UnaryCallSettings.Builder
+        batchWriteSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -438,6 +521,11 @@ public static class Builder extends StubSettings.BuildernewArrayList()));
+      definitions.put(
+          "idempotent2",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -504,6 +592,10 @@ protected Builder(ClientContext clientContext) {
 
       listCollectionIdsSettings = PagedCallSettings.newBuilder(LIST_COLLECTION_IDS_PAGE_STR_FACT);
 
+      partitionQuerySettings = PagedCallSettings.newBuilder(PARTITION_QUERY_PAGE_STR_FACT);
+
+      batchWriteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               getDocumentSettings,
@@ -514,7 +606,9 @@ protected Builder(ClientContext clientContext) {
               beginTransactionSettings,
               commitSettings,
               rollbackSettings,
-              listCollectionIdsSettings);
+              listCollectionIdsSettings,
+              partitionQuerySettings,
+              batchWriteSettings);
 
       initDefaults(this);
     }
@@ -532,12 +626,12 @@ private static Builder initDefaults(Builder builder) {
 
       builder
           .getDocumentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
           .listDocumentsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent2"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -585,6 +679,16 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
+      builder
+          .partitionQuerySettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .batchWriteSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       return builder;
     }
 
@@ -604,6 +708,8 @@ protected Builder(FirestoreStubSettings settings) {
       writeSettings = settings.writeSettings.toBuilder();
       listenSettings = settings.listenSettings.toBuilder();
       listCollectionIdsSettings = settings.listCollectionIdsSettings.toBuilder();
+      partitionQuerySettings = settings.partitionQuerySettings.toBuilder();
+      batchWriteSettings = settings.batchWriteSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
@@ -615,7 +721,9 @@ protected Builder(FirestoreStubSettings settings) {
               beginTransactionSettings,
               commitSettings,
               rollbackSettings,
-              listCollectionIdsSettings);
+              listCollectionIdsSettings,
+              partitionQuerySettings,
+              batchWriteSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -706,6 +814,18 @@ public StreamingCallSettings.Builder listenSettin
       return listCollectionIdsSettings;
     }
 
+    /** Returns the builder for the settings used for calls to partitionQuery. */
+    public PagedCallSettings.Builder<
+            PartitionQueryRequest, PartitionQueryResponse, PartitionQueryPagedResponse>
+        partitionQuerySettings() {
+      return partitionQuerySettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchWrite. */
+    public UnaryCallSettings.Builder batchWriteSettings() {
+      return batchWriteSettings;
+    }
+
     @Override
     public FirestoreStubSettings build() throws IOException {
       return new FirestoreStubSettings(this);
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/v1/stub/GrpcFirestoreStub.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java
index 6d525bcd3..b5e67e465 100644
--- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java
+++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreStub.java
@@ -17,6 +17,7 @@
 
 import static com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse;
 import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse;
+import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse;
 
 import com.google.api.core.BetaApi;
 import com.google.api.gax.core.BackgroundResource;
@@ -31,6 +32,8 @@
 import com.google.common.collect.ImmutableMap;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
+import com.google.firestore.v1.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 import com.google.firestore.v1.CommitRequest;
@@ -45,6 +48,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -179,6 +184,24 @@ public class GrpcFirestoreStub extends FirestoreStub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(ListCollectionIdsResponse.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor
+      partitionQueryMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.v1.Firestore/PartitionQuery")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(PartitionQueryRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(PartitionQueryResponse.getDefaultInstance()))
+              .build();
+  private static final MethodDescriptor
+      batchWriteMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.firestore.v1.Firestore/BatchWrite")
+              .setRequestMarshaller(ProtoUtils.marshaller(BatchWriteRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(BatchWriteResponse.getDefaultInstance()))
+              .build();
 
   private final BackgroundResource backgroundResources;
 
@@ -202,6 +225,10 @@ public class GrpcFirestoreStub extends FirestoreStub {
       listCollectionIdsCallable;
   private final UnaryCallable
       listCollectionIdsPagedCallable;
+  private final UnaryCallable partitionQueryCallable;
+  private final UnaryCallable
+      partitionQueryPagedCallable;
+  private final UnaryCallable batchWriteCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -377,6 +404,33 @@ public Map extract(ListCollectionIdsRequest request) {
                       }
                     })
                 .build();
+    GrpcCallSettings
+        partitionQueryTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(partitionQueryMethodDescriptor)
+                .setParamsExtractor(
+                    new RequestParamsExtractor() {
+                      @Override
+                      public Map extract(PartitionQueryRequest request) {
+                        ImmutableMap.Builder params = ImmutableMap.builder();
+                        params.put("parent", String.valueOf(request.getParent()));
+                        return params.build();
+                      }
+                    })
+                .build();
+    GrpcCallSettings batchWriteTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(batchWriteMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(BatchWriteRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("database", String.valueOf(request.getDatabase()));
+                    return params.build();
+                  }
+                })
+            .build();
 
     this.getDocumentCallable =
         callableFactory.createUnaryCallable(
@@ -429,6 +483,15 @@ public Map extract(ListCollectionIdsRequest request) {
             listCollectionIdsTransportSettings,
             settings.listCollectionIdsSettings(),
             clientContext);
+    this.partitionQueryCallable =
+        callableFactory.createUnaryCallable(
+            partitionQueryTransportSettings, settings.partitionQuerySettings(), clientContext);
+    this.partitionQueryPagedCallable =
+        callableFactory.createPagedCallable(
+            partitionQueryTransportSettings, settings.partitionQuerySettings(), clientContext);
+    this.batchWriteCallable =
+        callableFactory.createUnaryCallable(
+            batchWriteTransportSettings, settings.batchWriteSettings(), clientContext);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
@@ -498,6 +561,19 @@ public BidiStreamingCallable listenCallable() {
     return listCollectionIdsCallable;
   }
 
+  public UnaryCallable
+      partitionQueryPagedCallable() {
+    return partitionQueryPagedCallable;
+  }
+
+  public UnaryCallable partitionQueryCallable() {
+    return partitionQueryCallable;
+  }
+
+  public UnaryCallable batchWriteCallable() {
+    return batchWriteCallable;
+  }
+
   @Override
   public final void close() {
     shutdown();
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..299d09276 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
@@ -17,6 +17,7 @@
 
 import static com.google.cloud.firestore.v1.FirestoreClient.ListCollectionIdsPagedResponse;
 import static com.google.cloud.firestore.v1.FirestoreClient.ListDocumentsPagedResponse;
+import static com.google.cloud.firestore.v1.FirestoreClient.PartitionQueryPagedResponse;
 
 import com.google.api.gax.core.NoCredentialsProvider;
 import com.google.api.gax.grpc.GaxGrpcProperties;
@@ -31,15 +32,16 @@
 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.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 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.Cursor;
 import com.google.firestore.v1.DeleteDocumentRequest;
 import com.google.firestore.v1.Document;
 import com.google.firestore.v1.DocumentMask;
@@ -50,6 +52,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -120,8 +124,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 +134,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 +148,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 +171,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 +186,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 +201,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 +220,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 +237,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 +253,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 +318,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 +326,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 +340,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 +360,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 +380,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 +408,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 +431,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 +446,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 +471,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 +487,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 +511,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 +532,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 +550,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 +576,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 +597,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 +622,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 +643,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 +676,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 +688,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 +702,99 @@ 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 partitionQueryTest() {
+    String nextPageToken = "";
+    Cursor partitionsElement = Cursor.newBuilder().build();
+    List partitions = Arrays.asList(partitionsElement);
+    PartitionQueryResponse expectedResponse =
+        PartitionQueryResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllPartitions(partitions)
+            .build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+    PartitionQueryRequest request = PartitionQueryRequest.newBuilder().setParent(parent).build();
+
+    PartitionQueryPagedResponse pagedListResponse = client.partitionQuery(request);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getPartitionsList().get(0), resources.get(0));
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    PartitionQueryRequest actualRequest = (PartitionQueryRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void partitionQueryExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      PartitionQueryRequest request = PartitionQueryRequest.newBuilder().setParent(parent).build();
+
+      client.partitionQuery(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void batchWriteTest() {
+    BatchWriteResponse expectedResponse = BatchWriteResponse.newBuilder().build();
+    mockFirestore.addResponse(expectedResponse);
+
+    String database = "database1789464955";
+    BatchWriteRequest request = BatchWriteRequest.newBuilder().setDatabase(database).build();
+
+    BatchWriteResponse actualResponse = client.batchWrite(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockFirestore.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BatchWriteRequest actualRequest = (BatchWriteRequest) actualRequests.get(0);
+
+    Assert.assertEquals(database, actualRequest.getDatabase());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void batchWriteExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockFirestore.addException(exception);
+
+    try {
+      String database = "database1789464955";
+      BatchWriteRequest request = BatchWriteRequest.newBuilder().setDatabase(database).build();
 
-      client.listCollectionIds(formattedParent);
+      client.batchWrite(request);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java
index 274978ef3..f095f896f 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1/MockFirestoreImpl.java
@@ -18,6 +18,8 @@
 import com.google.api.core.BetaApi;
 import com.google.firestore.v1.BatchGetDocumentsRequest;
 import com.google.firestore.v1.BatchGetDocumentsResponse;
+import com.google.firestore.v1.BatchWriteRequest;
+import com.google.firestore.v1.BatchWriteResponse;
 import com.google.firestore.v1.BeginTransactionRequest;
 import com.google.firestore.v1.BeginTransactionResponse;
 import com.google.firestore.v1.CommitRequest;
@@ -33,6 +35,8 @@
 import com.google.firestore.v1.ListDocumentsResponse;
 import com.google.firestore.v1.ListenRequest;
 import com.google.firestore.v1.ListenResponse;
+import com.google.firestore.v1.PartitionQueryRequest;
+import com.google.firestore.v1.PartitionQueryResponse;
 import com.google.firestore.v1.RollbackRequest;
 import com.google.firestore.v1.RunQueryRequest;
 import com.google.firestore.v1.RunQueryResponse;
@@ -211,13 +215,29 @@ public void runQuery(RunQueryRequest request, StreamObserver r
     }
   }
 
+  @Override
+  public void partitionQuery(
+      PartitionQueryRequest request, StreamObserver responseObserver) {
+    Object response = responses.remove();
+    if (response instanceof PartitionQueryResponse) {
+      requests.add(request);
+      responseObserver.onNext((PartitionQueryResponse) response);
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError((Exception) response);
+    } else {
+      responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+    }
+  }
+
   @Override
   public StreamObserver write(final StreamObserver responseObserver) {
-    final Object response = responses.remove();
     StreamObserver requestObserver =
         new StreamObserver() {
           @Override
           public void onNext(WriteRequest value) {
+            requests.add(value);
+            final Object response = responses.remove();
             if (response instanceof WriteResponse) {
               responseObserver.onNext((WriteResponse) response);
             } else if (response instanceof Exception) {
@@ -243,11 +263,12 @@ public void onCompleted() {
   @Override
   public StreamObserver listen(
       final StreamObserver responseObserver) {
-    final Object response = responses.remove();
     StreamObserver requestObserver =
         new StreamObserver() {
           @Override
           public void onNext(ListenRequest value) {
+            requests.add(value);
+            final Object response = responses.remove();
             if (response instanceof ListenResponse) {
               responseObserver.onNext((ListenResponse) response);
             } else if (response instanceof Exception) {
@@ -286,6 +307,21 @@ public void listCollectionIds(
     }
   }
 
+  @Override
+  public void batchWrite(
+      BatchWriteRequest request, StreamObserver responseObserver) {
+    Object response = responses.remove();
+    if (response instanceof BatchWriteResponse) {
+      requests.add(request);
+      responseObserver.onNext((BatchWriteResponse) response);
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError((Exception) response);
+    } else {
+      responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+    }
+  }
+
   @Override
   public void createDocument(
       CreateDocumentRequest request, StreamObserver responseObserver) {
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/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/MockFirestoreImpl.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/MockFirestoreImpl.java
index c4e8e65a3..1d5f83aa6 100644
--- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/MockFirestoreImpl.java
+++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/v1beta1/MockFirestoreImpl.java
@@ -228,11 +228,12 @@ public void runQuery(RunQueryRequest request, StreamObserver r
 
   @Override
   public StreamObserver write(final StreamObserver responseObserver) {
-    final Object response = responses.remove();
     StreamObserver requestObserver =
         new StreamObserver() {
           @Override
           public void onNext(WriteRequest value) {
+            requests.add(value);
+            final Object response = responses.remove();
             if (response instanceof WriteResponse) {
               responseObserver.onNext((WriteResponse) response);
             } else if (response instanceof Exception) {
@@ -258,11 +259,12 @@ public void onCompleted() {
   @Override
   public StreamObserver listen(
       final StreamObserver responseObserver) {
-    final Object response = responses.remove();
     StreamObserver requestObserver =
         new StreamObserver() {
           @Override
           public void onNext(ListenRequest value) {
+            requests.add(value);
+            final Object response = responses.remove();
             if (response instanceof ListenResponse) {
               responseObserver.onNext((ListenResponse) response);
             } else if (response instanceof Exception) {
diff --git a/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java b/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java
index 3f2b038e3..bf49895d2 100644
--- a/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java
+++ b/grpc-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreGrpc.java
@@ -431,6 +431,50 @@ private FirestoreGrpc() {}
     return getRunQueryMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.firestore.v1.PartitionQueryRequest,
+          com.google.firestore.v1.PartitionQueryResponse>
+      getPartitionQueryMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "PartitionQuery",
+      requestType = com.google.firestore.v1.PartitionQueryRequest.class,
+      responseType = com.google.firestore.v1.PartitionQueryResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.firestore.v1.PartitionQueryRequest,
+          com.google.firestore.v1.PartitionQueryResponse>
+      getPartitionQueryMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.firestore.v1.PartitionQueryRequest,
+            com.google.firestore.v1.PartitionQueryResponse>
+        getPartitionQueryMethod;
+    if ((getPartitionQueryMethod = FirestoreGrpc.getPartitionQueryMethod) == null) {
+      synchronized (FirestoreGrpc.class) {
+        if ((getPartitionQueryMethod = FirestoreGrpc.getPartitionQueryMethod) == null) {
+          FirestoreGrpc.getPartitionQueryMethod =
+              getPartitionQueryMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PartitionQuery"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.firestore.v1.PartitionQueryRequest.getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.firestore.v1.PartitionQueryResponse.getDefaultInstance()))
+                      .setSchemaDescriptor(new FirestoreMethodDescriptorSupplier("PartitionQuery"))
+                      .build();
+        }
+      }
+    }
+    return getPartitionQueryMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.firestore.v1.WriteRequest, com.google.firestore.v1.WriteResponse>
       getWriteMethod;
@@ -559,6 +603,47 @@ private FirestoreGrpc() {}
     return getListCollectionIdsMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.firestore.v1.BatchWriteRequest, com.google.firestore.v1.BatchWriteResponse>
+      getBatchWriteMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "BatchWrite",
+      requestType = com.google.firestore.v1.BatchWriteRequest.class,
+      responseType = com.google.firestore.v1.BatchWriteResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.firestore.v1.BatchWriteRequest, com.google.firestore.v1.BatchWriteResponse>
+      getBatchWriteMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.firestore.v1.BatchWriteRequest, com.google.firestore.v1.BatchWriteResponse>
+        getBatchWriteMethod;
+    if ((getBatchWriteMethod = FirestoreGrpc.getBatchWriteMethod) == null) {
+      synchronized (FirestoreGrpc.class) {
+        if ((getBatchWriteMethod = FirestoreGrpc.getBatchWriteMethod) == null) {
+          FirestoreGrpc.getBatchWriteMethod =
+              getBatchWriteMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchWrite"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.firestore.v1.BatchWriteRequest.getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.firestore.v1.BatchWriteResponse.getDefaultInstance()))
+                      .setSchemaDescriptor(new FirestoreMethodDescriptorSupplier("BatchWrite"))
+                      .build();
+        }
+      }
+    }
+    return getBatchWriteMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.firestore.v1.CreateDocumentRequest, com.google.firestore.v1.Document>
       getCreateDocumentMethod;
@@ -777,6 +862,22 @@ public void runQuery(
       asyncUnimplementedUnaryCall(getRunQueryMethod(), responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Partitions a query by returning partition cursors that can be used to run
+     * the query in parallel. The returned partition cursors are split points that
+     * can be used by RunQuery as starting/end points for the query results.
+     * 
+ */ + public void partitionQuery( + com.google.firestore.v1.PartitionQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getPartitionQueryMethod(), responseObserver); + } + /** * * @@ -815,6 +916,25 @@ public void listCollectionIds( asyncUnimplementedUnaryCall(getListCollectionIdsMethod(), responseObserver); } + /** + * + * + *
+     * Applies a batch of write operations.
+     * The BatchWrite method does not apply the write operations atomically
+     * and can apply them out of order. Method does not allow more than one write
+     * per document. Each write succeeds or fails independently. See the
+     * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.
+     * If you require an atomically applied set of writes, use
+     * [Commit][google.firestore.v1.Firestore.Commit] instead.
+     * 
+ */ + public void batchWrite( + com.google.firestore.v1.BatchWriteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBatchWriteMethod(), responseObserver); + } + /** * * @@ -888,6 +1008,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.firestore.v1.RunQueryRequest, com.google.firestore.v1.RunQueryResponse>(this, METHODID_RUN_QUERY))) + .addMethod( + getPartitionQueryMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.v1.PartitionQueryRequest, + com.google.firestore.v1.PartitionQueryResponse>( + this, METHODID_PARTITION_QUERY))) .addMethod( getWriteMethod(), asyncBidiStreamingCall( @@ -907,6 +1034,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.firestore.v1.ListCollectionIdsRequest, com.google.firestore.v1.ListCollectionIdsResponse>( this, METHODID_LIST_COLLECTION_IDS))) + .addMethod( + getBatchWriteMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.firestore.v1.BatchWriteRequest, + com.google.firestore.v1.BatchWriteResponse>(this, METHODID_BATCH_WRITE))) .addMethod( getCreateDocumentMethod(), asyncUnaryCall( @@ -1083,6 +1216,25 @@ public void runQuery( getChannel().newCall(getRunQueryMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Partitions a query by returning partition cursors that can be used to run
+     * the query in parallel. The returned partition cursors are split points that
+     * can be used by RunQuery as starting/end points for the query results.
+     * 
+ */ + public void partitionQuery( + com.google.firestore.v1.PartitionQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPartitionQueryMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1126,6 +1278,26 @@ public void listCollectionIds( responseObserver); } + /** + * + * + *
+     * Applies a batch of write operations.
+     * The BatchWrite method does not apply the write operations atomically
+     * and can apply them out of order. Method does not allow more than one write
+     * per document. Each write succeeds or fails independently. See the
+     * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.
+     * If you require an atomically applied set of writes, use
+     * [Commit][google.firestore.v1.Firestore.Commit] instead.
+     * 
+ */ + public void batchWrite( + com.google.firestore.v1.BatchWriteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchWriteMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1280,6 +1452,20 @@ public java.util.Iterator runQuery( getChannel(), getRunQueryMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Partitions a query by returning partition cursors that can be used to run
+     * the query in parallel. The returned partition cursors are split points that
+     * can be used by RunQuery as starting/end points for the query results.
+     * 
+ */ + public com.google.firestore.v1.PartitionQueryResponse partitionQuery( + com.google.firestore.v1.PartitionQueryRequest request) { + return blockingUnaryCall(getChannel(), getPartitionQueryMethod(), getCallOptions(), request); + } + /** * * @@ -1293,6 +1479,24 @@ public com.google.firestore.v1.ListCollectionIdsResponse listCollectionIds( getChannel(), getListCollectionIdsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Applies a batch of write operations.
+     * The BatchWrite method does not apply the write operations atomically
+     * and can apply them out of order. Method does not allow more than one write
+     * per document. Each write succeeds or fails independently. See the
+     * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write.
+     * If you require an atomically applied set of writes, use
+     * [Commit][google.firestore.v1.Firestore.Commit] instead.
+     * 
+ */ + public com.google.firestore.v1.BatchWriteResponse batchWrite( + com.google.firestore.v1.BatchWriteRequest request) { + return blockingUnaryCall(getChannel(), getBatchWriteMethod(), getCallOptions(), request); + } + /** * * @@ -1422,6 +1626,22 @@ public com.google.common.util.concurrent.ListenableFuture + * Partitions a query by returning partition cursors that can be used to run + * the query in parallel. The returned partition cursors are split points that + * can be used by RunQuery as starting/end points for the query results. + *
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.PartitionQueryResponse> + partitionQuery(com.google.firestore.v1.PartitionQueryRequest request) { + return futureUnaryCall( + getChannel().newCall(getPartitionQueryMethod(), getCallOptions()), request); + } + /** * * @@ -1436,6 +1656,26 @@ public com.google.common.util.concurrent.ListenableFuture + * Applies a batch of write operations. + * The BatchWrite method does not apply the write operations atomically + * and can apply them out of order. Method does not allow more than one write + * per document. Each write succeeds or fails independently. See the + * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. + * If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + *
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.firestore.v1.BatchWriteResponse> + batchWrite(com.google.firestore.v1.BatchWriteRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchWriteMethod(), getCallOptions()), request); + } + /** * * @@ -1459,10 +1699,12 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1531,12 +1773,24 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_PARTITION_QUERY: + serviceImpl.partitionQuery( + (com.google.firestore.v1.PartitionQueryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_LIST_COLLECTION_IDS: serviceImpl.listCollectionIds( (com.google.firestore.v1.ListCollectionIdsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_WRITE: + serviceImpl.batchWrite( + (com.google.firestore.v1.BatchWriteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_CREATE_DOCUMENT: serviceImpl.createDocument( (com.google.firestore.v1.CreateDocumentRequest) request, @@ -1625,9 +1879,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCommitMethod()) .addMethod(getRollbackMethod()) .addMethod(getRunQueryMethod()) + .addMethod(getPartitionQueryMethod()) .addMethod(getWriteMethod()) .addMethod(getListenMethod()) .addMethod(getListCollectionIdsMethod()) + .addMethod(getBatchWriteMethod()) .addMethod(getCreateDocumentMethod()) .build(); } 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/CreateIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java index 25f857841..982b0530a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/CreateIndexRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -168,6 +169,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -194,6 +196,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the index field is set. */ + @java.lang.Override public boolean hasIndex() { return index_ != null; } @@ -209,6 +212,7 @@ public boolean hasIndex() { * * @return The index. */ + @java.lang.Override public com.google.firestore.admin.v1.Index getIndex() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } @@ -222,6 +226,7 @@ public com.google.firestore.admin.v1.Index getIndex() { * .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { return getIndex(); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java index 8f6e54a5b..352a712e4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/DeleteIndexRequest.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -152,6 +153,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java index 71ecbe137..845d21bac 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsMetadata.java @@ -210,6 +210,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the startTime field is set. */ + @java.lang.Override public boolean hasStartTime() { return startTime_ != null; } @@ -224,6 +225,7 @@ public boolean hasStartTime() { * * @return The startTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } @@ -236,6 +238,7 @@ public com.google.protobuf.Timestamp getStartTime() { * * .google.protobuf.Timestamp start_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return getStartTime(); } @@ -254,6 +257,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the endTime field is set. */ + @java.lang.Override public boolean hasEndTime() { return endTime_ != null; } @@ -269,6 +273,7 @@ public boolean hasEndTime() { * * @return The endTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } @@ -282,6 +287,7 @@ public com.google.protobuf.Timestamp getEndTime() { * * .google.protobuf.Timestamp end_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } @@ -299,6 +305,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The enum numeric value on the wire for operationState. */ + @java.lang.Override public int getOperationStateValue() { return operationState_; } @@ -313,6 +320,7 @@ public int getOperationStateValue() { * * @return The operationState. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getOperationState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = @@ -333,6 +341,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { * * @return Whether the progressDocuments field is set. */ + @java.lang.Override public boolean hasProgressDocuments() { return progressDocuments_ != null; } @@ -347,6 +356,7 @@ public boolean hasProgressDocuments() { * * @return The progressDocuments. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocuments_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -361,6 +371,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { * * .google.firestore.admin.v1.Progress progress_documents = 4; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { return getProgressDocuments(); } @@ -378,6 +389,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui * * @return Whether the progressBytes field is set. */ + @java.lang.Override public boolean hasProgressBytes() { return progressBytes_ != null; } @@ -392,6 +404,7 @@ public boolean hasProgressBytes() { * * @return The progressBytes. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytes_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -406,6 +419,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { * * .google.firestore.admin.v1.Progress progress_bytes = 5; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { return getProgressBytes(); } @@ -484,6 +498,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The outputUriPrefix. */ + @java.lang.Override public java.lang.String getOutputUriPrefix() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { @@ -506,6 +521,7 @@ public java.lang.String getOutputUriPrefix() { * * @return The bytes for outputUriPrefix. */ + @java.lang.Override public com.google.protobuf.ByteString getOutputUriPrefixBytes() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { @@ -1382,6 +1398,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The enum numeric value on the wire for operationState. */ + @java.lang.Override public int getOperationStateValue() { return operationState_; } @@ -1398,6 +1415,7 @@ public int getOperationStateValue() { * @return This builder for chaining. */ public Builder setOperationStateValue(int value) { + operationState_ = value; onChanged(); return this; @@ -1413,6 +1431,7 @@ public Builder setOperationStateValue(int value) { * * @return The operationState. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getOperationState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java index 4d6e5f16a..3cd1b155e 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequest.java @@ -150,6 +150,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -175,6 +176,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -268,6 +270,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The outputUriPrefix. */ + @java.lang.Override public java.lang.String getOutputUriPrefix() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { @@ -297,6 +300,7 @@ public java.lang.String getOutputUriPrefix() { * * @return The bytes for outputUriPrefix. */ + @java.lang.Override public com.google.protobuf.ByteString getOutputUriPrefixBytes() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java index c70c184a6..8fd633b7e 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsResponse.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The outputUriPrefix. */ + @java.lang.Override public java.lang.String getOutputUriPrefix() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getOutputUriPrefix() { * * @return The bytes for outputUriPrefix. */ + @java.lang.Override public com.google.protobuf.ByteString getOutputUriPrefixBytes() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java index 0cb8194e8..5632b37cb 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Field.java @@ -379,6 +379,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public java.util.List getIndexesList() { return indexes_; } @@ -391,6 +392,7 @@ public java.util.List getIndexesList() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public java.util.List getIndexesOrBuilderList() { return indexes_; @@ -404,6 +406,7 @@ public java.util.List getIndexesList() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public int getIndexesCount() { return indexes_.size(); } @@ -416,6 +419,7 @@ public int getIndexesCount() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexes_.get(index); } @@ -428,6 +432,7 @@ public com.google.firestore.admin.v1.Index getIndexes(int index) { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { return indexes_.get(index); } @@ -447,6 +452,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde * * @return The usesAncestorConfig. */ + @java.lang.Override public boolean getUsesAncestorConfig() { return usesAncestorConfig_; } @@ -467,6 +473,7 @@ public boolean getUsesAncestorConfig() { * * @return The ancestorField. */ + @java.lang.Override public java.lang.String getAncestorField() { java.lang.Object ref = ancestorField_; if (ref instanceof java.lang.String) { @@ -492,6 +499,7 @@ public java.lang.String getAncestorField() { * * @return The bytes for ancestorField. */ + @java.lang.Override public com.google.protobuf.ByteString getAncestorFieldBytes() { java.lang.Object ref = ancestorField_; if (ref instanceof java.lang.String) { @@ -521,6 +529,7 @@ public com.google.protobuf.ByteString getAncestorFieldBytes() { * * @return The reverting. */ + @java.lang.Override public boolean getReverting() { return reverting_; } @@ -1297,6 +1306,7 @@ public java.util.List getIndexesBui * * @return The usesAncestorConfig. */ + @java.lang.Override public boolean getUsesAncestorConfig() { return usesAncestorConfig_; } @@ -1477,6 +1487,7 @@ public Builder setAncestorFieldBytes(com.google.protobuf.ByteString value) { * * @return The reverting. */ + @java.lang.Override public boolean getReverting() { return reverting_; } @@ -1610,6 +1621,7 @@ public com.google.firestore.admin.v1.Field.IndexConfig getDefaultInstanceForType * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -1653,6 +1665,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -1681,6 +1694,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the indexConfig field is set. */ + @java.lang.Override public boolean hasIndexConfig() { return indexConfig_ != null; } @@ -1698,6 +1712,7 @@ public boolean hasIndexConfig() { * * @return The indexConfig. */ + @java.lang.Override public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { return indexConfig_ == null ? com.google.firestore.admin.v1.Field.IndexConfig.getDefaultInstance() @@ -1715,6 +1730,7 @@ public com.google.firestore.admin.v1.Field.IndexConfig getIndexConfig() { * * .google.firestore.admin.v1.Field.IndexConfig index_config = 2; */ + @java.lang.Override public com.google.firestore.admin.v1.Field.IndexConfigOrBuilder getIndexConfigOrBuilder() { return getIndexConfig(); } 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/FieldOperationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java index 4a179544a..a5c390bbb 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOperationMetadata.java @@ -503,6 +503,10 @@ public ChangeType findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -552,6 +556,7 @@ private ChangeType(int value) { * * @return The enum numeric value on the wire for changeType. */ + @java.lang.Override public int getChangeTypeValue() { return changeType_; } @@ -568,6 +573,7 @@ public int getChangeTypeValue() { * * @return The changeType. */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType getChangeType() { @SuppressWarnings("deprecation") @@ -593,6 +599,7 @@ public int getChangeTypeValue() { * * @return Whether the index field is set. */ + @java.lang.Override public boolean hasIndex() { return index_ != null; } @@ -607,6 +614,7 @@ public boolean hasIndex() { * * @return The index. */ + @java.lang.Override public com.google.firestore.admin.v1.Index getIndex() { return index_ == null ? com.google.firestore.admin.v1.Index.getDefaultInstance() : index_; } @@ -619,6 +627,7 @@ public com.google.firestore.admin.v1.Index getIndex() { * * .google.firestore.admin.v1.Index index = 2; */ + @java.lang.Override public com.google.firestore.admin.v1.IndexOrBuilder getIndexOrBuilder() { return getIndex(); } @@ -1004,6 +1013,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for changeType. */ + @java.lang.Override public int getChangeTypeValue() { return changeType_; } @@ -1022,6 +1032,7 @@ public int getChangeTypeValue() { * @return This builder for chaining. */ public Builder setChangeTypeValue(int value) { + changeType_ = value; onChanged(); return this; @@ -1039,6 +1050,7 @@ public Builder setChangeTypeValue(int value) { * * @return The changeType. */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType getChangeType() { @SuppressWarnings("deprecation") @@ -1344,6 +1356,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return Whether the startTime field is set. */ + @java.lang.Override public boolean hasStartTime() { return startTime_ != null; } @@ -1358,6 +1371,7 @@ public boolean hasStartTime() { * * @return The startTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } @@ -1370,6 +1384,7 @@ public com.google.protobuf.Timestamp getStartTime() { * * .google.protobuf.Timestamp start_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return getStartTime(); } @@ -1388,6 +1403,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the endTime field is set. */ + @java.lang.Override public boolean hasEndTime() { return endTime_ != null; } @@ -1403,6 +1419,7 @@ public boolean hasEndTime() { * * @return The endTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } @@ -1416,6 +1433,7 @@ public com.google.protobuf.Timestamp getEndTime() { * * .google.protobuf.Timestamp end_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } @@ -1434,6 +1452,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The field. */ + @java.lang.Override public java.lang.String getField() { java.lang.Object ref = field_; if (ref instanceof java.lang.String) { @@ -1457,6 +1476,7 @@ public java.lang.String getField() { * * @return The bytes for field. */ + @java.lang.Override public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = field_; if (ref instanceof java.lang.String) { @@ -1484,6 +1504,7 @@ public com.google.protobuf.ByteString getFieldBytes() { * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; * */ + @java.lang.Override public java.util.List getIndexConfigDeltasList() { return indexConfigDeltas_; @@ -1500,6 +1521,7 @@ public com.google.protobuf.ByteString getFieldBytes() { * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; * */ + @java.lang.Override public java.util.List< ? extends com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder> getIndexConfigDeltasOrBuilderList() { @@ -1517,6 +1539,7 @@ public com.google.protobuf.ByteString getFieldBytes() { * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; * */ + @java.lang.Override public int getIndexConfigDeltasCount() { return indexConfigDeltas_.size(); } @@ -1532,6 +1555,7 @@ public int getIndexConfigDeltasCount() { * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; * */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta getIndexConfigDeltas( int index) { return indexConfigDeltas_.get(index); @@ -1548,6 +1572,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta get * repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; * */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDeltaOrBuilder getIndexConfigDeltasOrBuilder(int index) { return indexConfigDeltas_.get(index); @@ -1566,6 +1591,7 @@ public com.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta get * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -1580,6 +1606,7 @@ public int getStateValue() { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = @@ -1600,6 +1627,7 @@ public com.google.firestore.admin.v1.OperationState getState() { * * @return Whether the progressDocuments field is set. */ + @java.lang.Override public boolean hasProgressDocuments() { return progressDocuments_ != null; } @@ -1614,6 +1642,7 @@ public boolean hasProgressDocuments() { * * @return The progressDocuments. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocuments_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -1628,6 +1657,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { * * .google.firestore.admin.v1.Progress progress_documents = 6; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { return getProgressDocuments(); } @@ -1645,6 +1675,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui * * @return Whether the progressBytes field is set. */ + @java.lang.Override public boolean hasProgressBytes() { return progressBytes_ != null; } @@ -1659,6 +1690,7 @@ public boolean hasProgressBytes() { * * @return The progressBytes. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytes_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -1673,6 +1705,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { * * .google.firestore.admin.v1.Progress progress_bytes = 7; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { return getProgressBytes(); } @@ -3108,6 +3141,7 @@ public Builder removeIndexConfigDeltas(int index) { * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -3124,6 +3158,7 @@ public int getStateValue() { * @return This builder for chaining. */ public Builder setStateValue(int value) { + state_ = value; onChanged(); return this; @@ -3139,6 +3174,7 @@ public Builder setStateValue(int value) { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java index 606776fad..95b8a23f3 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetFieldRequest.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -152,6 +153,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java index 2c09e7639..2fcb9802e 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/GetIndexRequest.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -152,6 +153,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java index c7877695a..f693fb462 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsMetadata.java @@ -210,6 +210,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the startTime field is set. */ + @java.lang.Override public boolean hasStartTime() { return startTime_ != null; } @@ -224,6 +225,7 @@ public boolean hasStartTime() { * * @return The startTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } @@ -236,6 +238,7 @@ public com.google.protobuf.Timestamp getStartTime() { * * .google.protobuf.Timestamp start_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return getStartTime(); } @@ -254,6 +257,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the endTime field is set. */ + @java.lang.Override public boolean hasEndTime() { return endTime_ != null; } @@ -269,6 +273,7 @@ public boolean hasEndTime() { * * @return The endTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } @@ -282,6 +287,7 @@ public com.google.protobuf.Timestamp getEndTime() { * * .google.protobuf.Timestamp end_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } @@ -299,6 +305,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The enum numeric value on the wire for operationState. */ + @java.lang.Override public int getOperationStateValue() { return operationState_; } @@ -313,6 +320,7 @@ public int getOperationStateValue() { * * @return The operationState. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getOperationState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = @@ -333,6 +341,7 @@ public com.google.firestore.admin.v1.OperationState getOperationState() { * * @return Whether the progressDocuments field is set. */ + @java.lang.Override public boolean hasProgressDocuments() { return progressDocuments_ != null; } @@ -347,6 +356,7 @@ public boolean hasProgressDocuments() { * * @return The progressDocuments. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocuments_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -361,6 +371,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { * * .google.firestore.admin.v1.Progress progress_documents = 4; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { return getProgressDocuments(); } @@ -378,6 +389,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui * * @return Whether the progressBytes field is set. */ + @java.lang.Override public boolean hasProgressBytes() { return progressBytes_ != null; } @@ -392,6 +404,7 @@ public boolean hasProgressBytes() { * * @return The progressBytes. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytes_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -406,6 +419,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { * * .google.firestore.admin.v1.Progress progress_bytes = 5; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { return getProgressBytes(); } @@ -484,6 +498,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The inputUriPrefix. */ + @java.lang.Override public java.lang.String getInputUriPrefix() { java.lang.Object ref = inputUriPrefix_; if (ref instanceof java.lang.String) { @@ -506,6 +521,7 @@ public java.lang.String getInputUriPrefix() { * * @return The bytes for inputUriPrefix. */ + @java.lang.Override public com.google.protobuf.ByteString getInputUriPrefixBytes() { java.lang.Object ref = inputUriPrefix_; if (ref instanceof java.lang.String) { @@ -1382,6 +1398,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The enum numeric value on the wire for operationState. */ + @java.lang.Override public int getOperationStateValue() { return operationState_; } @@ -1398,6 +1415,7 @@ public int getOperationStateValue() { * @return This builder for chaining. */ public Builder setOperationStateValue(int value) { + operationState_ = value; onChanged(); return this; @@ -1413,6 +1431,7 @@ public Builder setOperationStateValue(int value) { * * @return The operationState. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getOperationState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java index 74d86152b..dee99b6b4 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequest.java @@ -150,6 +150,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -175,6 +176,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -269,6 +271,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The inputUriPrefix. */ + @java.lang.Override public java.lang.String getInputUriPrefix() { java.lang.Object ref = inputUriPrefix_; if (ref instanceof java.lang.String) { @@ -295,6 +298,7 @@ public java.lang.String getInputUriPrefix() { * * @return The bytes for inputUriPrefix. */ + @java.lang.Override public com.google.protobuf.ByteString getInputUriPrefixBytes() { java.lang.Object ref = inputUriPrefix_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java index 951ad4da8..52c959b16 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Index.java @@ -274,6 +274,10 @@ public QueryScope findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -476,6 +480,10 @@ public State findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -826,6 +834,10 @@ public Order findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -957,6 +969,10 @@ public ArrayConfig findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -1051,6 +1067,7 @@ public ValueModeCase getValueModeCase() { * * @return The fieldPath. */ + @java.lang.Override public java.lang.String getFieldPath() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -1075,6 +1092,7 @@ public java.lang.String getFieldPath() { * * @return The bytes for fieldPath. */ + @java.lang.Override public com.google.protobuf.ByteString getFieldPathBytes() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -1702,6 +1720,7 @@ public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { * * @return The enum numeric value on the wire for order. */ + @java.lang.Override public int getOrderValue() { if (valueModeCase_ == 2) { return ((java.lang.Integer) valueMode_).intValue(); @@ -1739,6 +1758,7 @@ public Builder setOrderValue(int value) { * * @return The order. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.IndexField.Order getOrder() { if (valueModeCase_ == 2) { @SuppressWarnings("deprecation") @@ -1805,6 +1825,7 @@ public Builder clearOrder() { * * @return The enum numeric value on the wire for arrayConfig. */ + @java.lang.Override public int getArrayConfigValue() { if (valueModeCase_ == 3) { return ((java.lang.Integer) valueMode_).intValue(); @@ -1840,6 +1861,7 @@ public Builder setArrayConfigValue(int value) { * * @return The arrayConfig. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig() { if (valueModeCase_ == 3) { @SuppressWarnings("deprecation") @@ -1962,6 +1984,7 @@ public com.google.firestore.admin.v1.Index.IndexField getDefaultInstanceForType( * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -1987,6 +2010,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -2017,6 +2041,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The enum numeric value on the wire for queryScope. */ + @java.lang.Override public int getQueryScopeValue() { return queryScope_; } @@ -2036,6 +2061,7 @@ public int getQueryScopeValue() { * * @return The queryScope. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.Index.QueryScope result = @@ -2062,6 +2088,7 @@ public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { * * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ + @java.lang.Override public java.util.List getFieldsList() { return fields_; } @@ -2082,6 +2109,7 @@ public java.util.List getFieldsL * * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ + @java.lang.Override public java.util.List getFieldsOrBuilderList() { return fields_; @@ -2103,6 +2131,7 @@ public java.util.List getFieldsL * * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ + @java.lang.Override public int getFieldsCount() { return fields_.size(); } @@ -2123,6 +2152,7 @@ public int getFieldsCount() { * * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ + @java.lang.Override public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { return fields_.get(index); } @@ -2143,6 +2173,7 @@ public com.google.firestore.admin.v1.Index.IndexField getFields(int index) { * * repeated .google.firestore.admin.v1.Index.IndexField fields = 3; */ + @java.lang.Override public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilder(int index) { return fields_.get(index); } @@ -2160,6 +2191,7 @@ public com.google.firestore.admin.v1.Index.IndexFieldOrBuilder getFieldsOrBuilde * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -2174,6 +2206,7 @@ public int getStateValue() { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.State getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.Index.State result = @@ -2723,6 +2756,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * @return The enum numeric value on the wire for queryScope. */ + @java.lang.Override public int getQueryScopeValue() { return queryScope_; } @@ -2744,6 +2778,7 @@ public int getQueryScopeValue() { * @return This builder for chaining. */ public Builder setQueryScopeValue(int value) { + queryScope_ = value; onChanged(); return this; @@ -2764,6 +2799,7 @@ public Builder setQueryScopeValue(int value) { * * @return The queryScope. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.QueryScope getQueryScope() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.Index.QueryScope result = @@ -3325,6 +3361,7 @@ public com.google.firestore.admin.v1.Index.IndexField.Builder addFieldsBuilder(i * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -3341,6 +3378,7 @@ public int getStateValue() { * @return This builder for chaining. */ public Builder setStateValue(int value) { + state_ = value; onChanged(); return this; @@ -3356,6 +3394,7 @@ public Builder setStateValue(int value) { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.Index.State getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.Index.State result = 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/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java index 7ede5d302..6e10525f0 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/IndexOperationMetadata.java @@ -195,6 +195,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the startTime field is set. */ + @java.lang.Override public boolean hasStartTime() { return startTime_ != null; } @@ -209,6 +210,7 @@ public boolean hasStartTime() { * * @return The startTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } @@ -221,6 +223,7 @@ public com.google.protobuf.Timestamp getStartTime() { * * .google.protobuf.Timestamp start_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return getStartTime(); } @@ -239,6 +242,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the endTime field is set. */ + @java.lang.Override public boolean hasEndTime() { return endTime_ != null; } @@ -254,6 +258,7 @@ public boolean hasEndTime() { * * @return The endTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } @@ -267,6 +272,7 @@ public com.google.protobuf.Timestamp getEndTime() { * * .google.protobuf.Timestamp end_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } @@ -285,6 +291,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return The index. */ + @java.lang.Override public java.lang.String getIndex() { java.lang.Object ref = index_; if (ref instanceof java.lang.String) { @@ -308,6 +315,7 @@ public java.lang.String getIndex() { * * @return The bytes for index. */ + @java.lang.Override public com.google.protobuf.ByteString getIndexBytes() { java.lang.Object ref = index_; if (ref instanceof java.lang.String) { @@ -333,6 +341,7 @@ public com.google.protobuf.ByteString getIndexBytes() { * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -347,6 +356,7 @@ public int getStateValue() { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = @@ -367,6 +377,7 @@ public com.google.firestore.admin.v1.OperationState getState() { * * @return Whether the progressDocuments field is set. */ + @java.lang.Override public boolean hasProgressDocuments() { return progressDocuments_ != null; } @@ -381,6 +392,7 @@ public boolean hasProgressDocuments() { * * @return The progressDocuments. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressDocuments() { return progressDocuments_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -395,6 +407,7 @@ public com.google.firestore.admin.v1.Progress getProgressDocuments() { * * .google.firestore.admin.v1.Progress progress_documents = 5; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { return getProgressDocuments(); } @@ -412,6 +425,7 @@ public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBui * * @return Whether the progressBytes field is set. */ + @java.lang.Override public boolean hasProgressBytes() { return progressBytes_ != null; } @@ -426,6 +440,7 @@ public boolean hasProgressBytes() { * * @return The progressBytes. */ + @java.lang.Override public com.google.firestore.admin.v1.Progress getProgressBytes() { return progressBytes_ == null ? com.google.firestore.admin.v1.Progress.getDefaultInstance() @@ -440,6 +455,7 @@ public com.google.firestore.admin.v1.Progress getProgressBytes() { * * .google.firestore.admin.v1.Progress progress_bytes = 6; */ + @java.lang.Override public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { return getProgressBytes(); } @@ -1382,6 +1398,7 @@ public Builder setIndexBytes(com.google.protobuf.ByteString value) { * * @return The enum numeric value on the wire for state. */ + @java.lang.Override public int getStateValue() { return state_; } @@ -1398,6 +1415,7 @@ public int getStateValue() { * @return This builder for chaining. */ public Builder setStateValue(int value) { + state_ = value; onChanged(); return this; @@ -1413,6 +1431,7 @@ public Builder setStateValue(int value) { * * @return The state. */ + @java.lang.Override public com.google.firestore.admin.v1.OperationState getState() { @SuppressWarnings("deprecation") com.google.firestore.admin.v1.OperationState result = diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java index 4767253fa..3f879e29c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequest.java @@ -148,6 +148,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -173,6 +174,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -202,6 +204,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -228,6 +231,7 @@ public java.lang.String getFilter() { * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -253,6 +257,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -272,6 +277,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -296,6 +302,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -931,6 +938,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java index e03d5bd39..837940a2b 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsResponse.java @@ -138,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.admin.v1.Field fields = 1; */ + @java.lang.Override public java.util.List getFieldsList() { return fields_; } @@ -150,6 +151,7 @@ public java.util.List getFieldsList() { * * repeated .google.firestore.admin.v1.Field fields = 1; */ + @java.lang.Override public java.util.List getFieldsOrBuilderList() { return fields_; @@ -163,6 +165,7 @@ public java.util.List getFieldsList() { * * repeated .google.firestore.admin.v1.Field fields = 1; */ + @java.lang.Override public int getFieldsCount() { return fields_.size(); } @@ -175,6 +178,7 @@ public int getFieldsCount() { * * repeated .google.firestore.admin.v1.Field fields = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.Field getFields(int index) { return fields_.get(index); } @@ -187,6 +191,7 @@ public com.google.firestore.admin.v1.Field getFields(int index) { * * repeated .google.firestore.admin.v1.Field fields = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index) { return fields_.get(index); } @@ -205,6 +210,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldsOrBuilder(int index * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -228,6 +234,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java index bce74beaf..0f6d1471a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesRequest.java @@ -148,6 +148,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -173,6 +174,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -198,6 +200,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -220,6 +223,7 @@ public java.lang.String getFilter() { * * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -245,6 +249,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -264,6 +269,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -288,6 +294,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -903,6 +910,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java index c5e808697..0e53b8338 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListIndexesResponse.java @@ -138,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public java.util.List getIndexesList() { return indexes_; } @@ -150,6 +151,7 @@ public java.util.List getIndexesList() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public java.util.List getIndexesOrBuilderList() { return indexes_; @@ -163,6 +165,7 @@ public java.util.List getIndexesList() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public int getIndexesCount() { return indexes_.size(); } @@ -175,6 +178,7 @@ public int getIndexesCount() { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.Index getIndexes(int index) { return indexes_.get(index); } @@ -187,6 +191,7 @@ public com.google.firestore.admin.v1.Index getIndexes(int index) { * * repeated .google.firestore.admin.v1.Index indexes = 1; */ + @java.lang.Override public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int index) { return indexes_.get(index); } @@ -205,6 +210,7 @@ public com.google.firestore.admin.v1.IndexOrBuilder getIndexesOrBuilder(int inde * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -228,6 +234,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java index 7054eec3e..50180d98c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationState.java @@ -253,6 +253,10 @@ public OperationState findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java index ffb7c657c..e7bb7791a 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/Progress.java @@ -127,6 +127,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The estimatedWork. */ + @java.lang.Override public long getEstimatedWork() { return estimatedWork_; } @@ -144,6 +145,7 @@ public long getEstimatedWork() { * * @return The completedWork. */ + @java.lang.Override public long getCompletedWork() { return completedWork_; } @@ -491,6 +493,7 @@ public Builder mergeFrom( * * @return The estimatedWork. */ + @java.lang.Override public long getEstimatedWork() { return estimatedWork_; } @@ -542,6 +545,7 @@ public Builder clearEstimatedWork() { * * @return The completedWork. */ + @java.lang.Override public long getCompletedWork() { return completedWork_; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java index 69ab8ca6d..2820094c2 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/UpdateFieldRequest.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return field_ != null; } @@ -162,6 +163,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.admin.v1.Field getField() { return field_ == null ? com.google.firestore.admin.v1.Field.getDefaultInstance() : field_; } @@ -175,6 +177,7 @@ public com.google.firestore.admin.v1.Field getField() { * .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { return getField(); } @@ -193,6 +196,7 @@ public com.google.firestore.admin.v1.FieldOrBuilder getFieldOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -208,6 +212,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -221,6 +226,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * .google.protobuf.FieldMask update_mask = 2; */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java index f3bf61fb7..1c6715086 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ArrayValue.java @@ -129,6 +129,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesList() { return values_; } @@ -141,6 +142,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesOrBuilderList() { return values_; } @@ -153,6 +155,7 @@ public java.util.List getValue * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public int getValuesCount() { return values_.size(); } @@ -165,6 +168,7 @@ public int getValuesCount() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getValues(int index) { return values_.get(index); } @@ -177,6 +181,7 @@ public com.google.firestore.v1.Value getValues(int index) { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return values_.get(index); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java index 8c77ed312..4ec3371db 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequest.java @@ -245,6 +245,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -268,6 +269,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -368,6 +370,7 @@ public com.google.protobuf.ByteString getDocumentsBytes(int index) { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -384,6 +387,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } @@ -398,6 +402,7 @@ public com.google.firestore.v1.DocumentMask getMask() { * * .google.firestore.v1.DocumentMask mask = 3; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -414,6 +419,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 4) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -436,6 +442,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } @@ -453,6 +460,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions getNewTransaction() { if (consistencySelectorCase_ == 5) { return (com.google.firestore.v1.TransactionOptions) consistencySelector_; @@ -471,6 +479,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { * * .google.firestore.v1.TransactionOptions new_transaction = 5; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if (consistencySelectorCase_ == 5) { return (com.google.firestore.v1.TransactionOptions) consistencySelector_; @@ -484,13 +493,14 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -499,13 +509,14 @@ public boolean hasReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -517,11 +528,12 @@ public com.google.protobuf.Timestamp getReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1601,6 +1613,7 @@ public Builder clearTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } @@ -1618,6 +1631,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions getNewTransaction() { if (newTransactionBuilder_ == null) { if (consistencySelectorCase_ == 5) { @@ -1769,6 +1783,7 @@ public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuild * * .google.firestore.v1.TransactionOptions new_transaction = 5; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if ((consistencySelectorCase_ == 5) && (newTransactionBuilder_ != null)) { return newTransactionBuilder_.getMessageOrBuilder(); @@ -1826,13 +1841,14 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -1841,13 +1857,14 @@ public boolean hasReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 7) { @@ -1866,7 +1883,7 @@ public com.google.protobuf.Timestamp getReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1889,7 +1906,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1909,7 +1926,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1941,7 +1958,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1967,7 +1984,7 @@ public Builder clearReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1980,11 +1997,12 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -2000,7 +2018,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java index c80c27882..8257d80c6 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsRequestOrBuilder.java @@ -216,7 +216,7 @@ public interface BatchGetDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; @@ -229,7 +229,7 @@ public interface BatchGetDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; @@ -242,7 +242,7 @@ public interface BatchGetDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java index 8d304e24e..d6cbff668 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchGetDocumentsResponse.java @@ -205,6 +205,7 @@ public ResultCase getResultCase() { * * @return Whether the found field is set. */ + @java.lang.Override public boolean hasFound() { return resultCase_ == 1; } @@ -219,6 +220,7 @@ public boolean hasFound() { * * @return The found. */ + @java.lang.Override public com.google.firestore.v1.Document getFound() { if (resultCase_ == 1) { return (com.google.firestore.v1.Document) result_; @@ -234,6 +236,7 @@ public com.google.firestore.v1.Document getFound() { * * .google.firestore.v1.Document found = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { if (resultCase_ == 1) { return (com.google.firestore.v1.Document) result_; @@ -314,6 +317,7 @@ public com.google.protobuf.ByteString getMissingBytes() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -334,6 +338,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -351,6 +356,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -366,6 +372,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -813,6 +820,7 @@ public Builder clearResult() { * * @return Whether the found field is set. */ + @java.lang.Override public boolean hasFound() { return resultCase_ == 1; } @@ -827,6 +835,7 @@ public boolean hasFound() { * * @return The found. */ + @java.lang.Override public com.google.firestore.v1.Document getFound() { if (foundBuilder_ == null) { if (resultCase_ == 1) { @@ -957,6 +966,7 @@ public com.google.firestore.v1.Document.Builder getFoundBuilder() { * * .google.firestore.v1.Document found = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { if ((resultCase_ == 1) && (foundBuilder_ != null)) { return foundBuilder_.getMessageOrBuilder(); @@ -1011,6 +1021,7 @@ public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() { * * @return The missing. */ + @java.lang.Override public java.lang.String getMissing() { java.lang.Object ref = ""; if (resultCase_ == 2) { @@ -1039,6 +1050,7 @@ public java.lang.String getMissing() { * * @return The bytes for missing. */ + @java.lang.Override public com.google.protobuf.ByteString getMissingBytes() { java.lang.Object ref = ""; if (resultCase_ == 2) { @@ -1135,6 +1147,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java new file mode 100644 index 000000000..29fac66fb --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequest.java @@ -0,0 +1,1516 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * The request for [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.BatchWriteRequest} + */ +public final class BatchWriteRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchWriteRequest) + BatchWriteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchWriteRequest.newBuilder() to construct. + private BatchWriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchWriteRequest() { + database_ = ""; + writes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchWriteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchWriteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + database_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + writes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + writes_.add( + input.readMessage(com.google.firestore.v1.Write.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + writes_ = java.util.Collections.unmodifiableList(writes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchWriteRequest.class, + com.google.firestore.v1.BatchWriteRequest.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private volatile java.lang.Object database_; + /** + * + * + *
+   * Required. The database name. In the format:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The database name. In the format:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WRITES_FIELD_NUMBER = 2; + private java.util.List writes_; + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + @java.lang.Override + public java.util.List getWritesList() { + return writes_; + } + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + @java.lang.Override + public java.util.List getWritesOrBuilderList() { + return writes_; + } + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + @java.lang.Override + public int getWritesCount() { + return writes_.size(); + } + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + @java.lang.Override + public com.google.firestore.v1.Write getWrites(int index) { + return writes_.get(index); + } + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + @java.lang.Override + public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { + return writes_.get(index); + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatabaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_); + } + for (int i = 0; i < writes_.size(); i++) { + output.writeMessage(2, writes_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatabaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_); + } + for (int i = 0; i < writes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, writes_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.BatchWriteRequest)) { + return super.equals(obj); + } + com.google.firestore.v1.BatchWriteRequest other = + (com.google.firestore.v1.BatchWriteRequest) obj; + + if (!getDatabase().equals(other.getDatabase())) return false; + if (!getWritesList().equals(other.getWritesList())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + if (getWritesCount() > 0) { + hash = (37 * hash) + WRITES_FIELD_NUMBER; + hash = (53 * hash) + getWritesList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.BatchWriteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.BatchWriteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.BatchWriteRequest) + com.google.firestore.v1.BatchWriteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchWriteRequest.class, + com.google.firestore.v1.BatchWriteRequest.Builder.class); + } + + // Construct using com.google.firestore.v1.BatchWriteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWritesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + database_ = ""; + + if (writesBuilder_ == null) { + writes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + writesBuilder_.clear(); + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteRequest getDefaultInstanceForType() { + return com.google.firestore.v1.BatchWriteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteRequest build() { + com.google.firestore.v1.BatchWriteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteRequest buildPartial() { + com.google.firestore.v1.BatchWriteRequest result = + new com.google.firestore.v1.BatchWriteRequest(this); + int from_bitField0_ = bitField0_; + result.database_ = database_; + if (writesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + writes_ = java.util.Collections.unmodifiableList(writes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.writes_ = writes_; + } else { + result.writes_ = writesBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.BatchWriteRequest) { + return mergeFrom((com.google.firestore.v1.BatchWriteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.BatchWriteRequest other) { + if (other == com.google.firestore.v1.BatchWriteRequest.getDefaultInstance()) return this; + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + onChanged(); + } + if (writesBuilder_ == null) { + if (!other.writes_.isEmpty()) { + if (writes_.isEmpty()) { + writes_ = other.writes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWritesIsMutable(); + writes_.addAll(other.writes_); + } + onChanged(); + } + } else { + if (!other.writes_.isEmpty()) { + if (writesBuilder_.isEmpty()) { + writesBuilder_.dispose(); + writesBuilder_ = null; + writes_ = other.writes_; + bitField0_ = (bitField0_ & ~0x00000001); + writesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWritesFieldBuilder() + : null; + } else { + writesBuilder_.addAllMessages(other.writes_); + } + } + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.BatchWriteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.v1.BatchWriteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object database_ = ""; + /** + * + * + *
+     * Required. The database name. In the format:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The database name. In the format:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The database name. In the format:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + database_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database name. In the format:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + + database_ = getDefaultInstance().getDatabase(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The database name. In the format:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + database_ = value; + onChanged(); + return this; + } + + private java.util.List writes_ = + java.util.Collections.emptyList(); + + private void ensureWritesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + writes_ = new java.util.ArrayList(writes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Write, + com.google.firestore.v1.Write.Builder, + com.google.firestore.v1.WriteOrBuilder> + writesBuilder_; + + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public java.util.List getWritesList() { + if (writesBuilder_ == null) { + return java.util.Collections.unmodifiableList(writes_); + } else { + return writesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public int getWritesCount() { + if (writesBuilder_ == null) { + return writes_.size(); + } else { + return writesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public com.google.firestore.v1.Write getWrites(int index) { + if (writesBuilder_ == null) { + return writes_.get(index); + } else { + return writesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder setWrites(int index, com.google.firestore.v1.Write value) { + if (writesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWritesIsMutable(); + writes_.set(index, value); + onChanged(); + } else { + writesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder setWrites(int index, com.google.firestore.v1.Write.Builder builderForValue) { + if (writesBuilder_ == null) { + ensureWritesIsMutable(); + writes_.set(index, builderForValue.build()); + onChanged(); + } else { + writesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder addWrites(com.google.firestore.v1.Write value) { + if (writesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWritesIsMutable(); + writes_.add(value); + onChanged(); + } else { + writesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder addWrites(int index, com.google.firestore.v1.Write value) { + if (writesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWritesIsMutable(); + writes_.add(index, value); + onChanged(); + } else { + writesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder addWrites(com.google.firestore.v1.Write.Builder builderForValue) { + if (writesBuilder_ == null) { + ensureWritesIsMutable(); + writes_.add(builderForValue.build()); + onChanged(); + } else { + writesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder addWrites(int index, com.google.firestore.v1.Write.Builder builderForValue) { + if (writesBuilder_ == null) { + ensureWritesIsMutable(); + writes_.add(index, builderForValue.build()); + onChanged(); + } else { + writesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder addAllWrites( + java.lang.Iterable values) { + if (writesBuilder_ == null) { + ensureWritesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writes_); + onChanged(); + } else { + writesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder clearWrites() { + if (writesBuilder_ == null) { + writes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + writesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public Builder removeWrites(int index) { + if (writesBuilder_ == null) { + ensureWritesIsMutable(); + writes_.remove(index); + onChanged(); + } else { + writesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public com.google.firestore.v1.Write.Builder getWritesBuilder(int index) { + return getWritesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { + if (writesBuilder_ == null) { + return writes_.get(index); + } else { + return writesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public java.util.List + getWritesOrBuilderList() { + if (writesBuilder_ != null) { + return writesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(writes_); + } + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public com.google.firestore.v1.Write.Builder addWritesBuilder() { + return getWritesFieldBuilder().addBuilder(com.google.firestore.v1.Write.getDefaultInstance()); + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public com.google.firestore.v1.Write.Builder addWritesBuilder(int index) { + return getWritesFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Write.getDefaultInstance()); + } + /** + * + * + *
+     * The writes to apply.
+     * Method does not apply writes atomically and does not guarantee ordering.
+     * Each write succeeds or fails independently. You cannot write to the same
+     * document more than once per request.
+     * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + public java.util.List getWritesBuilderList() { + return getWritesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Write, + com.google.firestore.v1.Write.Builder, + com.google.firestore.v1.WriteOrBuilder> + getWritesFieldBuilder() { + if (writesBuilder_ == null) { + writesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Write, + com.google.firestore.v1.Write.Builder, + com.google.firestore.v1.WriteOrBuilder>( + writes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + writes_ = null; + } + return writesBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Labels associated with this batch write.
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.BatchWriteRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchWriteRequest) + private static final com.google.firestore.v1.BatchWriteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.BatchWriteRequest(); + } + + public static com.google.firestore.v1.BatchWriteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchWriteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchWriteRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java new file mode 100644 index 000000000..21b8e2156 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteRequestOrBuilder.java @@ -0,0 +1,172 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +public interface BatchWriteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.BatchWriteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The database name. In the format:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + java.lang.String getDatabase(); + /** + * + * + *
+   * Required. The database name. In the format:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + java.util.List getWritesList(); + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + com.google.firestore.v1.Write getWrites(int index); + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + int getWritesCount(); + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + java.util.List getWritesOrBuilderList(); + /** + * + * + *
+   * The writes to apply.
+   * Method does not apply writes atomically and does not guarantee ordering.
+   * Each write succeeds or fails independently. You cannot write to the same
+   * document more than once per request.
+   * 
+ * + * repeated .google.firestore.v1.Write writes = 2; + */ + com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index); + + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Labels associated with this batch write.
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java new file mode 100644 index 000000000..f8d804152 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponse.java @@ -0,0 +1,1511 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * The response from [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.BatchWriteResponse} + */ +public final class BatchWriteResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchWriteResponse) + BatchWriteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchWriteResponse.newBuilder() to construct. + private BatchWriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchWriteResponse() { + writeResults_ = java.util.Collections.emptyList(); + status_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchWriteResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchWriteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + writeResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + writeResults_.add( + input.readMessage( + com.google.firestore.v1.WriteResult.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + status_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + status_.add(input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + writeResults_ = java.util.Collections.unmodifiableList(writeResults_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + status_ = java.util.Collections.unmodifiableList(status_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchWriteResponse.class, + com.google.firestore.v1.BatchWriteResponse.Builder.class); + } + + public static final int WRITE_RESULTS_FIELD_NUMBER = 1; + private java.util.List writeResults_; + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + @java.lang.Override + public java.util.List getWriteResultsList() { + return writeResults_; + } + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + @java.lang.Override + public java.util.List + getWriteResultsOrBuilderList() { + return writeResults_; + } + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + @java.lang.Override + public int getWriteResultsCount() { + return writeResults_.size(); + } + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + @java.lang.Override + public com.google.firestore.v1.WriteResult getWriteResults(int index) { + return writeResults_.get(index); + } + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + @java.lang.Override + public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { + return writeResults_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private java.util.List status_; + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + @java.lang.Override + public java.util.List getStatusList() { + return status_; + } + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + @java.lang.Override + public java.util.List getStatusOrBuilderList() { + return status_; + } + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + @java.lang.Override + public int getStatusCount() { + return status_.size(); + } + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.Status getStatus(int index) { + return status_.get(index); + } + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder(int index) { + return status_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < writeResults_.size(); i++) { + output.writeMessage(1, writeResults_.get(i)); + } + for (int i = 0; i < status_.size(); i++) { + output.writeMessage(2, status_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < writeResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, writeResults_.get(i)); + } + for (int i = 0; i < status_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, status_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.BatchWriteResponse)) { + return super.equals(obj); + } + com.google.firestore.v1.BatchWriteResponse other = + (com.google.firestore.v1.BatchWriteResponse) obj; + + if (!getWriteResultsList().equals(other.getWriteResultsList())) return false; + if (!getStatusList().equals(other.getStatusList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWriteResultsCount() > 0) { + hash = (37 * hash) + WRITE_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getWriteResultsList().hashCode(); + } + if (getStatusCount() > 0) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatusList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.BatchWriteResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.BatchWriteResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response from [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.BatchWriteResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.BatchWriteResponse) + com.google.firestore.v1.BatchWriteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.BatchWriteResponse.class, + com.google.firestore.v1.BatchWriteResponse.Builder.class); + } + + // Construct using com.google.firestore.v1.BatchWriteResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWriteResultsFieldBuilder(); + getStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (writeResultsBuilder_ == null) { + writeResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + writeResultsBuilder_.clear(); + } + if (statusBuilder_ == null) { + status_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + statusBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_BatchWriteResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteResponse getDefaultInstanceForType() { + return com.google.firestore.v1.BatchWriteResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteResponse build() { + com.google.firestore.v1.BatchWriteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteResponse buildPartial() { + com.google.firestore.v1.BatchWriteResponse result = + new com.google.firestore.v1.BatchWriteResponse(this); + int from_bitField0_ = bitField0_; + if (writeResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + writeResults_ = java.util.Collections.unmodifiableList(writeResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.writeResults_ = writeResults_; + } else { + result.writeResults_ = writeResultsBuilder_.build(); + } + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + status_ = java.util.Collections.unmodifiableList(status_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.BatchWriteResponse) { + return mergeFrom((com.google.firestore.v1.BatchWriteResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.BatchWriteResponse other) { + if (other == com.google.firestore.v1.BatchWriteResponse.getDefaultInstance()) return this; + if (writeResultsBuilder_ == null) { + if (!other.writeResults_.isEmpty()) { + if (writeResults_.isEmpty()) { + writeResults_ = other.writeResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWriteResultsIsMutable(); + writeResults_.addAll(other.writeResults_); + } + onChanged(); + } + } else { + if (!other.writeResults_.isEmpty()) { + if (writeResultsBuilder_.isEmpty()) { + writeResultsBuilder_.dispose(); + writeResultsBuilder_ = null; + writeResults_ = other.writeResults_; + bitField0_ = (bitField0_ & ~0x00000001); + writeResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWriteResultsFieldBuilder() + : null; + } else { + writeResultsBuilder_.addAllMessages(other.writeResults_); + } + } + } + if (statusBuilder_ == null) { + if (!other.status_.isEmpty()) { + if (status_.isEmpty()) { + status_ = other.status_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatusIsMutable(); + status_.addAll(other.status_); + } + onChanged(); + } + } else { + if (!other.status_.isEmpty()) { + if (statusBuilder_.isEmpty()) { + statusBuilder_.dispose(); + statusBuilder_ = null; + status_ = other.status_; + bitField0_ = (bitField0_ & ~0x00000002); + statusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStatusFieldBuilder() + : null; + } else { + statusBuilder_.addAllMessages(other.status_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.BatchWriteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.v1.BatchWriteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List writeResults_ = + java.util.Collections.emptyList(); + + private void ensureWriteResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + writeResults_ = new java.util.ArrayList(writeResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.WriteResult, + com.google.firestore.v1.WriteResult.Builder, + com.google.firestore.v1.WriteResultOrBuilder> + writeResultsBuilder_; + + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public java.util.List getWriteResultsList() { + if (writeResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(writeResults_); + } else { + return writeResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public int getWriteResultsCount() { + if (writeResultsBuilder_ == null) { + return writeResults_.size(); + } else { + return writeResultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public com.google.firestore.v1.WriteResult getWriteResults(int index) { + if (writeResultsBuilder_ == null) { + return writeResults_.get(index); + } else { + return writeResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder setWriteResults(int index, com.google.firestore.v1.WriteResult value) { + if (writeResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWriteResultsIsMutable(); + writeResults_.set(index, value); + onChanged(); + } else { + writeResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder setWriteResults( + int index, com.google.firestore.v1.WriteResult.Builder builderForValue) { + if (writeResultsBuilder_ == null) { + ensureWriteResultsIsMutable(); + writeResults_.set(index, builderForValue.build()); + onChanged(); + } else { + writeResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder addWriteResults(com.google.firestore.v1.WriteResult value) { + if (writeResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWriteResultsIsMutable(); + writeResults_.add(value); + onChanged(); + } else { + writeResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder addWriteResults(int index, com.google.firestore.v1.WriteResult value) { + if (writeResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWriteResultsIsMutable(); + writeResults_.add(index, value); + onChanged(); + } else { + writeResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder addWriteResults(com.google.firestore.v1.WriteResult.Builder builderForValue) { + if (writeResultsBuilder_ == null) { + ensureWriteResultsIsMutable(); + writeResults_.add(builderForValue.build()); + onChanged(); + } else { + writeResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder addWriteResults( + int index, com.google.firestore.v1.WriteResult.Builder builderForValue) { + if (writeResultsBuilder_ == null) { + ensureWriteResultsIsMutable(); + writeResults_.add(index, builderForValue.build()); + onChanged(); + } else { + writeResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder addAllWriteResults( + java.lang.Iterable values) { + if (writeResultsBuilder_ == null) { + ensureWriteResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writeResults_); + onChanged(); + } else { + writeResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder clearWriteResults() { + if (writeResultsBuilder_ == null) { + writeResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + writeResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public Builder removeWriteResults(int index) { + if (writeResultsBuilder_ == null) { + ensureWriteResultsIsMutable(); + writeResults_.remove(index); + onChanged(); + } else { + writeResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public com.google.firestore.v1.WriteResult.Builder getWriteResultsBuilder(int index) { + return getWriteResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { + if (writeResultsBuilder_ == null) { + return writeResults_.get(index); + } else { + return writeResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public java.util.List + getWriteResultsOrBuilderList() { + if (writeResultsBuilder_ != null) { + return writeResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(writeResults_); + } + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder() { + return getWriteResultsFieldBuilder() + .addBuilder(com.google.firestore.v1.WriteResult.getDefaultInstance()); + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public com.google.firestore.v1.WriteResult.Builder addWriteResultsBuilder(int index) { + return getWriteResultsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.WriteResult.getDefaultInstance()); + } + /** + * + * + *
+     * The result of applying the writes.
+     * This i-th write result corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + public java.util.List + getWriteResultsBuilderList() { + return getWriteResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.WriteResult, + com.google.firestore.v1.WriteResult.Builder, + com.google.firestore.v1.WriteResultOrBuilder> + getWriteResultsFieldBuilder() { + if (writeResultsBuilder_ == null) { + writeResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.WriteResult, + com.google.firestore.v1.WriteResult.Builder, + com.google.firestore.v1.WriteResultOrBuilder>( + writeResults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + writeResults_ = null; + } + return writeResultsBuilder_; + } + + private java.util.List status_ = java.util.Collections.emptyList(); + + private void ensureStatusIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + status_ = new java.util.ArrayList(status_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public java.util.List getStatusList() { + if (statusBuilder_ == null) { + return java.util.Collections.unmodifiableList(status_); + } else { + return statusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public int getStatusCount() { + if (statusBuilder_ == null) { + return status_.size(); + } else { + return statusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public com.google.rpc.Status getStatus(int index) { + if (statusBuilder_ == null) { + return status_.get(index); + } else { + return statusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder setStatus(int index, com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusIsMutable(); + status_.set(index, value); + onChanged(); + } else { + statusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder setStatus(int index, com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + ensureStatusIsMutable(); + status_.set(index, builderForValue.build()); + onChanged(); + } else { + statusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder addStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusIsMutable(); + status_.add(value); + onChanged(); + } else { + statusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder addStatus(int index, com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatusIsMutable(); + status_.add(index, value); + onChanged(); + } else { + statusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder addStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + ensureStatusIsMutable(); + status_.add(builderForValue.build()); + onChanged(); + } else { + statusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder addStatus(int index, com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + ensureStatusIsMutable(); + status_.add(index, builderForValue.build()); + onChanged(); + } else { + statusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder addAllStatus(java.lang.Iterable values) { + if (statusBuilder_ == null) { + ensureStatusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, status_); + onChanged(); + } else { + statusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + statusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public Builder removeStatus(int index) { + if (statusBuilder_ == null) { + ensureStatusIsMutable(); + status_.remove(index); + onChanged(); + } else { + statusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder getStatusBuilder(int index) { + return getStatusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder(int index) { + if (statusBuilder_ == null) { + return status_.get(index); + } else { + return statusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public java.util.List getStatusOrBuilderList() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(status_); + } + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder addStatusBuilder() { + return getStatusFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public com.google.rpc.Status.Builder addStatusBuilder(int index) { + return getStatusFieldBuilder().addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * The status of applying the writes.
+     * This i-th write status corresponds to the i-th write in the
+     * request.
+     * 
+ * + * repeated .google.rpc.Status status = 2; + */ + public java.util.List getStatusBuilderList() { + return getStatusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + status_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.BatchWriteResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchWriteResponse) + private static final com.google.firestore.v1.BatchWriteResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.BatchWriteResponse(); + } + + public static com.google.firestore.v1.BatchWriteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchWriteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchWriteResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.BatchWriteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java new file mode 100644 index 000000000..605838ae1 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BatchWriteResponseOrBuilder.java @@ -0,0 +1,148 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +public interface BatchWriteResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.BatchWriteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + java.util.List getWriteResultsList(); + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + com.google.firestore.v1.WriteResult getWriteResults(int index); + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + int getWriteResultsCount(); + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + java.util.List + getWriteResultsOrBuilderList(); + /** + * + * + *
+   * The result of applying the writes.
+   * This i-th write result corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.firestore.v1.WriteResult write_results = 1; + */ + com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index); + + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + java.util.List getStatusList(); + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + com.google.rpc.Status getStatus(int index); + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + int getStatusCount(); + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + java.util.List getStatusOrBuilderList(); + /** + * + * + *
+   * The status of applying the writes.
+   * This i-th write status corresponds to the i-th write in the
+   * request.
+   * 
+ * + * repeated .google.rpc.Status status = 2; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(int index); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java index c12cc7180..10dd6299b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -164,6 +165,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return Whether the options field is set. */ + @java.lang.Override public boolean hasOptions() { return options_ != null; } @@ -205,6 +208,7 @@ public boolean hasOptions() { * * @return The options. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions getOptions() { return options_ == null ? com.google.firestore.v1.TransactionOptions.getDefaultInstance() @@ -220,6 +224,7 @@ public com.google.firestore.v1.TransactionOptions getOptions() { * * .google.firestore.v1.TransactionOptions options = 2; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptionsOrBuilder getOptionsOrBuilder() { return getOptions(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java index 3449812dc..b7de35b60 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/BeginTransactionResponse.java @@ -122,6 +122,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -454,6 +455,7 @@ public Builder mergeFrom( * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java index 21f31b7d1..116cd7eff 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitRequest.java @@ -146,6 +146,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -169,6 +170,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -193,6 +195,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * repeated .google.firestore.v1.Write writes = 2; */ + @java.lang.Override public java.util.List getWritesList() { return writes_; } @@ -206,6 +209,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1.Write writes = 2; */ + @java.lang.Override public java.util.List getWritesOrBuilderList() { return writes_; } @@ -219,6 +223,7 @@ public java.util.List getWrite * * repeated .google.firestore.v1.Write writes = 2; */ + @java.lang.Override public int getWritesCount() { return writes_.size(); } @@ -232,6 +237,7 @@ public int getWritesCount() { * * repeated .google.firestore.v1.Write writes = 2; */ + @java.lang.Override public com.google.firestore.v1.Write getWrites(int index) { return writes_.get(index); } @@ -245,6 +251,7 @@ public com.google.firestore.v1.Write getWrites(int index) { * * repeated .google.firestore.v1.Write writes = 2; */ + @java.lang.Override public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return writes_.get(index); } @@ -262,6 +269,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -1139,6 +1147,7 @@ public java.util.List getWritesBuilderLis * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java index 4ea1459d3..8675ccc60 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CommitResponse.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1.WriteResult write_results = 1; */ + @java.lang.Override public java.util.List getWriteResultsList() { return writeResults_; } @@ -161,6 +162,7 @@ public java.util.List getWriteResultsList() * * repeated .google.firestore.v1.WriteResult write_results = 1; */ + @java.lang.Override public java.util.List getWriteResultsOrBuilderList() { return writeResults_; @@ -176,6 +178,7 @@ public java.util.List getWriteResultsList() * * repeated .google.firestore.v1.WriteResult write_results = 1; */ + @java.lang.Override public int getWriteResultsCount() { return writeResults_.size(); } @@ -190,6 +193,7 @@ public int getWriteResultsCount() { * * repeated .google.firestore.v1.WriteResult write_results = 1; */ + @java.lang.Override public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } @@ -204,6 +208,7 @@ public com.google.firestore.v1.WriteResult getWriteResults(int index) { * * repeated .google.firestore.v1.WriteResult write_results = 1; */ + @java.lang.Override public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { return writeResults_.get(index); } @@ -222,6 +227,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int * * @return Whether the commitTime field is set. */ + @java.lang.Override public boolean hasCommitTime() { return commitTime_ != null; } @@ -237,6 +243,7 @@ public boolean hasCommitTime() { * * @return The commitTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } @@ -250,6 +257,7 @@ public com.google.protobuf.Timestamp getCommitTime() { * * .google.protobuf.Timestamp commit_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { return getCommitTime(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java index 5b0a591b4..c9a68a7b2 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/CreateDocumentRequest.java @@ -173,6 +173,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -197,6 +198,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -222,6 +224,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -244,6 +247,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -270,6 +274,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The documentId. */ + @java.lang.Override public java.lang.String getDocumentId() { java.lang.Object ref = documentId_; if (ref instanceof java.lang.String) { @@ -293,6 +298,7 @@ public java.lang.String getDocumentId() { * * @return The bytes for documentId. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentIdBytes() { java.lang.Object ref = documentId_; if (ref instanceof java.lang.String) { @@ -319,6 +325,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -334,6 +341,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } @@ -347,6 +355,7 @@ public com.google.firestore.v1.Document getDocument() { * .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -366,6 +375,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -382,6 +392,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } @@ -396,6 +407,7 @@ public com.google.firestore.v1.DocumentMask getMask() { * * .google.firestore.v1.DocumentMask mask = 5; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java index 7c6fe4cfb..0584089a0 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Cursor.java @@ -134,6 +134,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesList() { return values_; } @@ -148,6 +149,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesOrBuilderList() { return values_; } @@ -162,6 +164,7 @@ public java.util.List getValue * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public int getValuesCount() { return values_.size(); } @@ -176,6 +179,7 @@ public int getValuesCount() { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getValues(int index) { return values_.get(index); } @@ -190,6 +194,7 @@ public com.google.firestore.v1.Value getValues(int index) { * * repeated .google.firestore.v1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { return values_.get(index); } @@ -208,6 +213,7 @@ public com.google.firestore.v1.ValueOrBuilder getValuesOrBuilder(int index) { * * @return The before. */ + @java.lang.Override public boolean getBefore() { return before_; } @@ -975,6 +981,7 @@ public java.util.List getValuesBuilderLis * * @return The before. */ + @java.lang.Override public boolean getBefore() { return before_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java index 996794631..9f7303031 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DeleteDocumentRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -164,6 +165,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -205,6 +208,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1.Precondition.getDefaultInstance() @@ -220,6 +224,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { * * .google.firestore.v1.Precondition current_document = 2; */ + @java.lang.Override public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java index 5d3512917..34121eea7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Document.java @@ -182,6 +182,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -205,6 +206,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -272,6 +274,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -279,6 +282,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -310,6 +314,7 @@ public java.util.Map getFields( * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -340,6 +345,7 @@ public java.util.Map getFieldsM * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1.Value defaultValue) { if (key == null) { @@ -376,6 +382,7 @@ public com.google.firestore.v1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -404,6 +411,7 @@ public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -421,6 +429,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -436,6 +445,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -456,6 +466,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -473,6 +484,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -488,6 +500,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -1070,6 +1083,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1077,6 +1091,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -1108,6 +1123,7 @@ public java.util.Map getFields( * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -1138,6 +1154,7 @@ public java.util.Map getFieldsM * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1.Value defaultValue) { if (key == null) { @@ -1174,6 +1191,7 @@ public com.google.firestore.v1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java index 7dbb1d856..108a943dd 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentChange.java @@ -191,6 +191,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -206,6 +207,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } @@ -219,6 +221,7 @@ public com.google.firestore.v1.Document getDocument() { * * .google.firestore.v1.Document document = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -236,6 +239,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { * * @return A list containing the targetIds. */ + @java.lang.Override public java.util.List getTargetIdsList() { return targetIds_; } @@ -284,6 +288,7 @@ public int getTargetIds(int index) { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java index 3aa2cb89c..fa714c4c9 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentDelete.java @@ -171,6 +171,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -193,6 +194,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -218,6 +220,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } @@ -267,6 +270,7 @@ public int getRemovedTargetIds(int index) { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -282,6 +286,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -295,6 +300,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java index 347fcb5b5..5d86ab312 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentRemove.java @@ -172,6 +172,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -194,6 +195,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -219,6 +221,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } @@ -268,6 +271,7 @@ public int getRemovedTargetIds(int index) { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -283,6 +287,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -296,6 +301,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java index 637dd4b34..f44df3dbe 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/DocumentTransform.java @@ -779,6 +779,10 @@ public ServerValue findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -886,6 +890,7 @@ public TransformTypeCase getTransformTypeCase() { * * @return The fieldPath. */ + @java.lang.Override public java.lang.String getFieldPath() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -909,6 +914,7 @@ public java.lang.String getFieldPath() { * * @return The bytes for fieldPath. */ + @java.lang.Override public com.google.protobuf.ByteString getFieldPathBytes() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -989,6 +995,7 @@ public int getSetToServerValueValue() { * * @return Whether the increment field is set. */ + @java.lang.Override public boolean hasIncrement() { return transformTypeCase_ == 3; } @@ -1011,6 +1018,7 @@ public boolean hasIncrement() { * * @return The increment. */ + @java.lang.Override public com.google.firestore.v1.Value getIncrement() { if (transformTypeCase_ == 3) { return (com.google.firestore.v1.Value) transformType_; @@ -1034,6 +1042,7 @@ public com.google.firestore.v1.Value getIncrement() { * * .google.firestore.v1.Value increment = 3; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { if (transformTypeCase_ == 3) { return (com.google.firestore.v1.Value) transformType_; @@ -1063,6 +1072,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { * * @return Whether the maximum field is set. */ + @java.lang.Override public boolean hasMaximum() { return transformTypeCase_ == 4; } @@ -1087,6 +1097,7 @@ public boolean hasMaximum() { * * @return The maximum. */ + @java.lang.Override public com.google.firestore.v1.Value getMaximum() { if (transformTypeCase_ == 4) { return (com.google.firestore.v1.Value) transformType_; @@ -1112,6 +1123,7 @@ public com.google.firestore.v1.Value getMaximum() { * * .google.firestore.v1.Value maximum = 4; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { if (transformTypeCase_ == 4) { return (com.google.firestore.v1.Value) transformType_; @@ -1141,6 +1153,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { * * @return Whether the minimum field is set. */ + @java.lang.Override public boolean hasMinimum() { return transformTypeCase_ == 5; } @@ -1165,6 +1178,7 @@ public boolean hasMinimum() { * * @return The minimum. */ + @java.lang.Override public com.google.firestore.v1.Value getMinimum() { if (transformTypeCase_ == 5) { return (com.google.firestore.v1.Value) transformType_; @@ -1190,6 +1204,7 @@ public com.google.firestore.v1.Value getMinimum() { * * .google.firestore.v1.Value minimum = 5; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { if (transformTypeCase_ == 5) { return (com.google.firestore.v1.Value) transformType_; @@ -1218,6 +1233,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { * * @return Whether the appendMissingElements field is set. */ + @java.lang.Override public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } @@ -1241,6 +1257,7 @@ public boolean hasAppendMissingElements() { * * @return The appendMissingElements. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getAppendMissingElements() { if (transformTypeCase_ == 6) { return (com.google.firestore.v1.ArrayValue) transformType_; @@ -1265,6 +1282,7 @@ public com.google.firestore.v1.ArrayValue getAppendMissingElements() { * * .google.firestore.v1.ArrayValue append_missing_elements = 6; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() { if (transformTypeCase_ == 6) { return (com.google.firestore.v1.ArrayValue) transformType_; @@ -1291,6 +1309,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui * * @return Whether the removeAllFromArray field is set. */ + @java.lang.Override public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } @@ -1312,6 +1331,7 @@ public boolean hasRemoveAllFromArray() { * * @return The removeAllFromArray. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getRemoveAllFromArray() { if (transformTypeCase_ == 7) { return (com.google.firestore.v1.ArrayValue) transformType_; @@ -1334,6 +1354,7 @@ public com.google.firestore.v1.ArrayValue getRemoveAllFromArray() { * * .google.firestore.v1.ArrayValue remove_all_from_array = 7; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() { if (transformTypeCase_ == 7) { return (com.google.firestore.v1.ArrayValue) transformType_; @@ -1978,6 +1999,7 @@ public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { * * @return The enum numeric value on the wire for setToServerValue. */ + @java.lang.Override public int getSetToServerValueValue() { if (transformTypeCase_ == 2) { return ((java.lang.Integer) transformType_).intValue(); @@ -2017,6 +2039,7 @@ public Builder setSetToServerValueValue(int value) { * * @return The setToServerValue. */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue getSetToServerValue() { if (transformTypeCase_ == 2) { @@ -2101,6 +2124,7 @@ public Builder clearSetToServerValue() { * * @return Whether the increment field is set. */ + @java.lang.Override public boolean hasIncrement() { return transformTypeCase_ == 3; } @@ -2123,6 +2147,7 @@ public boolean hasIncrement() { * * @return The increment. */ + @java.lang.Override public com.google.firestore.v1.Value getIncrement() { if (incrementBuilder_ == null) { if (transformTypeCase_ == 3) { @@ -2302,6 +2327,7 @@ public com.google.firestore.v1.Value.Builder getIncrementBuilder() { * * .google.firestore.v1.Value increment = 3; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { if ((transformTypeCase_ == 3) && (incrementBuilder_ != null)) { return incrementBuilder_.getMessageOrBuilder(); @@ -2380,6 +2406,7 @@ public com.google.firestore.v1.ValueOrBuilder getIncrementOrBuilder() { * * @return Whether the maximum field is set. */ + @java.lang.Override public boolean hasMaximum() { return transformTypeCase_ == 4; } @@ -2404,6 +2431,7 @@ public boolean hasMaximum() { * * @return The maximum. */ + @java.lang.Override public com.google.firestore.v1.Value getMaximum() { if (maximumBuilder_ == null) { if (transformTypeCase_ == 4) { @@ -2595,6 +2623,7 @@ public com.google.firestore.v1.Value.Builder getMaximumBuilder() { * * .google.firestore.v1.Value maximum = 4; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { if ((transformTypeCase_ == 4) && (maximumBuilder_ != null)) { return maximumBuilder_.getMessageOrBuilder(); @@ -2675,6 +2704,7 @@ public com.google.firestore.v1.ValueOrBuilder getMaximumOrBuilder() { * * @return Whether the minimum field is set. */ + @java.lang.Override public boolean hasMinimum() { return transformTypeCase_ == 5; } @@ -2699,6 +2729,7 @@ public boolean hasMinimum() { * * @return The minimum. */ + @java.lang.Override public com.google.firestore.v1.Value getMinimum() { if (minimumBuilder_ == null) { if (transformTypeCase_ == 5) { @@ -2890,6 +2921,7 @@ public com.google.firestore.v1.Value.Builder getMinimumBuilder() { * * .google.firestore.v1.Value minimum = 5; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { if ((transformTypeCase_ == 5) && (minimumBuilder_ != null)) { return minimumBuilder_.getMessageOrBuilder(); @@ -2969,6 +3001,7 @@ public com.google.firestore.v1.ValueOrBuilder getMinimumOrBuilder() { * * @return Whether the appendMissingElements field is set. */ + @java.lang.Override public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } @@ -2992,6 +3025,7 @@ public boolean hasAppendMissingElements() { * * @return The appendMissingElements. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getAppendMissingElements() { if (appendMissingElementsBuilder_ == null) { if (transformTypeCase_ == 6) { @@ -3178,6 +3212,7 @@ public com.google.firestore.v1.ArrayValue.Builder getAppendMissingElementsBuilde * * .google.firestore.v1.ArrayValue append_missing_elements = 6; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() { if ((transformTypeCase_ == 6) && (appendMissingElementsBuilder_ != null)) { return appendMissingElementsBuilder_.getMessageOrBuilder(); @@ -3254,6 +3289,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getAppendMissingElementsOrBui * * @return Whether the removeAllFromArray field is set. */ + @java.lang.Override public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } @@ -3275,6 +3311,7 @@ public boolean hasRemoveAllFromArray() { * * @return The removeAllFromArray. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getRemoveAllFromArray() { if (removeAllFromArrayBuilder_ == null) { if (transformTypeCase_ == 7) { @@ -3449,6 +3486,7 @@ public com.google.firestore.v1.ArrayValue.Builder getRemoveAllFromArrayBuilder() * * .google.firestore.v1.ArrayValue remove_all_from_array = 7; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() { if ((transformTypeCase_ == 7) && (removeAllFromArrayBuilder_ != null)) { return removeAllFromArrayBuilder_.getMessageOrBuilder(); @@ -3565,6 +3603,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getDefaultInstan * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -3587,6 +3626,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -3613,6 +3653,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public java.util.List getFieldTransformsList() { return fieldTransforms_; @@ -3629,6 +3670,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public java.util.List getFieldTransformsOrBuilderList() { return fieldTransforms_; @@ -3645,6 +3687,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public int getFieldTransformsCount() { return fieldTransforms_.size(); } @@ -3660,6 +3703,7 @@ public int getFieldTransformsCount() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform.FieldTransform getFieldTransforms(int index) { return fieldTransforms_.get(index); } @@ -3675,6 +3719,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getFieldTransfor * repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform.FieldTransformOrBuilder getFieldTransformsOrBuilder(int index) { return fieldTransforms_.get(index); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java index 444c3f124..60a016650 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ExistenceFilter.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -144,6 +145,7 @@ public int getTargetId() { * * @return The count. */ + @java.lang.Override public int getCount() { return count_; } @@ -489,6 +491,7 @@ public Builder mergeFrom( * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -542,6 +545,7 @@ public Builder clearTargetId() { * * @return The count. */ + @java.lang.Override public int getCount() { return count_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java index 50da056a3..c368cda0b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/FirestoreProto.java @@ -87,6 +87,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_RunQueryResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_RunQueryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_PartitionQueryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_PartitionQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_PartitionQueryResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_PartitionQueryResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_WriteRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,6 +143,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_ListCollectionIdsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_ListCollectionIdsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_BatchWriteRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_BatchWriteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_BatchWriteRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_BatchWriteRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_BatchWriteResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_BatchWriteResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -215,122 +235,147 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nse\022\023\n\013transaction\030\002 \001(\014\022/\n\010document\030\001 \001" + "(\0132\035.google.firestore.v1.Document\022-\n\trea" + "d_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + "\022\027\n\017skipped_results\030\004 \001(\005\"\350\001\n\014WriteReque" - + "st\022\025\n\010database\030\001 \001(\tB\003\340A\002\022\021\n\tstream_id\030\002" - + " \001(\t\022*\n\006writes\030\003 \003(\0132\032.google.firestore." - + "v1.Write\022\024\n\014stream_token\030\004 \001(\014\022=\n\006labels" - + "\030\005 \003(\0132-.google.firestore.v1.WriteReques" - + "t.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(" - + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021" - + "\n\tstream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001(\014\022" - + "7\n\rwrite_results\030\003 \003(\0132 .google.firestor" - + "e.v1.WriteResult\022/\n\013commit_time\030\004 \001(\0132\032." - + "google.protobuf.Timestamp\"\362\001\n\rListenRequ" - + "est\022\025\n\010database\030\001 \001(\tB\003\340A\002\0221\n\nadd_target" - + "\030\002 \001(\0132\033.google.firestore.v1.TargetH\000\022\027\n" - + "\rremove_target\030\003 \001(\005H\000\022>\n\006labels\030\004 \003(\0132." - + ".google.firestore.v1.ListenRequest.Label" - + "sEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001B\017\n\rtarget_change\"\325\002\n\016Liste" - + "nResponse\022:\n\rtarget_change\030\002 \001(\0132!.googl" - + "e.firestore.v1.TargetChangeH\000\022>\n\017documen" - + "t_change\030\003 \001(\0132#.google.firestore.v1.Doc" - + "umentChangeH\000\022>\n\017document_delete\030\004 \001(\0132#" - + ".google.firestore.v1.DocumentDeleteH\000\022>\n" - + "\017document_remove\030\006 \001(\0132#.google.firestor" - + "e.v1.DocumentRemoveH\000\0226\n\006filter\030\005 \001(\0132$." - + "google.firestore.v1.ExistenceFilterH\000B\017\n" - + "\rresponse_type\"\241\003\n\006Target\0228\n\005query\030\002 \001(\013" - + "2\'.google.firestore.v1.Target.QueryTarge" - + "tH\000\022@\n\tdocuments\030\003 \001(\0132+.google.firestor" - + "e.v1.Target.DocumentsTargetH\000\022\026\n\014resume_" - + "token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132\032.googl" - + "e.protobuf.TimestampH\001\022\021\n\ttarget_id\030\005 \001(" - + "\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarget\022\021\n\tdo" - + "cuments\030\002 \003(\t\032m\n\013QueryTarget\022\016\n\006parent\030\001" - + " \001(\t\022@\n\020structured_query\030\002 \001(\0132$.google." - + "firestore.v1.StructuredQueryH\000B\014\n\nquery_" - + "typeB\r\n\013target_typeB\r\n\013resume_type\"\252\002\n\014T" - + "argetChange\022N\n\022target_change_type\030\001 \001(\0162" - + "2.google.firestore.v1.TargetChange.Targe" - + "tChangeType\022\022\n\ntarget_ids\030\002 \003(\005\022!\n\005cause" - + "\030\003 \001(\0132\022.google.rpc.Status\022\024\n\014resume_tok" - + "en\030\004 \001(\014\022-\n\tread_time\030\006 \001(\0132\032.google.pro" - + "tobuf.Timestamp\"N\n\020TargetChangeType\022\r\n\tN" - + "O_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRE" - + "NT\020\003\022\t\n\005RESET\020\004\"V\n\030ListCollectionIdsRequ" - + "est\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031ListCollectio" - + "nIdsResponse\022\026\n\016collection_ids\030\001 \003(\t\022\027\n\017" - + "next_page_token\030\002 \001(\t2\327\023\n\tFirestore\022\217\001\n\013" - + "GetDocument\022\'.google.firestore.v1.GetDoc" - + "umentRequest\032\035.google.firestore.v1.Docum" - + "ent\"8\202\323\344\223\0022\0220/v1/{name=projects/*/databa" - + "ses/*/documents/*/**}\022\262\001\n\rListDocuments\022" - + ").google.firestore.v1.ListDocumentsReque" - + "st\032*.google.firestore.v1.ListDocumentsRe" - + "sponse\"J\202\323\344\223\002D\022B/v1/{parent=projects/*/d" - + "atabases/*/documents/*/**}/{collection_i" - + "d}\022\277\001\n\016UpdateDocument\022*.google.firestore" - + ".v1.UpdateDocumentRequest\032\035.google.fires" - + "tore.v1.Document\"b\202\323\344\223\002E29/v1/{document." - + "name=projects/*/databases/*/documents/*/" - + "**}:\010document\332A\024document,update_mask\022\225\001\n" - + "\016DeleteDocument\022*.google.firestore.v1.De" - + "leteDocumentRequest\032\026.google.protobuf.Em" - + "pty\"?\202\323\344\223\0022*0/v1/{name=projects/*/databa" - + "ses/*/documents/*/**}\332A\004name\022\271\001\n\021BatchGe" - + "tDocuments\022-.google.firestore.v1.BatchGe" - + "tDocumentsRequest\032..google.firestore.v1." - + "BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8/v1/{" - + "database=projects/*/databases/*}/documen" - + "ts:batchGet:\001*0\001\022\307\001\n\020BeginTransaction\022,." - + "google.firestore.v1.BeginTransactionRequ" - + "est\032-.google.firestore.v1.BeginTransacti" - + "onResponse\"V\202\323\344\223\002E\"@/v1/{database=projec" - + "ts/*/databases/*}/documents:beginTransac" - + "tion:\001*\332A\010database\022\246\001\n\006Commit\022\".google.f" - + "irestore.v1.CommitRequest\032#.google.fires" - + "tore.v1.CommitResponse\"S\202\323\344\223\002;\"6/v1/{dat" - + "abase=projects/*/databases/*}/documents:" - + "commit:\001*\332A\017database,writes\022\244\001\n\010Rollback" - + "\022$.google.firestore.v1.RollbackRequest\032\026" - + ".google.protobuf.Empty\"Z\202\323\344\223\002=\"8/v1/{dat" - + "abase=projects/*/databases/*}/documents:" - + "rollback:\001*\332A\024database,transaction\022\337\001\n\010R" - + "unQuery\022$.google.firestore.v1.RunQueryRe" - + "quest\032%.google.firestore.v1.RunQueryResp" - + "onse\"\203\001\202\323\344\223\002}\"6/v1/{parent=projects/*/da" - + "tabases/*/documents}:runQuery:\001*Z@\";/v1/" - + "{parent=projects/*/databases/*/documents" - + "/*/**}:runQuery:\001*0\001\022\224\001\n\005Write\022!.google." - + "firestore.v1.WriteRequest\032\".google.fires" - + "tore.v1.WriteResponse\"@\202\323\344\223\002:\"5/v1/{data" - + "base=projects/*/databases/*}/documents:w" - + "rite:\001*(\0010\001\022\230\001\n\006Listen\022\".google.firestor" - + "e.v1.ListenRequest\032#.google.firestore.v1" - + ".ListenResponse\"A\202\323\344\223\002;\"6/v1/{database=p" - + "rojects/*/databases/*}/documents:listen:" - + "\001*(\0010\001\022\224\002\n\021ListCollectionIds\022-.google.fi" - + "restore.v1.ListCollectionIdsRequest\032..go" - + "ogle.firestore.v1.ListCollectionIdsRespo" - + "nse\"\237\001\202\323\344\223\002\217\001\"?/v1/{parent=projects/*/da" - + "tabases/*/documents}:listCollectionIds:\001" - + "*ZI\"D/v1/{parent=projects/*/databases/*/" - + "documents/*/**}:listCollectionIds:\001*\332A\006p" - + "arent\022\257\001\n\016CreateDocument\022*.google.firest" - + "ore.v1.CreateDocumentRequest\032\035.google.fi" - + "restore.v1.Document\"R\202\323\344\223\002L\"@/v1/{parent" - + "=projects/*/databases/*/documents/**}/{c" - + "ollection_id}:\010document\032v\312A\030firestore.go" - + "ogleapis.com\322AXhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/datastoreB\250\001\n\027com.google.f" - + "irestore.v1B\016FirestoreProtoP\001Z\n\006lab" + + "els\030\004 \003(\0132..google.firestore.v1.ListenRe" + + "quest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_chang" + + "e\"\325\002\n\016ListenResponse\022:\n\rtarget_change\030\002 " + + "\001(\0132!.google.firestore.v1.TargetChangeH\000" + + "\022>\n\017document_change\030\003 \001(\0132#.google.fires" + + "tore.v1.DocumentChangeH\000\022>\n\017document_del" + + "ete\030\004 \001(\0132#.google.firestore.v1.Document" + + "DeleteH\000\022>\n\017document_remove\030\006 \001(\0132#.goog" + + "le.firestore.v1.DocumentRemoveH\000\0226\n\006filt" + + "er\030\005 \001(\0132$.google.firestore.v1.Existence" + + "FilterH\000B\017\n\rresponse_type\"\241\003\n\006Target\0228\n\005" + + "query\030\002 \001(\0132\'.google.firestore.v1.Target" + + ".QueryTargetH\000\022@\n\tdocuments\030\003 \001(\0132+.goog" + + "le.firestore.v1.Target.DocumentsTargetH\000" + + "\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 " + + "\001(\0132\032.google.protobuf.TimestampH\001\022\021\n\ttar" + + "get_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsT" + + "arget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013QueryTarget\022" + + "\016\n\006parent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(" + + "\0132$.google.firestore.v1.StructuredQueryH" + + "\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resume" + + "_type\"\252\002\n\014TargetChange\022N\n\022target_change_" + + "type\030\001 \001(\01622.google.firestore.v1.TargetC" + + "hange.TargetChangeType\022\022\n\ntarget_ids\030\002 \003" + + "(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Status\022\024\n" + + "\014resume_token\030\004 \001(\014\022-\n\tread_time\030\006 \001(\0132\032" + + ".google.protobuf.Timestamp\"N\n\020TargetChan" + + "geType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006REMOVE" + + "\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"V\n\030ListCollec" + + "tionIdsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031Li" + + "stCollectionIdsResponse\022\026\n\016collection_id" + + "s\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\021Bat" + + "chWriteRequest\022\025\n\010database\030\001 \001(\tB\003\340A\002\022*\n" + + "\006writes\030\002 \003(\0132\032.google.firestore.v1.Writ" + + "e\022B\n\006labels\030\003 \003(\01322.google.firestore.v1." + + "BatchWriteRequest.LabelsEntry\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"q\n\022" + + "BatchWriteResponse\0227\n\rwrite_results\030\001 \003(" + + "\0132 .google.firestore.v1.WriteResult\022\"\n\006s" + + "tatus\030\002 \003(\0132\022.google.rpc.Status2\375\026\n\tFire" + + "store\022\217\001\n\013GetDocument\022\'.google.firestore" + + ".v1.GetDocumentRequest\032\035.google.firestor" + + "e.v1.Document\"8\202\323\344\223\0022\0220/v1/{name=project" + + "s/*/databases/*/documents/*/**}\022\262\001\n\rList" + + "Documents\022).google.firestore.v1.ListDocu" + + "mentsRequest\032*.google.firestore.v1.ListD" + + "ocumentsResponse\"J\202\323\344\223\002D\022B/v1/{parent=pr" + + "ojects/*/databases/*/documents/*/**}/{co" + + "llection_id}\022\277\001\n\016UpdateDocument\022*.google" + + ".firestore.v1.UpdateDocumentRequest\032\035.go" + + "ogle.firestore.v1.Document\"b\202\323\344\223\002E29/v1/" + + "{document.name=projects/*/databases/*/do" + + "cuments/*/**}:\010document\332A\024document,updat" + + "e_mask\022\225\001\n\016DeleteDocument\022*.google.fires" + + "tore.v1.DeleteDocumentRequest\032\026.google.p" + + "rotobuf.Empty\"?\202\323\344\223\0022*0/v1/{name=project" + + "s/*/databases/*/documents/*/**}\332A\004name\022\271" + + "\001\n\021BatchGetDocuments\022-.google.firestore." + + "v1.BatchGetDocumentsRequest\032..google.fir" + + "estore.v1.BatchGetDocumentsResponse\"C\202\323\344" + + "\223\002=\"8/v1/{database=projects/*/databases/" + + "*}/documents:batchGet:\001*0\001\022\307\001\n\020BeginTran" + + "saction\022,.google.firestore.v1.BeginTrans" + + "actionRequest\032-.google.firestore.v1.Begi" + + "nTransactionResponse\"V\202\323\344\223\002E\"@/v1/{datab" + + "ase=projects/*/databases/*}/documents:be" + + "ginTransaction:\001*\332A\010database\022\246\001\n\006Commit\022" + + "\".google.firestore.v1.CommitRequest\032#.go" + + "ogle.firestore.v1.CommitResponse\"S\202\323\344\223\002;" + + "\"6/v1/{database=projects/*/databases/*}/" + + "documents:commit:\001*\332A\017database,writes\022\244\001" + + "\n\010Rollback\022$.google.firestore.v1.Rollbac" + + "kRequest\032\026.google.protobuf.Empty\"Z\202\323\344\223\002=" + + "\"8/v1/{database=projects/*/databases/*}/" + + "documents:rollback:\001*\332A\024database,transac" + + "tion\022\337\001\n\010RunQuery\022$.google.firestore.v1." + + "RunQueryRequest\032%.google.firestore.v1.Ru" + + "nQueryResponse\"\203\001\202\323\344\223\002}\"6/v1/{parent=pro" + + "jects/*/databases/*/documents}:runQuery:" + + "\001*Z@\";/v1/{parent=projects/*/databases/*" + + "/documents/*/**}:runQuery:\001*0\001\022\374\001\n\016Parti" + + "tionQuery\022*.google.firestore.v1.Partitio" + + "nQueryRequest\032+.google.firestore.v1.Part" + + "itionQueryResponse\"\220\001\202\323\344\223\002\211\001\".google.firestore.v1.DocumentMask mask = 2; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -305,6 +310,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 3) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -318,13 +324,14 @@ public com.google.protobuf.ByteString getTransaction() { * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 5; } @@ -333,13 +340,14 @@ public boolean hasReadTime() { * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -351,11 +359,12 @@ public com.google.protobuf.Timestamp getReadTime() { * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1167,13 +1176,14 @@ public Builder clearTransaction() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 5; } @@ -1182,13 +1192,14 @@ public boolean hasReadTime() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 5) { @@ -1207,7 +1218,7 @@ public com.google.protobuf.Timestamp getReadTime() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; @@ -1230,7 +1241,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; @@ -1250,7 +1261,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; @@ -1282,7 +1293,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; @@ -1308,7 +1319,7 @@ public Builder clearReadTime() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; @@ -1321,11 +1332,12 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 5) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -1341,7 +1353,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * *
      * Reads the version of the document at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 5; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java index 8a9143bad..3fd4be1a7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/GetDocumentRequestOrBuilder.java @@ -109,7 +109,7 @@ public interface GetDocumentRequestOrBuilder * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; @@ -122,7 +122,7 @@ public interface GetDocumentRequestOrBuilder * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; @@ -135,7 +135,7 @@ public interface GetDocumentRequestOrBuilder * *
    * Reads the version of the document at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 5; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java index 93518a6d7..e180036d7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsRequest.java @@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -165,6 +166,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -208,6 +211,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -231,6 +235,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -724,6 +729,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java index 4bccaafb0..c94981ee8 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListCollectionIdsResponse.java @@ -200,6 +200,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -222,6 +223,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java index 5a0591fec..7d45c0d11 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequest.java @@ -247,6 +247,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -274,6 +275,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -300,6 +302,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -323,6 +326,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -348,6 +352,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -365,6 +370,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -387,6 +393,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -412,6 +419,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * @return The orderBy. */ + @java.lang.Override public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -434,6 +442,7 @@ public java.lang.String getOrderBy() { * * @return The bytes for orderBy. */ + @java.lang.Override public com.google.protobuf.ByteString getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -461,6 +470,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -477,6 +487,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } @@ -491,6 +502,7 @@ public com.google.firestore.v1.DocumentMask getMask() { * * .google.firestore.v1.DocumentMask mask = 7; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -507,6 +519,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 8) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -520,13 +533,14 @@ public com.google.protobuf.ByteString getTransaction() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 10; } @@ -535,13 +549,14 @@ public boolean hasReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 10) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -553,11 +568,12 @@ public com.google.protobuf.Timestamp getReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 10) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -583,6 +599,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The showMissing. */ + @java.lang.Override public boolean getShowMissing() { return showMissing_; } @@ -1345,6 +1362,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -1863,13 +1881,14 @@ public Builder clearTransaction() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 10; } @@ -1878,13 +1897,14 @@ public boolean hasReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 10) { @@ -1903,7 +1923,7 @@ public com.google.protobuf.Timestamp getReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -1926,7 +1946,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -1946,7 +1966,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -1978,7 +1998,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -2004,7 +2024,7 @@ public Builder clearReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -2017,11 +2037,12 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 10) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -2037,7 +2058,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 10; @@ -2084,6 +2105,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The showMissing. */ + @java.lang.Override public boolean getShowMissing() { return showMissing_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java index f3293a116..7ff66b64b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsRequestOrBuilder.java @@ -207,7 +207,7 @@ public interface ListDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; @@ -220,7 +220,7 @@ public interface ListDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; @@ -233,7 +233,7 @@ public interface ListDocumentsRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 10; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java index 1b487f2fd..7995f3dc7 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListDocumentsResponse.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1.Document documents = 1; */ + @java.lang.Override public java.util.List getDocumentsList() { return documents_; } @@ -149,6 +150,7 @@ public java.util.List getDocumentsList() { * * repeated .google.firestore.v1.Document documents = 1; */ + @java.lang.Override public java.util.List getDocumentsOrBuilderList() { return documents_; @@ -162,6 +164,7 @@ public java.util.List getDocumentsList() { * * repeated .google.firestore.v1.Document documents = 1; */ + @java.lang.Override public int getDocumentsCount() { return documents_.size(); } @@ -174,6 +177,7 @@ public int getDocumentsCount() { * * repeated .google.firestore.v1.Document documents = 1; */ + @java.lang.Override public com.google.firestore.v1.Document getDocuments(int index) { return documents_.get(index); } @@ -186,6 +190,7 @@ public com.google.firestore.v1.Document getDocuments(int index) { * * repeated .google.firestore.v1.Document documents = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentsOrBuilder(int index) { return documents_.get(index); } @@ -203,6 +208,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentsOrBuilder(int index * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -225,6 +231,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java index b0ffbc148..80238b7b1 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenRequest.java @@ -218,6 +218,7 @@ public TargetChangeCase getTargetChangeCase() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -241,6 +242,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -265,6 +267,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return Whether the addTarget field is set. */ + @java.lang.Override public boolean hasAddTarget() { return targetChangeCase_ == 2; } @@ -279,6 +282,7 @@ public boolean hasAddTarget() { * * @return The addTarget. */ + @java.lang.Override public com.google.firestore.v1.Target getAddTarget() { if (targetChangeCase_ == 2) { return (com.google.firestore.v1.Target) targetChange_; @@ -294,6 +298,7 @@ public com.google.firestore.v1.Target getAddTarget() { * * .google.firestore.v1.Target add_target = 2; */ + @java.lang.Override public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { if (targetChangeCase_ == 2) { return (com.google.firestore.v1.Target) targetChange_; @@ -313,6 +318,7 @@ public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { * * @return The removeTarget. */ + @java.lang.Override public int getRemoveTarget() { if (targetChangeCase_ == 3) { return (java.lang.Integer) targetChange_; @@ -354,6 +360,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -361,6 +368,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -374,6 +382,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -386,6 +395,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -402,6 +412,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -980,6 +991,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { * * @return Whether the addTarget field is set. */ + @java.lang.Override public boolean hasAddTarget() { return targetChangeCase_ == 2; } @@ -994,6 +1006,7 @@ public boolean hasAddTarget() { * * @return The addTarget. */ + @java.lang.Override public com.google.firestore.v1.Target getAddTarget() { if (addTargetBuilder_ == null) { if (targetChangeCase_ == 2) { @@ -1125,6 +1138,7 @@ public com.google.firestore.v1.Target.Builder getAddTargetBuilder() { * * .google.firestore.v1.Target add_target = 2; */ + @java.lang.Override public com.google.firestore.v1.TargetOrBuilder getAddTargetOrBuilder() { if ((targetChangeCase_ == 2) && (addTargetBuilder_ != null)) { return addTargetBuilder_.getMessageOrBuilder(); @@ -1256,6 +1270,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1263,6 +1278,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1276,6 +1292,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1288,6 +1305,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1305,6 +1323,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java index a3763a6d1..6532c1694 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/ListenResponse.java @@ -250,6 +250,7 @@ public ResponseTypeCase getResponseTypeCase() { * * @return Whether the targetChange field is set. */ + @java.lang.Override public boolean hasTargetChange() { return responseTypeCase_ == 2; } @@ -264,6 +265,7 @@ public boolean hasTargetChange() { * * @return The targetChange. */ + @java.lang.Override public com.google.firestore.v1.TargetChange getTargetChange() { if (responseTypeCase_ == 2) { return (com.google.firestore.v1.TargetChange) responseType_; @@ -279,6 +281,7 @@ public com.google.firestore.v1.TargetChange getTargetChange() { * * .google.firestore.v1.TargetChange target_change = 2; */ + @java.lang.Override public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() { if (responseTypeCase_ == 2) { return (com.google.firestore.v1.TargetChange) responseType_; @@ -298,6 +301,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() * * @return Whether the documentChange field is set. */ + @java.lang.Override public boolean hasDocumentChange() { return responseTypeCase_ == 3; } @@ -312,6 +316,7 @@ public boolean hasDocumentChange() { * * @return The documentChange. */ + @java.lang.Override public com.google.firestore.v1.DocumentChange getDocumentChange() { if (responseTypeCase_ == 3) { return (com.google.firestore.v1.DocumentChange) responseType_; @@ -327,6 +332,7 @@ public com.google.firestore.v1.DocumentChange getDocumentChange() { * * .google.firestore.v1.DocumentChange document_change = 3; */ + @java.lang.Override public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilder() { if (responseTypeCase_ == 3) { return (com.google.firestore.v1.DocumentChange) responseType_; @@ -346,6 +352,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde * * @return Whether the documentDelete field is set. */ + @java.lang.Override public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } @@ -360,6 +367,7 @@ public boolean hasDocumentDelete() { * * @return The documentDelete. */ + @java.lang.Override public com.google.firestore.v1.DocumentDelete getDocumentDelete() { if (responseTypeCase_ == 4) { return (com.google.firestore.v1.DocumentDelete) responseType_; @@ -375,6 +383,7 @@ public com.google.firestore.v1.DocumentDelete getDocumentDelete() { * * .google.firestore.v1.DocumentDelete document_delete = 4; */ + @java.lang.Override public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilder() { if (responseTypeCase_ == 4) { return (com.google.firestore.v1.DocumentDelete) responseType_; @@ -395,6 +404,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde * * @return Whether the documentRemove field is set. */ + @java.lang.Override public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } @@ -410,6 +420,7 @@ public boolean hasDocumentRemove() { * * @return The documentRemove. */ + @java.lang.Override public com.google.firestore.v1.DocumentRemove getDocumentRemove() { if (responseTypeCase_ == 6) { return (com.google.firestore.v1.DocumentRemove) responseType_; @@ -426,6 +437,7 @@ public com.google.firestore.v1.DocumentRemove getDocumentRemove() { * * .google.firestore.v1.DocumentRemove document_remove = 6; */ + @java.lang.Override public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilder() { if (responseTypeCase_ == 6) { return (com.google.firestore.v1.DocumentRemove) responseType_; @@ -448,6 +460,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde * * @return Whether the filter field is set. */ + @java.lang.Override public boolean hasFilter() { return responseTypeCase_ == 5; } @@ -465,6 +478,7 @@ public boolean hasFilter() { * * @return The filter. */ + @java.lang.Override public com.google.firestore.v1.ExistenceFilter getFilter() { if (responseTypeCase_ == 5) { return (com.google.firestore.v1.ExistenceFilter) responseType_; @@ -483,6 +497,7 @@ public com.google.firestore.v1.ExistenceFilter getFilter() { * * .google.firestore.v1.ExistenceFilter filter = 5; */ + @java.lang.Override public com.google.firestore.v1.ExistenceFilterOrBuilder getFilterOrBuilder() { if (responseTypeCase_ == 5) { return (com.google.firestore.v1.ExistenceFilter) responseType_; @@ -972,6 +987,7 @@ public Builder clearResponseType() { * * @return Whether the targetChange field is set. */ + @java.lang.Override public boolean hasTargetChange() { return responseTypeCase_ == 2; } @@ -986,6 +1002,7 @@ public boolean hasTargetChange() { * * @return The targetChange. */ + @java.lang.Override public com.google.firestore.v1.TargetChange getTargetChange() { if (targetChangeBuilder_ == null) { if (responseTypeCase_ == 2) { @@ -1117,6 +1134,7 @@ public com.google.firestore.v1.TargetChange.Builder getTargetChangeBuilder() { * * .google.firestore.v1.TargetChange target_change = 2; */ + @java.lang.Override public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() { if ((responseTypeCase_ == 2) && (targetChangeBuilder_ != null)) { return targetChangeBuilder_.getMessageOrBuilder(); @@ -1177,6 +1195,7 @@ public com.google.firestore.v1.TargetChangeOrBuilder getTargetChangeOrBuilder() * * @return Whether the documentChange field is set. */ + @java.lang.Override public boolean hasDocumentChange() { return responseTypeCase_ == 3; } @@ -1191,6 +1210,7 @@ public boolean hasDocumentChange() { * * @return The documentChange. */ + @java.lang.Override public com.google.firestore.v1.DocumentChange getDocumentChange() { if (documentChangeBuilder_ == null) { if (responseTypeCase_ == 3) { @@ -1323,6 +1343,7 @@ public com.google.firestore.v1.DocumentChange.Builder getDocumentChangeBuilder() * * .google.firestore.v1.DocumentChange document_change = 3; */ + @java.lang.Override public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilder() { if ((responseTypeCase_ == 3) && (documentChangeBuilder_ != null)) { return documentChangeBuilder_.getMessageOrBuilder(); @@ -1383,6 +1404,7 @@ public com.google.firestore.v1.DocumentChangeOrBuilder getDocumentChangeOrBuilde * * @return Whether the documentDelete field is set. */ + @java.lang.Override public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } @@ -1397,6 +1419,7 @@ public boolean hasDocumentDelete() { * * @return The documentDelete. */ + @java.lang.Override public com.google.firestore.v1.DocumentDelete getDocumentDelete() { if (documentDeleteBuilder_ == null) { if (responseTypeCase_ == 4) { @@ -1529,6 +1552,7 @@ public com.google.firestore.v1.DocumentDelete.Builder getDocumentDeleteBuilder() * * .google.firestore.v1.DocumentDelete document_delete = 4; */ + @java.lang.Override public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilder() { if ((responseTypeCase_ == 4) && (documentDeleteBuilder_ != null)) { return documentDeleteBuilder_.getMessageOrBuilder(); @@ -1590,6 +1614,7 @@ public com.google.firestore.v1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilde * * @return Whether the documentRemove field is set. */ + @java.lang.Override public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } @@ -1605,6 +1630,7 @@ public boolean hasDocumentRemove() { * * @return The documentRemove. */ + @java.lang.Override public com.google.firestore.v1.DocumentRemove getDocumentRemove() { if (documentRemoveBuilder_ == null) { if (responseTypeCase_ == 6) { @@ -1743,6 +1769,7 @@ public com.google.firestore.v1.DocumentRemove.Builder getDocumentRemoveBuilder() * * .google.firestore.v1.DocumentRemove document_remove = 6; */ + @java.lang.Override public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilder() { if ((responseTypeCase_ == 6) && (documentRemoveBuilder_ != null)) { return documentRemoveBuilder_.getMessageOrBuilder(); @@ -1807,6 +1834,7 @@ public com.google.firestore.v1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilde * * @return Whether the filter field is set. */ + @java.lang.Override public boolean hasFilter() { return responseTypeCase_ == 5; } @@ -1824,6 +1852,7 @@ public boolean hasFilter() { * * @return The filter. */ + @java.lang.Override public com.google.firestore.v1.ExistenceFilter getFilter() { if (filterBuilder_ == null) { if (responseTypeCase_ == 5) { @@ -1973,6 +2002,7 @@ public com.google.firestore.v1.ExistenceFilter.Builder getFilterBuilder() { * * .google.firestore.v1.ExistenceFilter filter = 5; */ + @java.lang.Override public com.google.firestore.v1.ExistenceFilterOrBuilder getFilterOrBuilder() { if ((responseTypeCase_ == 5) && (filterBuilder_ != null)) { return filterBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java index 0ca9795df..88c0f17ff 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/MapValue.java @@ -169,6 +169,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -176,6 +177,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -193,6 +195,7 @@ public java.util.Map getFields( * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -209,6 +212,7 @@ public java.util.Map getFieldsM * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1.Value defaultValue) { if (key == null) { @@ -231,6 +235,7 @@ public com.google.firestore.v1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -623,6 +628,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -630,6 +636,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -647,6 +654,7 @@ public java.util.Map getFields( * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -663,6 +671,7 @@ public java.util.Map getFieldsM * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1.Value defaultValue) { if (key == null) { @@ -685,6 +694,7 @@ public com.google.firestore.v1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java new file mode 100644 index 000000000..d2e156566 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequest.java @@ -0,0 +1,1524 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.PartitionQueryRequest} + */ +public final class PartitionQueryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.PartitionQueryRequest) + PartitionQueryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PartitionQueryRequest.newBuilder() to construct. + private PartitionQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PartitionQueryRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PartitionQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.firestore.v1.StructuredQuery.Builder subBuilder = null; + if (queryTypeCase_ == 2) { + subBuilder = ((com.google.firestore.v1.StructuredQuery) queryType_).toBuilder(); + } + queryType_ = + input.readMessage( + com.google.firestore.v1.StructuredQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.firestore.v1.StructuredQuery) queryType_); + queryType_ = subBuilder.buildPartial(); + } + queryTypeCase_ = 2; + break; + } + case 24: + { + partitionCount_ = input.readInt64(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 40: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.PartitionQueryRequest.class, + com.google.firestore.v1.PartitionQueryRequest.Builder.class); + } + + private int queryTypeCase_ = 0; + private java.lang.Object queryType_; + + public enum QueryTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRUCTURED_QUERY(2), + QUERYTYPE_NOT_SET(0); + private final int value; + + private QueryTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static QueryTypeCase valueOf(int value) { + return forNumber(value); + } + + public static QueryTypeCase forNumber(int value) { + switch (value) { + case 2: + return STRUCTURED_QUERY; + case 0: + return QUERYTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public QueryTypeCase getQueryTypeCase() { + return QueryTypeCase.forNumber(queryTypeCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name. In the format:
+   * `projects/{project_id}/databases/{database_id}/documents`.
+   * Document resource names are not supported; only database resource names
+   * can be specified.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name. In the format:
+   * `projects/{project_id}/databases/{database_id}/documents`.
+   * Document resource names are not supported; only database resource names
+   * can be specified.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRUCTURED_QUERY_FIELD_NUMBER = 2; + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return Whether the structuredQuery field is set. + */ + @java.lang.Override + public boolean hasStructuredQuery() { + return queryTypeCase_ == 2; + } + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return The structuredQuery. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery getStructuredQuery() { + if (queryTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery) queryType_; + } + return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { + if (queryTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery) queryType_; + } + return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } + + public static final int PARTITION_COUNT_FIELD_NUMBER = 3; + private long partitionCount_; + /** + * + * + *
+   * The desired maximum number of partition points.
+   * The partitions may be returned across multiple pages of results.
+   * The number must be strictly positive. The actual number of partitions
+   * returned may be fewer.
+   * For example, this may be set to one fewer than the number of parallel
+   * queries to be run, or in running a data pipeline job, one fewer than the
+   * number of workers or compute instances available.
+   * 
+ * + * int64 partition_count = 3; + * + * @return The partitionCount. + */ + @java.lang.Override + public long getPartitionCount() { + return partitionCount_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The `next_page_token` value returned from a previous call to
+   * PartitionQuery that may be used to get an additional set of results.
+   * There are no ordering guarantees between sets of results. Thus, using
+   * multiple sets of results will require merging the different result sets.
+   * For example, two subsequent calls using a page_token may return:
+   *  * cursor B, cursor M, cursor Q
+   *  * cursor A, cursor U, cursor W
+   * To obtain a complete result set ordered with respect to the results of the
+   * query supplied to PartitionQuery, the results sets should be merged:
+   * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The `next_page_token` value returned from a previous call to
+   * PartitionQuery that may be used to get an additional set of results.
+   * There are no ordering guarantees between sets of results. Thus, using
+   * multiple sets of results will require merging the different result sets.
+   * For example, two subsequent calls using a page_token may return:
+   *  * cursor B, cursor M, cursor Q
+   *  * cursor A, cursor U, cursor W
+   * To obtain a complete result set ordered with respect to the results of the
+   * query supplied to PartitionQuery, the results sets should be merged:
+   * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_; + /** + * + * + *
+   * The maximum number of partitions to return in this call, subject to
+   * `partition_count`.
+   * For example, if `partition_count` = 10 and `page_size` = 8, the first call
+   * to PartitionQuery will return up to 8 partitions and a `next_page_token`
+   * if more results exist. A second call to PartitionQuery will return up to
+   * 2 partitions, to complete the total of 10 specified in `partition_count`.
+   * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (queryTypeCase_ == 2) { + output.writeMessage(2, (com.google.firestore.v1.StructuredQuery) queryType_); + } + if (partitionCount_ != 0L) { + output.writeInt64(3, partitionCount_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (queryTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.firestore.v1.StructuredQuery) queryType_); + } + if (partitionCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, partitionCount_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.PartitionQueryRequest)) { + return super.equals(obj); + } + com.google.firestore.v1.PartitionQueryRequest other = + (com.google.firestore.v1.PartitionQueryRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPartitionCount() != other.getPartitionCount()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getQueryTypeCase().equals(other.getQueryTypeCase())) return false; + switch (queryTypeCase_) { + case 2: + if (!getStructuredQuery().equals(other.getStructuredQuery())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PARTITION_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartitionCount()); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + switch (queryTypeCase_) { + case 2: + hash = (37 * hash) + STRUCTURED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getStructuredQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.PartitionQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.PartitionQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.PartitionQueryRequest) + com.google.firestore.v1.PartitionQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.PartitionQueryRequest.class, + com.google.firestore.v1.PartitionQueryRequest.Builder.class); + } + + // Construct using com.google.firestore.v1.PartitionQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + partitionCount_ = 0L; + + pageToken_ = ""; + + pageSize_ = 0; + + queryTypeCase_ = 0; + queryType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryRequest getDefaultInstanceForType() { + return com.google.firestore.v1.PartitionQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryRequest build() { + com.google.firestore.v1.PartitionQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryRequest buildPartial() { + com.google.firestore.v1.PartitionQueryRequest result = + new com.google.firestore.v1.PartitionQueryRequest(this); + result.parent_ = parent_; + if (queryTypeCase_ == 2) { + if (structuredQueryBuilder_ == null) { + result.queryType_ = queryType_; + } else { + result.queryType_ = structuredQueryBuilder_.build(); + } + } + result.partitionCount_ = partitionCount_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.queryTypeCase_ = queryTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.PartitionQueryRequest) { + return mergeFrom((com.google.firestore.v1.PartitionQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.PartitionQueryRequest other) { + if (other == com.google.firestore.v1.PartitionQueryRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPartitionCount() != 0L) { + setPartitionCount(other.getPartitionCount()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + switch (other.getQueryTypeCase()) { + case STRUCTURED_QUERY: + { + mergeStructuredQuery(other.getStructuredQuery()); + break; + } + case QUERYTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.PartitionQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.v1.PartitionQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int queryTypeCase_ = 0; + private java.lang.Object queryType_; + + public QueryTypeCase getQueryTypeCase() { + return QueryTypeCase.forNumber(queryTypeCase_); + } + + public Builder clearQueryType() { + queryTypeCase_ = 0; + queryType_ = null; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name. In the format:
+     * `projects/{project_id}/databases/{database_id}/documents`.
+     * Document resource names are not supported; only database resource names
+     * can be specified.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name. In the format:
+     * `projects/{project_id}/databases/{database_id}/documents`.
+     * Document resource names are not supported; only database resource names
+     * can be specified.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name. In the format:
+     * `projects/{project_id}/databases/{database_id}/documents`.
+     * Document resource names are not supported; only database resource names
+     * can be specified.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name. In the format:
+     * `projects/{project_id}/databases/{database_id}/documents`.
+     * Document resource names are not supported; only database resource names
+     * can be specified.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name. In the format:
+     * `projects/{project_id}/databases/{database_id}/documents`.
+     * Document resource names are not supported; only database resource names
+     * can be specified.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder> + structuredQueryBuilder_; + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return Whether the structuredQuery field is set. + */ + @java.lang.Override + public boolean hasStructuredQuery() { + return queryTypeCase_ == 2; + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return The structuredQuery. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery getStructuredQuery() { + if (structuredQueryBuilder_ == null) { + if (queryTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery) queryType_; + } + return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } else { + if (queryTypeCase_ == 2) { + return structuredQueryBuilder_.getMessage(); + } + return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + public Builder setStructuredQuery(com.google.firestore.v1.StructuredQuery value) { + if (structuredQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryType_ = value; + onChanged(); + } else { + structuredQueryBuilder_.setMessage(value); + } + queryTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + public Builder setStructuredQuery( + com.google.firestore.v1.StructuredQuery.Builder builderForValue) { + if (structuredQueryBuilder_ == null) { + queryType_ = builderForValue.build(); + onChanged(); + } else { + structuredQueryBuilder_.setMessage(builderForValue.build()); + } + queryTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + public Builder mergeStructuredQuery(com.google.firestore.v1.StructuredQuery value) { + if (structuredQueryBuilder_ == null) { + if (queryTypeCase_ == 2 + && queryType_ != com.google.firestore.v1.StructuredQuery.getDefaultInstance()) { + queryType_ = + com.google.firestore.v1.StructuredQuery.newBuilder( + (com.google.firestore.v1.StructuredQuery) queryType_) + .mergeFrom(value) + .buildPartial(); + } else { + queryType_ = value; + } + onChanged(); + } else { + if (queryTypeCase_ == 2) { + structuredQueryBuilder_.mergeFrom(value); + } + structuredQueryBuilder_.setMessage(value); + } + queryTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + public Builder clearStructuredQuery() { + if (structuredQueryBuilder_ == null) { + if (queryTypeCase_ == 2) { + queryTypeCase_ = 0; + queryType_ = null; + onChanged(); + } + } else { + if (queryTypeCase_ == 2) { + queryTypeCase_ = 0; + queryType_ = null; + } + structuredQueryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder() { + return getStructuredQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { + if ((queryTypeCase_ == 2) && (structuredQueryBuilder_ != null)) { + return structuredQueryBuilder_.getMessageOrBuilder(); + } else { + if (queryTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery) queryType_; + } + return com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } + } + /** + * + * + *
+     * A structured query.
+     * Filters, order bys, limits, offsets, and start/end cursors are not
+     * supported.
+     * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder> + getStructuredQueryFieldBuilder() { + if (structuredQueryBuilder_ == null) { + if (!(queryTypeCase_ == 2)) { + queryType_ = com.google.firestore.v1.StructuredQuery.getDefaultInstance(); + } + structuredQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder>( + (com.google.firestore.v1.StructuredQuery) queryType_, + getParentForChildren(), + isClean()); + queryType_ = null; + } + queryTypeCase_ = 2; + onChanged(); + ; + return structuredQueryBuilder_; + } + + private long partitionCount_; + /** + * + * + *
+     * The desired maximum number of partition points.
+     * The partitions may be returned across multiple pages of results.
+     * The number must be strictly positive. The actual number of partitions
+     * returned may be fewer.
+     * For example, this may be set to one fewer than the number of parallel
+     * queries to be run, or in running a data pipeline job, one fewer than the
+     * number of workers or compute instances available.
+     * 
+ * + * int64 partition_count = 3; + * + * @return The partitionCount. + */ + @java.lang.Override + public long getPartitionCount() { + return partitionCount_; + } + /** + * + * + *
+     * The desired maximum number of partition points.
+     * The partitions may be returned across multiple pages of results.
+     * The number must be strictly positive. The actual number of partitions
+     * returned may be fewer.
+     * For example, this may be set to one fewer than the number of parallel
+     * queries to be run, or in running a data pipeline job, one fewer than the
+     * number of workers or compute instances available.
+     * 
+ * + * int64 partition_count = 3; + * + * @param value The partitionCount to set. + * @return This builder for chaining. + */ + public Builder setPartitionCount(long value) { + + partitionCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The desired maximum number of partition points.
+     * The partitions may be returned across multiple pages of results.
+     * The number must be strictly positive. The actual number of partitions
+     * returned may be fewer.
+     * For example, this may be set to one fewer than the number of parallel
+     * queries to be run, or in running a data pipeline job, one fewer than the
+     * number of workers or compute instances available.
+     * 
+ * + * int64 partition_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearPartitionCount() { + + partitionCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The `next_page_token` value returned from a previous call to
+     * PartitionQuery that may be used to get an additional set of results.
+     * There are no ordering guarantees between sets of results. Thus, using
+     * multiple sets of results will require merging the different result sets.
+     * For example, two subsequent calls using a page_token may return:
+     *  * cursor B, cursor M, cursor Q
+     *  * cursor A, cursor U, cursor W
+     * To obtain a complete result set ordered with respect to the results of the
+     * query supplied to PartitionQuery, the results sets should be merged:
+     * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+     * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The `next_page_token` value returned from a previous call to
+     * PartitionQuery that may be used to get an additional set of results.
+     * There are no ordering guarantees between sets of results. Thus, using
+     * multiple sets of results will require merging the different result sets.
+     * For example, two subsequent calls using a page_token may return:
+     *  * cursor B, cursor M, cursor Q
+     *  * cursor A, cursor U, cursor W
+     * To obtain a complete result set ordered with respect to the results of the
+     * query supplied to PartitionQuery, the results sets should be merged:
+     * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+     * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The `next_page_token` value returned from a previous call to
+     * PartitionQuery that may be used to get an additional set of results.
+     * There are no ordering guarantees between sets of results. Thus, using
+     * multiple sets of results will require merging the different result sets.
+     * For example, two subsequent calls using a page_token may return:
+     *  * cursor B, cursor M, cursor Q
+     *  * cursor A, cursor U, cursor W
+     * To obtain a complete result set ordered with respect to the results of the
+     * query supplied to PartitionQuery, the results sets should be merged:
+     * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+     * 
+ * + * string page_token = 4; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The `next_page_token` value returned from a previous call to
+     * PartitionQuery that may be used to get an additional set of results.
+     * There are no ordering guarantees between sets of results. Thus, using
+     * multiple sets of results will require merging the different result sets.
+     * For example, two subsequent calls using a page_token may return:
+     *  * cursor B, cursor M, cursor Q
+     *  * cursor A, cursor U, cursor W
+     * To obtain a complete result set ordered with respect to the results of the
+     * query supplied to PartitionQuery, the results sets should be merged:
+     * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The `next_page_token` value returned from a previous call to
+     * PartitionQuery that may be used to get an additional set of results.
+     * There are no ordering guarantees between sets of results. Thus, using
+     * multiple sets of results will require merging the different result sets.
+     * For example, two subsequent calls using a page_token may return:
+     *  * cursor B, cursor M, cursor Q
+     *  * cursor A, cursor U, cursor W
+     * To obtain a complete result set ordered with respect to the results of the
+     * query supplied to PartitionQuery, the results sets should be merged:
+     * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+     * 
+ * + * string page_token = 4; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of partitions to return in this call, subject to
+     * `partition_count`.
+     * For example, if `partition_count` = 10 and `page_size` = 8, the first call
+     * to PartitionQuery will return up to 8 partitions and a `next_page_token`
+     * if more results exist. A second call to PartitionQuery will return up to
+     * 2 partitions, to complete the total of 10 specified in `partition_count`.
+     * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of partitions to return in this call, subject to
+     * `partition_count`.
+     * For example, if `partition_count` = 10 and `page_size` = 8, the first call
+     * to PartitionQuery will return up to 8 partitions and a `next_page_token`
+     * if more results exist. A second call to PartitionQuery will return up to
+     * 2 partitions, to complete the total of 10 specified in `partition_count`.
+     * 
+ * + * int32 page_size = 5; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of partitions to return in this call, subject to
+     * `partition_count`.
+     * For example, if `partition_count` = 10 and `page_size` = 8, the first call
+     * to PartitionQuery will return up to 8 partitions and a `next_page_token`
+     * if more results exist. A second call to PartitionQuery will return up to
+     * 2 partitions, to complete the total of 10 specified in `partition_count`.
+     * 
+ * + * int32 page_size = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.PartitionQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.PartitionQueryRequest) + private static final com.google.firestore.v1.PartitionQueryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.PartitionQueryRequest(); + } + + public static com.google.firestore.v1.PartitionQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartitionQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java new file mode 100644 index 000000000..ea95a0f81 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +public interface PartitionQueryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.PartitionQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name. In the format:
+   * `projects/{project_id}/databases/{database_id}/documents`.
+   * Document resource names are not supported; only database resource names
+   * can be specified.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name. In the format:
+   * `projects/{project_id}/databases/{database_id}/documents`.
+   * Document resource names are not supported; only database resource names
+   * can be specified.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return Whether the structuredQuery field is set. + */ + boolean hasStructuredQuery(); + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + * + * @return The structuredQuery. + */ + com.google.firestore.v1.StructuredQuery getStructuredQuery(); + /** + * + * + *
+   * A structured query.
+   * Filters, order bys, limits, offsets, and start/end cursors are not
+   * supported.
+   * 
+ * + * .google.firestore.v1.StructuredQuery structured_query = 2; + */ + com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder(); + + /** + * + * + *
+   * The desired maximum number of partition points.
+   * The partitions may be returned across multiple pages of results.
+   * The number must be strictly positive. The actual number of partitions
+   * returned may be fewer.
+   * For example, this may be set to one fewer than the number of parallel
+   * queries to be run, or in running a data pipeline job, one fewer than the
+   * number of workers or compute instances available.
+   * 
+ * + * int64 partition_count = 3; + * + * @return The partitionCount. + */ + long getPartitionCount(); + + /** + * + * + *
+   * The `next_page_token` value returned from a previous call to
+   * PartitionQuery that may be used to get an additional set of results.
+   * There are no ordering guarantees between sets of results. Thus, using
+   * multiple sets of results will require merging the different result sets.
+   * For example, two subsequent calls using a page_token may return:
+   *  * cursor B, cursor M, cursor Q
+   *  * cursor A, cursor U, cursor W
+   * To obtain a complete result set ordered with respect to the results of the
+   * query supplied to PartitionQuery, the results sets should be merged:
+   * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The `next_page_token` value returned from a previous call to
+   * PartitionQuery that may be used to get an additional set of results.
+   * There are no ordering guarantees between sets of results. Thus, using
+   * multiple sets of results will require merging the different result sets.
+   * For example, two subsequent calls using a page_token may return:
+   *  * cursor B, cursor M, cursor Q
+   *  * cursor A, cursor U, cursor W
+   * To obtain a complete result set ordered with respect to the results of the
+   * query supplied to PartitionQuery, the results sets should be merged:
+   * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The maximum number of partitions to return in this call, subject to
+   * `partition_count`.
+   * For example, if `partition_count` = 10 and `page_size` = 8, the first call
+   * to PartitionQuery will return up to 8 partitions and a `next_page_token`
+   * if more results exist. A second call to PartitionQuery will return up to
+   * 2 partitions, to complete the total of 10 specified in `partition_count`.
+   * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + int getPageSize(); + + public com.google.firestore.v1.PartitionQueryRequest.QueryTypeCase getQueryTypeCase(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java new file mode 100644 index 000000000..04766aff5 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponse.java @@ -0,0 +1,1391 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +/** + * + * + *
+ * The response for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].
+ * 
+ * + * Protobuf type {@code google.firestore.v1.PartitionQueryResponse} + */ +public final class PartitionQueryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.PartitionQueryResponse) + PartitionQueryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PartitionQueryResponse.newBuilder() to construct. + private PartitionQueryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PartitionQueryResponse() { + partitions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionQueryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PartitionQueryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + partitions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + partitions_.add( + input.readMessage(com.google.firestore.v1.Cursor.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + partitions_ = java.util.Collections.unmodifiableList(partitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.PartitionQueryResponse.class, + com.google.firestore.v1.PartitionQueryResponse.Builder.class); + } + + public static final int PARTITIONS_FIELD_NUMBER = 1; + private java.util.List partitions_; + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + @java.lang.Override + public java.util.List getPartitionsList() { + return partitions_; + } + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + @java.lang.Override + public java.util.List + getPartitionsOrBuilderList() { + return partitions_; + } + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + @java.lang.Override + public int getPartitionsCount() { + return partitions_.size(); + } + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + @java.lang.Override + public com.google.firestore.v1.Cursor getPartitions(int index) { + return partitions_.get(index); + } + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + @java.lang.Override + public com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index) { + return partitions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A page token that may be used to request an additional set of results, up
+   * to the number specified by `partition_count` in the PartitionQuery request.
+   * If blank, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token that may be used to request an additional set of results, up
+   * to the number specified by `partition_count` in the PartitionQuery request.
+   * If blank, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < partitions_.size(); i++) { + output.writeMessage(1, partitions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < partitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, partitions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.firestore.v1.PartitionQueryResponse)) { + return super.equals(obj); + } + com.google.firestore.v1.PartitionQueryResponse other = + (com.google.firestore.v1.PartitionQueryResponse) obj; + + if (!getPartitionsList().equals(other.getPartitionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPartitionsCount() > 0) { + hash = (37 * hash) + PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getPartitionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.PartitionQueryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.firestore.v1.PartitionQueryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].
+   * 
+ * + * Protobuf type {@code google.firestore.v1.PartitionQueryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.PartitionQueryResponse) + com.google.firestore.v1.PartitionQueryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.PartitionQueryResponse.class, + com.google.firestore.v1.PartitionQueryResponse.Builder.class); + } + + // Construct using com.google.firestore.v1.PartitionQueryResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (partitionsBuilder_ == null) { + partitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + partitionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.FirestoreProto + .internal_static_google_firestore_v1_PartitionQueryResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryResponse getDefaultInstanceForType() { + return com.google.firestore.v1.PartitionQueryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryResponse build() { + com.google.firestore.v1.PartitionQueryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryResponse buildPartial() { + com.google.firestore.v1.PartitionQueryResponse result = + new com.google.firestore.v1.PartitionQueryResponse(this); + int from_bitField0_ = bitField0_; + if (partitionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + partitions_ = java.util.Collections.unmodifiableList(partitions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.partitions_ = partitions_; + } else { + result.partitions_ = partitionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.PartitionQueryResponse) { + return mergeFrom((com.google.firestore.v1.PartitionQueryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.PartitionQueryResponse other) { + if (other == com.google.firestore.v1.PartitionQueryResponse.getDefaultInstance()) return this; + if (partitionsBuilder_ == null) { + if (!other.partitions_.isEmpty()) { + if (partitions_.isEmpty()) { + partitions_ = other.partitions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePartitionsIsMutable(); + partitions_.addAll(other.partitions_); + } + onChanged(); + } + } else { + if (!other.partitions_.isEmpty()) { + if (partitionsBuilder_.isEmpty()) { + partitionsBuilder_.dispose(); + partitionsBuilder_ = null; + partitions_ = other.partitions_; + bitField0_ = (bitField0_ & ~0x00000001); + partitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartitionsFieldBuilder() + : null; + } else { + partitionsBuilder_.addAllMessages(other.partitions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.PartitionQueryResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.v1.PartitionQueryResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List partitions_ = + java.util.Collections.emptyList(); + + private void ensurePartitionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + partitions_ = new java.util.ArrayList(partitions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Cursor, + com.google.firestore.v1.Cursor.Builder, + com.google.firestore.v1.CursorOrBuilder> + partitionsBuilder_; + + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public java.util.List getPartitionsList() { + if (partitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partitions_); + } else { + return partitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public int getPartitionsCount() { + if (partitionsBuilder_ == null) { + return partitions_.size(); + } else { + return partitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public com.google.firestore.v1.Cursor getPartitions(int index) { + if (partitionsBuilder_ == null) { + return partitions_.get(index); + } else { + return partitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder setPartitions(int index, com.google.firestore.v1.Cursor value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.set(index, value); + onChanged(); + } else { + partitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder setPartitions( + int index, com.google.firestore.v1.Cursor.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.set(index, builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder addPartitions(com.google.firestore.v1.Cursor value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.add(value); + onChanged(); + } else { + partitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder addPartitions(int index, com.google.firestore.v1.Cursor value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.add(index, value); + onChanged(); + } else { + partitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder addPartitions(com.google.firestore.v1.Cursor.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.add(builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder addPartitions( + int index, com.google.firestore.v1.Cursor.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.add(index, builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder addAllPartitions( + java.lang.Iterable values) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partitions_); + onChanged(); + } else { + partitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder clearPartitions() { + if (partitionsBuilder_ == null) { + partitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + partitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public Builder removePartitions(int index) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.remove(index); + onChanged(); + } else { + partitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public com.google.firestore.v1.Cursor.Builder getPartitionsBuilder(int index) { + return getPartitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index) { + if (partitionsBuilder_ == null) { + return partitions_.get(index); + } else { + return partitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public java.util.List + getPartitionsOrBuilderList() { + if (partitionsBuilder_ != null) { + return partitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partitions_); + } + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public com.google.firestore.v1.Cursor.Builder addPartitionsBuilder() { + return getPartitionsFieldBuilder() + .addBuilder(com.google.firestore.v1.Cursor.getDefaultInstance()); + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public com.google.firestore.v1.Cursor.Builder addPartitionsBuilder(int index) { + return getPartitionsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Cursor.getDefaultInstance()); + } + /** + * + * + *
+     * Partition results.
+     * Each partition is a split point that can be used by RunQuery as a starting
+     * or end point for the query results. The RunQuery requests must be made with
+     * the same query supplied to this PartitionQuery request. The partition
+     * cursors will be ordered according to same ordering as the results of the
+     * query supplied to PartitionQuery.
+     * For example, if a PartitionQuery request returns partition cursors A and B,
+     * running the following three queries will return the entire result set of
+     * the original query:
+     *  * query, end_at A
+     *  * query, start_at A, end_at B
+     *  * query, start_at B
+     * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + public java.util.List getPartitionsBuilderList() { + return getPartitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Cursor, + com.google.firestore.v1.Cursor.Builder, + com.google.firestore.v1.CursorOrBuilder> + getPartitionsFieldBuilder() { + if (partitionsBuilder_ == null) { + partitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Cursor, + com.google.firestore.v1.Cursor.Builder, + com.google.firestore.v1.CursorOrBuilder>( + partitions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + partitions_ = null; + } + return partitionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A page token that may be used to request an additional set of results, up
+     * to the number specified by `partition_count` in the PartitionQuery request.
+     * If blank, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request an additional set of results, up
+     * to the number specified by `partition_count` in the PartitionQuery request.
+     * If blank, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token that may be used to request an additional set of results, up
+     * to the number specified by `partition_count` in the PartitionQuery request.
+     * If blank, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request an additional set of results, up
+     * to the number specified by `partition_count` in the PartitionQuery request.
+     * If blank, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token that may be used to request an additional set of results, up
+     * to the number specified by `partition_count` in the PartitionQuery request.
+     * If blank, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.firestore.v1.PartitionQueryResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.v1.PartitionQueryResponse) + private static final com.google.firestore.v1.PartitionQueryResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.PartitionQueryResponse(); + } + + public static com.google.firestore.v1.PartitionQueryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionQueryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartitionQueryResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.firestore.v1.PartitionQueryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java new file mode 100644 index 000000000..c6ab160b7 --- /dev/null +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/PartitionQueryResponseOrBuilder.java @@ -0,0 +1,160 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1/firestore.proto + +package com.google.firestore.v1; + +public interface PartitionQueryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.PartitionQueryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + java.util.List getPartitionsList(); + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + com.google.firestore.v1.Cursor getPartitions(int index); + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + int getPartitionsCount(); + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + java.util.List getPartitionsOrBuilderList(); + /** + * + * + *
+   * Partition results.
+   * Each partition is a split point that can be used by RunQuery as a starting
+   * or end point for the query results. The RunQuery requests must be made with
+   * the same query supplied to this PartitionQuery request. The partition
+   * cursors will be ordered according to same ordering as the results of the
+   * query supplied to PartitionQuery.
+   * For example, if a PartitionQuery request returns partition cursors A and B,
+   * running the following three queries will return the entire result set of
+   * the original query:
+   *  * query, end_at A
+   *  * query, start_at A, end_at B
+   *  * query, start_at B
+   * 
+ * + * repeated .google.firestore.v1.Cursor partitions = 1; + */ + com.google.firestore.v1.CursorOrBuilder getPartitionsOrBuilder(int index); + + /** + * + * + *
+   * A page token that may be used to request an additional set of results, up
+   * to the number specified by `partition_count` in the PartitionQuery request.
+   * If blank, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A page token that may be used to request an additional set of results, up
+   * to the number specified by `partition_count` in the PartitionQuery request.
+   * If blank, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java index 6d62c83f5..ec3d8ebc5 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Precondition.java @@ -183,6 +183,7 @@ public ConditionTypeCase getConditionTypeCase() { * * @return The exists. */ + @java.lang.Override public boolean getExists() { if (conditionTypeCase_ == 1) { return (java.lang.Boolean) conditionType_; @@ -203,6 +204,7 @@ public boolean getExists() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } @@ -218,6 +220,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { if (conditionTypeCase_ == 2) { return (com.google.protobuf.Timestamp) conditionType_; @@ -234,6 +237,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (conditionTypeCase_ == 2) { return (com.google.protobuf.Timestamp) conditionType_; @@ -695,6 +699,7 @@ public Builder clearExists() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } @@ -710,6 +715,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { if (conditionTypeCase_ == 2) { @@ -847,6 +853,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * .google.protobuf.Timestamp update_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if ((conditionTypeCase_ == 2) && (updateTimeBuilder_ != null)) { return updateTimeBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java index d4d5e4c82..a41a3cb97 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/QueryProto.java @@ -47,10 +47,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_StructuredQuery_FieldFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_StructuredQuery_FieldFilter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -63,6 +59,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_v1_Cursor_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -113,19 +113,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "AN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GREATER_" + "THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t\n\005EQU" + "AL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\022\006\n\002IN\020\010\022\026\n\022ARRA" - + "Y_CONTAINS_ANY\020\t\032Q\n\nProjection\022C\n\006fields" - + "\030\002 \003(\01323.google.firestore.v1.StructuredQ" - + "uery.FieldReference\032\351\001\n\013UnaryFilter\022E\n\002o" - + "p\030\001 \001(\01629.google.firestore.v1.Structured" - + "Query.UnaryFilter.Operator\022D\n\005field\030\002 \001(" - + "\01323.google.firestore.v1.StructuredQuery." - + "FieldReferenceH\000\"=\n\010Operator\022\030\n\024OPERATOR" - + "_UNSPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NULL\020\003B" - + "\016\n\014operand_type\032$\n\016FieldReference\022\022\n\nfie" - + "ld_path\030\002 \001(\t\032\216\001\n\005Order\022B\n\005field\030\001 \001(\01323" + + "Y_CONTAINS_ANY\020\t\032\351\001\n\013UnaryFilter\022E\n\002op\030\001" + + " \001(\01629.google.firestore.v1.StructuredQue" + + "ry.UnaryFilter.Operator\022D\n\005field\030\002 \001(\01323" + ".google.firestore.v1.StructuredQuery.Fie" - + "ldReference\022A\n\tdirection\030\002 \001(\0162..google." - + "firestore.v1.StructuredQuery.Direction\"E" + + "ldReferenceH\000\"=\n\010Operator\022\030\n\024OPERATOR_UN" + + "SPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NULL\020\003B\016\n\014" + + "operand_type\032$\n\016FieldReference\022\022\n\nfield_" + + "path\030\002 \001(\t\032\216\001\n\005Order\022B\n\005field\030\001 \001(\01323.go" + + "ogle.firestore.v1.StructuredQuery.FieldR" + + "eference\022A\n\tdirection\030\002 \001(\0162..google.fir" + + "estore.v1.StructuredQuery.Direction\032Q\n\nP" + + "rojection\022C\n\006fields\030\002 \003(\01323.google.fires" + + "tore.v1.StructuredQuery.FieldReference\"E" + "\n\tDirection\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\r" + "\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"D\n\006Cursor\022" + "*\n\006values\030\001 \003(\0132\032.google.firestore.v1.Va" @@ -183,16 +183,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Field", "Op", "Value", }); - internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor = - internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(4); - internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor, - new java.lang.String[] { - "Fields", - }); internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor = - internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(5); + internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(4); internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor, @@ -200,7 +192,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Op", "Field", "OperandType", }); internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor = - internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(6); + internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(5); internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor, @@ -208,13 +200,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FieldPath", }); internal_static_google_firestore_v1_StructuredQuery_Order_descriptor = - internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(7); + internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(6); internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_v1_StructuredQuery_Order_descriptor, new java.lang.String[] { "Field", "Direction", }); + internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor = + internal_static_google_firestore_v1_StructuredQuery_descriptor.getNestedTypes().get(7); + internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor, + new java.lang.String[] { + "Fields", + }); internal_static_google_firestore_v1_Cursor_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_firestore_v1_Cursor_fieldAccessorTable = diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java index 60574f453..c80cb68ff 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RollbackRequest.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -154,6 +155,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -179,6 +181,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -636,6 +639,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java index 2a1364bc8..1372dddf5 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequest.java @@ -278,6 +278,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -305,6 +306,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -329,6 +331,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -343,6 +346,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery getStructuredQuery() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery) queryType_; @@ -358,6 +362,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { * * .google.firestore.v1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery) queryType_; @@ -377,6 +382,7 @@ public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuil * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -399,6 +405,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } @@ -416,6 +423,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions getNewTransaction() { if (consistencySelectorCase_ == 6) { return (com.google.firestore.v1.TransactionOptions) consistencySelector_; @@ -434,6 +442,7 @@ public com.google.firestore.v1.TransactionOptions getNewTransaction() { * * .google.firestore.v1.TransactionOptions new_transaction = 6; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if (consistencySelectorCase_ == 6) { return (com.google.firestore.v1.TransactionOptions) consistencySelector_; @@ -447,13 +456,14 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -462,13 +472,14 @@ public boolean hasReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -480,11 +491,12 @@ public com.google.protobuf.Timestamp getReadTime() { * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1122,6 +1134,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1136,6 +1149,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery getStructuredQuery() { if (structuredQueryBuilder_ == null) { if (queryTypeCase_ == 2) { @@ -1268,6 +1282,7 @@ public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder * * .google.firestore.v1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if ((queryTypeCase_ == 2) && (structuredQueryBuilder_ != null)) { return structuredQueryBuilder_.getMessageOrBuilder(); @@ -1389,6 +1404,7 @@ public Builder clearTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } @@ -1406,6 +1422,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions getNewTransaction() { if (newTransactionBuilder_ == null) { if (consistencySelectorCase_ == 6) { @@ -1557,6 +1574,7 @@ public com.google.firestore.v1.TransactionOptions.Builder getNewTransactionBuild * * .google.firestore.v1.TransactionOptions new_transaction = 6; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if ((consistencySelectorCase_ == 6) && (newTransactionBuilder_ != null)) { return newTransactionBuilder_.getMessageOrBuilder(); @@ -1614,13 +1632,14 @@ public com.google.firestore.v1.TransactionOptionsOrBuilder getNewTransactionOrBu * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -1629,13 +1648,14 @@ public boolean hasReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 7) { @@ -1654,7 +1674,7 @@ public com.google.protobuf.Timestamp getReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1677,7 +1697,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1697,7 +1717,7 @@ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1729,7 +1749,7 @@ public Builder mergeReadTime(com.google.protobuf.Timestamp value) { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1755,7 +1775,7 @@ public Builder clearReadTime() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; @@ -1768,11 +1788,12 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -1788,7 +1809,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * *
      * Reads documents as they were at the given time.
-     * This may not be older than 60 seconds.
+     * This may not be older than 270 seconds.
      * 
* * .google.protobuf.Timestamp read_time = 7; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java index ca54f6591..c34cb4767 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryRequestOrBuilder.java @@ -155,7 +155,7 @@ public interface RunQueryRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; @@ -168,7 +168,7 @@ public interface RunQueryRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; @@ -181,7 +181,7 @@ public interface RunQueryRequestOrBuilder * *
    * Reads documents as they were at the given time.
-   * This may not be older than 60 seconds.
+   * This may not be older than 270 seconds.
    * 
* * .google.protobuf.Timestamp read_time = 7; diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java index 48c303e6b..afa5d3fbc 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/RunQueryResponse.java @@ -160,6 +160,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -178,6 +179,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -193,6 +195,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } @@ -206,6 +209,7 @@ public com.google.firestore.v1.Document getDocument() { * * .google.firestore.v1.Document document = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -228,6 +232,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -247,6 +252,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -264,6 +270,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -282,6 +289,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The skippedResults. */ + @java.lang.Override public int getSkippedResults() { return skippedResults_; } @@ -686,6 +694,7 @@ public Builder mergeFrom( * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -1165,6 +1174,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The skippedResults. */ + @java.lang.Override public int getSkippedResults() { return skippedResults_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java index 6a6867192..e4dd48011 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/StructuredQuery.java @@ -341,6 +341,10 @@ public Direction findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -532,6 +536,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -555,6 +560,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -582,6 +588,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The allDescendants. */ + @java.lang.Override public boolean getAllDescendants() { return allDescendants_; } @@ -1051,6 +1058,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { * * @return The allDescendants. */ + @java.lang.Override public boolean getAllDescendants() { return allDescendants_; } @@ -1465,6 +1473,7 @@ public FilterTypeCase getFilterTypeCase() { * * @return Whether the compositeFilter field is set. */ + @java.lang.Override public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } @@ -1479,6 +1488,7 @@ public boolean hasCompositeFilter() { * * @return The compositeFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilter() { if (filterTypeCase_ == 1) { return (com.google.firestore.v1.StructuredQuery.CompositeFilter) filterType_; @@ -1494,6 +1504,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte * * .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilterOrBuilder getCompositeFilterOrBuilder() { if (filterTypeCase_ == 1) { @@ -1514,6 +1525,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilte * * @return Whether the fieldFilter field is set. */ + @java.lang.Override public boolean hasFieldFilter() { return filterTypeCase_ == 2; } @@ -1528,6 +1540,7 @@ public boolean hasFieldFilter() { * * @return The fieldFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter() { if (filterTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery.FieldFilter) filterType_; @@ -1543,6 +1556,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter() { * * .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder getFieldFilterOrBuilder() { if (filterTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery.FieldFilter) filterType_; @@ -1562,6 +1576,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder getFieldFilt * * @return Whether the unaryFilter field is set. */ + @java.lang.Override public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } @@ -1576,6 +1591,7 @@ public boolean hasUnaryFilter() { * * @return The unaryFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter() { if (filterTypeCase_ == 3) { return (com.google.firestore.v1.StructuredQuery.UnaryFilter) filterType_; @@ -1591,6 +1607,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter() { * * .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.UnaryFilterOrBuilder getUnaryFilterOrBuilder() { if (filterTypeCase_ == 3) { return (com.google.firestore.v1.StructuredQuery.UnaryFilter) filterType_; @@ -2033,6 +2050,7 @@ public Builder clearFilterType() { * * @return Whether the compositeFilter field is set. */ + @java.lang.Override public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } @@ -2047,6 +2065,7 @@ public boolean hasCompositeFilter() { * * @return The compositeFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilter getCompositeFilter() { if (compositeFilterBuilder_ == null) { if (filterTypeCase_ == 1) { @@ -2183,6 +2202,7 @@ public Builder clearCompositeFilter() { * * .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilterOrBuilder getCompositeFilterOrBuilder() { if ((filterTypeCase_ == 1) && (compositeFilterBuilder_ != null)) { @@ -2245,6 +2265,7 @@ public Builder clearCompositeFilter() { * * @return Whether the fieldFilter field is set. */ + @java.lang.Override public boolean hasFieldFilter() { return filterTypeCase_ == 2; } @@ -2259,6 +2280,7 @@ public boolean hasFieldFilter() { * * @return The fieldFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilter getFieldFilter() { if (fieldFilterBuilder_ == null) { if (filterTypeCase_ == 2) { @@ -2392,6 +2414,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilte * * .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilterOrBuilder getFieldFilterOrBuilder() { if ((filterTypeCase_ == 2) && (fieldFilterBuilder_ != null)) { @@ -2453,6 +2476,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Builder getFieldFilte * * @return Whether the unaryFilter field is set. */ + @java.lang.Override public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } @@ -2467,6 +2491,7 @@ public boolean hasUnaryFilter() { * * @return The unaryFilter. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.UnaryFilter getUnaryFilter() { if (unaryFilterBuilder_ == null) { if (filterTypeCase_ == 3) { @@ -2600,6 +2625,7 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder getUnaryFilte * * .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.UnaryFilterOrBuilder getUnaryFilterOrBuilder() { if ((filterTypeCase_ == 3) && (unaryFilterBuilder_ != null)) { @@ -2994,6 +3020,10 @@ public Operator findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -3041,6 +3071,7 @@ private Operator(int value) { * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -3055,6 +3086,7 @@ public int getOpValue() { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator result = @@ -3076,6 +3108,7 @@ public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() * * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public java.util.List getFiltersList() { return filters_; } @@ -3089,6 +3122,7 @@ public java.util.List getFilters * * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public java.util.List getFiltersOrBuilderList() { return filters_; @@ -3103,6 +3137,7 @@ public java.util.List getFilters * * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public int getFiltersCount() { return filters_.size(); } @@ -3116,6 +3151,7 @@ public int getFiltersCount() { * * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.Filter getFilters(int index) { return filters_.get(index); } @@ -3129,6 +3165,7 @@ public com.google.firestore.v1.StructuredQuery.Filter getFilters(int index) { * * repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getFiltersOrBuilder(int index) { return filters_.get(index); } @@ -3529,6 +3566,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -3545,6 +3583,7 @@ public int getOpValue() { * @return This builder for chaining. */ public Builder setOpValue(int value) { + op_ = value; onChanged(); return this; @@ -3560,6 +3599,7 @@ public Builder setOpValue(int value) { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1.StructuredQuery.CompositeFilter.Operator result = @@ -4278,7 +4318,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Less than. Requires that the field come first in `order_by`.
+       * The given `field` is less than the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * LESS_THAN = 1; @@ -4288,7 +4330,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Less than or equal. Requires that the field come first in `order_by`.
+       * The given `field` is less than or equal to the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * LESS_THAN_OR_EQUAL = 2; @@ -4298,7 +4342,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Greater than. Requires that the field come first in `order_by`.
+       * The given `field` is greater than the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * GREATER_THAN = 3; @@ -4308,8 +4354,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Greater than or equal. Requires that the field come first in
-       * `order_by`.
+       * The given `field` is greater than or equal to the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * GREATER_THAN_OR_EQUAL = 4; @@ -4319,7 +4366,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Equal.
+       * The given `field` is equal to the given `value`.
        * 
* * EQUAL = 5; @@ -4329,7 +4376,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Contains. Requires that the field is an array.
+       * The given `field` is an array that contains the given `value`.
        * 
* * ARRAY_CONTAINS = 7; @@ -4339,8 +4386,10 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * In. Requires that `value` is a non-empty ArrayValue with at most 10
-       * values.
+       * The given `field` is equal to at least one value in the given array.
+       * Requires:
+       * * That `value` is a non-empty `ArrayValue` with at most 10 values.
+       * * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`.
        * 
* * IN = 8; @@ -4350,8 +4399,11 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Contains any. Requires that the field is an array and
-       * `value` is a non-empty ArrayValue with at most 10 values.
+       * The given `field` is an array that contains any of the values in the
+       * given array.
+       * Requires:
+       * * That `value` is a non-empty `ArrayValue` with at most 10 values.
+       * * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`.
        * 
* * ARRAY_CONTAINS_ANY = 9; @@ -4374,7 +4426,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Less than. Requires that the field come first in `order_by`.
+       * The given `field` is less than the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * LESS_THAN = 1; @@ -4384,7 +4438,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Less than or equal. Requires that the field come first in `order_by`.
+       * The given `field` is less than or equal to the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * LESS_THAN_OR_EQUAL = 2; @@ -4394,7 +4450,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Greater than. Requires that the field come first in `order_by`.
+       * The given `field` is greater than the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * GREATER_THAN = 3; @@ -4404,8 +4462,9 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Greater than or equal. Requires that the field come first in
-       * `order_by`.
+       * The given `field` is greater than or equal to the given `value`.
+       * Requires:
+       * * That `field` come first in `order_by`.
        * 
* * GREATER_THAN_OR_EQUAL = 4; @@ -4415,7 +4474,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Equal.
+       * The given `field` is equal to the given `value`.
        * 
* * EQUAL = 5; @@ -4425,7 +4484,7 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Contains. Requires that the field is an array.
+       * The given `field` is an array that contains the given `value`.
        * 
* * ARRAY_CONTAINS = 7; @@ -4435,8 +4494,10 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * In. Requires that `value` is a non-empty ArrayValue with at most 10
-       * values.
+       * The given `field` is equal to at least one value in the given array.
+       * Requires:
+       * * That `value` is a non-empty `ArrayValue` with at most 10 values.
+       * * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`.
        * 
* * IN = 8; @@ -4446,8 +4507,11 @@ public enum Operator implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Contains any. Requires that the field is an array and
-       * `value` is a non-empty ArrayValue with at most 10 values.
+       * The given `field` is an array that contains any of the values in the
+       * given array.
+       * Requires:
+       * * That `value` is a non-empty `ArrayValue` with at most 10 values.
+       * * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`.
        * 
* * ARRAY_CONTAINS_ANY = 9; @@ -4513,6 +4577,10 @@ public Operator findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -4560,6 +4628,7 @@ private Operator(int value) { * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return field_ != null; } @@ -4574,6 +4643,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldReference getField() { return field_ == null ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() @@ -4588,6 +4658,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReference getField() { * * .google.firestore.v1.StructuredQuery.FieldReference field = 1; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { return getField(); } @@ -4605,6 +4676,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -4619,6 +4691,7 @@ public int getOpValue() { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1.StructuredQuery.FieldFilter.Operator result = @@ -4641,6 +4714,7 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { * * @return Whether the value field is set. */ + @java.lang.Override public boolean hasValue() { return value_ != null; } @@ -4655,6 +4729,7 @@ public boolean hasValue() { * * @return The value. */ + @java.lang.Override public com.google.firestore.v1.Value getValue() { return value_ == null ? com.google.firestore.v1.Value.getDefaultInstance() : value_; } @@ -4667,6 +4742,7 @@ public com.google.firestore.v1.Value getValue() { * * .google.firestore.v1.Value value = 3; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getValueOrBuilder() { return getValue(); } @@ -5251,6 +5327,7 @@ public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldO * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -5267,6 +5344,7 @@ public int getOpValue() { * @return This builder for chaining. */ public Builder setOpValue(int value) { + op_ = value; onChanged(); return this; @@ -5282,6 +5360,7 @@ public Builder setOpValue(int value) { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FieldFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1.StructuredQuery.FieldFilter.Operator result = @@ -5560,100 +5639,100 @@ public com.google.firestore.v1.StructuredQuery.FieldFilter getDefaultInstanceFor } } - public interface ProjectionOrBuilder + public interface UnaryFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Projection) + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.UnaryFilter) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * The unary operator to apply.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return The enum numeric value on the wire for op. */ - java.util.List getFieldsList(); + int getOpValue(); /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * The unary operator to apply.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return The op. */ - com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index); + com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp(); + /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * The field to which to apply the operator.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return Whether the field field is set. */ - int getFieldsCount(); + boolean hasField(); /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * The field to which to apply the operator.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return The field. */ - java.util.List - getFieldsOrBuilderList(); + com.google.firestore.v1.StructuredQuery.FieldReference getField(); /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * The field to which to apply the operator.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder(int index); + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + public com.google.firestore.v1.StructuredQuery.UnaryFilter.OperandTypeCase getOperandTypeCase(); } /** * * *
-   * The projection of document's fields to return.
+   * A filter with a single operand.
    * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Projection} + * Protobuf type {@code google.firestore.v1.StructuredQuery.UnaryFilter} */ - public static final class Projection extends com.google.protobuf.GeneratedMessageV3 + public static final class UnaryFilter extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Projection) - ProjectionOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.UnaryFilter) + UnaryFilterOrBuilder { private static final long serialVersionUID = 0L; - // Use Projection.newBuilder() to construct. - private Projection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UnaryFilter.newBuilder() to construct. + private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Projection() { - fields_ = java.util.Collections.emptyList(); + private UnaryFilter() { + op_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Projection(); + return new UnaryFilter(); } @java.lang.Override @@ -5661,7 +5740,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Projection( + private UnaryFilter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5669,7 +5748,6 @@ private Projection( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -5680,18 +5758,31 @@ private Projection( case 0: done = true; break; + case 8: + { + int rawValue = input.readEnum(); + + op_ = rawValue; + break; + } case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList< - com.google.firestore.v1.StructuredQuery.FieldReference>(); - mutable_bitField0_ |= 0x00000001; + com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; + if (operandTypeCase_ == 2) { + subBuilder = + ((com.google.firestore.v1.StructuredQuery.FieldReference) operandType_) + .toBuilder(); } - fields_.add( + operandType_ = input.readMessage( com.google.firestore.v1.StructuredQuery.FieldReference.parser(), - extensionRegistry)); + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); + operandType_ = subBuilder.buildPartial(); + } + operandTypeCase_ = 2; break; } default: @@ -5708,9 +5799,6 @@ private Projection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -5718,370 +5806,610 @@ private Projection( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Projection.class, - com.google.firestore.v1.StructuredQuery.Projection.Builder.class); + com.google.firestore.v1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder.class); } - public static final int FIELDS_FIELD_NUMBER = 2; - private java.util.List fields_; - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List getFieldsList() { - return fields_; - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsOrBuilderList() { - return fields_; - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public int getFieldsCount() { - return fields_.size(); - } - /** - * - * - *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
-     * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index) { - return fields_.get(index); - } /** * * *
-     * The fields to return.
-     * If empty, all fields are returned. To only return the name
-     * of the document, use `['__name__']`.
+     * A unary operator.
      * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * Protobuf enum {@code google.firestore.v1.StructuredQuery.UnaryFilter.Operator} */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(2, fields_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified. This value must not be used.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + OPERATOR_UNSPECIFIED(0), + /** + * + * + *
+       * The given `field` is equal to `NaN`.
+       * 
+ * + * IS_NAN = 2; + */ + IS_NAN(2), + /** + * + * + *
+       * The given `field` is equal to `NULL`.
+       * 
+ * + * IS_NULL = 3; + */ + IS_NULL(3), + UNRECOGNIZED(-1), + ; - size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); + /** + * + * + *
+       * Unspecified. This value must not be used.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The given `field` is equal to `NaN`.
+       * 
+ * + * IS_NAN = 2; + */ + public static final int IS_NAN_VALUE = 2; + /** + * + * + *
+       * The given `field` is equal to `NULL`.
+       * 
+ * + * IS_NULL = 3; + */ + public static final int IS_NULL_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Operator valueOf(int value) { + return forNumber(value); } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Projection)) { - return super.equals(obj); + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Operator forNumber(int value) { + switch (value) { + case 0: + return OPERATOR_UNSPECIFIED; + case 2: + return IS_NAN; + case 3: + return IS_NULL; + default: + return null; + } } - com.google.firestore.v1.StructuredQuery.Projection other = - (com.google.firestore.v1.StructuredQuery.Projection) obj; - if (!getFieldsList().equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Operator findValueByNumber(int number) { + return Operator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDescriptor() + .getEnumTypes() + .get(0); + } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private static final Operator[] VALUES = values(); - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static Operator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private final int value; - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private Operator(int value) { + this.value = value; + } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + // @@protoc_insertion_point(enum_scope:google.firestore.v1.StructuredQuery.UnaryFilter.Operator) } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private int operandTypeCase_ = 0; + private java.lang.Object operandType_; - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } + public enum OperandTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIELD(2), + OPERANDTYPE_NOT_SET(0); + private final int value; - public static com.google.firestore.v1.StructuredQuery.Projection parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + private OperandTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OperandTypeCase valueOf(int value) { + return forNumber(value); + } - public static com.google.firestore.v1.StructuredQuery.Projection parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public static OperandTypeCase forNumber(int value) { + switch (value) { + case 2: + return FIELD; + case 0: + return OPERANDTYPE_NOT_SET; + default: + return null; + } + } - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + public int getNumber() { + return this.value; + } + }; + + public OperandTypeCase getOperandTypeCase() { + return OperandTypeCase.forNumber(operandTypeCase_); } + public static final int OP_FIELD_NUMBER = 1; + private int op_; + /** + * + * + *
+     * The unary operator to apply.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return The enum numeric value on the wire for op. + */ @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + public int getOpValue() { + return op_; } - - public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Projection prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
+     * The unary operator to apply.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return The op. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator result = + com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); + return result == null + ? com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED + : result; } + public static final int FIELD_FIELD_NUMBER = 2; + /** + * + * + *
+     * The field to which to apply the operator.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return Whether the field field is set. + */ @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public boolean hasField() { + return operandTypeCase_ == 2; } - + /** + * + * + *
+     * The field to which to apply the operator.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return The field. + */ @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } /** * * *
-     * The projection of document's fields to return.
+     * The field to which to apply the operator.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Projection} + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Projection) - com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; } + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Projection.class, - com.google.firestore.v1.StructuredQuery.Projection.Builder.class); - } + private byte memoizedIsInitialized = -1; - // Construct using com.google.firestore.v1.StructuredQuery.Projection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + memoizedIsInitialized = 1; + return true; + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (op_ + != com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, op_); } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } - return this; + if (operandTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); } + unknownFields.writeTo(output); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Projection getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance(); + size = 0; + if (op_ + != com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, op_); } - - @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Projection build() { - com.google.firestore.v1.StructuredQuery.Projection result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + if (operandTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Projection buildPartial() { - com.google.firestore.v1.StructuredQuery.Projection result = - new com.google.firestore.v1.StructuredQuery.Projection(this); - int from_bitField0_ = bitField0_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - onBuilt(); - return result; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - @java.lang.Override - public Builder clone() { - return super.clone(); + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.UnaryFilter)) { + return super.equals(obj); } + com.google.firestore.v1.StructuredQuery.UnaryFilter other = + (com.google.firestore.v1.StructuredQuery.UnaryFilter) obj; - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); + if (op_ != other.op_) return false; + if (!getOperandTypeCase().equals(other.getOperandTypeCase())) return false; + switch (operandTypeCase_) { + case 2: + if (!getField().equals(other.getField())) return false; + break; + case 0: + default: } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + op_; + switch (operandTypeCase_) { + case 2: + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.firestore.v1.StructuredQuery.UnaryFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A filter with a single operand.
+     * 
+ * + * Protobuf type {@code google.firestore.v1.StructuredQuery.UnaryFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.UnaryFilter) + com.google.firestore.v1.StructuredQuery.UnaryFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.QueryProto + .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.QueryProto + .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.StructuredQuery.UnaryFilter.class, + com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder.class); + } + + // Construct using com.google.firestore.v1.StructuredQuery.UnaryFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + op_ = 0; + + operandTypeCase_ = 0; + operandType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.v1.QueryProto + .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; + } + + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter build() { + com.google.firestore.v1.StructuredQuery.UnaryFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter buildPartial() { + com.google.firestore.v1.StructuredQuery.UnaryFilter result = + new com.google.firestore.v1.StructuredQuery.UnaryFilter(this); + result.op_ = op_; + if (operandTypeCase_ == 2) { + if (fieldBuilder_ == null) { + result.operandType_ = operandType_; + } else { + result.operandType_ = fieldBuilder_.build(); + } + } + result.operandTypeCase_ = operandTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); } @java.lang.Override @@ -6100,43 +6428,30 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.Projection) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.Projection) other); + if (other instanceof com.google.firestore.v1.StructuredQuery.UnaryFilter) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.UnaryFilter) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Projection other) { - if (other == com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.UnaryFilter other) { + if (other == com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); + if (other.op_ != 0) { + setOpValue(other.getOpValue()); + } + switch (other.getOperandTypeCase()) { + case FIELD: + { + mergeField(other.getField()); + break; } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getFieldsFieldBuilder() - : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); + case OPERANDTYPE_NOT_SET: + { + break; } - } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -6153,12 +6468,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.Projection parsedMessage = null; + com.google.firestore.v1.StructuredQuery.UnaryFilter parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.firestore.v1.StructuredQuery.Projection) e.getUnfinishedMessage(); + (com.google.firestore.v1.StructuredQuery.UnaryFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -6168,921 +6483,522 @@ public Builder mergeFrom( return this; } - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); + private int operandTypeCase_ = 0; + private java.lang.Object operandType_; - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = - new java.util.ArrayList( - fields_); - bitField0_ |= 0x00000001; - } + public OperandTypeCase getOperandTypeCase() { + return OperandTypeCase.forNumber(operandTypeCase_); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - fieldsBuilder_; + public Builder clearOperandType() { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + return this; + } + private int op_ = 0; /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The unary operator to apply.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
+ * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @return The enum numeric value on the wire for op. */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } + @java.lang.Override + public int getOpValue() { + return op_; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The unary operator to apply.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
+ * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @param value The enum numeric value on the wire for op to set. + * @return This builder for chaining. */ - public Builder setFields( - int index, com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } + public Builder setOpValue(int value) { + + op_ = value; + onChanged(); return this; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The unary operator to apply.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return The op. */ - public Builder setFields( - int index, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator result = + com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); + return result == null + ? com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED + : result; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The unary operator to apply.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @param value The op to set. + * @return This builder for chaining. */ - public Builder addFields(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); + public Builder setOp(com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator value) { + if (value == null) { + throw new NullPointerException(); } + + op_ = value.getNumber(); + onChanged(); return this; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The unary operator to apply.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * + * @return This builder for chaining. */ - public Builder addFields( - int index, com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } + public Builder clearOp() { + + op_ = 0; + onChanged(); return this; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + fieldBuilder_; /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The field to which to apply the operator.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return Whether the field field is set. */ - public Builder addFields( - com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; + @java.lang.Override + public boolean hasField() { + return operandTypeCase_ == 2; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The field to which to apply the operator.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * + * @return The field. */ - public Builder addFields( - int index, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + if (fieldBuilder_ == null) { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); + if (operandTypeCase_ == 2) { + return fieldBuilder_.getMessage(); + } + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } - return this; } /** * * *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
+       * The field to which to apply the operator.
        * 
* - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - public Builder addAllFields( - java.lang.Iterable - values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( - int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List< - ? extends com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); - } - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsBuilder() { - return getFieldsFieldBuilder() - .addBuilder( - com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsBuilder( - int index) { - return getFieldsFieldBuilder() - .addBuilder( - index, com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); - } - /** - * - * - *
-       * The fields to return.
-       * If empty, all fields are returned. To only return the name
-       * of the document, use `['__name__']`.
-       * 
- * - * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( - fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Projection) - } - - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Projection) - private static final com.google.firestore.v1.StructuredQuery.Projection DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Projection(); - } - - public static com.google.firestore.v1.StructuredQuery.Projection getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Projection parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Projection(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Projection getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UnaryFilterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.UnaryFilter) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The enum numeric value on the wire for op. - */ - int getOpValue(); - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The op. - */ - com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp(); - - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return Whether the field field is set. - */ - boolean hasField(); - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return The field. - */ - com.google.firestore.v1.StructuredQuery.FieldReference getField(); - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - */ - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - - public com.google.firestore.v1.StructuredQuery.UnaryFilter.OperandTypeCase getOperandTypeCase(); - } - /** - * - * - *
-   * A filter with a single operand.
-   * 
- * - * Protobuf type {@code google.firestore.v1.StructuredQuery.UnaryFilter} - */ - public static final class UnaryFilter extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.UnaryFilter) - UnaryFilterOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnaryFilter.newBuilder() to construct. - private UnaryFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UnaryFilter() { - op_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UnaryFilter(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UnaryFilter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - op_ = rawValue; - break; - } - case 18: - { - com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; - if (operandTypeCase_ == 2) { - subBuilder = - ((com.google.firestore.v1.StructuredQuery.FieldReference) operandType_) - .toBuilder(); - } - operandType_ = - input.readMessage( - com.google.firestore.v1.StructuredQuery.FieldReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); - operandType_ = subBuilder.buildPartial(); - } - operandTypeCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder.class); - } - - /** - * - * - *
-     * A unary operator.
-     * 
- * - * Protobuf enum {@code google.firestore.v1.StructuredQuery.UnaryFilter.Operator} - */ - public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operandType_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + operandTypeCase_ = 2; + return this; + } /** * * *
-       * Unspecified. This value must not be used.
+       * The field to which to apply the operator.
        * 
* - * OPERATOR_UNSPECIFIED = 0; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - OPERATOR_UNSPECIFIED(0), + public Builder setField( + com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldBuilder_ == null) { + operandType_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + operandTypeCase_ = 2; + return this; + } /** * * *
-       * Test if a field is equal to NaN.
+       * The field to which to apply the operator.
        * 
* - * IS_NAN = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - IS_NAN(2), + public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (operandTypeCase_ == 2 + && operandType_ + != com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) { + operandType_ = + com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder( + (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_) + .mergeFrom(value) + .buildPartial(); + } else { + operandType_ = value; + } + onChanged(); + } else { + if (operandTypeCase_ == 2) { + fieldBuilder_.mergeFrom(value); + } + fieldBuilder_.setMessage(value); + } + operandTypeCase_ = 2; + return this; + } /** * * *
-       * Test if an expression evaluates to Null.
+       * The field to which to apply the operator.
        * 
* - * IS_NULL = 3; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - IS_NULL(3), - UNRECOGNIZED(-1), - ; - + public Builder clearField() { + if (fieldBuilder_ == null) { + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + onChanged(); + } + } else { + if (operandTypeCase_ == 2) { + operandTypeCase_ = 0; + operandType_ = null; + } + fieldBuilder_.clear(); + } + return this; + } /** * * *
-       * Unspecified. This value must not be used.
+       * The field to which to apply the operator.
        * 
* - * OPERATOR_UNSPECIFIED = 0; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { + return getFieldFieldBuilder().getBuilder(); + } /** * * *
-       * Test if a field is equal to NaN.
+       * The field to which to apply the operator.
        * 
* - * IS_NAN = 2; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - public static final int IS_NAN_VALUE = 2; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + if (operandTypeCase_ == 2) { + return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; + } + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + } + } /** * * *
-       * Test if an expression evaluates to Null.
+       * The field to which to apply the operator.
        * 
* - * IS_NULL = 3; + * .google.firestore.v1.StructuredQuery.FieldReference field = 2; */ - public static final int IS_NULL_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + if (!(operandTypeCase_ == 2)) { + operandType_ = + com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + } + fieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( + (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_, + getParentForChildren(), + isClean()); + operandType_ = null; } - return value; + operandTypeCase_ = 2; + onChanged(); + ; + return fieldBuilder_; } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Operator valueOf(int value) { - return forNumber(value); + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Operator forNumber(int value) { - switch (value) { - case 0: - return OPERATOR_UNSPECIFIED; - case 2: - return IS_NAN; - case 3: - return IS_NULL; - default: - return null; - } + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.UnaryFilter) + } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Operator findValueByNumber(int number) { - return Operator.forNumber(number); - } - }; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.UnaryFilter) + private static final com.google.firestore.v1.StructuredQuery.UnaryFilter DEFAULT_INSTANCE; - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } + static { + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.UnaryFilter(); + } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + public static com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDescriptor() - .getEnumTypes() - .get(0); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnaryFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UnaryFilter(input, extensionRegistry); + } + }; - private static final Operator[] VALUES = values(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static Operator valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private final int value; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - private Operator(int value) { - this.value = value; - } + public interface FieldReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.FieldReference) + com.google.protobuf.MessageOrBuilder { + + /** + * string field_path = 2; + * + * @return The fieldPath. + */ + java.lang.String getFieldPath(); + /** + * string field_path = 2; + * + * @return The bytes for fieldPath. + */ + com.google.protobuf.ByteString getFieldPathBytes(); + } + /** + * + * + *
+   * A reference to a field, such as `max(messages.time) as max_time`.
+   * 
+ * + * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} + */ + public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldReference) + FieldReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldReference.newBuilder() to construct. + private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - // @@protoc_insertion_point(enum_scope:google.firestore.v1.StructuredQuery.UnaryFilter.Operator) + private FieldReference() { + fieldPath_ = ""; } - private int operandTypeCase_ = 0; - private java.lang.Object operandType_; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FieldReference(); + } - public enum OperandTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FIELD(2), - OPERANDTYPE_NOT_SET(0); - private final int value; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } - private OperandTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OperandTypeCase valueOf(int value) { - return forNumber(value); + private FieldReference( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); - public static OperandTypeCase forNumber(int value) { - switch (value) { - case 2: - return FIELD; - case 0: - return OPERANDTYPE_NOT_SET; - default: - return null; + fieldPath_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); } - - public int getNumber() { - return this.value; - } - }; - - public OperandTypeCase getOperandTypeCase() { - return OperandTypeCase.forNumber(operandTypeCase_); } - public static final int OP_FIELD_NUMBER = 1; - private int op_; - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The enum numeric value on the wire for op. - */ - public int getOpValue() { - return op_; - } - /** - * - * - *
-     * The unary operator to apply.
-     * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The op. - */ - public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator result = - com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); - return result == null - ? com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED - : result; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.v1.QueryProto + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } - public static final int FIELD_FIELD_NUMBER = 2; - /** - * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return Whether the field field is set. - */ - public boolean hasField() { - return operandTypeCase_ == 2; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.v1.QueryProto + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.v1.StructuredQuery.FieldReference.class, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); } + + public static final int FIELD_PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object fieldPath_; /** + * string field_path = 2; * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return The field. + * @return The fieldPath. */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; + @java.lang.Override + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; } - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } /** + * string field_path = 2; * - * - *
-     * The field to which to apply the operator.
-     * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return The bytes for fieldPath. */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; + @java.lang.Override + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -7099,14 +7015,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (op_ - != com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, op_); - } - if (operandTypeCase_ == 2) { - output.writeMessage( - 2, (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); + if (!getFieldPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); } unknownFields.writeTo(output); } @@ -7117,15 +7027,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (op_ - != com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.OPERATOR_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, op_); - } - if (operandTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_); + if (!getFieldPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -7137,21 +7040,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.UnaryFilter)) { + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.FieldReference)) { return super.equals(obj); } - com.google.firestore.v1.StructuredQuery.UnaryFilter other = - (com.google.firestore.v1.StructuredQuery.UnaryFilter) obj; + com.google.firestore.v1.StructuredQuery.FieldReference other = + (com.google.firestore.v1.StructuredQuery.FieldReference) obj; - if (op_ != other.op_) return false; - if (!getOperandTypeCase().equals(other.getOperandTypeCase())) return false; - switch (operandTypeCase_) { - case 2: - if (!getField().equals(other.getField())) return false; - break; - case 0: - default: - } + if (!getFieldPath().equals(other.getFieldPath())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7163,86 +7058,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OP_FIELD_NUMBER; - hash = (53 * hash) + op_; - switch (operandTypeCase_) { - case 2: - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - break; - case 0: - default: - } + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom(byte[] data) + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter parseFrom( + public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7260,7 +7147,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.firestore.v1.StructuredQuery.UnaryFilter prototype) { + com.google.firestore.v1.StructuredQuery.FieldReference prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -7279,32 +7166,32 @@ protected Builder newBuilderForType( * * *
-     * A filter with a single operand.
+     * A reference to a field, such as `max(messages.time) as max_time`.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.UnaryFilter} + * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.UnaryFilter) - com.google.firestore.v1.StructuredQuery.UnaryFilterOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.FieldReference) + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.UnaryFilter.class, - com.google.firestore.v1.StructuredQuery.UnaryFilter.Builder.class); + com.google.firestore.v1.StructuredQuery.FieldReference.class, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); } - // Construct using com.google.firestore.v1.StructuredQuery.UnaryFilter.newBuilder() + // Construct using com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7321,27 +7208,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - op_ = 0; + fieldPath_ = ""; - operandTypeCase_ = 0; - operandType_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_UnaryFilter_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance(); + public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.UnaryFilter build() { - com.google.firestore.v1.StructuredQuery.UnaryFilter result = buildPartial(); + public com.google.firestore.v1.StructuredQuery.FieldReference build() { + com.google.firestore.v1.StructuredQuery.FieldReference result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7349,18 +7234,10 @@ public com.google.firestore.v1.StructuredQuery.UnaryFilter build() { } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.UnaryFilter buildPartial() { - com.google.firestore.v1.StructuredQuery.UnaryFilter result = - new com.google.firestore.v1.StructuredQuery.UnaryFilter(this); - result.op_ = op_; - if (operandTypeCase_ == 2) { - if (fieldBuilder_ == null) { - result.operandType_ = operandType_; - } else { - result.operandType_ = fieldBuilder_.build(); - } - } - result.operandTypeCase_ = operandTypeCase_; + public com.google.firestore.v1.StructuredQuery.FieldReference buildPartial() { + com.google.firestore.v1.StructuredQuery.FieldReference result = + new com.google.firestore.v1.StructuredQuery.FieldReference(this); + result.fieldPath_ = fieldPath_; onBuilt(); return result; } @@ -7396,377 +7273,131 @@ public Builder setRepeatedField( @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.UnaryFilter) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.UnaryFilter) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.UnaryFilter other) { - if (other == com.google.firestore.v1.StructuredQuery.UnaryFilter.getDefaultInstance()) - return this; - if (other.op_ != 0) { - setOpValue(other.getOpValue()); - } - switch (other.getOperandTypeCase()) { - case FIELD: - { - mergeField(other.getField()); - break; - } - case OPERANDTYPE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.UnaryFilter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.firestore.v1.StructuredQuery.UnaryFilter) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int operandTypeCase_ = 0; - private java.lang.Object operandType_; - - public OperandTypeCase getOperandTypeCase() { - return OperandTypeCase.forNumber(operandTypeCase_); - } - - public Builder clearOperandType() { - operandTypeCase_ = 0; - operandType_ = null; - onChanged(); - return this; - } - - private int op_ = 0; - /** - * - * - *
-       * The unary operator to apply.
-       * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The enum numeric value on the wire for op. - */ - public int getOpValue() { - return op_; - } - /** - * - * - *
-       * The unary operator to apply.
-       * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @param value The enum numeric value on the wire for op to set. - * @return This builder for chaining. - */ - public Builder setOpValue(int value) { - op_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The unary operator to apply.
-       * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return The op. - */ - public com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator getOp() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator result = - com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.valueOf(op_); - return result == null - ? com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The unary operator to apply.
-       * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @param value The op to set. - * @return This builder for chaining. - */ - public Builder setOp(com.google.firestore.v1.StructuredQuery.UnaryFilter.Operator value) { - if (value == null) { - throw new NullPointerException(); - } - - op_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The unary operator to apply.
-       * 
- * - * .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * - * @return This builder for chaining. - */ - public Builder clearOp() { - - op_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - fieldBuilder_; - /** - * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return Whether the field field is set. - */ - public boolean hasField() { - return operandTypeCase_ == 2; + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * - * @return The field. - */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.firestore.v1.StructuredQuery.FieldReference) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.FieldReference) other); } else { - if (operandTypeCase_ == 2) { - return fieldBuilder_.getMessage(); - } - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + super.mergeFrom(other); + return this; } } - /** - * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - */ - public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - operandType_ = value; + + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.FieldReference other) { + if (other == com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) + return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; onChanged(); - } else { - fieldBuilder_.setMessage(value); } - operandTypeCase_ = 2; + this.mergeUnknownFields(other.unknownFields); + onChanged(); return this; } - /** - * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; - */ - public Builder setField( - com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldBuilder_ == null) { - operandType_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.StructuredQuery.FieldReference parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.firestore.v1.StructuredQuery.FieldReference) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } - operandTypeCase_ = 2; return this; } + + private java.lang.Object fieldPath_ = ""; /** + * string field_path = 2; * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return The fieldPath. */ - public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2 - && operandType_ - != com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) { - operandType_ = - com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder( - (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_) - .mergeFrom(value) - .buildPartial(); - } else { - operandType_ = value; - } - onChanged(); + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; } else { - if (operandTypeCase_ == 2) { - fieldBuilder_.mergeFrom(value); - } - fieldBuilder_.setMessage(value); + return (java.lang.String) ref; } - operandTypeCase_ = 2; - return this; } /** + * string field_path = 2; * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return The bytes for fieldPath. */ - public Builder clearField() { - if (fieldBuilder_ == null) { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - onChanged(); - } + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; } else { - if (operandTypeCase_ == 2) { - operandTypeCase_ = 0; - operandType_ = null; - } - fieldBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** + * string field_path = 2; * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @param value The fieldPath to set. + * @return This builder for chaining. */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - return getFieldFieldBuilder().getBuilder(); + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fieldPath_ = value; + onChanged(); + return this; } /** + * string field_path = 2; * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return This builder for chaining. */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - if (operandTypeCase_ == 2) { - return (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_; - } - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); - } + public Builder clearFieldPath() { + + fieldPath_ = getDefaultInstance().getFieldPath(); + onChanged(); + return this; } /** + * string field_path = 2; * - * - *
-       * The field to which to apply the operator.
-       * 
- * - * .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @param value The bytes for fieldPath to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - if (!(operandTypeCase_ == 2)) { - operandType_ = - com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); - } - fieldBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( - (com.google.firestore.v1.StructuredQuery.FieldReference) operandType_, - getParentForChildren(), - isClean()); - operandType_ = null; + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - operandTypeCase_ = 2; + checkByteStringIsUtf8(value); + + fieldPath_ = value; onChanged(); - ; - return fieldBuilder_; + return this; } @java.lang.Override @@ -7781,91 +7412,138 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.FieldReference) } - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.UnaryFilter) - private static final com.google.firestore.v1.StructuredQuery.UnaryFilter DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldReference) + private static final com.google.firestore.v1.StructuredQuery.FieldReference DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.UnaryFilter(); + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.FieldReference(); } - public static com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstance() { + public static com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public UnaryFilter parsePartialFrom( + public FieldReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UnaryFilter(input, extensionRegistry); + return new FieldReference(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.UnaryFilter getDefaultInstanceForType() { + public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FieldReferenceOrBuilder + public interface OrderOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Order) com.google.protobuf.MessageOrBuilder { /** - * string field_path = 2; * - * @return The fieldPath. + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return Whether the field field is set. */ - java.lang.String getFieldPath(); + boolean hasField(); /** - * string field_path = 2; * - * @return The bytes for fieldPath. + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return The field. */ - com.google.protobuf.ByteString getFieldPathBytes(); + com.google.firestore.v1.StructuredQuery.FieldReference getField(); + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); + + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The enum numeric value on the wire for direction. + */ + int getDirectionValue(); + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The direction. + */ + com.google.firestore.v1.StructuredQuery.Direction getDirection(); } /** * * *
-   * A reference to a field, such as `max(messages.time) as max_time`.
+   * An order on a field.
    * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} */ - public static final class FieldReference extends com.google.protobuf.GeneratedMessageV3 + public static final class Order extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.FieldReference) - FieldReferenceOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Order) + OrderOrBuilder { private static final long serialVersionUID = 0L; - // Use FieldReference.newBuilder() to construct. - private FieldReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Order.newBuilder() to construct. + private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FieldReference() { - fieldPath_ = ""; + private Order() { + direction_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FieldReference(); + return new Order(); } @java.lang.Override @@ -7873,7 +7551,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FieldReference( + private Order( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7891,11 +7569,28 @@ private FieldReference( case 0: done = true; break; - case 18: + case 10: { - java.lang.String s = input.readStringRequireUtf8(); + com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = + input.readMessage( + com.google.firestore.v1.StructuredQuery.FieldReference.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } - fieldPath_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + direction_ = rawValue; break; } default: @@ -7919,52 +7614,103 @@ private FieldReference( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.FieldReference.class, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1.StructuredQuery.Order.class, + com.google.firestore.v1.StructuredQuery.Order.Builder.class); } - public static final int FIELD_PATH_FIELD_NUMBER = 2; - private volatile java.lang.Object fieldPath_; + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.firestore.v1.StructuredQuery.FieldReference field_; /** - * string field_path = 2; * - * @return The fieldPath. + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return Whether the field field is set. */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldPath_ = s; - return s; - } + @java.lang.Override + public boolean hasField() { + return field_ != null; } /** - * string field_path = 2; * - * @return The bytes for fieldPath. + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return The field. */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } + /** + * + * + *
+     * The field to order by.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int DIRECTION_FIELD_NUMBER = 2; + private int direction_; + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The enum numeric value on the wire for direction. + */ + @java.lang.Override + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+     * The direction to order by. Defaults to `ASCENDING`.
+     * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The direction. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.Direction result = + com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -7981,8 +7727,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getFieldPathBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fieldPath_); + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (direction_ + != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { + output.writeEnum(2, direction_); } unknownFields.writeTo(output); } @@ -7993,8 +7743,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getFieldPathBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fieldPath_); + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); + } + if (direction_ + != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8006,13 +7760,17 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.FieldReference)) { + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Order)) { return super.equals(obj); } - com.google.firestore.v1.StructuredQuery.FieldReference other = - (com.google.firestore.v1.StructuredQuery.FieldReference) obj; + com.google.firestore.v1.StructuredQuery.Order other = + (com.google.firestore.v1.StructuredQuery.Order) obj; - if (!getFieldPath().equals(other.getFieldPath())) return false; + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField().equals(other.getField())) return false; + } + if (direction_ != other.direction_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8024,78 +7782,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + direction_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom(byte[] data) + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.io.InputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.FieldReference parseFrom( + public static com.google.firestore.v1.StructuredQuery.Order parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8112,8 +7874,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder( - com.google.firestore.v1.StructuredQuery.FieldReference prototype) { + public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Order prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8132,32 +7893,32 @@ protected Builder newBuilderForType( * * *
-     * A reference to a field, such as `max(messages.time) as max_time`.
+     * An order on a field.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.FieldReference} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.FieldReference) - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Order) + com.google.firestore.v1.StructuredQuery.OrderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.FieldReference.class, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder.class); + com.google.firestore.v1.StructuredQuery.Order.class, + com.google.firestore.v1.StructuredQuery.Order.Builder.class); } - // Construct using com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder() + // Construct using com.google.firestore.v1.StructuredQuery.Order.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8174,7 +7935,13 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - fieldPath_ = ""; + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + direction_ = 0; return this; } @@ -8182,17 +7949,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_FieldReference_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance(); + public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference build() { - com.google.firestore.v1.StructuredQuery.FieldReference result = buildPartial(); + public com.google.firestore.v1.StructuredQuery.Order build() { + com.google.firestore.v1.StructuredQuery.Order result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8200,10 +7967,15 @@ public com.google.firestore.v1.StructuredQuery.FieldReference build() { } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference buildPartial() { - com.google.firestore.v1.StructuredQuery.FieldReference result = - new com.google.firestore.v1.StructuredQuery.FieldReference(this); - result.fieldPath_ = fieldPath_; + public com.google.firestore.v1.StructuredQuery.Order buildPartial() { + com.google.firestore.v1.StructuredQuery.Order result = + new com.google.firestore.v1.StructuredQuery.Order(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.direction_ = direction_; onBuilt(); return result; } @@ -8245,123 +8017,327 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.FieldReference) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.FieldReference) other); + if (other instanceof com.google.firestore.v1.StructuredQuery.Order) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.Order) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Order other) { + if (other == com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()) + return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.direction_ != 0) { + setDirectionValue(other.getDirectionValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.firestore.v1.StructuredQuery.Order parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.firestore.v1.StructuredQuery.Order) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.firestore.v1.StructuredQuery.FieldReference field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + fieldBuilder_; + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * + * @return The field. + */ + public com.google.firestore.v1.StructuredQuery.FieldReference getField() { + if (fieldBuilder_ == null) { + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder setField( + com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder(field_) + .mergeFrom(value) + .buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); } else { - super.mergeFrom(other); - return this; + field_ = null; + fieldBuilder_ = null; } - } - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.FieldReference other) { - if (other == com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()) - return this; - if (!other.getFieldPath().isEmpty()) { - fieldPath_ = other.fieldPath_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); return this; } + /** + * + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.FieldReference parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.firestore.v1.StructuredQuery.FieldReference) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + onChanged(); + return getFieldFieldBuilder().getBuilder(); } - - private java.lang.Object fieldPath_ = ""; /** - * string field_path = 2; * - * @return The fieldPath. + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldPath_ = s; - return s; + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return field_ == null + ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() + : field_; } } /** - * string field_path = 2; * - * @return The bytes for fieldPath. + * + *
+       * The field to order by.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.FieldReference field = 1; */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( + getField(), getParentForChildren(), isClean()); + field_ = null; } + return fieldBuilder_; } + + private int direction_ = 0; /** - * string field_path = 2; * - * @param value The fieldPath to set. + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The enum numeric value on the wire for direction. + */ + @java.lang.Override + public int getDirectionValue() { + return direction_; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @param value The enum numeric value on the wire for direction to set. * @return This builder for chaining. */ - public Builder setFieldPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setDirectionValue(int value) { - fieldPath_ = value; + direction_ = value; onChanged(); return this; } /** - * string field_path = 2; * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @return The direction. + */ + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.Direction getDirection() { + @SuppressWarnings("deprecation") + com.google.firestore.v1.StructuredQuery.Direction result = + com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); + return result == null + ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * + * @param value The direction to set. * @return This builder for chaining. */ - public Builder clearFieldPath() { + public Builder setDirection(com.google.firestore.v1.StructuredQuery.Direction value) { + if (value == null) { + throw new NullPointerException(); + } - fieldPath_ = getDefaultInstance().getFieldPath(); + direction_ = value.getNumber(); onChanged(); return this; } /** - * string field_path = 2; * - * @param value The bytes for fieldPath to set. + * + *
+       * The direction to order by. Defaults to `ASCENDING`.
+       * 
+ * + * .google.firestore.v1.StructuredQuery.Direction direction = 2; + * * @return This builder for chaining. */ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + public Builder clearDirection() { - fieldPath_ = value; + direction_ = 0; onChanged(); return this; } @@ -8378,138 +8354,140 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Order) } - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldReference) - private static final com.google.firestore.v1.StructuredQuery.FieldReference DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) + private static final com.google.firestore.v1.StructuredQuery.Order DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.FieldReference(); + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Order(); } - public static com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstance() { + public static com.google.firestore.v1.StructuredQuery.Order getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public FieldReference parsePartialFrom( + public Order parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldReference(input, extensionRegistry); + return new Order(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.FieldReference getDefaultInstanceForType() { + public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface OrderOrBuilder + public interface ProjectionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Order) + // @@protoc_insertion_point(interface_extends:google.firestore.v1.StructuredQuery.Projection) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * - * @return Whether the field field is set. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - boolean hasField(); + java.util.List getFieldsList(); /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * - * @return The field. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1.StructuredQuery.FieldReference getField(); + com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index); /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder(); - + int getFieldsCount(); /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The enum numeric value on the wire for direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - int getDirectionValue(); + java.util.List + getFieldsOrBuilderList(); /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - com.google.firestore.v1.StructuredQuery.Direction getDirection(); + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder(int index); } /** * * *
-   * An order on a field.
+   * The projection of document's fields to return.
    * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Projection} */ - public static final class Order extends com.google.protobuf.GeneratedMessageV3 + public static final class Projection extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Order) - OrderOrBuilder { + // @@protoc_insertion_point(message_implements:google.firestore.v1.StructuredQuery.Projection) + ProjectionOrBuilder { private static final long serialVersionUID = 0L; - // Use Order.newBuilder() to construct. - private Order(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use Projection.newBuilder() to construct. + private Projection(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Order() { - direction_ = 0; + private Projection() { + fields_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Order(); + return new Projection(); } @java.lang.Override @@ -8517,7 +8495,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Order( + private Projection( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8525,6 +8503,7 @@ private Order( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -8535,28 +8514,18 @@ private Order( case 0: done = true; break; - case 10: + case 18: { - com.google.firestore.v1.StructuredQuery.FieldReference.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = + new java.util.ArrayList< + com.google.firestore.v1.StructuredQuery.FieldReference>(); + mutable_bitField0_ |= 0x00000001; } - field_ = + fields_.add( input.readMessage( com.google.firestore.v1.StructuredQuery.FieldReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - int rawValue = input.readEnum(); - - direction_ = rawValue; + extensionRegistry)); break; } default: @@ -8573,6 +8542,9 @@ private Order( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -8580,98 +8552,97 @@ private Order( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Order.class, - com.google.firestore.v1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1.StructuredQuery.Projection.class, + com.google.firestore.v1.StructuredQuery.Projection.Builder.class); } - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.firestore.v1.StructuredQuery.FieldReference field_; + public static final int FIELDS_FIELD_NUMBER = 2; + private java.util.List fields_; /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * - * @return Whether the field field is set. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public boolean hasField() { - return field_ != null; + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; } /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * - * @return The field. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; } /** * * *
-     * The field to order by.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - return getField(); + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); } - - public static final int DIRECTION_FIELD_NUMBER = 2; - private int direction_; /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The enum numeric value on the wire for direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public int getDirectionValue() { - return direction_; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index) { + return fields_.get(index); } /** * * *
-     * The direction to order by. Defaults to `ASCENDING`.
+     * The fields to return.
+     * If empty, all fields are returned. To only return the name
+     * of the document, use `['__name__']`.
      * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.Direction result = - com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED - : result; + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( + int index) { + return fields_.get(index); } private byte memoizedIsInitialized = -1; @@ -8688,12 +8659,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (direction_ - != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { - output.writeEnum(2, direction_); + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(2, fields_.get(i)); } unknownFields.writeTo(output); } @@ -8704,12 +8671,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getField()); - } - if (direction_ - != com.google.firestore.v1.StructuredQuery.Direction.DIRECTION_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, direction_); + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -8721,17 +8684,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Order)) { + if (!(obj instanceof com.google.firestore.v1.StructuredQuery.Projection)) { return super.equals(obj); } - com.google.firestore.v1.StructuredQuery.Order other = - (com.google.firestore.v1.StructuredQuery.Order) obj; + com.google.firestore.v1.StructuredQuery.Projection other = + (com.google.firestore.v1.StructuredQuery.Projection) obj; - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField().equals(other.getField())) return false; - } - if (direction_ != other.direction_) return false; + if (!getFieldsList().equals(other.getFieldsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8743,82 +8702,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); } - hash = (37 * hash) + DIRECTION_FIELD_NUMBER; - hash = (53 * hash) + direction_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom(byte[] data) + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseDelimitedFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.firestore.v1.StructuredQuery.Order parseFrom( + public static com.google.firestore.v1.StructuredQuery.Projection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8835,7 +8792,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Order prototype) { + public static Builder newBuilder(com.google.firestore.v1.StructuredQuery.Projection prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -8854,32 +8811,32 @@ protected Builder newBuilderForType( * * *
-     * An order on a field.
+     * The projection of document's fields to return.
      * 
* - * Protobuf type {@code google.firestore.v1.StructuredQuery.Order} + * Protobuf type {@code google.firestore.v1.StructuredQuery.Projection} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Order) - com.google.firestore.v1.StructuredQuery.OrderOrBuilder { + // @@protoc_insertion_point(builder_implements:google.firestore.v1.StructuredQuery.Projection) + com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_fieldAccessorTable + .internal_static_google_firestore_v1_StructuredQuery_Projection_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.firestore.v1.StructuredQuery.Order.class, - com.google.firestore.v1.StructuredQuery.Order.Builder.class); + com.google.firestore.v1.StructuredQuery.Projection.class, + com.google.firestore.v1.StructuredQuery.Projection.Builder.class); } - // Construct using com.google.firestore.v1.StructuredQuery.Order.newBuilder() + // Construct using com.google.firestore.v1.StructuredQuery.Projection.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8890,37 +8847,37 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - if (fieldBuilder_ == null) { - field_ = null; + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - field_ = null; - fieldBuilder_ = null; + fieldsBuilder_.clear(); } - direction_ = 0; - return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.firestore.v1.QueryProto - .internal_static_google_firestore_v1_StructuredQuery_Order_descriptor; + .internal_static_google_firestore_v1_StructuredQuery_Projection_descriptor; } - @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { - return com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance(); + @java.lang.Override + public com.google.firestore.v1.StructuredQuery.Projection getDefaultInstanceForType() { + return com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance(); } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order build() { - com.google.firestore.v1.StructuredQuery.Order result = buildPartial(); + public com.google.firestore.v1.StructuredQuery.Projection build() { + com.google.firestore.v1.StructuredQuery.Projection result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8928,15 +8885,19 @@ public com.google.firestore.v1.StructuredQuery.Order build() { } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order buildPartial() { - com.google.firestore.v1.StructuredQuery.Order result = - new com.google.firestore.v1.StructuredQuery.Order(this); - if (fieldBuilder_ == null) { - result.field_ = field_; + public com.google.firestore.v1.StructuredQuery.Projection buildPartial() { + com.google.firestore.v1.StructuredQuery.Projection result = + new com.google.firestore.v1.StructuredQuery.Projection(this); + int from_bitField0_ = bitField0_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; } else { - result.field_ = fieldBuilder_.build(); + result.fields_ = fieldsBuilder_.build(); } - result.direction_ = direction_; onBuilt(); return result; } @@ -8978,22 +8939,43 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.firestore.v1.StructuredQuery.Order) { - return mergeFrom((com.google.firestore.v1.StructuredQuery.Order) other); + if (other instanceof com.google.firestore.v1.StructuredQuery.Projection) { + return mergeFrom((com.google.firestore.v1.StructuredQuery.Projection) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Order other) { - if (other == com.google.firestore.v1.StructuredQuery.Order.getDefaultInstance()) + public Builder mergeFrom(com.google.firestore.v1.StructuredQuery.Projection other) { + if (other == com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - if (other.direction_ != 0) { - setDirectionValue(other.getDirectionValue()); + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -9010,11 +8992,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.firestore.v1.StructuredQuery.Order parsedMessage = null; + com.google.firestore.v1.StructuredQuery.Projection parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.firestore.v1.StructuredQuery.Order) e.getUnfinishedMessage(); + parsedMessage = + (com.google.firestore.v1.StructuredQuery.Projection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -9024,280 +9007,406 @@ public Builder mergeFrom( return this; } - private com.google.firestore.v1.StructuredQuery.FieldReference field_; - private com.google.protobuf.SingleFieldBuilderV3< + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = + new java.util.ArrayList( + fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< com.google.firestore.v1.StructuredQuery.FieldReference, com.google.firestore.v1.StructuredQuery.FieldReference.Builder, com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - fieldBuilder_; + fieldsBuilder_; + /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * - * @return Whether the field field is set. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; + public java.util.List + getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** * - * @return The field. + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.FieldReference getField() { - if (fieldBuilder_ == null) { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + public com.google.firestore.v1.StructuredQuery.FieldReference getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); } else { - return fieldBuilder_.getMessage(); + return fieldsBuilder_.getMessage(index); } } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder setField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { + public Builder setFields( + int index, com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - field_ = value; + ensureFieldsIsMutable(); + fields_.set(index, value); onChanged(); } else { - fieldBuilder_.setMessage(value); + fieldsBuilder_.setMessage(index, value); } - return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder setField( + public Builder setFields( + int index, com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); onChanged(); } else { - fieldBuilder_.setMessage(builderForValue.build()); + fieldsBuilder_.setMessage(index, builderForValue.build()); } - return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder mergeField(com.google.firestore.v1.StructuredQuery.FieldReference value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.firestore.v1.StructuredQuery.FieldReference.newBuilder(field_) - .mergeFrom(value) - .buildPartial(); - } else { - field_ = value; + public Builder addFields(com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + public Builder addFields( + int index, com.google.firestore.v1.StructuredQuery.FieldReference value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + public Builder addFields( + com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
+       * 
+ * + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + public Builder addFields( + int index, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); onChanged(); } else { - fieldBuilder_.mergeFrom(value); + fieldsBuilder_.addMessage(index, builderForValue.build()); } - return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; + public Builder addAllFields( + java.lang.Iterable + values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { - field_ = null; - fieldBuilder_ = null; + fieldsBuilder_.addAllMessages(values); } - return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); } else { - return field_ == null - ? com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance() - : field_; + fieldsBuilder_.remove(index); } + return this; } /** * * *
-       * The field to order by.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.firestore.v1.StructuredQuery.FieldReference, - com.google.firestore.v1.StructuredQuery.FieldReference.Builder, - com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( - getField(), getParentForChildren(), isClean()); - field_ = null; - } - return fieldBuilder_; + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder getFieldsBuilder( + int index) { + return getFieldsFieldBuilder().getBuilder(index); } - - private int direction_ = 0; /** * * *
-       * The direction to order by. Defaults to `ASCENDING`.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The enum numeric value on the wire for direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public int getDirectionValue() { - return direction_; + public com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } } /** * * *
-       * The direction to order by. Defaults to `ASCENDING`.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @param value The enum numeric value on the wire for direction to set. - * @return This builder for chaining. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder setDirectionValue(int value) { - direction_ = value; - onChanged(); - return this; + public java.util.List< + ? extends com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } } /** * * *
-       * The direction to order by. Defaults to `ASCENDING`.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return The direction. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public com.google.firestore.v1.StructuredQuery.Direction getDirection() { - @SuppressWarnings("deprecation") - com.google.firestore.v1.StructuredQuery.Direction result = - com.google.firestore.v1.StructuredQuery.Direction.valueOf(direction_); - return result == null - ? com.google.firestore.v1.StructuredQuery.Direction.UNRECOGNIZED - : result; + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder( + com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); } /** * * *
-       * The direction to order by. Defaults to `ASCENDING`.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @param value The direction to set. - * @return This builder for chaining. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder setDirection(com.google.firestore.v1.StructuredQuery.Direction value) { - if (value == null) { - throw new NullPointerException(); - } - - direction_ = value.getNumber(); - onChanged(); - return this; + public com.google.firestore.v1.StructuredQuery.FieldReference.Builder addFieldsBuilder( + int index) { + return getFieldsFieldBuilder() + .addBuilder( + index, com.google.firestore.v1.StructuredQuery.FieldReference.getDefaultInstance()); } /** * * *
-       * The direction to order by. Defaults to `ASCENDING`.
+       * The fields to return.
+       * If empty, all fields are returned. To only return the name
+       * of the document, use `['__name__']`.
        * 
* - * .google.firestore.v1.StructuredQuery.Direction direction = 2; - * - * @return This builder for chaining. + * repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; */ - public Builder clearDirection() { + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } - direction_ = 0; - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.StructuredQuery.FieldReference, + com.google.firestore.v1.StructuredQuery.FieldReference.Builder, + com.google.firestore.v1.StructuredQuery.FieldReferenceOrBuilder>( + fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; } @java.lang.Override @@ -9312,42 +9421,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Order) + // @@protoc_insertion_point(builder_scope:google.firestore.v1.StructuredQuery.Projection) } - // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) - private static final com.google.firestore.v1.StructuredQuery.Order DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Projection) + private static final com.google.firestore.v1.StructuredQuery.Projection DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Order(); + DEFAULT_INSTANCE = new com.google.firestore.v1.StructuredQuery.Projection(); } - public static com.google.firestore.v1.StructuredQuery.Order getDefaultInstance() { + public static com.google.firestore.v1.StructuredQuery.Projection getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Order parsePartialFrom( + public Projection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Order(input, extensionRegistry); + return new Projection(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() { + public com.google.firestore.v1.StructuredQuery.Projection getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -9365,6 +9474,7 @@ public com.google.firestore.v1.StructuredQuery.Order getDefaultInstanceForType() * * @return Whether the select field is set. */ + @java.lang.Override public boolean hasSelect() { return select_ != null; } @@ -9379,6 +9489,7 @@ public boolean hasSelect() { * * @return The select. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.Projection getSelect() { return select_ == null ? com.google.firestore.v1.StructuredQuery.Projection.getDefaultInstance() @@ -9393,6 +9504,7 @@ public com.google.firestore.v1.StructuredQuery.Projection getSelect() { * * .google.firestore.v1.StructuredQuery.Projection select = 1; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder getSelectOrBuilder() { return getSelect(); } @@ -9408,6 +9520,7 @@ public com.google.firestore.v1.StructuredQuery.ProjectionOrBuilder getSelectOrBu * * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public java.util.List getFromList() { return from_; } @@ -9420,6 +9533,7 @@ public java.util.Listrepeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public java.util.List< ? extends com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder> getFromOrBuilderList() { @@ -9434,6 +9548,7 @@ public java.util.Listrepeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public int getFromCount() { return from_.size(); } @@ -9446,6 +9561,7 @@ public int getFromCount() { * * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CollectionSelector getFrom(int index) { return from_.get(index); } @@ -9458,6 +9574,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelector getFrom(int in * * repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder getFromOrBuilder( int index) { return from_.get(index); @@ -9476,6 +9593,7 @@ public com.google.firestore.v1.StructuredQuery.CollectionSelectorOrBuilder getFr * * @return Whether the where field is set. */ + @java.lang.Override public boolean hasWhere() { return where_ != null; } @@ -9490,6 +9608,7 @@ public boolean hasWhere() { * * @return The where. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.Filter getWhere() { return where_ == null ? com.google.firestore.v1.StructuredQuery.Filter.getDefaultInstance() @@ -9504,6 +9623,7 @@ public com.google.firestore.v1.StructuredQuery.Filter getWhere() { * * .google.firestore.v1.StructuredQuery.Filter where = 3; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getWhereOrBuilder() { return getWhere(); } @@ -9532,6 +9652,7 @@ public com.google.firestore.v1.StructuredQuery.FilterOrBuilder getWhereOrBuilder * * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public java.util.List getOrderByList() { return orderBy_; } @@ -9557,6 +9678,7 @@ public java.util.List getOrderByL * * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public java.util.List getOrderByOrBuilderList() { return orderBy_; @@ -9583,6 +9705,7 @@ public java.util.List getOrderByL * * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public int getOrderByCount() { return orderBy_.size(); } @@ -9608,6 +9731,7 @@ public int getOrderByCount() { * * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.Order getOrderBy(int index) { return orderBy_.get(index); } @@ -9633,6 +9757,7 @@ public com.google.firestore.v1.StructuredQuery.Order getOrderBy(int index) { * * repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilder(int index) { return orderBy_.get(index); } @@ -9650,6 +9775,7 @@ public com.google.firestore.v1.StructuredQuery.OrderOrBuilder getOrderByOrBuilde * * @return Whether the startAt field is set. */ + @java.lang.Override public boolean hasStartAt() { return startAt_ != null; } @@ -9664,6 +9790,7 @@ public boolean hasStartAt() { * * @return The startAt. */ + @java.lang.Override public com.google.firestore.v1.Cursor getStartAt() { return startAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : startAt_; } @@ -9676,6 +9803,7 @@ public com.google.firestore.v1.Cursor getStartAt() { * * .google.firestore.v1.Cursor start_at = 7; */ + @java.lang.Override public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { return getStartAt(); } @@ -9693,6 +9821,7 @@ public com.google.firestore.v1.CursorOrBuilder getStartAtOrBuilder() { * * @return Whether the endAt field is set. */ + @java.lang.Override public boolean hasEndAt() { return endAt_ != null; } @@ -9707,6 +9836,7 @@ public boolean hasEndAt() { * * @return The endAt. */ + @java.lang.Override public com.google.firestore.v1.Cursor getEndAt() { return endAt_ == null ? com.google.firestore.v1.Cursor.getDefaultInstance() : endAt_; } @@ -9719,6 +9849,7 @@ public com.google.firestore.v1.Cursor getEndAt() { * * .google.firestore.v1.Cursor end_at = 8; */ + @java.lang.Override public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { return getEndAt(); } @@ -9738,6 +9869,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { * * @return The offset. */ + @java.lang.Override public int getOffset() { return offset_; } @@ -9757,6 +9889,7 @@ public int getOffset() { * * @return Whether the limit field is set. */ + @java.lang.Override public boolean hasLimit() { return limit_ != null; } @@ -9773,6 +9906,7 @@ public boolean hasLimit() { * * @return The limit. */ + @java.lang.Override public com.google.protobuf.Int32Value getLimit() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } @@ -9787,6 +9921,7 @@ public com.google.protobuf.Int32Value getLimit() { * * .google.protobuf.Int32Value limit = 5; */ + @java.lang.Override public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { return getLimit(); } @@ -12050,6 +12185,7 @@ public com.google.firestore.v1.CursorOrBuilder getEndAtOrBuilder() { * * @return The offset. */ + @java.lang.Override public int getOffset() { return offset_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java index 09d4f87ab..6b2ce715b 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Target.java @@ -1242,6 +1242,7 @@ public QueryTypeCase getQueryTypeCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -1269,6 +1270,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -1293,6 +1295,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1307,6 +1310,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery getStructuredQuery() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery) queryType_; @@ -1322,6 +1326,7 @@ public com.google.firestore.v1.StructuredQuery getStructuredQuery() { * * .google.firestore.v1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1.StructuredQuery) queryType_; @@ -1855,6 +1860,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1869,6 +1875,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1.StructuredQuery getStructuredQuery() { if (structuredQueryBuilder_ == null) { if (queryTypeCase_ == 2) { @@ -2001,6 +2008,7 @@ public com.google.firestore.v1.StructuredQuery.Builder getStructuredQueryBuilder * * .google.firestore.v1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if ((queryTypeCase_ == 2) && (structuredQueryBuilder_ != null)) { return structuredQueryBuilder_.getMessageOrBuilder(); @@ -2203,6 +2211,7 @@ public ResumeTypeCase getResumeTypeCase() { * * @return Whether the query field is set. */ + @java.lang.Override public boolean hasQuery() { return targetTypeCase_ == 2; } @@ -2217,6 +2226,7 @@ public boolean hasQuery() { * * @return The query. */ + @java.lang.Override public com.google.firestore.v1.Target.QueryTarget getQuery() { if (targetTypeCase_ == 2) { return (com.google.firestore.v1.Target.QueryTarget) targetType_; @@ -2232,6 +2242,7 @@ public com.google.firestore.v1.Target.QueryTarget getQuery() { * * .google.firestore.v1.Target.QueryTarget query = 2; */ + @java.lang.Override public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { if (targetTypeCase_ == 2) { return (com.google.firestore.v1.Target.QueryTarget) targetType_; @@ -2251,6 +2262,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { * * @return Whether the documents field is set. */ + @java.lang.Override public boolean hasDocuments() { return targetTypeCase_ == 3; } @@ -2265,6 +2277,7 @@ public boolean hasDocuments() { * * @return The documents. */ + @java.lang.Override public com.google.firestore.v1.Target.DocumentsTarget getDocuments() { if (targetTypeCase_ == 3) { return (com.google.firestore.v1.Target.DocumentsTarget) targetType_; @@ -2280,6 +2293,7 @@ public com.google.firestore.v1.Target.DocumentsTarget getDocuments() { * * .google.firestore.v1.Target.DocumentsTarget documents = 3; */ + @java.lang.Override public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBuilder() { if (targetTypeCase_ == 3) { return (com.google.firestore.v1.Target.DocumentsTarget) targetType_; @@ -2300,6 +2314,7 @@ public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBui * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { if (resumeTypeCase_ == 4) { return (com.google.protobuf.ByteString) resumeType_; @@ -2320,6 +2335,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return resumeTypeCase_ == 11; } @@ -2335,6 +2351,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (resumeTypeCase_ == 11) { return (com.google.protobuf.Timestamp) resumeType_; @@ -2351,6 +2368,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 11; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (resumeTypeCase_ == 11) { return (com.google.protobuf.Timestamp) resumeType_; @@ -2372,6 +2390,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -2389,6 +2408,7 @@ public int getTargetId() { * * @return The once. */ + @java.lang.Override public boolean getOnce() { return once_; } @@ -2903,6 +2923,7 @@ public Builder clearResumeType() { * * @return Whether the query field is set. */ + @java.lang.Override public boolean hasQuery() { return targetTypeCase_ == 2; } @@ -2917,6 +2938,7 @@ public boolean hasQuery() { * * @return The query. */ + @java.lang.Override public com.google.firestore.v1.Target.QueryTarget getQuery() { if (queryBuilder_ == null) { if (targetTypeCase_ == 2) { @@ -3048,6 +3070,7 @@ public com.google.firestore.v1.Target.QueryTarget.Builder getQueryBuilder() { * * .google.firestore.v1.Target.QueryTarget query = 2; */ + @java.lang.Override public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { if ((targetTypeCase_ == 2) && (queryBuilder_ != null)) { return queryBuilder_.getMessageOrBuilder(); @@ -3108,6 +3131,7 @@ public com.google.firestore.v1.Target.QueryTargetOrBuilder getQueryOrBuilder() { * * @return Whether the documents field is set. */ + @java.lang.Override public boolean hasDocuments() { return targetTypeCase_ == 3; } @@ -3122,6 +3146,7 @@ public boolean hasDocuments() { * * @return The documents. */ + @java.lang.Override public com.google.firestore.v1.Target.DocumentsTarget getDocuments() { if (documentsBuilder_ == null) { if (targetTypeCase_ == 3) { @@ -3254,6 +3279,7 @@ public com.google.firestore.v1.Target.DocumentsTarget.Builder getDocumentsBuilde * * .google.firestore.v1.Target.DocumentsTarget documents = 3; */ + @java.lang.Override public com.google.firestore.v1.Target.DocumentsTargetOrBuilder getDocumentsOrBuilder() { if ((targetTypeCase_ == 3) && (documentsBuilder_ != null)) { return documentsBuilder_.getMessageOrBuilder(); @@ -3376,6 +3402,7 @@ public Builder clearResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return resumeTypeCase_ == 11; } @@ -3391,6 +3418,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (resumeTypeCase_ == 11) { @@ -3527,6 +3555,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 11; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((resumeTypeCase_ == 11) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -3583,6 +3612,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -3636,6 +3666,7 @@ public Builder clearTargetId() { * * @return The once. */ + @java.lang.Override public boolean getOnce() { return once_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java index 37c960fc8..1235999da 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TargetChange.java @@ -356,6 +356,10 @@ public TargetChangeType findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -402,6 +406,7 @@ private TargetChangeType(int value) { * * @return The enum numeric value on the wire for targetChangeType. */ + @java.lang.Override public int getTargetChangeTypeValue() { return targetChangeType_; } @@ -416,6 +421,7 @@ public int getTargetChangeTypeValue() { * * @return The targetChangeType. */ + @java.lang.Override public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType() { @SuppressWarnings("deprecation") com.google.firestore.v1.TargetChange.TargetChangeType result = @@ -440,6 +446,7 @@ public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType * * @return A list containing the targetIds. */ + @java.lang.Override public java.util.List getTargetIdsList() { return targetIds_; } @@ -492,6 +499,7 @@ public int getTargetIds(int index) { * * @return Whether the cause field is set. */ + @java.lang.Override public boolean hasCause() { return cause_ != null; } @@ -506,6 +514,7 @@ public boolean hasCause() { * * @return The cause. */ + @java.lang.Override public com.google.rpc.Status getCause() { return cause_ == null ? com.google.rpc.Status.getDefaultInstance() : cause_; } @@ -518,6 +527,7 @@ public com.google.rpc.Status getCause() { * * .google.rpc.Status cause = 3; */ + @java.lang.Override public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { return getCause(); } @@ -537,6 +547,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } @@ -561,6 +572,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -582,6 +594,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -601,6 +614,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 6; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -1048,6 +1062,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for targetChangeType. */ + @java.lang.Override public int getTargetChangeTypeValue() { return targetChangeType_; } @@ -1064,6 +1079,7 @@ public int getTargetChangeTypeValue() { * @return This builder for chaining. */ public Builder setTargetChangeTypeValue(int value) { + targetChangeType_ = value; onChanged(); return this; @@ -1079,6 +1095,7 @@ public Builder setTargetChangeTypeValue(int value) { * * @return The targetChangeType. */ + @java.lang.Override public com.google.firestore.v1.TargetChange.TargetChangeType getTargetChangeType() { @SuppressWarnings("deprecation") com.google.firestore.v1.TargetChange.TargetChangeType result = @@ -1454,6 +1471,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java index f1e503a86..8dc0c2952 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/TransactionOptions.java @@ -260,6 +260,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The retryTransaction. */ + @java.lang.Override public com.google.protobuf.ByteString getRetryTransaction() { return retryTransaction_; } @@ -599,6 +600,7 @@ public Builder mergeFrom( * * @return The retryTransaction. */ + @java.lang.Override public com.google.protobuf.ByteString getRetryTransaction() { return retryTransaction_; } @@ -895,6 +897,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 2; } @@ -910,6 +913,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 2) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -926,6 +930,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 2) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1316,6 +1321,7 @@ public Builder clearConsistencySelector() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 2; } @@ -1331,6 +1337,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 2) { @@ -1468,6 +1475,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 2) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -1624,6 +1632,7 @@ public ModeCase getModeCase() { * * @return Whether the readOnly field is set. */ + @java.lang.Override public boolean hasReadOnly() { return modeCase_ == 2; } @@ -1638,6 +1647,7 @@ public boolean hasReadOnly() { * * @return The readOnly. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly() { if (modeCase_ == 2) { return (com.google.firestore.v1.TransactionOptions.ReadOnly) mode_; @@ -1653,6 +1663,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly() { * * .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if (modeCase_ == 2) { return (com.google.firestore.v1.TransactionOptions.ReadOnly) mode_; @@ -1672,6 +1683,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO * * @return Whether the readWrite field is set. */ + @java.lang.Override public boolean hasReadWrite() { return modeCase_ == 3; } @@ -1686,6 +1698,7 @@ public boolean hasReadWrite() { * * @return The readWrite. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite() { if (modeCase_ == 3) { return (com.google.firestore.v1.TransactionOptions.ReadWrite) mode_; @@ -1701,6 +1714,7 @@ public com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite() { * * .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if (modeCase_ == 3) { return (com.google.firestore.v1.TransactionOptions.ReadWrite) mode_; @@ -2110,6 +2124,7 @@ public Builder clearMode() { * * @return Whether the readOnly field is set. */ + @java.lang.Override public boolean hasReadOnly() { return modeCase_ == 2; } @@ -2124,6 +2139,7 @@ public boolean hasReadOnly() { * * @return The readOnly. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadOnly getReadOnly() { if (readOnlyBuilder_ == null) { if (modeCase_ == 2) { @@ -2256,6 +2272,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnly.Builder getReadOnlyBu * * .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if ((modeCase_ == 2) && (readOnlyBuilder_ != null)) { return readOnlyBuilder_.getMessageOrBuilder(); @@ -2316,6 +2333,7 @@ public com.google.firestore.v1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyO * * @return Whether the readWrite field is set. */ + @java.lang.Override public boolean hasReadWrite() { return modeCase_ == 3; } @@ -2330,6 +2348,7 @@ public boolean hasReadWrite() { * * @return The readWrite. */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadWrite getReadWrite() { if (readWriteBuilder_ == null) { if (modeCase_ == 3) { @@ -2462,6 +2481,7 @@ public com.google.firestore.v1.TransactionOptions.ReadWrite.Builder getReadWrite * * .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; */ + @java.lang.Override public com.google.firestore.v1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if ((modeCase_ == 3) && (readWriteBuilder_ != null)) { return readWriteBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java index 190aa6e59..f03cf378f 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/UpdateDocumentRequest.java @@ -180,6 +180,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -196,6 +197,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1.Document getDocument() { return document_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : document_; } @@ -210,6 +212,7 @@ public com.google.firestore.v1.Document getDocument() { * .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -232,6 +235,7 @@ public com.google.firestore.v1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -251,6 +255,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getUpdateMask() { return updateMask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() @@ -270,6 +275,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { * * .google.firestore.v1.DocumentMask update_mask = 2; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -289,6 +295,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -305,6 +312,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() : mask_; } @@ -319,6 +327,7 @@ public com.google.firestore.v1.DocumentMask getMask() { * * .google.firestore.v1.DocumentMask mask = 3; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -337,6 +346,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -352,6 +362,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1.Precondition.getDefaultInstance() @@ -367,6 +378,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { * * .google.firestore.v1.Precondition current_document = 4; */ + @java.lang.Override public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java index 74958b5f8..5965bdf11 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Value.java @@ -330,6 +330,7 @@ public com.google.protobuf.NullValue getNullValue() { * * @return The booleanValue. */ + @java.lang.Override public boolean getBooleanValue() { if (valueTypeCase_ == 1) { return (java.lang.Boolean) valueType_; @@ -349,6 +350,7 @@ public boolean getBooleanValue() { * * @return The integerValue. */ + @java.lang.Override public long getIntegerValue() { if (valueTypeCase_ == 2) { return (java.lang.Long) valueType_; @@ -368,6 +370,7 @@ public long getIntegerValue() { * * @return The doubleValue. */ + @java.lang.Override public double getDoubleValue() { if (valueTypeCase_ == 3) { return (java.lang.Double) valueType_; @@ -389,6 +392,7 @@ public double getDoubleValue() { * * @return Whether the timestampValue field is set. */ + @java.lang.Override public boolean hasTimestampValue() { return valueTypeCase_ == 10; } @@ -405,6 +409,7 @@ public boolean hasTimestampValue() { * * @return The timestampValue. */ + @java.lang.Override public com.google.protobuf.Timestamp getTimestampValue() { if (valueTypeCase_ == 10) { return (com.google.protobuf.Timestamp) valueType_; @@ -422,6 +427,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { * * .google.protobuf.Timestamp timestamp_value = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { if (valueTypeCase_ == 10) { return (com.google.protobuf.Timestamp) valueType_; @@ -505,6 +511,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { * * @return The bytesValue. */ + @java.lang.Override public com.google.protobuf.ByteString getBytesValue() { if (valueTypeCase_ == 18) { return (com.google.protobuf.ByteString) valueType_; @@ -582,6 +589,7 @@ public com.google.protobuf.ByteString getReferenceValueBytes() { * * @return Whether the geoPointValue field is set. */ + @java.lang.Override public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } @@ -596,6 +604,7 @@ public boolean hasGeoPointValue() { * * @return The geoPointValue. */ + @java.lang.Override public com.google.type.LatLng getGeoPointValue() { if (valueTypeCase_ == 8) { return (com.google.type.LatLng) valueType_; @@ -611,6 +620,7 @@ public com.google.type.LatLng getGeoPointValue() { * * .google.type.LatLng geo_point_value = 8; */ + @java.lang.Override public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { if (valueTypeCase_ == 8) { return (com.google.type.LatLng) valueType_; @@ -632,6 +642,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { * * @return Whether the arrayValue field is set. */ + @java.lang.Override public boolean hasArrayValue() { return valueTypeCase_ == 9; } @@ -648,6 +659,7 @@ public boolean hasArrayValue() { * * @return The arrayValue. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getArrayValue() { if (valueTypeCase_ == 9) { return (com.google.firestore.v1.ArrayValue) valueType_; @@ -665,6 +677,7 @@ public com.google.firestore.v1.ArrayValue getArrayValue() { * * .google.firestore.v1.ArrayValue array_value = 9; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { if (valueTypeCase_ == 9) { return (com.google.firestore.v1.ArrayValue) valueType_; @@ -684,6 +697,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { * * @return Whether the mapValue field is set. */ + @java.lang.Override public boolean hasMapValue() { return valueTypeCase_ == 6; } @@ -698,6 +712,7 @@ public boolean hasMapValue() { * * @return The mapValue. */ + @java.lang.Override public com.google.firestore.v1.MapValue getMapValue() { if (valueTypeCase_ == 6) { return (com.google.firestore.v1.MapValue) valueType_; @@ -713,6 +728,7 @@ public com.google.firestore.v1.MapValue getMapValue() { * * .google.firestore.v1.MapValue map_value = 6; */ + @java.lang.Override public com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder() { if (valueTypeCase_ == 6) { return (com.google.firestore.v1.MapValue) valueType_; @@ -1332,6 +1348,7 @@ public Builder clearValueType() { * * @return The enum numeric value on the wire for nullValue. */ + @java.lang.Override public int getNullValueValue() { if (valueTypeCase_ == 11) { return ((java.lang.Integer) valueType_).intValue(); @@ -1367,6 +1384,7 @@ public Builder setNullValueValue(int value) { * * @return The nullValue. */ + @java.lang.Override public com.google.protobuf.NullValue getNullValue() { if (valueTypeCase_ == 11) { @SuppressWarnings("deprecation") @@ -1600,6 +1618,7 @@ public Builder clearDoubleValue() { * * @return Whether the timestampValue field is set. */ + @java.lang.Override public boolean hasTimestampValue() { return valueTypeCase_ == 10; } @@ -1616,6 +1635,7 @@ public boolean hasTimestampValue() { * * @return The timestampValue. */ + @java.lang.Override public com.google.protobuf.Timestamp getTimestampValue() { if (timestampValueBuilder_ == null) { if (valueTypeCase_ == 10) { @@ -1758,6 +1778,7 @@ public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { * * .google.protobuf.Timestamp timestamp_value = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { if ((valueTypeCase_ == 10) && (timestampValueBuilder_ != null)) { return timestampValueBuilder_.getMessageOrBuilder(); @@ -1816,6 +1837,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { * * @return The stringValue. */ + @java.lang.Override public java.lang.String getStringValue() { java.lang.Object ref = ""; if (valueTypeCase_ == 17) { @@ -1846,6 +1868,7 @@ public java.lang.String getStringValue() { * * @return The bytes for stringValue. */ + @java.lang.Override public com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (valueTypeCase_ == 17) { @@ -2010,6 +2033,7 @@ public Builder clearBytesValue() { * * @return The referenceValue. */ + @java.lang.Override public java.lang.String getReferenceValue() { java.lang.Object ref = ""; if (valueTypeCase_ == 5) { @@ -2038,6 +2062,7 @@ public java.lang.String getReferenceValue() { * * @return The bytes for referenceValue. */ + @java.lang.Override public com.google.protobuf.ByteString getReferenceValueBytes() { java.lang.Object ref = ""; if (valueTypeCase_ == 5) { @@ -2134,6 +2159,7 @@ public Builder setReferenceValueBytes(com.google.protobuf.ByteString value) { * * @return Whether the geoPointValue field is set. */ + @java.lang.Override public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } @@ -2148,6 +2174,7 @@ public boolean hasGeoPointValue() { * * @return The geoPointValue. */ + @java.lang.Override public com.google.type.LatLng getGeoPointValue() { if (geoPointValueBuilder_ == null) { if (valueTypeCase_ == 8) { @@ -2277,6 +2304,7 @@ public com.google.type.LatLng.Builder getGeoPointValueBuilder() { * * .google.type.LatLng geo_point_value = 8; */ + @java.lang.Override public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { if ((valueTypeCase_ == 8) && (geoPointValueBuilder_ != null)) { return geoPointValueBuilder_.getMessageOrBuilder(); @@ -2335,6 +2363,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { * * @return Whether the arrayValue field is set. */ + @java.lang.Override public boolean hasArrayValue() { return valueTypeCase_ == 9; } @@ -2351,6 +2380,7 @@ public boolean hasArrayValue() { * * @return The arrayValue. */ + @java.lang.Override public com.google.firestore.v1.ArrayValue getArrayValue() { if (arrayValueBuilder_ == null) { if (valueTypeCase_ == 9) { @@ -2494,6 +2524,7 @@ public com.google.firestore.v1.ArrayValue.Builder getArrayValueBuilder() { * * .google.firestore.v1.ArrayValue array_value = 9; */ + @java.lang.Override public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { if ((valueTypeCase_ == 9) && (arrayValueBuilder_ != null)) { return arrayValueBuilder_.getMessageOrBuilder(); @@ -2554,6 +2585,7 @@ public com.google.firestore.v1.ArrayValueOrBuilder getArrayValueOrBuilder() { * * @return Whether the mapValue field is set. */ + @java.lang.Override public boolean hasMapValue() { return valueTypeCase_ == 6; } @@ -2568,6 +2600,7 @@ public boolean hasMapValue() { * * @return The mapValue. */ + @java.lang.Override public com.google.firestore.v1.MapValue getMapValue() { if (mapValueBuilder_ == null) { if (valueTypeCase_ == 6) { @@ -2699,6 +2732,7 @@ public com.google.firestore.v1.MapValue.Builder getMapValueBuilder() { * * .google.firestore.v1.MapValue map_value = 6; */ + @java.lang.Override public com.google.firestore.v1.MapValueOrBuilder getMapValueOrBuilder() { if ((valueTypeCase_ == 6) && (mapValueBuilder_ != null)) { return mapValueBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java index d840d2b9b..9c59027a4 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/Write.java @@ -252,6 +252,7 @@ public OperationCase getOperationCase() { * * @return Whether the update field is set. */ + @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } @@ -266,6 +267,7 @@ public boolean hasUpdate() { * * @return The update. */ + @java.lang.Override public com.google.firestore.v1.Document getUpdate() { if (operationCase_ == 1) { return (com.google.firestore.v1.Document) operation_; @@ -281,6 +283,7 @@ public com.google.firestore.v1.Document getUpdate() { * * .google.firestore.v1.Document update = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { if (operationCase_ == 1) { return (com.google.firestore.v1.Document) operation_; @@ -358,6 +361,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { * * @return Whether the transform field is set. */ + @java.lang.Override public boolean hasTransform() { return operationCase_ == 6; } @@ -372,6 +376,7 @@ public boolean hasTransform() { * * @return The transform. */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform getTransform() { if (operationCase_ == 6) { return (com.google.firestore.v1.DocumentTransform) operation_; @@ -387,6 +392,7 @@ public com.google.firestore.v1.DocumentTransform getTransform() { * * .google.firestore.v1.DocumentTransform transform = 6; */ + @java.lang.Override public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder() { if (operationCase_ == 6) { return (com.google.firestore.v1.DocumentTransform) operation_; @@ -415,6 +421,7 @@ public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder( * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -437,6 +444,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.firestore.v1.DocumentMask getUpdateMask() { return updateMask_ == null ? com.google.firestore.v1.DocumentMask.getDefaultInstance() @@ -459,6 +467,7 @@ public com.google.firestore.v1.DocumentMask getUpdateMask() { * * .google.firestore.v1.DocumentMask update_mask = 3; */ + @java.lang.Override public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -479,6 +488,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; * */ + @java.lang.Override public java.util.List getUpdateTransformsList() { return updateTransforms_; @@ -496,6 +506,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; * */ + @java.lang.Override public java.util.List getUpdateTransformsOrBuilderList() { return updateTransforms_; @@ -513,6 +524,7 @@ public com.google.firestore.v1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; * */ + @java.lang.Override public int getUpdateTransformsCount() { return updateTransforms_.size(); } @@ -529,6 +541,7 @@ public int getUpdateTransformsCount() { * repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; * */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransforms(int index) { return updateTransforms_.get(index); } @@ -545,6 +558,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransfo * repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; * */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform.FieldTransformOrBuilder getUpdateTransformsOrBuilder(int index) { return updateTransforms_.get(index); @@ -564,6 +578,7 @@ public com.google.firestore.v1.DocumentTransform.FieldTransform getUpdateTransfo * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -579,6 +594,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1.Precondition.getDefaultInstance() @@ -594,6 +610,7 @@ public com.google.firestore.v1.Precondition getCurrentDocument() { * * .google.firestore.v1.Precondition current_document = 4; */ + @java.lang.Override public com.google.firestore.v1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } @@ -1133,6 +1150,7 @@ public Builder clearOperation() { * * @return Whether the update field is set. */ + @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } @@ -1147,6 +1165,7 @@ public boolean hasUpdate() { * * @return The update. */ + @java.lang.Override public com.google.firestore.v1.Document getUpdate() { if (updateBuilder_ == null) { if (operationCase_ == 1) { @@ -1278,6 +1297,7 @@ public com.google.firestore.v1.Document.Builder getUpdateBuilder() { * * .google.firestore.v1.Document update = 1; */ + @java.lang.Override public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { if ((operationCase_ == 1) && (updateBuilder_ != null)) { return updateBuilder_.getMessageOrBuilder(); @@ -1332,6 +1352,7 @@ public com.google.firestore.v1.DocumentOrBuilder getUpdateOrBuilder() { * * @return The delete. */ + @java.lang.Override public java.lang.String getDelete() { java.lang.Object ref = ""; if (operationCase_ == 2) { @@ -1360,6 +1381,7 @@ public java.lang.String getDelete() { * * @return The bytes for delete. */ + @java.lang.Override public com.google.protobuf.ByteString getDeleteBytes() { java.lang.Object ref = ""; if (operationCase_ == 2) { @@ -1458,6 +1480,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) { * * @return Whether the transform field is set. */ + @java.lang.Override public boolean hasTransform() { return operationCase_ == 6; } @@ -1472,6 +1495,7 @@ public boolean hasTransform() { * * @return The transform. */ + @java.lang.Override public com.google.firestore.v1.DocumentTransform getTransform() { if (transformBuilder_ == null) { if (operationCase_ == 6) { @@ -1603,6 +1627,7 @@ public com.google.firestore.v1.DocumentTransform.Builder getTransformBuilder() { * * .google.firestore.v1.DocumentTransform transform = 6; */ + @java.lang.Override public com.google.firestore.v1.DocumentTransformOrBuilder getTransformOrBuilder() { if ((operationCase_ == 6) && (transformBuilder_ != null)) { return transformBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java index 738f2a2ac..a418e1553 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteRequest.java @@ -185,6 +185,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -209,6 +210,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -236,6 +238,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return The streamId. */ + @java.lang.Override public java.lang.String getStreamId() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -260,6 +263,7 @@ public java.lang.String getStreamId() { * * @return The bytes for streamId. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamIdBytes() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -287,6 +291,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { * * repeated .google.firestore.v1.Write writes = 3; */ + @java.lang.Override public java.util.List getWritesList() { return writes_; } @@ -303,6 +308,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1.Write writes = 3; */ + @java.lang.Override public java.util.List getWritesOrBuilderList() { return writes_; } @@ -319,6 +325,7 @@ public java.util.List getWrite * * repeated .google.firestore.v1.Write writes = 3; */ + @java.lang.Override public int getWritesCount() { return writes_.size(); } @@ -335,6 +342,7 @@ public int getWritesCount() { * * repeated .google.firestore.v1.Write writes = 3; */ + @java.lang.Override public com.google.firestore.v1.Write getWrites(int index) { return writes_.get(index); } @@ -351,6 +359,7 @@ public com.google.firestore.v1.Write getWrites(int index) { * * repeated .google.firestore.v1.Write writes = 3; */ + @java.lang.Override public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { return writes_.get(index); } @@ -377,6 +386,7 @@ public com.google.firestore.v1.WriteOrBuilder getWritesOrBuilder(int index) { * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -415,6 +425,7 @@ public int getLabelsCount() { * * map<string, string> labels = 5; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -422,6 +433,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -435,6 +447,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -447,6 +460,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -463,6 +477,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1593,6 +1608,7 @@ public java.util.List getWritesBuilderLis * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -1687,6 +1703,7 @@ public int getLabelsCount() { * * map<string, string> labels = 5; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1694,6 +1711,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1707,6 +1725,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1719,6 +1738,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1736,6 +1756,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java index fa1fb8cf3..69ae28718 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResponse.java @@ -162,6 +162,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The streamId. */ + @java.lang.Override public java.lang.String getStreamId() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -185,6 +186,7 @@ public java.lang.String getStreamId() { * * @return The bytes for streamId. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamIdBytes() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -212,6 +214,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -229,6 +232,7 @@ public com.google.protobuf.ByteString getStreamToken() { * * repeated .google.firestore.v1.WriteResult write_results = 3; */ + @java.lang.Override public java.util.List getWriteResultsList() { return writeResults_; } @@ -243,6 +247,7 @@ public java.util.List getWriteResultsList() * * repeated .google.firestore.v1.WriteResult write_results = 3; */ + @java.lang.Override public java.util.List getWriteResultsOrBuilderList() { return writeResults_; @@ -258,6 +263,7 @@ public java.util.List getWriteResultsList() * * repeated .google.firestore.v1.WriteResult write_results = 3; */ + @java.lang.Override public int getWriteResultsCount() { return writeResults_.size(); } @@ -272,6 +278,7 @@ public int getWriteResultsCount() { * * repeated .google.firestore.v1.WriteResult write_results = 3; */ + @java.lang.Override public com.google.firestore.v1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } @@ -286,6 +293,7 @@ public com.google.firestore.v1.WriteResult getWriteResults(int index) { * * repeated .google.firestore.v1.WriteResult write_results = 3; */ + @java.lang.Override public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { return writeResults_.get(index); } @@ -304,6 +312,7 @@ public com.google.firestore.v1.WriteResultOrBuilder getWriteResultsOrBuilder(int * * @return Whether the commitTime field is set. */ + @java.lang.Override public boolean hasCommitTime() { return commitTime_ != null; } @@ -319,6 +328,7 @@ public boolean hasCommitTime() { * * @return The commitTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } @@ -332,6 +342,7 @@ public com.google.protobuf.Timestamp getCommitTime() { * * .google.protobuf.Timestamp commit_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { return getCommitTime(); } @@ -876,6 +887,7 @@ public Builder setStreamIdBytes(com.google.protobuf.ByteString value) { * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } diff --git a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java index 80f679139..060d0fa6e 100644 --- a/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java +++ b/proto-google-cloud-firestore-v1/src/main/java/com/google/firestore/v1/WriteResult.java @@ -149,6 +149,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -166,6 +167,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -181,6 +183,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -197,6 +200,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * repeated .google.firestore.v1.Value transform_results = 2; */ + @java.lang.Override public java.util.List getTransformResultsList() { return transformResults_; } @@ -210,6 +214,7 @@ public java.util.List getTransformResultsList() { * * repeated .google.firestore.v1.Value transform_results = 2; */ + @java.lang.Override public java.util.List getTransformResultsOrBuilderList() { return transformResults_; @@ -224,6 +229,7 @@ public java.util.List getTransformResultsList() { * * repeated .google.firestore.v1.Value transform_results = 2; */ + @java.lang.Override public int getTransformResultsCount() { return transformResults_.size(); } @@ -237,6 +243,7 @@ public int getTransformResultsCount() { * * repeated .google.firestore.v1.Value transform_results = 2; */ + @java.lang.Override public com.google.firestore.v1.Value getTransformResults(int index) { return transformResults_.get(index); } @@ -250,6 +257,7 @@ public com.google.firestore.v1.Value getTransformResults(int index) { * * repeated .google.firestore.v1.Value transform_results = 2; */ + @java.lang.Override public com.google.firestore.v1.ValueOrBuilder getTransformResultsOrBuilder(int index) { return transformResults_.get(index); } diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto index 5f9b6d732..5e8c21c45 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/firestore.proto @@ -132,6 +132,20 @@ service Firestore { }; } + // Partitions a query by returning partition cursors that can be used to run + // the query in parallel. The returned partition cursors are split points that + // can be used by RunQuery as starting/end points for the query results. + rpc PartitionQuery(PartitionQueryRequest) returns (PartitionQueryResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/documents}:partitionQuery" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery" + body: "*" + } + }; + } + // Streams batches of document updates and deletes, in order. rpc Write(stream WriteRequest) returns (stream WriteResponse) { option (google.api.http) = { @@ -161,6 +175,22 @@ service Firestore { option (google.api.method_signature) = "parent"; } + // Applies a batch of write operations. + // + // The BatchWrite method does not apply the write operations atomically + // and can apply them out of order. Method does not allow more than one write + // per document. Each write succeeds or fails independently. See the + // [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the success status of each write. + // + // If you require an atomically applied set of writes, use + // [Commit][google.firestore.v1.Firestore.Commit] instead. + rpc BatchWrite(BatchWriteRequest) returns (BatchWriteResponse) { + option (google.api.http) = { + post: "/v1/{database=projects/*/databases/*}/documents:batchWrite" + body: "*" + }; + } + // Creates a new document. rpc CreateDocument(CreateDocumentRequest) returns (Document) { option (google.api.http) = { @@ -189,7 +219,7 @@ message GetDocumentRequest { bytes transaction = 3; // Reads the version of the document at the given time. - // This may not be older than 60 seconds. + // This may not be older than 270 seconds. google.protobuf.Timestamp read_time = 5; } } @@ -230,7 +260,7 @@ message ListDocumentsRequest { bytes transaction = 8; // Reads documents as they were at the given time. - // This may not be older than 60 seconds. + // This may not be older than 270 seconds. google.protobuf.Timestamp read_time = 10; } @@ -346,7 +376,7 @@ message BatchGetDocumentsRequest { TransactionOptions new_transaction = 5; // Reads documents as they were at the given time. - // This may not be older than 60 seconds. + // This may not be older than 270 seconds. google.protobuf.Timestamp read_time = 7; } } @@ -460,7 +490,7 @@ message RunQueryRequest { TransactionOptions new_transaction = 6; // Reads documents as they were at the given time. - // This may not be older than 60 seconds. + // This may not be older than 270 seconds. google.protobuf.Timestamp read_time = 7; } } @@ -491,6 +521,81 @@ message RunQueryResponse { int32 skipped_results = 4; } +// The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. +message PartitionQueryRequest { + // Required. The parent resource name. In the format: + // `projects/{project_id}/databases/{database_id}/documents`. + // Document resource names are not supported; only database resource names + // can be specified. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The query to partition. + oneof query_type { + // A structured query. + // Filters, order bys, limits, offsets, and start/end cursors are not + // supported. + StructuredQuery structured_query = 2; + } + + // The desired maximum number of partition points. + // The partitions may be returned across multiple pages of results. + // The number must be strictly positive. The actual number of partitions + // returned may be fewer. + // + // For example, this may be set to one fewer than the number of parallel + // queries to be run, or in running a data pipeline job, one fewer than the + // number of workers or compute instances available. + int64 partition_count = 3; + + // The `next_page_token` value returned from a previous call to + // PartitionQuery that may be used to get an additional set of results. + // There are no ordering guarantees between sets of results. Thus, using + // multiple sets of results will require merging the different result sets. + // + // For example, two subsequent calls using a page_token may return: + // + // * cursor B, cursor M, cursor Q + // * cursor A, cursor U, cursor W + // + // To obtain a complete result set ordered with respect to the results of the + // query supplied to PartitionQuery, the results sets should be merged: + // cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + string page_token = 4; + + // The maximum number of partitions to return in this call, subject to + // `partition_count`. + // + // For example, if `partition_count` = 10 and `page_size` = 8, the first call + // to PartitionQuery will return up to 8 partitions and a `next_page_token` + // if more results exist. A second call to PartitionQuery will return up to + // 2 partitions, to complete the total of 10 specified in `partition_count`. + int32 page_size = 5; +} + +// The response for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. +message PartitionQueryResponse { + // Partition results. + // Each partition is a split point that can be used by RunQuery as a starting + // or end point for the query results. The RunQuery requests must be made with + // the same query supplied to this PartitionQuery request. The partition + // cursors will be ordered according to same ordering as the results of the + // query supplied to PartitionQuery. + // + // For example, if a PartitionQuery request returns partition cursors A and B, + // running the following three queries will return the entire result set of + // the original query: + // + // * query, end_at A + // * query, start_at A, end_at B + // * query, start_at B + repeated Cursor partitions = 1; + + // A page token that may be used to request an additional set of results, up + // to the number specified by `partition_count` in the PartitionQuery request. + // If blank, there are no more results. + string next_page_token = 2; +} + // The request for [Firestore.Write][google.firestore.v1.Firestore.Write]. // // The first request creates a stream, or resumes an existing one from a token. @@ -756,3 +861,35 @@ message ListCollectionIdsResponse { // A page token that may be used to continue the list. string next_page_token = 2; } + +// The request for [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite]. +message BatchWriteRequest { + // Required. The database name. In the format: + // `projects/{project_id}/databases/{database_id}`. + string database = 1 [(google.api.field_behavior) = REQUIRED]; + + // The writes to apply. + // + // Method does not apply writes atomically and does not guarantee ordering. + // Each write succeeds or fails independently. You cannot write to the same + // document more than once per request. + repeated Write writes = 2; + + // Labels associated with this batch write. + map labels = 3; +} + +// The response from [Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite]. +message BatchWriteResponse { + // The result of applying the writes. + // + // This i-th write result corresponds to the i-th write in the + // request. + repeated WriteResult write_results = 1; + + // The status of applying the writes. + // + // This i-th write status corresponds to the i-th write in the + // request. + repeated google.rpc.Status status = 2; +} diff --git a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto index 226d32418..845019136 100644 --- a/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto +++ b/proto-google-cloud-firestore-v1/src/main/proto/google/firestore/v1/query.proto @@ -83,31 +83,55 @@ message StructuredQuery { // Unspecified. This value must not be used. OPERATOR_UNSPECIFIED = 0; - // Less than. Requires that the field come first in `order_by`. + // The given `field` is less than the given `value`. + // + // Requires: + // + // * That `field` come first in `order_by`. LESS_THAN = 1; - // Less than or equal. Requires that the field come first in `order_by`. + // The given `field` is less than or equal to the given `value`. + // + // Requires: + // + // * That `field` come first in `order_by`. LESS_THAN_OR_EQUAL = 2; - // Greater than. Requires that the field come first in `order_by`. + // The given `field` is greater than the given `value`. + // + // Requires: + // + // * That `field` come first in `order_by`. GREATER_THAN = 3; - // Greater than or equal. Requires that the field come first in - // `order_by`. + // The given `field` is greater than or equal to the given `value`. + // + // Requires: + // + // * That `field` come first in `order_by`. GREATER_THAN_OR_EQUAL = 4; - // Equal. + // The given `field` is equal to the given `value`. EQUAL = 5; - // Contains. Requires that the field is an array. + // The given `field` is an array that contains the given `value`. ARRAY_CONTAINS = 7; - // In. Requires that `value` is a non-empty ArrayValue with at most 10 - // values. + // The given `field` is equal to at least one value in the given array. + // + // Requires: + // + // * That `value` is a non-empty `ArrayValue` with at most 10 values. + // * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`. IN = 8; - // Contains any. Requires that the field is an array and - // `value` is a non-empty ArrayValue with at most 10 values. + // The given `field` is an array that contains any of the values in the + // given array. + // + // Requires: + // + // * That `value` is a non-empty `ArrayValue` with at most 10 values. + // * No other `IN`, `ARRAY_CONTAINS_ANY`, or `NOT_IN`. ARRAY_CONTAINS_ANY = 9; } @@ -121,15 +145,6 @@ message StructuredQuery { Value value = 3; } - // The projection of document's fields to return. - message Projection { - // The fields to return. - // - // If empty, all fields are returned. To only return the name - // of the document, use `['__name__']`. - repeated FieldReference fields = 2; - } - // A filter with a single operand. message UnaryFilter { // A unary operator. @@ -137,10 +152,10 @@ message StructuredQuery { // Unspecified. This value must not be used. OPERATOR_UNSPECIFIED = 0; - // Test if a field is equal to NaN. + // The given `field` is equal to `NaN`. IS_NAN = 2; - // Test if an expression evaluates to Null. + // The given `field` is equal to `NULL`. IS_NULL = 3; } @@ -168,6 +183,15 @@ message StructuredQuery { Direction direction = 2; } + // The projection of document's fields to return. + message Projection { + // The fields to return. + // + // If empty, all fields are returned. To only return the name + // of the document, use `['__name__']`. + repeated FieldReference fields = 2; + } + // A sort direction. enum Direction { // Unspecified. diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ArrayValue.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ArrayValue.java index 25a6db420..753ddff2f 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ArrayValue.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ArrayValue.java @@ -130,6 +130,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesList() { return values_; } @@ -142,6 +143,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesOrBuilderList() { return values_; @@ -155,6 +157,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public int getValuesCount() { return values_.size(); } @@ -167,6 +170,7 @@ public int getValuesCount() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getValues(int index) { return values_.get(index); } @@ -179,6 +183,7 @@ public com.google.firestore.v1beta1.Value getValues(int index) { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index) { return values_.get(index); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java index 3c64d1eec..baf849e80 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsRequest.java @@ -246,6 +246,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -269,6 +270,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -369,6 +371,7 @@ public com.google.protobuf.ByteString getDocumentsBytes(int index) { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -385,6 +388,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_; } @@ -399,6 +403,7 @@ public com.google.firestore.v1beta1.DocumentMask getMask() { * * .google.firestore.v1beta1.DocumentMask mask = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -415,6 +420,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 4) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -437,6 +443,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } @@ -454,6 +461,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { if (consistencySelectorCase_ == 5) { return (com.google.firestore.v1beta1.TransactionOptions) consistencySelector_; @@ -472,6 +480,7 @@ public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { * * .google.firestore.v1beta1.TransactionOptions new_transaction = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if (consistencySelectorCase_ == 5) { return (com.google.firestore.v1beta1.TransactionOptions) consistencySelector_; @@ -492,6 +501,7 @@ public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactio * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -507,6 +517,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -523,6 +534,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1609,6 +1621,7 @@ public Builder clearTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 5; } @@ -1626,6 +1639,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { if (newTransactionBuilder_ == null) { if (consistencySelectorCase_ == 5) { @@ -1777,6 +1791,7 @@ public com.google.firestore.v1beta1.TransactionOptions.Builder getNewTransaction * * .google.firestore.v1beta1.TransactionOptions new_transaction = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if ((consistencySelectorCase_ == 5) && (newTransactionBuilder_ != null)) { return newTransactionBuilder_.getMessageOrBuilder(); @@ -1842,6 +1857,7 @@ public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactio * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -1857,6 +1873,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 7) { @@ -1994,6 +2011,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java index 72459005a..69becdaad 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BatchGetDocumentsResponse.java @@ -206,6 +206,7 @@ public ResultCase getResultCase() { * * @return Whether the found field is set. */ + @java.lang.Override public boolean hasFound() { return resultCase_ == 1; } @@ -220,6 +221,7 @@ public boolean hasFound() { * * @return The found. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getFound() { if (resultCase_ == 1) { return (com.google.firestore.v1beta1.Document) result_; @@ -235,6 +237,7 @@ public com.google.firestore.v1beta1.Document getFound() { * * .google.firestore.v1beta1.Document found = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getFoundOrBuilder() { if (resultCase_ == 1) { return (com.google.firestore.v1beta1.Document) result_; @@ -315,6 +318,7 @@ public com.google.protobuf.ByteString getMissingBytes() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -335,6 +339,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -352,6 +357,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -367,6 +373,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -815,6 +822,7 @@ public Builder clearResult() { * * @return Whether the found field is set. */ + @java.lang.Override public boolean hasFound() { return resultCase_ == 1; } @@ -829,6 +837,7 @@ public boolean hasFound() { * * @return The found. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getFound() { if (foundBuilder_ == null) { if (resultCase_ == 1) { @@ -960,6 +969,7 @@ public com.google.firestore.v1beta1.Document.Builder getFoundBuilder() { * * .google.firestore.v1beta1.Document found = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getFoundOrBuilder() { if ((resultCase_ == 1) && (foundBuilder_ != null)) { return foundBuilder_.getMessageOrBuilder(); @@ -1014,6 +1024,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getFoundOrBuilder() { * * @return The missing. */ + @java.lang.Override public java.lang.String getMissing() { java.lang.Object ref = ""; if (resultCase_ == 2) { @@ -1042,6 +1053,7 @@ public java.lang.String getMissing() { * * @return The bytes for missing. */ + @java.lang.Override public com.google.protobuf.ByteString getMissingBytes() { java.lang.Object ref = ""; if (resultCase_ == 2) { @@ -1138,6 +1150,7 @@ public Builder setMissingBytes(com.google.protobuf.ByteString value) { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java index 2c59a07c1..c70efb1f4 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -164,6 +165,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return Whether the options field is set. */ + @java.lang.Override public boolean hasOptions() { return options_ != null; } @@ -205,6 +208,7 @@ public boolean hasOptions() { * * @return The options. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions getOptions() { return options_ == null ? com.google.firestore.v1beta1.TransactionOptions.getDefaultInstance() @@ -220,6 +224,7 @@ public com.google.firestore.v1beta1.TransactionOptions getOptions() { * * .google.firestore.v1beta1.TransactionOptions options = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getOptionsOrBuilder() { return getOptions(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java index 47022a25b..0dbff539e 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/BeginTransactionResponse.java @@ -122,6 +122,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -456,6 +457,7 @@ public Builder mergeFrom( * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java index dfcefbff1..76b4d3a6d 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitRequest.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -170,6 +171,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -194,6 +196,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * repeated .google.firestore.v1beta1.Write writes = 2; */ + @java.lang.Override public java.util.List getWritesList() { return writes_; } @@ -207,6 +210,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1beta1.Write writes = 2; */ + @java.lang.Override public java.util.List getWritesOrBuilderList() { return writes_; @@ -221,6 +225,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1beta1.Write writes = 2; */ + @java.lang.Override public int getWritesCount() { return writes_.size(); } @@ -234,6 +239,7 @@ public int getWritesCount() { * * repeated .google.firestore.v1beta1.Write writes = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Write getWrites(int index) { return writes_.get(index); } @@ -247,6 +253,7 @@ public com.google.firestore.v1beta1.Write getWrites(int index) { * * repeated .google.firestore.v1beta1.Write writes = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(int index) { return writes_.get(index); } @@ -264,6 +271,7 @@ public com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(int index) * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -1146,6 +1154,7 @@ public java.util.List getWritesBuild * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java index a52993835..9a8046301 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CommitResponse.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.WriteResult write_results = 1; */ + @java.lang.Override public java.util.List getWriteResultsList() { return writeResults_; } @@ -161,6 +162,7 @@ public java.util.List getWriteResultsL * * repeated .google.firestore.v1beta1.WriteResult write_results = 1; */ + @java.lang.Override public java.util.List getWriteResultsOrBuilderList() { return writeResults_; @@ -176,6 +178,7 @@ public java.util.List getWriteResultsL * * repeated .google.firestore.v1beta1.WriteResult write_results = 1; */ + @java.lang.Override public int getWriteResultsCount() { return writeResults_.size(); } @@ -190,6 +193,7 @@ public int getWriteResultsCount() { * * repeated .google.firestore.v1beta1.WriteResult write_results = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } @@ -204,6 +208,7 @@ public com.google.firestore.v1beta1.WriteResult getWriteResults(int index) { * * repeated .google.firestore.v1beta1.WriteResult write_results = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { return writeResults_.get(index); } @@ -221,6 +226,7 @@ public com.google.firestore.v1beta1.WriteResultOrBuilder getWriteResultsOrBuilde * * @return Whether the commitTime field is set. */ + @java.lang.Override public boolean hasCommitTime() { return commitTime_ != null; } @@ -235,6 +241,7 @@ public boolean hasCommitTime() { * * @return The commitTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } @@ -247,6 +254,7 @@ public com.google.protobuf.Timestamp getCommitTime() { * * .google.protobuf.Timestamp commit_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { return getCommitTime(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java index be727d29c..154c9bc44 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/CreateDocumentRequest.java @@ -174,6 +174,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -198,6 +199,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -223,6 +225,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -245,6 +248,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -271,6 +275,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The documentId. */ + @java.lang.Override public java.lang.String getDocumentId() { java.lang.Object ref = documentId_; if (ref instanceof java.lang.String) { @@ -294,6 +299,7 @@ public java.lang.String getDocumentId() { * * @return The bytes for documentId. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentIdBytes() { java.lang.Object ref = documentId_; if (ref instanceof java.lang.String) { @@ -321,6 +327,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -337,6 +344,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getDocument() { return document_ == null ? com.google.firestore.v1beta1.Document.getDefaultInstance() @@ -353,6 +361,7 @@ public com.google.firestore.v1beta1.Document getDocument() { * .google.firestore.v1beta1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -372,6 +381,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -388,6 +398,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_; } @@ -402,6 +413,7 @@ public com.google.firestore.v1beta1.DocumentMask getMask() { * * .google.firestore.v1beta1.DocumentMask mask = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java index 7e51ee6a7..4c7f9e5b7 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Cursor.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesList() { return values_; } @@ -151,6 +152,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public java.util.List getValuesOrBuilderList() { return values_; @@ -166,6 +168,7 @@ public java.util.List getValuesList() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public int getValuesCount() { return values_.size(); } @@ -180,6 +183,7 @@ public int getValuesCount() { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getValues(int index) { return values_.get(index); } @@ -194,6 +198,7 @@ public com.google.firestore.v1beta1.Value getValues(int index) { * * repeated .google.firestore.v1beta1.Value values = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index) { return values_.get(index); } @@ -212,6 +217,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getValuesOrBuilder(int index) * * @return The before. */ + @java.lang.Override public boolean getBefore() { return before_; } @@ -983,6 +989,7 @@ public java.util.List getValuesBuild * * @return The before. */ + @java.lang.Override public boolean getBefore() { return before_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java index 32ccba2ac..ef5b3f452 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DeleteDocumentRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -164,6 +165,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -205,6 +208,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1beta1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1beta1.Precondition.getDefaultInstance() @@ -220,6 +224,7 @@ public com.google.firestore.v1beta1.Precondition getCurrentDocument() { * * .google.firestore.v1beta1.Precondition current_document = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java index 2b09f0048..f922e3e8d 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Document.java @@ -183,6 +183,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -206,6 +207,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -274,6 +276,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -281,6 +284,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -312,6 +316,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -342,6 +347,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1beta1.Value defaultValue) { if (key == null) { @@ -378,6 +384,7 @@ public com.google.firestore.v1beta1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -406,6 +413,7 @@ public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -423,6 +431,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -438,6 +447,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -458,6 +468,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -475,6 +486,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -490,6 +502,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -1074,6 +1087,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1081,6 +1095,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -1112,6 +1127,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -1142,6 +1158,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1beta1.Value defaultValue) { if (key == null) { @@ -1178,6 +1195,7 @@ public com.google.firestore.v1beta1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1beta1.Value> fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java index 092ea91d4..072ec2a11 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentChange.java @@ -192,6 +192,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -207,6 +208,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getDocument() { return document_ == null ? com.google.firestore.v1beta1.Document.getDefaultInstance() @@ -222,6 +224,7 @@ public com.google.firestore.v1beta1.Document getDocument() { * * .google.firestore.v1beta1.Document document = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -239,6 +242,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { * * @return A list containing the targetIds. */ + @java.lang.Override public java.util.List getTargetIdsList() { return targetIds_; } @@ -287,6 +291,7 @@ public int getTargetIds(int index) { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java index ead5773cf..443dd3600 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentDelete.java @@ -171,6 +171,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -193,6 +194,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -218,6 +220,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } @@ -267,6 +270,7 @@ public int getRemovedTargetIds(int index) { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -282,6 +286,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -295,6 +300,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java index e1651ba1d..ec498b973 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentRemove.java @@ -172,6 +172,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -194,6 +195,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -219,6 +221,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * * @return A list containing the removedTargetIds. */ + @java.lang.Override public java.util.List getRemovedTargetIdsList() { return removedTargetIds_; } @@ -268,6 +271,7 @@ public int getRemovedTargetIds(int index) { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -283,6 +287,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -296,6 +301,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java index f4467a30a..27b7fd1cb 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/DocumentTransform.java @@ -784,6 +784,10 @@ public ServerValue findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -891,6 +895,7 @@ public TransformTypeCase getTransformTypeCase() { * * @return The fieldPath. */ + @java.lang.Override public java.lang.String getFieldPath() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -914,6 +919,7 @@ public java.lang.String getFieldPath() { * * @return The bytes for fieldPath. */ + @java.lang.Override public com.google.protobuf.ByteString getFieldPathBytes() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -994,6 +1000,7 @@ public int getSetToServerValueValue() { * * @return Whether the increment field is set. */ + @java.lang.Override public boolean hasIncrement() { return transformTypeCase_ == 3; } @@ -1016,6 +1023,7 @@ public boolean hasIncrement() { * * @return The increment. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getIncrement() { if (transformTypeCase_ == 3) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1039,6 +1047,7 @@ public com.google.firestore.v1beta1.Value getIncrement() { * * .google.firestore.v1beta1.Value increment = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getIncrementOrBuilder() { if (transformTypeCase_ == 3) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1068,6 +1077,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getIncrementOrBuilder() { * * @return Whether the maximum field is set. */ + @java.lang.Override public boolean hasMaximum() { return transformTypeCase_ == 4; } @@ -1092,6 +1102,7 @@ public boolean hasMaximum() { * * @return The maximum. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getMaximum() { if (transformTypeCase_ == 4) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1117,6 +1128,7 @@ public com.google.firestore.v1beta1.Value getMaximum() { * * .google.firestore.v1beta1.Value maximum = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getMaximumOrBuilder() { if (transformTypeCase_ == 4) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1146,6 +1158,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getMaximumOrBuilder() { * * @return Whether the minimum field is set. */ + @java.lang.Override public boolean hasMinimum() { return transformTypeCase_ == 5; } @@ -1170,6 +1183,7 @@ public boolean hasMinimum() { * * @return The minimum. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getMinimum() { if (transformTypeCase_ == 5) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1195,6 +1209,7 @@ public com.google.firestore.v1beta1.Value getMinimum() { * * .google.firestore.v1beta1.Value minimum = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getMinimumOrBuilder() { if (transformTypeCase_ == 5) { return (com.google.firestore.v1beta1.Value) transformType_; @@ -1223,6 +1238,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getMinimumOrBuilder() { * * @return Whether the appendMissingElements field is set. */ + @java.lang.Override public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } @@ -1246,6 +1262,7 @@ public boolean hasAppendMissingElements() { * * @return The appendMissingElements. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getAppendMissingElements() { if (transformTypeCase_ == 6) { return (com.google.firestore.v1beta1.ArrayValue) transformType_; @@ -1270,6 +1287,7 @@ public com.google.firestore.v1beta1.ArrayValue getAppendMissingElements() { * * .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() { if (transformTypeCase_ == 6) { return (com.google.firestore.v1beta1.ArrayValue) transformType_; @@ -1296,6 +1314,7 @@ public com.google.firestore.v1beta1.ArrayValueOrBuilder getAppendMissingElements * * @return Whether the removeAllFromArray field is set. */ + @java.lang.Override public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } @@ -1317,6 +1336,7 @@ public boolean hasRemoveAllFromArray() { * * @return The removeAllFromArray. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getRemoveAllFromArray() { if (transformTypeCase_ == 7) { return (com.google.firestore.v1beta1.ArrayValue) transformType_; @@ -1339,6 +1359,7 @@ public com.google.firestore.v1beta1.ArrayValue getRemoveAllFromArray() { * * .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() { if (transformTypeCase_ == 7) { return (com.google.firestore.v1beta1.ArrayValue) transformType_; @@ -1987,6 +2008,7 @@ public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { * * @return The enum numeric value on the wire for setToServerValue. */ + @java.lang.Override public int getSetToServerValueValue() { if (transformTypeCase_ == 2) { return ((java.lang.Integer) transformType_).intValue(); @@ -2026,6 +2048,7 @@ public Builder setSetToServerValueValue(int value) { * * @return The setToServerValue. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue getSetToServerValue() { if (transformTypeCase_ == 2) { @@ -2111,6 +2134,7 @@ public Builder clearSetToServerValue() { * * @return Whether the increment field is set. */ + @java.lang.Override public boolean hasIncrement() { return transformTypeCase_ == 3; } @@ -2133,6 +2157,7 @@ public boolean hasIncrement() { * * @return The increment. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getIncrement() { if (incrementBuilder_ == null) { if (transformTypeCase_ == 3) { @@ -2312,6 +2337,7 @@ public com.google.firestore.v1beta1.Value.Builder getIncrementBuilder() { * * .google.firestore.v1beta1.Value increment = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getIncrementOrBuilder() { if ((transformTypeCase_ == 3) && (incrementBuilder_ != null)) { return incrementBuilder_.getMessageOrBuilder(); @@ -2390,6 +2416,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getIncrementOrBuilder() { * * @return Whether the maximum field is set. */ + @java.lang.Override public boolean hasMaximum() { return transformTypeCase_ == 4; } @@ -2414,6 +2441,7 @@ public boolean hasMaximum() { * * @return The maximum. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getMaximum() { if (maximumBuilder_ == null) { if (transformTypeCase_ == 4) { @@ -2605,6 +2633,7 @@ public com.google.firestore.v1beta1.Value.Builder getMaximumBuilder() { * * .google.firestore.v1beta1.Value maximum = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getMaximumOrBuilder() { if ((transformTypeCase_ == 4) && (maximumBuilder_ != null)) { return maximumBuilder_.getMessageOrBuilder(); @@ -2685,6 +2714,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getMaximumOrBuilder() { * * @return Whether the minimum field is set. */ + @java.lang.Override public boolean hasMinimum() { return transformTypeCase_ == 5; } @@ -2709,6 +2739,7 @@ public boolean hasMinimum() { * * @return The minimum. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getMinimum() { if (minimumBuilder_ == null) { if (transformTypeCase_ == 5) { @@ -2900,6 +2931,7 @@ public com.google.firestore.v1beta1.Value.Builder getMinimumBuilder() { * * .google.firestore.v1beta1.Value minimum = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getMinimumOrBuilder() { if ((transformTypeCase_ == 5) && (minimumBuilder_ != null)) { return minimumBuilder_.getMessageOrBuilder(); @@ -2979,6 +3011,7 @@ public com.google.firestore.v1beta1.ValueOrBuilder getMinimumOrBuilder() { * * @return Whether the appendMissingElements field is set. */ + @java.lang.Override public boolean hasAppendMissingElements() { return transformTypeCase_ == 6; } @@ -3002,6 +3035,7 @@ public boolean hasAppendMissingElements() { * * @return The appendMissingElements. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getAppendMissingElements() { if (appendMissingElementsBuilder_ == null) { if (transformTypeCase_ == 6) { @@ -3188,6 +3222,7 @@ public com.google.firestore.v1beta1.ArrayValue.Builder getAppendMissingElementsB * * .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getAppendMissingElementsOrBuilder() { if ((transformTypeCase_ == 6) && (appendMissingElementsBuilder_ != null)) { return appendMissingElementsBuilder_.getMessageOrBuilder(); @@ -3264,6 +3299,7 @@ public com.google.firestore.v1beta1.ArrayValueOrBuilder getAppendMissingElements * * @return Whether the removeAllFromArray field is set. */ + @java.lang.Override public boolean hasRemoveAllFromArray() { return transformTypeCase_ == 7; } @@ -3285,6 +3321,7 @@ public boolean hasRemoveAllFromArray() { * * @return The removeAllFromArray. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getRemoveAllFromArray() { if (removeAllFromArrayBuilder_ == null) { if (transformTypeCase_ == 7) { @@ -3459,6 +3496,7 @@ public com.google.firestore.v1beta1.ArrayValue.Builder getRemoveAllFromArrayBuil * * .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getRemoveAllFromArrayOrBuilder() { if ((transformTypeCase_ == 7) && (removeAllFromArrayBuilder_ != null)) { return removeAllFromArrayBuilder_.getMessageOrBuilder(); @@ -3578,6 +3616,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -3600,6 +3639,7 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; if (ref instanceof java.lang.String) { @@ -3627,6 +3667,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public java.util.List getFieldTransformsList() { return fieldTransforms_; @@ -3643,6 +3684,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public java.util.List< ? extends com.google.firestore.v1beta1.DocumentTransform.FieldTransformOrBuilder> getFieldTransformsOrBuilderList() { @@ -3660,6 +3702,7 @@ public com.google.protobuf.ByteString getDocumentBytes() { * repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public int getFieldTransformsCount() { return fieldTransforms_.size(); } @@ -3675,6 +3718,7 @@ public int getFieldTransformsCount() { * repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransform.FieldTransform getFieldTransforms( int index) { return fieldTransforms_.get(index); @@ -3691,6 +3735,7 @@ public com.google.firestore.v1beta1.DocumentTransform.FieldTransform getFieldTra * repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; * */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransform.FieldTransformOrBuilder getFieldTransformsOrBuilder(int index) { return fieldTransforms_.get(index); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java index 3b509b13a..93b532597 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ExistenceFilter.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -144,6 +145,7 @@ public int getTargetId() { * * @return The count. */ + @java.lang.Override public int getCount() { return count_; } @@ -490,6 +492,7 @@ public Builder mergeFrom( * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -543,6 +546,7 @@ public Builder clearTargetId() { * * @return The count. */ + @java.lang.Override public int getCount() { return count_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java index 6a8bfa342..8f4124a53 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/GetDocumentRequest.java @@ -209,6 +209,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -232,6 +233,7 @@ public java.lang.String getName() { * * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -259,6 +261,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -275,6 +278,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_; } @@ -289,6 +293,7 @@ public com.google.firestore.v1beta1.DocumentMask getMask() { * * .google.firestore.v1beta1.DocumentMask mask = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -305,6 +310,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 3) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -325,6 +331,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 5; } @@ -340,6 +347,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -356,6 +364,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 5; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1179,6 +1188,7 @@ public Builder clearTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 5; } @@ -1194,6 +1204,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 5) { @@ -1331,6 +1342,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 5; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 5) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java index 7331f9e9b..b5d0328a0 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsRequest.java @@ -140,6 +140,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -165,6 +166,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -208,6 +211,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -231,6 +235,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -726,6 +731,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java index 013812d92..05ce157e5 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListCollectionIdsResponse.java @@ -200,6 +200,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -222,6 +223,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java index fc2136f84..beea3cf19 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsRequest.java @@ -247,6 +247,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -274,6 +275,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -300,6 +302,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -323,6 +326,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -348,6 +352,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -365,6 +370,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -387,6 +393,7 @@ public java.lang.String getPageToken() { * * @return The bytes for pageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -412,6 +419,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * @return The orderBy. */ + @java.lang.Override public java.lang.String getOrderBy() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -434,6 +442,7 @@ public java.lang.String getOrderBy() { * * @return The bytes for orderBy. */ + @java.lang.Override public com.google.protobuf.ByteString getOrderByBytes() { java.lang.Object ref = orderBy_; if (ref instanceof java.lang.String) { @@ -461,6 +470,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -477,6 +487,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_; } @@ -491,6 +502,7 @@ public com.google.firestore.v1beta1.DocumentMask getMask() { * * .google.firestore.v1beta1.DocumentMask mask = 7; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -507,6 +519,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 8) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -527,6 +540,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 10; } @@ -542,6 +556,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 10) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -558,6 +573,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 10) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -583,6 +599,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The showMissing. */ + @java.lang.Override public boolean getShowMissing() { return showMissing_; } @@ -1347,6 +1364,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -1876,6 +1894,7 @@ public Builder clearTransaction() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 10; } @@ -1891,6 +1910,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 10) { @@ -2028,6 +2048,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 10) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -2090,6 +2111,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The showMissing. */ + @java.lang.Override public boolean getShowMissing() { return showMissing_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java index 82ceb5636..a1babc8b2 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListDocumentsResponse.java @@ -138,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.Document documents = 1; */ + @java.lang.Override public java.util.List getDocumentsList() { return documents_; } @@ -150,6 +151,7 @@ public java.util.List getDocumentsList() * * repeated .google.firestore.v1beta1.Document documents = 1; */ + @java.lang.Override public java.util.List getDocumentsOrBuilderList() { return documents_; @@ -163,6 +165,7 @@ public java.util.List getDocumentsList() * * repeated .google.firestore.v1beta1.Document documents = 1; */ + @java.lang.Override public int getDocumentsCount() { return documents_.size(); } @@ -175,6 +178,7 @@ public int getDocumentsCount() { * * repeated .google.firestore.v1beta1.Document documents = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Document getDocuments(int index) { return documents_.get(index); } @@ -187,6 +191,7 @@ public com.google.firestore.v1beta1.Document getDocuments(int index) { * * repeated .google.firestore.v1beta1.Document documents = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentsOrBuilder(int index) { return documents_.get(index); } @@ -204,6 +209,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentsOrBuilder(int * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -226,6 +232,7 @@ public java.lang.String getNextPageToken() { * * @return The bytes for nextPageToken. */ + @java.lang.Override public com.google.protobuf.ByteString getNextPageTokenBytes() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenRequest.java index b32e607f8..72b2b6abf 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenRequest.java @@ -219,6 +219,7 @@ public TargetChangeCase getTargetChangeCase() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -242,6 +243,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -266,6 +268,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return Whether the addTarget field is set. */ + @java.lang.Override public boolean hasAddTarget() { return targetChangeCase_ == 2; } @@ -280,6 +283,7 @@ public boolean hasAddTarget() { * * @return The addTarget. */ + @java.lang.Override public com.google.firestore.v1beta1.Target getAddTarget() { if (targetChangeCase_ == 2) { return (com.google.firestore.v1beta1.Target) targetChange_; @@ -295,6 +299,7 @@ public com.google.firestore.v1beta1.Target getAddTarget() { * * .google.firestore.v1beta1.Target add_target = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TargetOrBuilder getAddTargetOrBuilder() { if (targetChangeCase_ == 2) { return (com.google.firestore.v1beta1.Target) targetChange_; @@ -314,6 +319,7 @@ public com.google.firestore.v1beta1.TargetOrBuilder getAddTargetOrBuilder() { * * @return The removeTarget. */ + @java.lang.Override public int getRemoveTarget() { if (targetChangeCase_ == 3) { return (java.lang.Integer) targetChange_; @@ -355,6 +361,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -362,6 +369,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -375,6 +383,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -387,6 +396,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -403,6 +413,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -983,6 +994,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { * * @return Whether the addTarget field is set. */ + @java.lang.Override public boolean hasAddTarget() { return targetChangeCase_ == 2; } @@ -997,6 +1009,7 @@ public boolean hasAddTarget() { * * @return The addTarget. */ + @java.lang.Override public com.google.firestore.v1beta1.Target getAddTarget() { if (addTargetBuilder_ == null) { if (targetChangeCase_ == 2) { @@ -1128,6 +1141,7 @@ public com.google.firestore.v1beta1.Target.Builder getAddTargetBuilder() { * * .google.firestore.v1beta1.Target add_target = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TargetOrBuilder getAddTargetOrBuilder() { if ((targetChangeCase_ == 2) && (addTargetBuilder_ != null)) { return addTargetBuilder_.getMessageOrBuilder(); @@ -1261,6 +1275,7 @@ public int getLabelsCount() { * * map<string, string> labels = 4; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1268,6 +1283,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1281,6 +1297,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1293,6 +1310,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1310,6 +1328,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 4; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java index 6a7b16d8f..41d37f8aa 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/ListenResponse.java @@ -255,6 +255,7 @@ public ResponseTypeCase getResponseTypeCase() { * * @return Whether the targetChange field is set. */ + @java.lang.Override public boolean hasTargetChange() { return responseTypeCase_ == 2; } @@ -269,6 +270,7 @@ public boolean hasTargetChange() { * * @return The targetChange. */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChange getTargetChange() { if (responseTypeCase_ == 2) { return (com.google.firestore.v1beta1.TargetChange) responseType_; @@ -284,6 +286,7 @@ public com.google.firestore.v1beta1.TargetChange getTargetChange() { * * .google.firestore.v1beta1.TargetChange target_change = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChangeOrBuilder getTargetChangeOrBuilder() { if (responseTypeCase_ == 2) { return (com.google.firestore.v1beta1.TargetChange) responseType_; @@ -303,6 +306,7 @@ public com.google.firestore.v1beta1.TargetChangeOrBuilder getTargetChangeOrBuild * * @return Whether the documentChange field is set. */ + @java.lang.Override public boolean hasDocumentChange() { return responseTypeCase_ == 3; } @@ -317,6 +321,7 @@ public boolean hasDocumentChange() { * * @return The documentChange. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentChange getDocumentChange() { if (responseTypeCase_ == 3) { return (com.google.firestore.v1beta1.DocumentChange) responseType_; @@ -332,6 +337,7 @@ public com.google.firestore.v1beta1.DocumentChange getDocumentChange() { * * .google.firestore.v1beta1.DocumentChange document_change = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentChangeOrBuilder getDocumentChangeOrBuilder() { if (responseTypeCase_ == 3) { return (com.google.firestore.v1beta1.DocumentChange) responseType_; @@ -351,6 +357,7 @@ public com.google.firestore.v1beta1.DocumentChangeOrBuilder getDocumentChangeOrB * * @return Whether the documentDelete field is set. */ + @java.lang.Override public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } @@ -365,6 +372,7 @@ public boolean hasDocumentDelete() { * * @return The documentDelete. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentDelete getDocumentDelete() { if (responseTypeCase_ == 4) { return (com.google.firestore.v1beta1.DocumentDelete) responseType_; @@ -380,6 +388,7 @@ public com.google.firestore.v1beta1.DocumentDelete getDocumentDelete() { * * .google.firestore.v1beta1.DocumentDelete document_delete = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilder() { if (responseTypeCase_ == 4) { return (com.google.firestore.v1beta1.DocumentDelete) responseType_; @@ -400,6 +409,7 @@ public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrB * * @return Whether the documentRemove field is set. */ + @java.lang.Override public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } @@ -415,6 +425,7 @@ public boolean hasDocumentRemove() { * * @return The documentRemove. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentRemove getDocumentRemove() { if (responseTypeCase_ == 6) { return (com.google.firestore.v1beta1.DocumentRemove) responseType_; @@ -431,6 +442,7 @@ public com.google.firestore.v1beta1.DocumentRemove getDocumentRemove() { * * .google.firestore.v1beta1.DocumentRemove document_remove = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilder() { if (responseTypeCase_ == 6) { return (com.google.firestore.v1beta1.DocumentRemove) responseType_; @@ -453,6 +465,7 @@ public com.google.firestore.v1beta1.DocumentRemoveOrBuilder getDocumentRemoveOrB * * @return Whether the filter field is set. */ + @java.lang.Override public boolean hasFilter() { return responseTypeCase_ == 5; } @@ -470,6 +483,7 @@ public boolean hasFilter() { * * @return The filter. */ + @java.lang.Override public com.google.firestore.v1beta1.ExistenceFilter getFilter() { if (responseTypeCase_ == 5) { return (com.google.firestore.v1beta1.ExistenceFilter) responseType_; @@ -488,6 +502,7 @@ public com.google.firestore.v1beta1.ExistenceFilter getFilter() { * * .google.firestore.v1beta1.ExistenceFilter filter = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.ExistenceFilterOrBuilder getFilterOrBuilder() { if (responseTypeCase_ == 5) { return (com.google.firestore.v1beta1.ExistenceFilter) responseType_; @@ -978,6 +993,7 @@ public Builder clearResponseType() { * * @return Whether the targetChange field is set. */ + @java.lang.Override public boolean hasTargetChange() { return responseTypeCase_ == 2; } @@ -992,6 +1008,7 @@ public boolean hasTargetChange() { * * @return The targetChange. */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChange getTargetChange() { if (targetChangeBuilder_ == null) { if (responseTypeCase_ == 2) { @@ -1124,6 +1141,7 @@ public com.google.firestore.v1beta1.TargetChange.Builder getTargetChangeBuilder( * * .google.firestore.v1beta1.TargetChange target_change = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChangeOrBuilder getTargetChangeOrBuilder() { if ((responseTypeCase_ == 2) && (targetChangeBuilder_ != null)) { return targetChangeBuilder_.getMessageOrBuilder(); @@ -1184,6 +1202,7 @@ public com.google.firestore.v1beta1.TargetChangeOrBuilder getTargetChangeOrBuild * * @return Whether the documentChange field is set. */ + @java.lang.Override public boolean hasDocumentChange() { return responseTypeCase_ == 3; } @@ -1198,6 +1217,7 @@ public boolean hasDocumentChange() { * * @return The documentChange. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentChange getDocumentChange() { if (documentChangeBuilder_ == null) { if (responseTypeCase_ == 3) { @@ -1330,6 +1350,7 @@ public com.google.firestore.v1beta1.DocumentChange.Builder getDocumentChangeBuil * * .google.firestore.v1beta1.DocumentChange document_change = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentChangeOrBuilder getDocumentChangeOrBuilder() { if ((responseTypeCase_ == 3) && (documentChangeBuilder_ != null)) { return documentChangeBuilder_.getMessageOrBuilder(); @@ -1390,6 +1411,7 @@ public com.google.firestore.v1beta1.DocumentChangeOrBuilder getDocumentChangeOrB * * @return Whether the documentDelete field is set. */ + @java.lang.Override public boolean hasDocumentDelete() { return responseTypeCase_ == 4; } @@ -1404,6 +1426,7 @@ public boolean hasDocumentDelete() { * * @return The documentDelete. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentDelete getDocumentDelete() { if (documentDeleteBuilder_ == null) { if (responseTypeCase_ == 4) { @@ -1536,6 +1559,7 @@ public com.google.firestore.v1beta1.DocumentDelete.Builder getDocumentDeleteBuil * * .google.firestore.v1beta1.DocumentDelete document_delete = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrBuilder() { if ((responseTypeCase_ == 4) && (documentDeleteBuilder_ != null)) { return documentDeleteBuilder_.getMessageOrBuilder(); @@ -1597,6 +1621,7 @@ public com.google.firestore.v1beta1.DocumentDeleteOrBuilder getDocumentDeleteOrB * * @return Whether the documentRemove field is set. */ + @java.lang.Override public boolean hasDocumentRemove() { return responseTypeCase_ == 6; } @@ -1612,6 +1637,7 @@ public boolean hasDocumentRemove() { * * @return The documentRemove. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentRemove getDocumentRemove() { if (documentRemoveBuilder_ == null) { if (responseTypeCase_ == 6) { @@ -1750,6 +1776,7 @@ public com.google.firestore.v1beta1.DocumentRemove.Builder getDocumentRemoveBuil * * .google.firestore.v1beta1.DocumentRemove document_remove = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentRemoveOrBuilder getDocumentRemoveOrBuilder() { if ((responseTypeCase_ == 6) && (documentRemoveBuilder_ != null)) { return documentRemoveBuilder_.getMessageOrBuilder(); @@ -1814,6 +1841,7 @@ public com.google.firestore.v1beta1.DocumentRemoveOrBuilder getDocumentRemoveOrB * * @return Whether the filter field is set. */ + @java.lang.Override public boolean hasFilter() { return responseTypeCase_ == 5; } @@ -1831,6 +1859,7 @@ public boolean hasFilter() { * * @return The filter. */ + @java.lang.Override public com.google.firestore.v1beta1.ExistenceFilter getFilter() { if (filterBuilder_ == null) { if (responseTypeCase_ == 5) { @@ -1980,6 +2009,7 @@ public com.google.firestore.v1beta1.ExistenceFilter.Builder getFilterBuilder() { * * .google.firestore.v1beta1.ExistenceFilter filter = 5; */ + @java.lang.Override public com.google.firestore.v1beta1.ExistenceFilterOrBuilder getFilterOrBuilder() { if ((responseTypeCase_ == 5) && (filterBuilder_ != null)) { return filterBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/MapValue.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/MapValue.java index 037af7c60..5b30ab064 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/MapValue.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/MapValue.java @@ -171,6 +171,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -178,6 +179,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -195,6 +197,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -211,6 +214,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1beta1.Value defaultValue) { if (key == null) { @@ -233,6 +237,7 @@ public com.google.firestore.v1beta1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -627,6 +632,7 @@ public int getFieldsCount() { * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -634,6 +640,7 @@ public boolean containsFields(java.lang.String key) { return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getFields() { return getFieldsMap(); @@ -651,6 +658,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public java.util.Map getFieldsMap() { return internalGetFields().getMap(); } @@ -667,6 +675,7 @@ public java.util.Map getFi * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1beta1.Value defaultValue) { if (key == null) { @@ -689,6 +698,7 @@ public com.google.firestore.v1beta1.Value getFieldsOrDefault( * * map<string, .google.firestore.v1beta1.Value> fields = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Precondition.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Precondition.java index 4693a722c..5dc8429ce 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Precondition.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Precondition.java @@ -183,6 +183,7 @@ public ConditionTypeCase getConditionTypeCase() { * * @return The exists. */ + @java.lang.Override public boolean getExists() { if (conditionTypeCase_ == 1) { return (java.lang.Boolean) conditionType_; @@ -203,6 +204,7 @@ public boolean getExists() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } @@ -218,6 +220,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { if (conditionTypeCase_ == 2) { return (com.google.protobuf.Timestamp) conditionType_; @@ -234,6 +237,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (conditionTypeCase_ == 2) { return (com.google.protobuf.Timestamp) conditionType_; @@ -698,6 +702,7 @@ public Builder clearExists() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return conditionTypeCase_ == 2; } @@ -713,6 +718,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { if (conditionTypeCase_ == 2) { @@ -850,6 +856,7 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * .google.protobuf.Timestamp update_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if ((conditionTypeCase_ == 2) && (updateTimeBuilder_ != null)) { return updateTimeBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java index a1eb2e3ed..cadbdf9ad 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RollbackRequest.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -154,6 +155,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -179,6 +181,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -637,6 +640,7 @@ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java index 8937d9dbb..0621d2f42 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryRequest.java @@ -280,6 +280,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -307,6 +308,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -331,6 +333,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -345,6 +348,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery) queryType_; @@ -360,6 +364,7 @@ public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { * * .google.firestore.v1beta1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery) queryType_; @@ -379,6 +384,7 @@ public com.google.firestore.v1beta1.StructuredQueryOrBuilder getStructuredQueryO * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { if (consistencySelectorCase_ == 5) { return (com.google.protobuf.ByteString) consistencySelector_; @@ -401,6 +407,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } @@ -418,6 +425,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { if (consistencySelectorCase_ == 6) { return (com.google.firestore.v1beta1.TransactionOptions) consistencySelector_; @@ -436,6 +444,7 @@ public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { * * .google.firestore.v1beta1.TransactionOptions new_transaction = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if (consistencySelectorCase_ == 6) { return (com.google.firestore.v1beta1.TransactionOptions) consistencySelector_; @@ -456,6 +465,7 @@ public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactio * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -471,6 +481,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -487,6 +498,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 7) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1126,6 +1138,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1140,6 +1153,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { if (structuredQueryBuilder_ == null) { if (queryTypeCase_ == 2) { @@ -1272,6 +1286,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Builder getStructuredQueryBu * * .google.firestore.v1beta1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if ((queryTypeCase_ == 2) && (structuredQueryBuilder_ != null)) { return structuredQueryBuilder_.getMessageOrBuilder(); @@ -1393,6 +1408,7 @@ public Builder clearTransaction() { * * @return Whether the newTransaction field is set. */ + @java.lang.Override public boolean hasNewTransaction() { return consistencySelectorCase_ == 6; } @@ -1410,6 +1426,7 @@ public boolean hasNewTransaction() { * * @return The newTransaction. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions getNewTransaction() { if (newTransactionBuilder_ == null) { if (consistencySelectorCase_ == 6) { @@ -1561,6 +1578,7 @@ public com.google.firestore.v1beta1.TransactionOptions.Builder getNewTransaction * * .google.firestore.v1beta1.TransactionOptions new_transaction = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactionOrBuilder() { if ((consistencySelectorCase_ == 6) && (newTransactionBuilder_ != null)) { return newTransactionBuilder_.getMessageOrBuilder(); @@ -1626,6 +1644,7 @@ public com.google.firestore.v1beta1.TransactionOptionsOrBuilder getNewTransactio * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 7; } @@ -1641,6 +1660,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 7) { @@ -1778,6 +1798,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 7) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java index 802f15b88..968a53a4e 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/RunQueryResponse.java @@ -161,6 +161,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -179,6 +180,7 @@ public com.google.protobuf.ByteString getTransaction() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -194,6 +196,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getDocument() { return document_ == null ? com.google.firestore.v1beta1.Document.getDefaultInstance() @@ -209,6 +212,7 @@ public com.google.firestore.v1beta1.Document getDocument() { * * .google.firestore.v1beta1.Document document = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -231,6 +235,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -250,6 +255,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -267,6 +273,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -285,6 +292,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The skippedResults. */ + @java.lang.Override public int getSkippedResults() { return skippedResults_; } @@ -690,6 +698,7 @@ public Builder mergeFrom( * * @return The transaction. */ + @java.lang.Override public com.google.protobuf.ByteString getTransaction() { return transaction_; } @@ -1169,6 +1178,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The skippedResults. */ + @java.lang.Override public int getSkippedResults() { return skippedResults_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java index 6c0bdec35..373131db4 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/StructuredQuery.java @@ -346,6 +346,10 @@ public Direction findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -537,6 +541,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The collectionId. */ + @java.lang.Override public java.lang.String getCollectionId() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -560,6 +565,7 @@ public java.lang.String getCollectionId() { * * @return The bytes for collectionId. */ + @java.lang.Override public com.google.protobuf.ByteString getCollectionIdBytes() { java.lang.Object ref = collectionId_; if (ref instanceof java.lang.String) { @@ -587,6 +593,7 @@ public com.google.protobuf.ByteString getCollectionIdBytes() { * * @return The allDescendants. */ + @java.lang.Override public boolean getAllDescendants() { return allDescendants_; } @@ -1060,6 +1067,7 @@ public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { * * @return The allDescendants. */ + @java.lang.Override public boolean getAllDescendants() { return allDescendants_; } @@ -1478,6 +1486,7 @@ public FilterTypeCase getFilterTypeCase() { * * @return Whether the compositeFilter field is set. */ + @java.lang.Override public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } @@ -1492,6 +1501,7 @@ public boolean hasCompositeFilter() { * * @return The compositeFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter getCompositeFilter() { if (filterTypeCase_ == 1) { return (com.google.firestore.v1beta1.StructuredQuery.CompositeFilter) filterType_; @@ -1507,6 +1517,7 @@ public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter getComposite * * .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilterOrBuilder getCompositeFilterOrBuilder() { if (filterTypeCase_ == 1) { @@ -1527,6 +1538,7 @@ public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter getComposite * * @return Whether the fieldFilter field is set. */ + @java.lang.Override public boolean hasFieldFilter() { return filterTypeCase_ == 2; } @@ -1541,6 +1553,7 @@ public boolean hasFieldFilter() { * * @return The fieldFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getFieldFilter() { if (filterTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery.FieldFilter) filterType_; @@ -1556,6 +1569,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getFieldFilter() * * .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilterOrBuilder getFieldFilterOrBuilder() { if (filterTypeCase_ == 2) { @@ -1576,6 +1590,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getFieldFilter() * * @return Whether the unaryFilter field is set. */ + @java.lang.Override public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } @@ -1590,6 +1605,7 @@ public boolean hasUnaryFilter() { * * @return The unaryFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getUnaryFilter() { if (filterTypeCase_ == 3) { return (com.google.firestore.v1beta1.StructuredQuery.UnaryFilter) filterType_; @@ -1605,6 +1621,7 @@ public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getUnaryFilter() * * .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilterOrBuilder getUnaryFilterOrBuilder() { if (filterTypeCase_ == 3) { @@ -2053,6 +2070,7 @@ public Builder clearFilterType() { * * @return Whether the compositeFilter field is set. */ + @java.lang.Override public boolean hasCompositeFilter() { return filterTypeCase_ == 1; } @@ -2068,6 +2086,7 @@ public boolean hasCompositeFilter() { * * @return The compositeFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter getCompositeFilter() { if (compositeFilterBuilder_ == null) { if (filterTypeCase_ == 1) { @@ -2211,6 +2230,7 @@ public Builder clearCompositeFilter() { * .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; * */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilterOrBuilder getCompositeFilterOrBuilder() { if ((filterTypeCase_ == 1) && (compositeFilterBuilder_ != null)) { @@ -2274,6 +2294,7 @@ public Builder clearCompositeFilter() { * * @return Whether the fieldFilter field is set. */ + @java.lang.Override public boolean hasFieldFilter() { return filterTypeCase_ == 2; } @@ -2288,6 +2309,7 @@ public boolean hasFieldFilter() { * * @return The fieldFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilter getFieldFilter() { if (fieldFilterBuilder_ == null) { if (filterTypeCase_ == 2) { @@ -2425,6 +2447,7 @@ public Builder clearFieldFilter() { * * .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilterOrBuilder getFieldFilterOrBuilder() { if ((filterTypeCase_ == 2) && (fieldFilterBuilder_ != null)) { @@ -2487,6 +2510,7 @@ public Builder clearFieldFilter() { * * @return Whether the unaryFilter field is set. */ + @java.lang.Override public boolean hasUnaryFilter() { return filterTypeCase_ == 3; } @@ -2501,6 +2525,7 @@ public boolean hasUnaryFilter() { * * @return The unaryFilter. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter getUnaryFilter() { if (unaryFilterBuilder_ == null) { if (filterTypeCase_ == 3) { @@ -2638,6 +2663,7 @@ public Builder clearUnaryFilter() { * * .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilterOrBuilder getUnaryFilterOrBuilder() { if ((filterTypeCase_ == 3) && (unaryFilterBuilder_ != null)) { @@ -3034,6 +3060,10 @@ public Operator findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -3081,6 +3111,7 @@ private Operator(int value) { * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -3095,6 +3126,7 @@ public int getOpValue() { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator result = @@ -3116,6 +3148,7 @@ public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator get * * repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public java.util.List getFiltersList() { return filters_; } @@ -3129,6 +3162,7 @@ public java.util.List getFi * * repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public java.util.List getFiltersOrBuilderList() { return filters_; @@ -3143,6 +3177,7 @@ public java.util.List getFi * * repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public int getFiltersCount() { return filters_.size(); } @@ -3156,6 +3191,7 @@ public int getFiltersCount() { * * repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Filter getFilters(int index) { return filters_.get(index); } @@ -3169,6 +3205,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Filter getFilters(int index) * * repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FilterOrBuilder getFiltersOrBuilder( int index) { return filters_.get(index); @@ -3575,6 +3612,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -3591,6 +3629,7 @@ public int getOpValue() { * @return This builder for chaining. */ public Builder setOpValue(int value) { + op_ = value; onChanged(); return this; @@ -3606,6 +3645,7 @@ public Builder setOpValue(int value) { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator result = @@ -4572,6 +4612,10 @@ public Operator findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -4619,6 +4663,7 @@ private Operator(int value) { * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return field_ != null; } @@ -4633,6 +4678,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { return field_ == null ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() @@ -4647,6 +4693,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { * * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { return getField(); @@ -4665,6 +4712,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -4679,6 +4727,7 @@ public int getOpValue() { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator result = @@ -4701,6 +4750,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator getOp() * * @return Whether the value field is set. */ + @java.lang.Override public boolean hasValue() { return value_ != null; } @@ -4715,6 +4765,7 @@ public boolean hasValue() { * * @return The value. */ + @java.lang.Override public com.google.firestore.v1beta1.Value getValue() { return value_ == null ? com.google.firestore.v1beta1.Value.getDefaultInstance() : value_; } @@ -4727,6 +4778,7 @@ public com.google.firestore.v1beta1.Value getValue() { * * .google.firestore.v1beta1.Value value = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getValueOrBuilder() { return getValue(); } @@ -5312,6 +5364,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFi * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -5328,6 +5381,7 @@ public int getOpValue() { * @return This builder for chaining. */ public Builder setOpValue(int value) { + op_ = value; onChanged(); return this; @@ -5343,6 +5397,7 @@ public Builder setOpValue(int value) { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator result = @@ -5927,6 +5982,10 @@ public Operator findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -6018,6 +6077,7 @@ public OperandTypeCase getOperandTypeCase() { * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -6032,6 +6092,7 @@ public int getOpValue() { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = @@ -6053,6 +6114,7 @@ public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return operandTypeCase_ == 2; } @@ -6067,6 +6129,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { if (operandTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery.FieldReference) operandType_; @@ -6082,6 +6145,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { * * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { if (operandTypeCase_ == 2) { @@ -6488,6 +6552,7 @@ public Builder clearOperandType() { * * @return The enum numeric value on the wire for op. */ + @java.lang.Override public int getOpValue() { return op_; } @@ -6504,6 +6569,7 @@ public int getOpValue() { * @return This builder for chaining. */ public Builder setOpValue(int value) { + op_ = value; onChanged(); return this; @@ -6519,6 +6585,7 @@ public Builder setOpValue(int value) { * * @return The op. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator getOp() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator result = @@ -6583,6 +6650,7 @@ public Builder clearOp() { * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return operandTypeCase_ == 2; } @@ -6597,6 +6665,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { if (fieldBuilder_ == null) { if (operandTypeCase_ == 2) { @@ -6731,6 +6800,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFi * * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { if ((operandTypeCase_ == 2) && (fieldBuilder_ != null)) { @@ -7018,6 +7088,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the field field is set. */ + @java.lang.Override public boolean hasField() { return field_ != null; } @@ -7032,6 +7103,7 @@ public boolean hasField() { * * @return The field. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { return field_ == null ? com.google.firestore.v1beta1.StructuredQuery.FieldReference.getDefaultInstance() @@ -7046,6 +7118,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { * * .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder() { return getField(); @@ -7064,6 +7137,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getField() { * * @return The enum numeric value on the wire for direction. */ + @java.lang.Override public int getDirectionValue() { return direction_; } @@ -7078,6 +7152,7 @@ public int getDirectionValue() { * * @return The direction. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.Direction result = @@ -7639,6 +7714,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference.Builder getFi * * @return The enum numeric value on the wire for direction. */ + @java.lang.Override public int getDirectionValue() { return direction_; } @@ -7655,6 +7731,7 @@ public int getDirectionValue() { * @return This builder for chaining. */ public Builder setDirectionValue(int value) { + direction_ = value; onChanged(); return this; @@ -7670,6 +7747,7 @@ public Builder setDirectionValue(int value) { * * @return The direction. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Direction getDirection() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.StructuredQuery.Direction result = @@ -7887,6 +7965,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The fieldPath. */ + @java.lang.Override public java.lang.String getFieldPath() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -7903,6 +7982,7 @@ public java.lang.String getFieldPath() { * * @return The bytes for fieldPath. */ + @java.lang.Override public com.google.protobuf.ByteString getFieldPathBytes() { java.lang.Object ref = fieldPath_; if (ref instanceof java.lang.String) { @@ -8555,6 +8635,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ + @java.lang.Override public java.util.List getFieldsList() { return fields_; @@ -8570,6 +8651,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ + @java.lang.Override public java.util.List< ? extends com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder> getFieldsOrBuilderList() { @@ -8586,6 +8668,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ + @java.lang.Override public int getFieldsCount() { return fields_.size(); } @@ -8600,6 +8683,7 @@ public int getFieldsCount() { * * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int index) { return fields_.get(index); } @@ -8614,6 +8698,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FieldReference getFields(int * * repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FieldReferenceOrBuilder getFieldsOrBuilder( int index) { return fields_.get(index); @@ -9451,6 +9536,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Projection getDefaultInstanc * * @return Whether the select field is set. */ + @java.lang.Override public boolean hasSelect() { return select_ != null; } @@ -9465,6 +9551,7 @@ public boolean hasSelect() { * * @return The select. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Projection getSelect() { return select_ == null ? com.google.firestore.v1beta1.StructuredQuery.Projection.getDefaultInstance() @@ -9479,6 +9566,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Projection getSelect() { * * .google.firestore.v1beta1.StructuredQuery.Projection select = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder getSelectOrBuilder() { return getSelect(); } @@ -9494,6 +9582,7 @@ public com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder getSelec * * repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public java.util.List getFromList() { return from_; @@ -9507,6 +9596,7 @@ public com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder getSelec * * repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public java.util.List< ? extends com.google.firestore.v1beta1.StructuredQuery.CollectionSelectorOrBuilder> getFromOrBuilderList() { @@ -9521,6 +9611,7 @@ public com.google.firestore.v1beta1.StructuredQuery.ProjectionOrBuilder getSelec * * repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public int getFromCount() { return from_.size(); } @@ -9533,6 +9624,7 @@ public int getFromCount() { * * repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CollectionSelector getFrom(int index) { return from_.get(index); } @@ -9545,6 +9637,7 @@ public com.google.firestore.v1beta1.StructuredQuery.CollectionSelector getFrom(i * * repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.CollectionSelectorOrBuilder getFromOrBuilder( int index) { return from_.get(index); @@ -9563,6 +9656,7 @@ public com.google.firestore.v1beta1.StructuredQuery.CollectionSelectorOrBuilder * * @return Whether the where field is set. */ + @java.lang.Override public boolean hasWhere() { return where_ != null; } @@ -9577,6 +9671,7 @@ public boolean hasWhere() { * * @return The where. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Filter getWhere() { return where_ == null ? com.google.firestore.v1beta1.StructuredQuery.Filter.getDefaultInstance() @@ -9591,6 +9686,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Filter getWhere() { * * .google.firestore.v1beta1.StructuredQuery.Filter where = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.FilterOrBuilder getWhereOrBuilder() { return getWhere(); } @@ -9619,6 +9715,7 @@ public com.google.firestore.v1beta1.StructuredQuery.FilterOrBuilder getWhereOrBu * * repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public java.util.List getOrderByList() { return orderBy_; } @@ -9644,6 +9741,7 @@ public java.util.List getOrd * * repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public java.util.List getOrderByOrBuilderList() { return orderBy_; @@ -9670,6 +9768,7 @@ public java.util.List getOrd * * repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public int getOrderByCount() { return orderBy_.size(); } @@ -9695,6 +9794,7 @@ public int getOrderByCount() { * * repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.Order getOrderBy(int index) { return orderBy_.get(index); } @@ -9720,6 +9820,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Order getOrderBy(int index) * * repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery.OrderOrBuilder getOrderByOrBuilder( int index) { return orderBy_.get(index); @@ -9738,6 +9839,7 @@ public com.google.firestore.v1beta1.StructuredQuery.OrderOrBuilder getOrderByOrB * * @return Whether the startAt field is set. */ + @java.lang.Override public boolean hasStartAt() { return startAt_ != null; } @@ -9752,6 +9854,7 @@ public boolean hasStartAt() { * * @return The startAt. */ + @java.lang.Override public com.google.firestore.v1beta1.Cursor getStartAt() { return startAt_ == null ? com.google.firestore.v1beta1.Cursor.getDefaultInstance() : startAt_; } @@ -9764,6 +9867,7 @@ public com.google.firestore.v1beta1.Cursor getStartAt() { * * .google.firestore.v1beta1.Cursor start_at = 7; */ + @java.lang.Override public com.google.firestore.v1beta1.CursorOrBuilder getStartAtOrBuilder() { return getStartAt(); } @@ -9781,6 +9885,7 @@ public com.google.firestore.v1beta1.CursorOrBuilder getStartAtOrBuilder() { * * @return Whether the endAt field is set. */ + @java.lang.Override public boolean hasEndAt() { return endAt_ != null; } @@ -9795,6 +9900,7 @@ public boolean hasEndAt() { * * @return The endAt. */ + @java.lang.Override public com.google.firestore.v1beta1.Cursor getEndAt() { return endAt_ == null ? com.google.firestore.v1beta1.Cursor.getDefaultInstance() : endAt_; } @@ -9807,6 +9913,7 @@ public com.google.firestore.v1beta1.Cursor getEndAt() { * * .google.firestore.v1beta1.Cursor end_at = 8; */ + @java.lang.Override public com.google.firestore.v1beta1.CursorOrBuilder getEndAtOrBuilder() { return getEndAt(); } @@ -9826,6 +9933,7 @@ public com.google.firestore.v1beta1.CursorOrBuilder getEndAtOrBuilder() { * * @return The offset. */ + @java.lang.Override public int getOffset() { return offset_; } @@ -9845,6 +9953,7 @@ public int getOffset() { * * @return Whether the limit field is set. */ + @java.lang.Override public boolean hasLimit() { return limit_ != null; } @@ -9861,6 +9970,7 @@ public boolean hasLimit() { * * @return The limit. */ + @java.lang.Override public com.google.protobuf.Int32Value getLimit() { return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_; } @@ -9875,6 +9985,7 @@ public com.google.protobuf.Int32Value getLimit() { * * .google.protobuf.Int32Value limit = 5; */ + @java.lang.Override public com.google.protobuf.Int32ValueOrBuilder getLimitOrBuilder() { return getLimit(); } @@ -12152,6 +12263,7 @@ public com.google.firestore.v1beta1.CursorOrBuilder getEndAtOrBuilder() { * * @return The offset. */ + @java.lang.Override public int getOffset() { return offset_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java index 4bc9af089..f5b0eb6a2 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Target.java @@ -1249,6 +1249,7 @@ public QueryTypeCase getQueryTypeCase() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -1276,6 +1277,7 @@ public java.lang.String getParent() { * * @return The bytes for parent. */ + @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -1300,6 +1302,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1314,6 +1317,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery) queryType_; @@ -1329,6 +1333,7 @@ public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { * * .google.firestore.v1beta1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if (queryTypeCase_ == 2) { return (com.google.firestore.v1beta1.StructuredQuery) queryType_; @@ -1864,6 +1869,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * @return Whether the structuredQuery field is set. */ + @java.lang.Override public boolean hasStructuredQuery() { return queryTypeCase_ == 2; } @@ -1878,6 +1884,7 @@ public boolean hasStructuredQuery() { * * @return The structuredQuery. */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQuery getStructuredQuery() { if (structuredQueryBuilder_ == null) { if (queryTypeCase_ == 2) { @@ -2010,6 +2017,7 @@ public com.google.firestore.v1beta1.StructuredQuery.Builder getStructuredQueryBu * * .google.firestore.v1beta1.StructuredQuery structured_query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.StructuredQueryOrBuilder getStructuredQueryOrBuilder() { if ((queryTypeCase_ == 2) && (structuredQueryBuilder_ != null)) { return structuredQueryBuilder_.getMessageOrBuilder(); @@ -2212,6 +2220,7 @@ public ResumeTypeCase getResumeTypeCase() { * * @return Whether the query field is set. */ + @java.lang.Override public boolean hasQuery() { return targetTypeCase_ == 2; } @@ -2226,6 +2235,7 @@ public boolean hasQuery() { * * @return The query. */ + @java.lang.Override public com.google.firestore.v1beta1.Target.QueryTarget getQuery() { if (targetTypeCase_ == 2) { return (com.google.firestore.v1beta1.Target.QueryTarget) targetType_; @@ -2241,6 +2251,7 @@ public com.google.firestore.v1beta1.Target.QueryTarget getQuery() { * * .google.firestore.v1beta1.Target.QueryTarget query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Target.QueryTargetOrBuilder getQueryOrBuilder() { if (targetTypeCase_ == 2) { return (com.google.firestore.v1beta1.Target.QueryTarget) targetType_; @@ -2260,6 +2271,7 @@ public com.google.firestore.v1beta1.Target.QueryTargetOrBuilder getQueryOrBuilde * * @return Whether the documents field is set. */ + @java.lang.Override public boolean hasDocuments() { return targetTypeCase_ == 3; } @@ -2274,6 +2286,7 @@ public boolean hasDocuments() { * * @return The documents. */ + @java.lang.Override public com.google.firestore.v1beta1.Target.DocumentsTarget getDocuments() { if (targetTypeCase_ == 3) { return (com.google.firestore.v1beta1.Target.DocumentsTarget) targetType_; @@ -2289,6 +2302,7 @@ public com.google.firestore.v1beta1.Target.DocumentsTarget getDocuments() { * * .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.Target.DocumentsTargetOrBuilder getDocumentsOrBuilder() { if (targetTypeCase_ == 3) { return (com.google.firestore.v1beta1.Target.DocumentsTarget) targetType_; @@ -2309,6 +2323,7 @@ public com.google.firestore.v1beta1.Target.DocumentsTargetOrBuilder getDocuments * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { if (resumeTypeCase_ == 4) { return (com.google.protobuf.ByteString) resumeType_; @@ -2329,6 +2344,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return resumeTypeCase_ == 11; } @@ -2344,6 +2360,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (resumeTypeCase_ == 11) { return (com.google.protobuf.Timestamp) resumeType_; @@ -2360,6 +2377,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 11; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (resumeTypeCase_ == 11) { return (com.google.protobuf.Timestamp) resumeType_; @@ -2381,6 +2399,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -2398,6 +2417,7 @@ public int getTargetId() { * * @return The once. */ + @java.lang.Override public boolean getOnce() { return once_; } @@ -2913,6 +2933,7 @@ public Builder clearResumeType() { * * @return Whether the query field is set. */ + @java.lang.Override public boolean hasQuery() { return targetTypeCase_ == 2; } @@ -2927,6 +2948,7 @@ public boolean hasQuery() { * * @return The query. */ + @java.lang.Override public com.google.firestore.v1beta1.Target.QueryTarget getQuery() { if (queryBuilder_ == null) { if (targetTypeCase_ == 2) { @@ -3060,6 +3082,7 @@ public com.google.firestore.v1beta1.Target.QueryTarget.Builder getQueryBuilder() * * .google.firestore.v1beta1.Target.QueryTarget query = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Target.QueryTargetOrBuilder getQueryOrBuilder() { if ((targetTypeCase_ == 2) && (queryBuilder_ != null)) { return queryBuilder_.getMessageOrBuilder(); @@ -3120,6 +3143,7 @@ public com.google.firestore.v1beta1.Target.QueryTargetOrBuilder getQueryOrBuilde * * @return Whether the documents field is set. */ + @java.lang.Override public boolean hasDocuments() { return targetTypeCase_ == 3; } @@ -3134,6 +3158,7 @@ public boolean hasDocuments() { * * @return The documents. */ + @java.lang.Override public com.google.firestore.v1beta1.Target.DocumentsTarget getDocuments() { if (documentsBuilder_ == null) { if (targetTypeCase_ == 3) { @@ -3267,6 +3292,7 @@ public com.google.firestore.v1beta1.Target.DocumentsTarget.Builder getDocumentsB * * .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.Target.DocumentsTargetOrBuilder getDocumentsOrBuilder() { if ((targetTypeCase_ == 3) && (documentsBuilder_ != null)) { return documentsBuilder_.getMessageOrBuilder(); @@ -3389,6 +3415,7 @@ public Builder clearResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return resumeTypeCase_ == 11; } @@ -3404,6 +3431,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (resumeTypeCase_ == 11) { @@ -3540,6 +3568,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 11; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((resumeTypeCase_ == 11) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -3596,6 +3625,7 @@ public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { * * @return The targetId. */ + @java.lang.Override public int getTargetId() { return targetId_; } @@ -3649,6 +3679,7 @@ public Builder clearTargetId() { * * @return The once. */ + @java.lang.Override public boolean getOnce() { return once_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java index cd1953e49..c2d9b5978 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TargetChange.java @@ -356,6 +356,10 @@ public TargetChangeType findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } @@ -402,6 +406,7 @@ private TargetChangeType(int value) { * * @return The enum numeric value on the wire for targetChangeType. */ + @java.lang.Override public int getTargetChangeTypeValue() { return targetChangeType_; } @@ -416,6 +421,7 @@ public int getTargetChangeTypeValue() { * * @return The targetChangeType. */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChange.TargetChangeType getTargetChangeType() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.TargetChange.TargetChangeType result = @@ -440,6 +446,7 @@ public com.google.firestore.v1beta1.TargetChange.TargetChangeType getTargetChang * * @return A list containing the targetIds. */ + @java.lang.Override public java.util.List getTargetIdsList() { return targetIds_; } @@ -492,6 +499,7 @@ public int getTargetIds(int index) { * * @return Whether the cause field is set. */ + @java.lang.Override public boolean hasCause() { return cause_ != null; } @@ -506,6 +514,7 @@ public boolean hasCause() { * * @return The cause. */ + @java.lang.Override public com.google.rpc.Status getCause() { return cause_ == null ? com.google.rpc.Status.getDefaultInstance() : cause_; } @@ -518,6 +527,7 @@ public com.google.rpc.Status getCause() { * * .google.rpc.Status cause = 3; */ + @java.lang.Override public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { return getCause(); } @@ -537,6 +547,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } @@ -561,6 +572,7 @@ public com.google.protobuf.ByteString getResumeToken() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return readTime_ != null; } @@ -582,6 +594,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; } @@ -601,6 +614,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 6; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { return getReadTime(); } @@ -1051,6 +1065,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for targetChangeType. */ + @java.lang.Override public int getTargetChangeTypeValue() { return targetChangeType_; } @@ -1067,6 +1082,7 @@ public int getTargetChangeTypeValue() { * @return This builder for chaining. */ public Builder setTargetChangeTypeValue(int value) { + targetChangeType_ = value; onChanged(); return this; @@ -1082,6 +1098,7 @@ public Builder setTargetChangeTypeValue(int value) { * * @return The targetChangeType. */ + @java.lang.Override public com.google.firestore.v1beta1.TargetChange.TargetChangeType getTargetChangeType() { @SuppressWarnings("deprecation") com.google.firestore.v1beta1.TargetChange.TargetChangeType result = @@ -1457,6 +1474,7 @@ public com.google.rpc.StatusOrBuilder getCauseOrBuilder() { * * @return The resumeToken. */ + @java.lang.Override public com.google.protobuf.ByteString getResumeToken() { return resumeToken_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TransactionOptions.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TransactionOptions.java index f05973b37..0aeb1a3b7 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TransactionOptions.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/TransactionOptions.java @@ -262,6 +262,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The retryTransaction. */ + @java.lang.Override public com.google.protobuf.ByteString getRetryTransaction() { return retryTransaction_; } @@ -601,6 +602,7 @@ public Builder mergeFrom( * * @return The retryTransaction. */ + @java.lang.Override public com.google.protobuf.ByteString getRetryTransaction() { return retryTransaction_; } @@ -897,6 +899,7 @@ public ConsistencySelectorCase getConsistencySelectorCase() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 2; } @@ -912,6 +915,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (consistencySelectorCase_ == 2) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -928,6 +932,7 @@ public com.google.protobuf.Timestamp getReadTime() { * * .google.protobuf.Timestamp read_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if (consistencySelectorCase_ == 2) { return (com.google.protobuf.Timestamp) consistencySelector_; @@ -1318,6 +1323,7 @@ public Builder clearConsistencySelector() { * * @return Whether the readTime field is set. */ + @java.lang.Override public boolean hasReadTime() { return consistencySelectorCase_ == 2; } @@ -1333,6 +1339,7 @@ public boolean hasReadTime() { * * @return The readTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getReadTime() { if (readTimeBuilder_ == null) { if (consistencySelectorCase_ == 2) { @@ -1470,6 +1477,7 @@ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { * * .google.protobuf.Timestamp read_time = 2; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { if ((consistencySelectorCase_ == 2) && (readTimeBuilder_ != null)) { return readTimeBuilder_.getMessageOrBuilder(); @@ -1626,6 +1634,7 @@ public ModeCase getModeCase() { * * @return Whether the readOnly field is set. */ + @java.lang.Override public boolean hasReadOnly() { return modeCase_ == 2; } @@ -1640,6 +1649,7 @@ public boolean hasReadOnly() { * * @return The readOnly. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadOnly getReadOnly() { if (modeCase_ == 2) { return (com.google.firestore.v1beta1.TransactionOptions.ReadOnly) mode_; @@ -1655,6 +1665,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadOnly getReadOnly() { * * .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if (modeCase_ == 2) { return (com.google.firestore.v1beta1.TransactionOptions.ReadOnly) mode_; @@ -1674,6 +1685,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadOnlyOrBuilder getRead * * @return Whether the readWrite field is set. */ + @java.lang.Override public boolean hasReadWrite() { return modeCase_ == 3; } @@ -1688,6 +1700,7 @@ public boolean hasReadWrite() { * * @return The readWrite. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadWrite getReadWrite() { if (modeCase_ == 3) { return (com.google.firestore.v1beta1.TransactionOptions.ReadWrite) mode_; @@ -1703,6 +1716,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadWrite getReadWrite() * * .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if (modeCase_ == 3) { @@ -2114,6 +2128,7 @@ public Builder clearMode() { * * @return Whether the readOnly field is set. */ + @java.lang.Override public boolean hasReadOnly() { return modeCase_ == 2; } @@ -2128,6 +2143,7 @@ public boolean hasReadOnly() { * * @return The readOnly. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadOnly getReadOnly() { if (readOnlyBuilder_ == null) { if (modeCase_ == 2) { @@ -2261,6 +2277,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadOnly.Builder getReadO * * .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder() { if ((modeCase_ == 2) && (readOnlyBuilder_ != null)) { @@ -2322,6 +2339,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadOnly.Builder getReadO * * @return Whether the readWrite field is set. */ + @java.lang.Override public boolean hasReadWrite() { return modeCase_ == 3; } @@ -2336,6 +2354,7 @@ public boolean hasReadWrite() { * * @return The readWrite. */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadWrite getReadWrite() { if (readWriteBuilder_ == null) { if (modeCase_ == 3) { @@ -2469,6 +2488,7 @@ public com.google.firestore.v1beta1.TransactionOptions.ReadWrite.Builder getRead * * .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder() { if ((modeCase_ == 3) && (readWriteBuilder_ != null)) { diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java index ba01c4418..0011d4cf1 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/UpdateDocumentRequest.java @@ -182,6 +182,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return document_ != null; } @@ -199,6 +200,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getDocument() { return document_ == null ? com.google.firestore.v1beta1.Document.getDefaultInstance() @@ -216,6 +218,7 @@ public com.google.firestore.v1beta1.Document getDocument() { * .google.firestore.v1beta1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { return getDocument(); } @@ -238,6 +241,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -257,6 +261,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getUpdateMask() { return updateMask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() @@ -276,6 +281,7 @@ public com.google.firestore.v1beta1.DocumentMask getUpdateMask() { * * .google.firestore.v1beta1.DocumentMask update_mask = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -295,6 +301,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getUpdateMaskOrBuilder * * @return Whether the mask field is set. */ + @java.lang.Override public boolean hasMask() { return mask_ != null; } @@ -311,6 +318,7 @@ public boolean hasMask() { * * @return The mask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getMask() { return mask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() : mask_; } @@ -325,6 +333,7 @@ public com.google.firestore.v1beta1.DocumentMask getMask() { * * .google.firestore.v1beta1.DocumentMask mask = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { return getMask(); } @@ -343,6 +352,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getMaskOrBuilder() { * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -358,6 +368,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1beta1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1beta1.Precondition.getDefaultInstance() @@ -373,6 +384,7 @@ public com.google.firestore.v1beta1.Precondition getCurrentDocument() { * * .google.firestore.v1beta1.Precondition current_document = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Value.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Value.java index 2e7eb260c..03560472d 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Value.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Value.java @@ -333,6 +333,7 @@ public com.google.protobuf.NullValue getNullValue() { * * @return The booleanValue. */ + @java.lang.Override public boolean getBooleanValue() { if (valueTypeCase_ == 1) { return (java.lang.Boolean) valueType_; @@ -352,6 +353,7 @@ public boolean getBooleanValue() { * * @return The integerValue. */ + @java.lang.Override public long getIntegerValue() { if (valueTypeCase_ == 2) { return (java.lang.Long) valueType_; @@ -371,6 +373,7 @@ public long getIntegerValue() { * * @return The doubleValue. */ + @java.lang.Override public double getDoubleValue() { if (valueTypeCase_ == 3) { return (java.lang.Double) valueType_; @@ -392,6 +395,7 @@ public double getDoubleValue() { * * @return Whether the timestampValue field is set. */ + @java.lang.Override public boolean hasTimestampValue() { return valueTypeCase_ == 10; } @@ -408,6 +412,7 @@ public boolean hasTimestampValue() { * * @return The timestampValue. */ + @java.lang.Override public com.google.protobuf.Timestamp getTimestampValue() { if (valueTypeCase_ == 10) { return (com.google.protobuf.Timestamp) valueType_; @@ -425,6 +430,7 @@ public com.google.protobuf.Timestamp getTimestampValue() { * * .google.protobuf.Timestamp timestamp_value = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { if (valueTypeCase_ == 10) { return (com.google.protobuf.Timestamp) valueType_; @@ -508,6 +514,7 @@ public com.google.protobuf.ByteString getStringValueBytes() { * * @return The bytesValue. */ + @java.lang.Override public com.google.protobuf.ByteString getBytesValue() { if (valueTypeCase_ == 18) { return (com.google.protobuf.ByteString) valueType_; @@ -585,6 +592,7 @@ public com.google.protobuf.ByteString getReferenceValueBytes() { * * @return Whether the geoPointValue field is set. */ + @java.lang.Override public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } @@ -599,6 +607,7 @@ public boolean hasGeoPointValue() { * * @return The geoPointValue. */ + @java.lang.Override public com.google.type.LatLng getGeoPointValue() { if (valueTypeCase_ == 8) { return (com.google.type.LatLng) valueType_; @@ -614,6 +623,7 @@ public com.google.type.LatLng getGeoPointValue() { * * .google.type.LatLng geo_point_value = 8; */ + @java.lang.Override public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { if (valueTypeCase_ == 8) { return (com.google.type.LatLng) valueType_; @@ -635,6 +645,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { * * @return Whether the arrayValue field is set. */ + @java.lang.Override public boolean hasArrayValue() { return valueTypeCase_ == 9; } @@ -651,6 +662,7 @@ public boolean hasArrayValue() { * * @return The arrayValue. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getArrayValue() { if (valueTypeCase_ == 9) { return (com.google.firestore.v1beta1.ArrayValue) valueType_; @@ -668,6 +680,7 @@ public com.google.firestore.v1beta1.ArrayValue getArrayValue() { * * .google.firestore.v1beta1.ArrayValue array_value = 9; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getArrayValueOrBuilder() { if (valueTypeCase_ == 9) { return (com.google.firestore.v1beta1.ArrayValue) valueType_; @@ -687,6 +700,7 @@ public com.google.firestore.v1beta1.ArrayValueOrBuilder getArrayValueOrBuilder() * * @return Whether the mapValue field is set. */ + @java.lang.Override public boolean hasMapValue() { return valueTypeCase_ == 6; } @@ -701,6 +715,7 @@ public boolean hasMapValue() { * * @return The mapValue. */ + @java.lang.Override public com.google.firestore.v1beta1.MapValue getMapValue() { if (valueTypeCase_ == 6) { return (com.google.firestore.v1beta1.MapValue) valueType_; @@ -716,6 +731,7 @@ public com.google.firestore.v1beta1.MapValue getMapValue() { * * .google.firestore.v1beta1.MapValue map_value = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.MapValueOrBuilder getMapValueOrBuilder() { if (valueTypeCase_ == 6) { return (com.google.firestore.v1beta1.MapValue) valueType_; @@ -1336,6 +1352,7 @@ public Builder clearValueType() { * * @return The enum numeric value on the wire for nullValue. */ + @java.lang.Override public int getNullValueValue() { if (valueTypeCase_ == 11) { return ((java.lang.Integer) valueType_).intValue(); @@ -1371,6 +1388,7 @@ public Builder setNullValueValue(int value) { * * @return The nullValue. */ + @java.lang.Override public com.google.protobuf.NullValue getNullValue() { if (valueTypeCase_ == 11) { @SuppressWarnings("deprecation") @@ -1604,6 +1622,7 @@ public Builder clearDoubleValue() { * * @return Whether the timestampValue field is set. */ + @java.lang.Override public boolean hasTimestampValue() { return valueTypeCase_ == 10; } @@ -1620,6 +1639,7 @@ public boolean hasTimestampValue() { * * @return The timestampValue. */ + @java.lang.Override public com.google.protobuf.Timestamp getTimestampValue() { if (timestampValueBuilder_ == null) { if (valueTypeCase_ == 10) { @@ -1762,6 +1782,7 @@ public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { * * .google.protobuf.Timestamp timestamp_value = 10; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { if ((valueTypeCase_ == 10) && (timestampValueBuilder_ != null)) { return timestampValueBuilder_.getMessageOrBuilder(); @@ -1820,6 +1841,7 @@ public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { * * @return The stringValue. */ + @java.lang.Override public java.lang.String getStringValue() { java.lang.Object ref = ""; if (valueTypeCase_ == 17) { @@ -1850,6 +1872,7 @@ public java.lang.String getStringValue() { * * @return The bytes for stringValue. */ + @java.lang.Override public com.google.protobuf.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (valueTypeCase_ == 17) { @@ -2014,6 +2037,7 @@ public Builder clearBytesValue() { * * @return The referenceValue. */ + @java.lang.Override public java.lang.String getReferenceValue() { java.lang.Object ref = ""; if (valueTypeCase_ == 5) { @@ -2042,6 +2066,7 @@ public java.lang.String getReferenceValue() { * * @return The bytes for referenceValue. */ + @java.lang.Override public com.google.protobuf.ByteString getReferenceValueBytes() { java.lang.Object ref = ""; if (valueTypeCase_ == 5) { @@ -2138,6 +2163,7 @@ public Builder setReferenceValueBytes(com.google.protobuf.ByteString value) { * * @return Whether the geoPointValue field is set. */ + @java.lang.Override public boolean hasGeoPointValue() { return valueTypeCase_ == 8; } @@ -2152,6 +2178,7 @@ public boolean hasGeoPointValue() { * * @return The geoPointValue. */ + @java.lang.Override public com.google.type.LatLng getGeoPointValue() { if (geoPointValueBuilder_ == null) { if (valueTypeCase_ == 8) { @@ -2281,6 +2308,7 @@ public com.google.type.LatLng.Builder getGeoPointValueBuilder() { * * .google.type.LatLng geo_point_value = 8; */ + @java.lang.Override public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { if ((valueTypeCase_ == 8) && (geoPointValueBuilder_ != null)) { return geoPointValueBuilder_.getMessageOrBuilder(); @@ -2339,6 +2367,7 @@ public com.google.type.LatLngOrBuilder getGeoPointValueOrBuilder() { * * @return Whether the arrayValue field is set. */ + @java.lang.Override public boolean hasArrayValue() { return valueTypeCase_ == 9; } @@ -2355,6 +2384,7 @@ public boolean hasArrayValue() { * * @return The arrayValue. */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValue getArrayValue() { if (arrayValueBuilder_ == null) { if (valueTypeCase_ == 9) { @@ -2498,6 +2528,7 @@ public com.google.firestore.v1beta1.ArrayValue.Builder getArrayValueBuilder() { * * .google.firestore.v1beta1.ArrayValue array_value = 9; */ + @java.lang.Override public com.google.firestore.v1beta1.ArrayValueOrBuilder getArrayValueOrBuilder() { if ((valueTypeCase_ == 9) && (arrayValueBuilder_ != null)) { return arrayValueBuilder_.getMessageOrBuilder(); @@ -2560,6 +2591,7 @@ public com.google.firestore.v1beta1.ArrayValueOrBuilder getArrayValueOrBuilder() * * @return Whether the mapValue field is set. */ + @java.lang.Override public boolean hasMapValue() { return valueTypeCase_ == 6; } @@ -2574,6 +2606,7 @@ public boolean hasMapValue() { * * @return The mapValue. */ + @java.lang.Override public com.google.firestore.v1beta1.MapValue getMapValue() { if (mapValueBuilder_ == null) { if (valueTypeCase_ == 6) { @@ -2705,6 +2738,7 @@ public com.google.firestore.v1beta1.MapValue.Builder getMapValueBuilder() { * * .google.firestore.v1beta1.MapValue map_value = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.MapValueOrBuilder getMapValueOrBuilder() { if ((valueTypeCase_ == 6) && (mapValueBuilder_ != null)) { return mapValueBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java index 735c1cb9b..ead5643d3 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/Write.java @@ -236,6 +236,7 @@ public OperationCase getOperationCase() { * * @return Whether the update field is set. */ + @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } @@ -250,6 +251,7 @@ public boolean hasUpdate() { * * @return The update. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getUpdate() { if (operationCase_ == 1) { return (com.google.firestore.v1beta1.Document) operation_; @@ -265,6 +267,7 @@ public com.google.firestore.v1beta1.Document getUpdate() { * * .google.firestore.v1beta1.Document update = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getUpdateOrBuilder() { if (operationCase_ == 1) { return (com.google.firestore.v1beta1.Document) operation_; @@ -345,6 +348,7 @@ public com.google.protobuf.ByteString getDeleteBytes() { * * @return Whether the transform field is set. */ + @java.lang.Override public boolean hasTransform() { return operationCase_ == 6; } @@ -362,6 +366,7 @@ public boolean hasTransform() { * * @return The transform. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransform getTransform() { if (operationCase_ == 6) { return (com.google.firestore.v1beta1.DocumentTransform) operation_; @@ -380,6 +385,7 @@ public com.google.firestore.v1beta1.DocumentTransform getTransform() { * * .google.firestore.v1beta1.DocumentTransform transform = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransformOrBuilder getTransformOrBuilder() { if (operationCase_ == 6) { return (com.google.firestore.v1beta1.DocumentTransform) operation_; @@ -408,6 +414,7 @@ public com.google.firestore.v1beta1.DocumentTransformOrBuilder getTransformOrBui * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -430,6 +437,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMask getUpdateMask() { return updateMask_ == null ? com.google.firestore.v1beta1.DocumentMask.getDefaultInstance() @@ -452,6 +460,7 @@ public com.google.firestore.v1beta1.DocumentMask getUpdateMask() { * * .google.firestore.v1beta1.DocumentMask update_mask = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } @@ -470,6 +479,7 @@ public com.google.firestore.v1beta1.DocumentMaskOrBuilder getUpdateMaskOrBuilder * * @return Whether the currentDocument field is set. */ + @java.lang.Override public boolean hasCurrentDocument() { return currentDocument_ != null; } @@ -485,6 +495,7 @@ public boolean hasCurrentDocument() { * * @return The currentDocument. */ + @java.lang.Override public com.google.firestore.v1beta1.Precondition getCurrentDocument() { return currentDocument_ == null ? com.google.firestore.v1beta1.Precondition.getDefaultInstance() @@ -500,6 +511,7 @@ public com.google.firestore.v1beta1.Precondition getCurrentDocument() { * * .google.firestore.v1beta1.Precondition current_document = 4; */ + @java.lang.Override public com.google.firestore.v1beta1.PreconditionOrBuilder getCurrentDocumentOrBuilder() { return getCurrentDocument(); } @@ -982,6 +994,7 @@ public Builder clearOperation() { * * @return Whether the update field is set. */ + @java.lang.Override public boolean hasUpdate() { return operationCase_ == 1; } @@ -996,6 +1009,7 @@ public boolean hasUpdate() { * * @return The update. */ + @java.lang.Override public com.google.firestore.v1beta1.Document getUpdate() { if (updateBuilder_ == null) { if (operationCase_ == 1) { @@ -1127,6 +1141,7 @@ public com.google.firestore.v1beta1.Document.Builder getUpdateBuilder() { * * .google.firestore.v1beta1.Document update = 1; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentOrBuilder getUpdateOrBuilder() { if ((operationCase_ == 1) && (updateBuilder_ != null)) { return updateBuilder_.getMessageOrBuilder(); @@ -1183,6 +1198,7 @@ public com.google.firestore.v1beta1.DocumentOrBuilder getUpdateOrBuilder() { * * @return The delete. */ + @java.lang.Override public java.lang.String getDelete() { java.lang.Object ref = ""; if (operationCase_ == 2) { @@ -1211,6 +1227,7 @@ public java.lang.String getDelete() { * * @return The bytes for delete. */ + @java.lang.Override public com.google.protobuf.ByteString getDeleteBytes() { java.lang.Object ref = ""; if (operationCase_ == 2) { @@ -1312,6 +1329,7 @@ public Builder setDeleteBytes(com.google.protobuf.ByteString value) { * * @return Whether the transform field is set. */ + @java.lang.Override public boolean hasTransform() { return operationCase_ == 6; } @@ -1329,6 +1347,7 @@ public boolean hasTransform() { * * @return The transform. */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransform getTransform() { if (transformBuilder_ == null) { if (operationCase_ == 6) { @@ -1479,6 +1498,7 @@ public com.google.firestore.v1beta1.DocumentTransform.Builder getTransformBuilde * * .google.firestore.v1beta1.DocumentTransform transform = 6; */ + @java.lang.Override public com.google.firestore.v1beta1.DocumentTransformOrBuilder getTransformOrBuilder() { if ((operationCase_ == 6) && (transformBuilder_ != null)) { return transformBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java index 60ddd6634..7c4d7fcea 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteRequest.java @@ -186,6 +186,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The database. */ + @java.lang.Override public java.lang.String getDatabase() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -210,6 +211,7 @@ public java.lang.String getDatabase() { * * @return The bytes for database. */ + @java.lang.Override public com.google.protobuf.ByteString getDatabaseBytes() { java.lang.Object ref = database_; if (ref instanceof java.lang.String) { @@ -237,6 +239,7 @@ public com.google.protobuf.ByteString getDatabaseBytes() { * * @return The streamId. */ + @java.lang.Override public java.lang.String getStreamId() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -261,6 +264,7 @@ public java.lang.String getStreamId() { * * @return The bytes for streamId. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamIdBytes() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -288,6 +292,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { * * repeated .google.firestore.v1beta1.Write writes = 3; */ + @java.lang.Override public java.util.List getWritesList() { return writes_; } @@ -304,6 +309,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1beta1.Write writes = 3; */ + @java.lang.Override public java.util.List getWritesOrBuilderList() { return writes_; @@ -321,6 +327,7 @@ public java.util.List getWritesList() { * * repeated .google.firestore.v1beta1.Write writes = 3; */ + @java.lang.Override public int getWritesCount() { return writes_.size(); } @@ -337,6 +344,7 @@ public int getWritesCount() { * * repeated .google.firestore.v1beta1.Write writes = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.Write getWrites(int index) { return writes_.get(index); } @@ -353,6 +361,7 @@ public com.google.firestore.v1beta1.Write getWrites(int index) { * * repeated .google.firestore.v1beta1.Write writes = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(int index) { return writes_.get(index); } @@ -379,6 +388,7 @@ public com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(int index) * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -417,6 +427,7 @@ public int getLabelsCount() { * * map<string, string> labels = 5; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -424,6 +435,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -437,6 +449,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -449,6 +462,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -465,6 +479,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1601,6 +1616,7 @@ public java.util.List getWritesBuild * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -1695,6 +1711,7 @@ public int getLabelsCount() { * * map<string, string> labels = 5; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1702,6 +1719,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1715,6 +1733,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1727,6 +1746,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1744,6 +1764,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 5; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResponse.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResponse.java index 4f3cf6dff..b41cca0b1 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResponse.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResponse.java @@ -162,6 +162,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The streamId. */ + @java.lang.Override public java.lang.String getStreamId() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -185,6 +186,7 @@ public java.lang.String getStreamId() { * * @return The bytes for streamId. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamIdBytes() { java.lang.Object ref = streamId_; if (ref instanceof java.lang.String) { @@ -212,6 +214,7 @@ public com.google.protobuf.ByteString getStreamIdBytes() { * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } @@ -229,6 +232,7 @@ public com.google.protobuf.ByteString getStreamToken() { * * repeated .google.firestore.v1beta1.WriteResult write_results = 3; */ + @java.lang.Override public java.util.List getWriteResultsList() { return writeResults_; } @@ -243,6 +247,7 @@ public java.util.List getWriteResultsL * * repeated .google.firestore.v1beta1.WriteResult write_results = 3; */ + @java.lang.Override public java.util.List getWriteResultsOrBuilderList() { return writeResults_; @@ -258,6 +263,7 @@ public java.util.List getWriteResultsL * * repeated .google.firestore.v1beta1.WriteResult write_results = 3; */ + @java.lang.Override public int getWriteResultsCount() { return writeResults_.size(); } @@ -272,6 +278,7 @@ public int getWriteResultsCount() { * * repeated .google.firestore.v1beta1.WriteResult write_results = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteResult getWriteResults(int index) { return writeResults_.get(index); } @@ -286,6 +293,7 @@ public com.google.firestore.v1beta1.WriteResult getWriteResults(int index) { * * repeated .google.firestore.v1beta1.WriteResult write_results = 3; */ + @java.lang.Override public com.google.firestore.v1beta1.WriteResultOrBuilder getWriteResultsOrBuilder(int index) { return writeResults_.get(index); } @@ -303,6 +311,7 @@ public com.google.firestore.v1beta1.WriteResultOrBuilder getWriteResultsOrBuilde * * @return Whether the commitTime field is set. */ + @java.lang.Override public boolean hasCommitTime() { return commitTime_ != null; } @@ -317,6 +326,7 @@ public boolean hasCommitTime() { * * @return The commitTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCommitTime() { return commitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : commitTime_; } @@ -329,6 +339,7 @@ public com.google.protobuf.Timestamp getCommitTime() { * * .google.protobuf.Timestamp commit_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCommitTimeOrBuilder() { return getCommitTime(); } @@ -875,6 +886,7 @@ public Builder setStreamIdBytes(com.google.protobuf.ByteString value) { * * @return The streamToken. */ + @java.lang.Override public com.google.protobuf.ByteString getStreamToken() { return streamToken_; } diff --git a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java index 61db7ea7b..662912c7e 100644 --- a/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java +++ b/proto-google-cloud-firestore-v1beta1/src/main/java/com/google/firestore/v1beta1/WriteResult.java @@ -150,6 +150,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -167,6 +168,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -182,6 +184,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 1; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -198,6 +201,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * repeated .google.firestore.v1beta1.Value transform_results = 2; */ + @java.lang.Override public java.util.List getTransformResultsList() { return transformResults_; } @@ -211,6 +215,7 @@ public java.util.List getTransformResultsLis * * repeated .google.firestore.v1beta1.Value transform_results = 2; */ + @java.lang.Override public java.util.List getTransformResultsOrBuilderList() { return transformResults_; @@ -225,6 +230,7 @@ public java.util.List getTransformResultsLis * * repeated .google.firestore.v1beta1.Value transform_results = 2; */ + @java.lang.Override public int getTransformResultsCount() { return transformResults_.size(); } @@ -238,6 +244,7 @@ public int getTransformResultsCount() { * * repeated .google.firestore.v1beta1.Value transform_results = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.Value getTransformResults(int index) { return transformResults_.get(index); } @@ -251,6 +258,7 @@ public com.google.firestore.v1beta1.Value getTransformResults(int index) { * * repeated .google.firestore.v1beta1.Value transform_results = 2; */ + @java.lang.Override public com.google.firestore.v1beta1.ValueOrBuilder getTransformResultsOrBuilder(int index) { return transformResults_.get(index); } diff --git a/synth.metadata b/synth.metadata index cffc5bc59..521d8fa8a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/java-firestore.git", - "sha": "dbb17be9bacd4876d5249678401f5fb38460b2af" + "remote": "https://github.com/googleapis/java-firestore.git", + "sha": "9cd367f5f4aa76200aece09ffa1195d31a56bfc5" } }, {