diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java index c1f9108d3..bca09fd69 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java @@ -35,6 +35,9 @@ import com.google.firestore.admin.v1.BackupName; import com.google.firestore.admin.v1.BackupSchedule; import com.google.firestore.admin.v1.BackupScheduleName; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CollectionGroupName; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; @@ -324,6 +327,27 @@ * * * + *

BulkDeleteDocuments + *

Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. + *

For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ * + *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ * + * + * + * *

CreateDatabase *

Create a database. * @@ -480,7 +504,7 @@ * *

RestoreDatabase *

Creates a new database by restoring from an existing backup. - *

The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. + *

The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. *

The [long-running operation][google.longrunning.Operation] can be used to track the progress of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field type being the [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is the [Database][google.firestore.admin.v1.Database] if the restore was successful. The new database is not readable or writeable until the LRO has completed. * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

@@ -2112,6 +2136,192 @@ public final UnaryCallable importDocumentsCal return stub.importDocumentsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated + * after the underlying system starts to process the request will not be deleted. The bulk delete + * occurs in the background and its progress can be monitored and managed via the Operation + * resource that is created. + * + *

For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
+   *   BulkDeleteDocumentsResponse response =
+   *       firestoreAdminClient.bulkDeleteDocumentsAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Database to operate. 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 OperationFuture + bulkDeleteDocumentsAsync(DatabaseName name) { + BulkDeleteDocumentsRequest request = + BulkDeleteDocumentsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return bulkDeleteDocumentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated + * after the underlying system starts to process the request will not be deleted. The bulk delete + * occurs in the background and its progress can be monitored and managed via the Operation + * resource that is created. + * + *

For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   String name = DatabaseName.of("[PROJECT]", "[DATABASE]").toString();
+   *   BulkDeleteDocumentsResponse response =
+   *       firestoreAdminClient.bulkDeleteDocumentsAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Database to operate. 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 OperationFuture + bulkDeleteDocumentsAsync(String name) { + BulkDeleteDocumentsRequest request = + BulkDeleteDocumentsRequest.newBuilder().setName(name).build(); + return bulkDeleteDocumentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated + * after the underlying system starts to process the request will not be deleted. The bulk delete + * occurs in the background and its progress can be monitored and managed via the Operation + * resource that is created. + * + *

For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   BulkDeleteDocumentsRequest request =
+   *       BulkDeleteDocumentsRequest.newBuilder()
+   *           .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+   *           .addAllCollectionIds(new ArrayList())
+   *           .addAllNamespaceIds(new ArrayList())
+   *           .build();
+   *   BulkDeleteDocumentsResponse response =
+   *       firestoreAdminClient.bulkDeleteDocumentsAsync(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 OperationFuture + bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest request) { + return bulkDeleteDocumentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated + * after the underlying system starts to process the request will not be deleted. The bulk delete + * occurs in the background and its progress can be monitored and managed via the Operation + * resource that is created. + * + *

For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   BulkDeleteDocumentsRequest request =
+   *       BulkDeleteDocumentsRequest.newBuilder()
+   *           .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+   *           .addAllCollectionIds(new ArrayList())
+   *           .addAllNamespaceIds(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       firestoreAdminClient.bulkDeleteDocumentsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BulkDeleteDocumentsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable() { + return stub.bulkDeleteDocumentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated + * after the underlying system starts to process the request will not be deleted. The bulk delete + * occurs in the background and its progress can be monitored and managed via the Operation + * resource that is created. + * + *

For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+   *   BulkDeleteDocumentsRequest request =
+   *       BulkDeleteDocumentsRequest.newBuilder()
+   *           .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+   *           .addAllCollectionIds(new ArrayList())
+   *           .addAllNamespaceIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       firestoreAdminClient.bulkDeleteDocumentsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable bulkDeleteDocumentsCallable() { + return stub.bulkDeleteDocumentsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a database. @@ -2467,6 +2677,7 @@ public final ListDatabasesResponse listDatabases(String parent) { * ListDatabasesRequest request = * ListDatabasesRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setShowDeleted(true) * .build(); * ListDatabasesResponse response = firestoreAdminClient.listDatabases(request); * } @@ -2495,6 +2706,7 @@ public final ListDatabasesResponse listDatabases(ListDatabasesRequest request) { * ListDatabasesRequest request = * ListDatabasesRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setShowDeleted(true) * .build(); * ApiFuture future = * firestoreAdminClient.listDatabasesCallable().futureCall(request); @@ -3112,9 +3324,9 @@ public final UnaryCallable deleteBackupCallable() { * *

The new database must be in the same cloud region or multi-region location as the existing * backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] except instead of - * creating a new empty database, a new database is created with the database type, index - * configuration, and documents from an existing backup. + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except + * instead of creating a new empty database, a new database is created with the database type, + * index configuration, and documents from an existing backup. * *

The [long-running operation][google.longrunning.Operation] can be used to track the progress * of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field @@ -3156,9 +3368,9 @@ public final OperationFuture restoreDatabaseA * *

The new database must be in the same cloud region or multi-region location as the existing * backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] except instead of - * creating a new empty database, a new database is created with the database type, index - * configuration, and documents from an existing backup. + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except + * instead of creating a new empty database, a new database is created with the database type, + * index configuration, and documents from an existing backup. * *

The [long-running operation][google.longrunning.Operation] can be used to track the progress * of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field @@ -3200,9 +3412,9 @@ public final OperationFuture restoreDatabaseA * *

The new database must be in the same cloud region or multi-region location as the existing * backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] except instead of - * creating a new empty database, a new database is created with the database type, index - * configuration, and documents from an existing backup. + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] except + * instead of creating a new empty database, a new database is created with the database type, + * index configuration, and documents from an existing backup. * *

The [long-running operation][google.longrunning.Operation] can be used to track the progress * of the restore, with the Operation's [metadata][google.longrunning.Operation.metadata] field diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java index 476ccec67..69b43f0b8 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java @@ -35,6 +35,9 @@ import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -193,6 +196,18 @@ public UnaryCallSettings importDocumentsSetti return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsOperationSettings(); } + /** Returns the object with the settings used for calls to bulkDeleteDocuments. */ + public UnaryCallSettings bulkDeleteDocumentsSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).bulkDeleteDocumentsSettings(); + } + + /** Returns the object with the settings used for calls to bulkDeleteDocuments. */ + public OperationCallSettings< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings() { + return ((FirestoreAdminStubSettings) getStubSettings()).bulkDeleteDocumentsOperationSettings(); + } + /** Returns the object with the settings used for calls to createDatabase. */ public UnaryCallSettings createDatabaseSettings() { return ((FirestoreAdminStubSettings) getStubSettings()).createDatabaseSettings(); @@ -475,6 +490,19 @@ public UnaryCallSettings.Builder importDocume return getStubSettingsBuilder().importDocumentsOperationSettings(); } + /** Returns the builder for the settings used for calls to bulkDeleteDocuments. */ + public UnaryCallSettings.Builder + bulkDeleteDocumentsSettings() { + return getStubSettingsBuilder().bulkDeleteDocumentsSettings(); + } + + /** Returns the builder for the settings used for calls to bulkDeleteDocuments. */ + public OperationCallSettings.Builder< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings() { + return getStubSettingsBuilder().bulkDeleteDocumentsOperationSettings(); + } + /** Returns the builder for the settings used for calls to createDatabase. */ public UnaryCallSettings.Builder createDatabaseSettings() { return getStubSettingsBuilder().createDatabaseSettings(); diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json index 727ba40b1..cb2a1863d 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "FirestoreAdminClient", "rpcs": { + "BulkDeleteDocuments": { + "methods": ["bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsAsync", "bulkDeleteDocumentsOperationCallable", "bulkDeleteDocumentsCallable"] + }, "CreateBackupSchedule": { "methods": ["createBackupSchedule", "createBackupSchedule", "createBackupSchedule", "createBackupScheduleCallable"] }, diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java index 26db1092a..4bd22e574 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java @@ -24,6 +24,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -150,6 +153,17 @@ public UnaryCallable importDocumentsCallable( throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()"); } + public OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: bulkDeleteDocumentsOperationCallable()"); + } + + public UnaryCallable bulkDeleteDocumentsCallable() { + throw new UnsupportedOperationException("Not implemented: bulkDeleteDocumentsCallable()"); + } + public OperationCallable createDatabaseOperationCallable() { throw new UnsupportedOperationException("Not implemented: createDatabaseOperationCallable()"); diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java index 6b445dcf5..63f7272fa 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStubSettings.java @@ -54,6 +54,9 @@ import com.google.common.collect.Lists; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -167,6 +170,11 @@ public class FirestoreAdminStubSettings extends StubSettings importDocumentsSettings; private final OperationCallSettings importDocumentsOperationSettings; + private final UnaryCallSettings + bulkDeleteDocumentsSettings; + private final OperationCallSettings< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings; private final UnaryCallSettings createDatabaseSettings; private final OperationCallSettings createDatabaseOperationSettings; @@ -373,6 +381,18 @@ public UnaryCallSettings importDocumentsSetti return importDocumentsOperationSettings; } + /** Returns the object with the settings used for calls to bulkDeleteDocuments. */ + public UnaryCallSettings bulkDeleteDocumentsSettings() { + return bulkDeleteDocumentsSettings; + } + + /** Returns the object with the settings used for calls to bulkDeleteDocuments. */ + public OperationCallSettings< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings() { + return bulkDeleteDocumentsOperationSettings; + } + /** Returns the object with the settings used for calls to createDatabase. */ public UnaryCallSettings createDatabaseSettings() { return createDatabaseSettings; @@ -593,6 +613,9 @@ protected FirestoreAdminStubSettings(Builder settingsBuilder) throws IOException exportDocumentsOperationSettings = settingsBuilder.exportDocumentsOperationSettings().build(); importDocumentsSettings = settingsBuilder.importDocumentsSettings().build(); importDocumentsOperationSettings = settingsBuilder.importDocumentsOperationSettings().build(); + bulkDeleteDocumentsSettings = settingsBuilder.bulkDeleteDocumentsSettings().build(); + bulkDeleteDocumentsOperationSettings = + settingsBuilder.bulkDeleteDocumentsOperationSettings().build(); createDatabaseSettings = settingsBuilder.createDatabaseSettings().build(); createDatabaseOperationSettings = settingsBuilder.createDatabaseOperationSettings().build(); getDatabaseSettings = settingsBuilder.getDatabaseSettings().build(); @@ -641,6 +664,11 @@ public static class Builder extends StubSettings.Builder importDocumentsOperationSettings; + private final UnaryCallSettings.Builder + bulkDeleteDocumentsSettings; + private final OperationCallSettings.Builder< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings; private final UnaryCallSettings.Builder createDatabaseSettings; private final OperationCallSettings.Builder< @@ -746,6 +774,8 @@ protected Builder(ClientContext clientContext) { exportDocumentsOperationSettings = OperationCallSettings.newBuilder(); importDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); importDocumentsOperationSettings = OperationCallSettings.newBuilder(); + bulkDeleteDocumentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + bulkDeleteDocumentsOperationSettings = OperationCallSettings.newBuilder(); createDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createDatabaseOperationSettings = OperationCallSettings.newBuilder(); getDatabaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -776,6 +806,7 @@ protected Builder(ClientContext clientContext) { listFieldsSettings, exportDocumentsSettings, importDocumentsSettings, + bulkDeleteDocumentsSettings, createDatabaseSettings, getDatabaseSettings, listDatabasesSettings, @@ -809,6 +840,9 @@ protected Builder(FirestoreAdminStubSettings settings) { exportDocumentsOperationSettings = settings.exportDocumentsOperationSettings.toBuilder(); importDocumentsSettings = settings.importDocumentsSettings.toBuilder(); importDocumentsOperationSettings = settings.importDocumentsOperationSettings.toBuilder(); + bulkDeleteDocumentsSettings = settings.bulkDeleteDocumentsSettings.toBuilder(); + bulkDeleteDocumentsOperationSettings = + settings.bulkDeleteDocumentsOperationSettings.toBuilder(); createDatabaseSettings = settings.createDatabaseSettings.toBuilder(); createDatabaseOperationSettings = settings.createDatabaseOperationSettings.toBuilder(); getDatabaseSettings = settings.getDatabaseSettings.toBuilder(); @@ -839,6 +873,7 @@ protected Builder(FirestoreAdminStubSettings settings) { listFieldsSettings, exportDocumentsSettings, importDocumentsSettings, + bulkDeleteDocumentsSettings, createDatabaseSettings, getDatabaseSettings, listDatabasesSettings, @@ -925,6 +960,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .bulkDeleteDocumentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .createDatabaseSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1089,6 +1129,32 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .bulkDeleteDocumentsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BulkDeleteDocumentsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BulkDeleteDocumentsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + builder .createDatabaseOperationSettings() .setInitialCallSettings( @@ -1276,6 +1342,19 @@ public UnaryCallSettings.Builder importDocume return importDocumentsOperationSettings; } + /** Returns the builder for the settings used for calls to bulkDeleteDocuments. */ + public UnaryCallSettings.Builder + bulkDeleteDocumentsSettings() { + return bulkDeleteDocumentsSettings; + } + + /** Returns the builder for the settings used for calls to bulkDeleteDocuments. */ + public OperationCallSettings.Builder< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationSettings() { + return bulkDeleteDocumentsOperationSettings; + } + /** Returns the builder for the settings used for calls to createDatabase. */ public UnaryCallSettings.Builder createDatabaseSettings() { return createDatabaseSettings; diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java index d0a883dc1..e1d414f60 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/GrpcFirestoreAdminStub.java @@ -29,6 +29,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -165,6 +168,16 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + bulkDeleteDocumentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments") + .setRequestMarshaller( + ProtoUtils.marshaller(BulkDeleteDocumentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor createDatabaseMethodDescriptor = MethodDescriptor.newBuilder() @@ -322,6 +335,10 @@ public class GrpcFirestoreAdminStub extends FirestoreAdminStub { private final UnaryCallable importDocumentsCallable; private final OperationCallable importDocumentsOperationCallable; + private final UnaryCallable bulkDeleteDocumentsCallable; + private final OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable; private final UnaryCallable createDatabaseCallable; private final OperationCallable createDatabaseOperationCallable; @@ -482,6 +499,16 @@ protected GrpcFirestoreAdminStub( return builder.build(); }) .build(); + GrpcCallSettings bulkDeleteDocumentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(bulkDeleteDocumentsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings createDatabaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDatabaseMethodDescriptor) @@ -685,6 +712,17 @@ protected GrpcFirestoreAdminStub( settings.importDocumentsOperationSettings(), clientContext, operationsStub); + this.bulkDeleteDocumentsCallable = + callableFactory.createUnaryCallable( + bulkDeleteDocumentsTransportSettings, + settings.bulkDeleteDocumentsSettings(), + clientContext); + this.bulkDeleteDocumentsOperationCallable = + callableFactory.createOperationCallable( + bulkDeleteDocumentsTransportSettings, + settings.bulkDeleteDocumentsOperationSettings(), + clientContext, + operationsStub); this.createDatabaseCallable = callableFactory.createUnaryCallable( createDatabaseTransportSettings, settings.createDatabaseSettings(), clientContext); @@ -849,6 +887,18 @@ public UnaryCallable importDocumentsCallable( return importDocumentsOperationCallable; } + @Override + public UnaryCallable bulkDeleteDocumentsCallable() { + return bulkDeleteDocumentsCallable; + } + + @Override + public OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable() { + return bulkDeleteDocumentsOperationCallable; + } + @Override public UnaryCallable createDatabaseCallable() { return createDatabaseCallable; diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java index e81b9b65d..3fa765bab 100644 --- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java +++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/HttpJsonFirestoreAdminStub.java @@ -38,6 +38,9 @@ import com.google.common.collect.ImmutableMap; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseMetadata; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -105,7 +108,9 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { .add(ImportDocumentsMetadata.getDescriptor()) .add(Database.getDescriptor()) .add(FieldOperationMetadata.getDescriptor()) + .add(BulkDeleteDocumentsResponse.getDescriptor()) .add(DeleteDatabaseMetadata.getDescriptor()) + .add(BulkDeleteDocumentsMetadata.getDescriptor()) .add(UpdateDatabaseMetadata.getDescriptor()) .add(Empty.getDescriptor()) .add(Index.getDescriptor()) @@ -449,6 +454,46 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + bulkDeleteDocumentsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/databases/*}:bulkDeleteDocuments", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BulkDeleteDocumentsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor createDatabaseMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -546,6 +591,8 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "showDeleted", request.getShowDeleted()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -980,6 +1027,10 @@ public class HttpJsonFirestoreAdminStub extends FirestoreAdminStub { private final UnaryCallable importDocumentsCallable; private final OperationCallable importDocumentsOperationCallable; + private final UnaryCallable bulkDeleteDocumentsCallable; + private final OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable; private final UnaryCallable createDatabaseCallable; private final OperationCallable createDatabaseOperationCallable; @@ -1175,6 +1226,18 @@ protected HttpJsonFirestoreAdminStub( return builder.build(); }) .build(); + HttpJsonCallSettings + bulkDeleteDocumentsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(bulkDeleteDocumentsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings createDatabaseTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createDatabaseMethodDescriptor) @@ -1395,6 +1458,17 @@ protected HttpJsonFirestoreAdminStub( settings.importDocumentsOperationSettings(), clientContext, httpJsonOperationsStub); + this.bulkDeleteDocumentsCallable = + callableFactory.createUnaryCallable( + bulkDeleteDocumentsTransportSettings, + settings.bulkDeleteDocumentsSettings(), + clientContext); + this.bulkDeleteDocumentsOperationCallable = + callableFactory.createOperationCallable( + bulkDeleteDocumentsTransportSettings, + settings.bulkDeleteDocumentsOperationSettings(), + clientContext, + httpJsonOperationsStub); this.createDatabaseCallable = callableFactory.createUnaryCallable( createDatabaseTransportSettings, settings.createDatabaseSettings(), clientContext); @@ -1488,6 +1562,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listFieldsMethodDescriptor); methodDescriptors.add(exportDocumentsMethodDescriptor); methodDescriptors.add(importDocumentsMethodDescriptor); + methodDescriptors.add(bulkDeleteDocumentsMethodDescriptor); methodDescriptors.add(createDatabaseMethodDescriptor); methodDescriptors.add(getDatabaseMethodDescriptor); methodDescriptors.add(listDatabasesMethodDescriptor); @@ -1588,6 +1663,18 @@ public UnaryCallable importDocumentsCallable( return importDocumentsOperationCallable; } + @Override + public UnaryCallable bulkDeleteDocumentsCallable() { + return bulkDeleteDocumentsCallable; + } + + @Override + public OperationCallable< + BulkDeleteDocumentsRequest, BulkDeleteDocumentsResponse, BulkDeleteDocumentsMetadata> + bulkDeleteDocumentsOperationCallable() { + return bulkDeleteDocumentsOperationCallable; + } + @Override public UnaryCallable createDatabaseCallable() { return createDatabaseCallable; diff --git a/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json index 4898cf2e6..dcc0dfa2e 100644 --- a/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json +++ b/google-cloud-firestore-admin/src/main/resources/META-INF/native-image/com.google.cloud.firestore.v1/reflect-config.json @@ -512,6 +512,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.firestore.admin.v1.BulkDeleteDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.firestore.admin.v1.CreateBackupScheduleRequest", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java index dee30271d..d75b8166c 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientHttpJsonTest.java @@ -34,6 +34,7 @@ import com.google.firestore.admin.v1.BackupName; import com.google.firestore.admin.v1.BackupSchedule; import com.google.firestore.admin.v1.BackupScheduleName; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CollectionGroupName; import com.google.firestore.admin.v1.Database; import com.google.firestore.admin.v1.DatabaseName; @@ -931,6 +932,98 @@ public void importDocumentsExceptionTest2() throws Exception { } } + @Test + public void bulkDeleteDocumentsTest() throws Exception { + BulkDeleteDocumentsResponse expectedResponse = BulkDeleteDocumentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkDeleteDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]"); + + BulkDeleteDocumentsResponse actualResponse = client.bulkDeleteDocumentsAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void bulkDeleteDocumentsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]"); + client.bulkDeleteDocumentsAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void bulkDeleteDocumentsTest2() throws Exception { + BulkDeleteDocumentsResponse expectedResponse = BulkDeleteDocumentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkDeleteDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-2580/databases/database-2580"; + + BulkDeleteDocumentsResponse actualResponse = client.bulkDeleteDocumentsAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void bulkDeleteDocumentsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2580/databases/database-2580"; + client.bulkDeleteDocumentsAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void createDatabaseTest() throws Exception { Database expectedResponse = diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java index 5aebfcf41..6ef7b2470 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/FirestoreAdminClientTest.java @@ -32,6 +32,8 @@ import com.google.firestore.admin.v1.BackupName; import com.google.firestore.admin.v1.BackupSchedule; import com.google.firestore.admin.v1.BackupScheduleName; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; +import com.google.firestore.admin.v1.BulkDeleteDocumentsResponse; import com.google.firestore.admin.v1.CollectionGroupName; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseRequest; @@ -858,6 +860,92 @@ public void importDocumentsExceptionTest2() throws Exception { } } + @Test + public void bulkDeleteDocumentsTest() throws Exception { + BulkDeleteDocumentsResponse expectedResponse = BulkDeleteDocumentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkDeleteDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFirestoreAdmin.addResponse(resultOperation); + + DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]"); + + BulkDeleteDocumentsResponse actualResponse = client.bulkDeleteDocumentsAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BulkDeleteDocumentsRequest actualRequest = ((BulkDeleteDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bulkDeleteDocumentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]"); + client.bulkDeleteDocumentsAsync(name).get(); + Assert.fail("No exception raised"); + } 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 + public void bulkDeleteDocumentsTest2() throws Exception { + BulkDeleteDocumentsResponse expectedResponse = BulkDeleteDocumentsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("bulkDeleteDocumentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockFirestoreAdmin.addResponse(resultOperation); + + String name = "name3373707"; + + BulkDeleteDocumentsResponse actualResponse = client.bulkDeleteDocumentsAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockFirestoreAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BulkDeleteDocumentsRequest actualRequest = ((BulkDeleteDocumentsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void bulkDeleteDocumentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockFirestoreAdmin.addException(exception); + + try { + String name = "name3373707"; + client.bulkDeleteDocumentsAsync(name).get(); + Assert.fail("No exception raised"); + } 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 public void createDatabaseTest() throws Exception { Database expectedResponse = diff --git a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java index 02c02f8af..2b3171d8f 100644 --- a/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java +++ b/google-cloud-firestore-admin/src/test/java/com/google/cloud/firestore/v1/MockFirestoreAdminImpl.java @@ -19,6 +19,7 @@ import com.google.api.core.BetaApi; import com.google.firestore.admin.v1.Backup; import com.google.firestore.admin.v1.BackupSchedule; +import com.google.firestore.admin.v1.BulkDeleteDocumentsRequest; import com.google.firestore.admin.v1.CreateBackupScheduleRequest; import com.google.firestore.admin.v1.CreateDatabaseRequest; import com.google.firestore.admin.v1.CreateIndexRequest; @@ -277,6 +278,27 @@ public void importDocuments( } } + @Override + public void bulkDeleteDocuments( + BulkDeleteDocumentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BulkDeleteDocuments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createDatabase( CreateDatabaseRequest request, StreamObserver responseObserver) { diff --git a/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml b/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml index 9a609086f..802da77da 100644 --- a/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml +++ b/grpc-google-cloud-firestore-admin-v1/clirr-ignored-differences.xml @@ -46,4 +46,9 @@ com/google/firestore/admin/v1/FirestoreAdminGrpc* void updateBackupSchedule(com.google.firestore.admin.v1.UpdateBackupScheduleRequest, io.grpc.stub.StreamObserver) + + 7012 + com/google/firestore/admin/v1/FirestoreAdminGrpc* + void bulkDeleteDocuments(com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, io.grpc.stub.StreamObserver) + diff --git a/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java b/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java index 69add7236..a25e4538f 100644 --- a/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java +++ b/grpc-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminGrpc.java @@ -442,6 +442,54 @@ private FirestoreAdminGrpc() {} return getImportDocumentsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, + com.google.longrunning.Operation> + getBulkDeleteDocumentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BulkDeleteDocuments", + requestType = com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, + com.google.longrunning.Operation> + getBulkDeleteDocumentsMethod() { + io.grpc.MethodDescriptor< + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, + com.google.longrunning.Operation> + getBulkDeleteDocumentsMethod; + if ((getBulkDeleteDocumentsMethod = FirestoreAdminGrpc.getBulkDeleteDocumentsMethod) == null) { + synchronized (FirestoreAdminGrpc.class) { + if ((getBulkDeleteDocumentsMethod = FirestoreAdminGrpc.getBulkDeleteDocumentsMethod) + == null) { + FirestoreAdminGrpc.getBulkDeleteDocumentsMethod = + getBulkDeleteDocumentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BulkDeleteDocuments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new FirestoreAdminMethodDescriptorSupplier("BulkDeleteDocuments")) + .build(); + } + } + } + return getBulkDeleteDocumentsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.firestore.admin.v1.CreateDatabaseRequest, com.google.longrunning.Operation> getCreateDatabaseMethod; @@ -1306,6 +1354,26 @@ default void importDocuments( getImportDocumentsMethod(), responseObserver); } + /** + * + * + *

+     * Bulk deletes a subset of documents from Google Cloud Firestore.
+     * Documents created or updated after the underlying system starts to process
+     * the request will not be deleted. The bulk delete occurs in the background
+     * and its progress can be monitored and managed via the Operation resource
+     * that is created.
+     * For more details on bulk delete behavior, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/bulk-delete
+     * 
+ */ + default void bulkDeleteDocuments( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBulkDeleteDocumentsMethod(), responseObserver); + } + /** * * @@ -1426,7 +1494,7 @@ default void deleteBackup( * Creates a new database by restoring from an existing backup. * The new database must be in the same cloud region or multi-region location * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] * except instead of creating a new empty database, a new database is created * with the database type, index configuration, and documents from an existing * backup. @@ -1773,6 +1841,28 @@ public void importDocuments( responseObserver); } + /** + * + * + *
+     * Bulk deletes a subset of documents from Google Cloud Firestore.
+     * Documents created or updated after the underlying system starts to process
+     * the request will not be deleted. The bulk delete occurs in the background
+     * and its progress can be monitored and managed via the Operation resource
+     * that is created.
+     * For more details on bulk delete behavior, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/bulk-delete
+     * 
+ */ + public void bulkDeleteDocuments( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBulkDeleteDocumentsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1908,7 +1998,7 @@ public void deleteBackup( * Creates a new database by restoring from an existing backup. * The new database must be in the same cloud region or multi-region location * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] * except instead of creating a new empty database, a new database is created * with the database type, index configuration, and documents from an existing * backup. @@ -2210,6 +2300,25 @@ public com.google.longrunning.Operation importDocuments( getChannel(), getImportDocumentsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Bulk deletes a subset of documents from Google Cloud Firestore.
+     * Documents created or updated after the underlying system starts to process
+     * the request will not be deleted. The bulk delete occurs in the background
+     * and its progress can be monitored and managed via the Operation resource
+     * that is created.
+     * For more details on bulk delete behavior, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/bulk-delete
+     * 
+ */ + public com.google.longrunning.Operation bulkDeleteDocuments( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBulkDeleteDocumentsMethod(), getCallOptions(), request); + } + /** * * @@ -2321,7 +2430,7 @@ public com.google.protobuf.Empty deleteBackup( * Creates a new database by restoring from an existing backup. * The new database must be in the same cloud region or multi-region location * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] * except instead of creating a new empty database, a new database is created * with the database type, index configuration, and documents from an existing * backup. @@ -2603,6 +2712,25 @@ protected FirestoreAdminFutureStub build( getChannel().newCall(getImportDocumentsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Bulk deletes a subset of documents from Google Cloud Firestore.
+     * Documents created or updated after the underlying system starts to process
+     * the request will not be deleted. The bulk delete occurs in the background
+     * and its progress can be monitored and managed via the Operation resource
+     * that is created.
+     * For more details on bulk delete behavior, refer to:
+     * https://cloud.google.com/firestore/docs/manage-data/bulk-delete
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + bulkDeleteDocuments(com.google.firestore.admin.v1.BulkDeleteDocumentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBulkDeleteDocumentsMethod(), getCallOptions()), request); + } + /** * * @@ -2717,7 +2845,7 @@ protected FirestoreAdminFutureStub build( * Creates a new database by restoring from an existing backup. * The new database must be in the same cloud region or multi-region location * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] * except instead of creating a new empty database, a new database is created * with the database type, index configuration, and documents from an existing * backup. @@ -2818,20 +2946,21 @@ protected FirestoreAdminFutureStub build( private static final int METHODID_LIST_FIELDS = 6; private static final int METHODID_EXPORT_DOCUMENTS = 7; private static final int METHODID_IMPORT_DOCUMENTS = 8; - private static final int METHODID_CREATE_DATABASE = 9; - private static final int METHODID_GET_DATABASE = 10; - private static final int METHODID_LIST_DATABASES = 11; - private static final int METHODID_UPDATE_DATABASE = 12; - private static final int METHODID_DELETE_DATABASE = 13; - private static final int METHODID_GET_BACKUP = 14; - private static final int METHODID_LIST_BACKUPS = 15; - private static final int METHODID_DELETE_BACKUP = 16; - private static final int METHODID_RESTORE_DATABASE = 17; - private static final int METHODID_CREATE_BACKUP_SCHEDULE = 18; - private static final int METHODID_GET_BACKUP_SCHEDULE = 19; - private static final int METHODID_LIST_BACKUP_SCHEDULES = 20; - private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 21; - private static final int METHODID_DELETE_BACKUP_SCHEDULE = 22; + private static final int METHODID_BULK_DELETE_DOCUMENTS = 9; + private static final int METHODID_CREATE_DATABASE = 10; + private static final int METHODID_GET_DATABASE = 11; + private static final int METHODID_LIST_DATABASES = 12; + private static final int METHODID_UPDATE_DATABASE = 13; + private static final int METHODID_DELETE_DATABASE = 14; + private static final int METHODID_GET_BACKUP = 15; + private static final int METHODID_LIST_BACKUPS = 16; + private static final int METHODID_DELETE_BACKUP = 17; + private static final int METHODID_RESTORE_DATABASE = 18; + private static final int METHODID_CREATE_BACKUP_SCHEDULE = 19; + private static final int METHODID_GET_BACKUP_SCHEDULE = 20; + private static final int METHODID_LIST_BACKUP_SCHEDULES = 21; + private static final int METHODID_UPDATE_BACKUP_SCHEDULE = 22; + private static final int METHODID_DELETE_BACKUP_SCHEDULE = 23; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2897,6 +3026,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.firestore.admin.v1.ImportDocumentsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BULK_DELETE_DOCUMENTS: + serviceImpl.bulkDeleteDocuments( + (com.google.firestore.admin.v1.BulkDeleteDocumentsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_CREATE_DATABASE: serviceImpl.createDatabase( (com.google.firestore.admin.v1.CreateDatabaseRequest) request, @@ -3049,6 +3183,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.firestore.admin.v1.ImportDocumentsRequest, com.google.longrunning.Operation>(service, METHODID_IMPORT_DOCUMENTS))) + .addMethod( + getBulkDeleteDocumentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest, + com.google.longrunning.Operation>(service, METHODID_BULK_DELETE_DOCUMENTS))) .addMethod( getCreateDatabaseMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -3199,6 +3339,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListFieldsMethod()) .addMethod(getExportDocumentsMethod()) .addMethod(getImportDocumentsMethod()) + .addMethod(getBulkDeleteDocumentsMethod()) .addMethod(getCreateDatabaseMethod()) .addMethod(getGetDatabaseMethod()) .addMethod(getListDatabasesMethod()) diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java new file mode 100644 index 000000000..b92e2dca5 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadata.java @@ -0,0 +1,2543 @@ +/* + * Copyright 2024 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/admin/v1/operation.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * Metadata for [google.longrunning.Operation][google.longrunning.Operation]
+ * results from
+ * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsMetadata} + */ +public final class BulkDeleteDocumentsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsMetadata) + BulkDeleteDocumentsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsMetadata.newBuilder() to construct. + private BulkDeleteDocumentsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BulkDeleteDocumentsMetadata() { + operationState_ = 0; + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkDeleteDocumentsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int OPERATION_STATE_FIELD_NUMBER = 3; + private int operationState_ = 0; + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + @java.lang.Override + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + @java.lang.Override + public com.google.firestore.admin.v1.OperationState getOperationState() { + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.forNumber(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + + public static final int PROGRESS_DOCUMENTS_FIELD_NUMBER = 4; + private com.google.firestore.admin.v1.Progress progressDocuments_; + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return Whether the progressDocuments field is set. + */ + @java.lang.Override + public boolean hasProgressDocuments() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return The progressDocuments. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + @java.lang.Override + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + + public static final int PROGRESS_BYTES_FIELD_NUMBER = 5; + private com.google.firestore.admin.v1.Progress progressBytes_; + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return Whether the progressBytes field is set. + */ + @java.lang.Override + public boolean hasProgressBytes() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return The progressBytes. + */ + @java.lang.Override + public com.google.firestore.admin.v1.Progress getProgressBytes() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + @java.lang.Override + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + + public static final int COLLECTION_IDS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList collectionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @return A list containing the collectionIds. + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @return The count of collectionIds. + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int NAMESPACE_IDS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList namespaceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @return A list containing the namespaceIds. + */ + public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { + return namespaceIds_; + } + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @return The count of namespaceIds. + */ + public int getNamespaceIdsCount() { + return namespaceIds_.size(); + } + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + public java.lang.String getNamespaceIds(int index) { + return namespaceIds_.get(index); + } + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { + return namespaceIds_.getByteString(index); + } + + public static final int SNAPSHOT_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp snapshotTime_; + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return Whether the snapshotTime field is set. + */ + @java.lang.Override + public boolean hasSnapshotTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return The snapshotTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSnapshotTime() { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, operationState_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getProgressDocuments()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getProgressBytes()); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, collectionIds_.getRaw(i)); + } + for (int i = 0; i < namespaceIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, namespaceIds_.getRaw(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(8, getSnapshotTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (operationState_ + != com.google.firestore.admin.v1.OperationState.OPERATION_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, operationState_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getProgressDocuments()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgressBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < namespaceIds_.size(); i++) { + dataSize += computeStringSizeNoTag(namespaceIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamespaceIdsList().size(); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSnapshotTime()); + } + size += getUnknownFields().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.admin.v1.BulkDeleteDocumentsMetadata)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata other = + (com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (operationState_ != other.operationState_) return false; + if (hasProgressDocuments() != other.hasProgressDocuments()) return false; + if (hasProgressDocuments()) { + if (!getProgressDocuments().equals(other.getProgressDocuments())) return false; + } + if (hasProgressBytes() != other.hasProgressBytes()) return false; + if (hasProgressBytes()) { + if (!getProgressBytes().equals(other.getProgressBytes())) return false; + } + if (!getCollectionIdsList().equals(other.getCollectionIdsList())) return false; + if (!getNamespaceIdsList().equals(other.getNamespaceIdsList())) return false; + if (hasSnapshotTime() != other.hasSnapshotTime()) return false; + if (hasSnapshotTime()) { + if (!getSnapshotTime().equals(other.getSnapshotTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + OPERATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + operationState_; + if (hasProgressDocuments()) { + hash = (37 * hash) + PROGRESS_DOCUMENTS_FIELD_NUMBER; + hash = (53 * hash) + getProgressDocuments().hashCode(); + } + if (hasProgressBytes()) { + hash = (37 * hash) + PROGRESS_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getProgressBytes().hashCode(); + } + if (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + if (getNamespaceIdsCount() > 0) { + hash = (37 * hash) + NAMESPACE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceIdsList().hashCode(); + } + if (hasSnapshotTime()) { + hash = (37 * hash) + SNAPSHOT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata 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.admin.v1.BulkDeleteDocumentsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata 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.admin.v1.BulkDeleteDocumentsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata 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.admin.v1.BulkDeleteDocumentsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata 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.admin.v1.BulkDeleteDocumentsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata 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.admin.v1.BulkDeleteDocumentsMetadata 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; + } + /** + * + * + *
+   * Metadata for [google.longrunning.Operation][google.longrunning.Operation]
+   * results from
+   * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.BulkDeleteDocumentsMetadata) + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + getProgressDocumentsFieldBuilder(); + getProgressBytesFieldBuilder(); + getSnapshotTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + operationState_ = 0; + progressDocuments_ = null; + if (progressDocumentsBuilder_ != null) { + progressDocumentsBuilder_.dispose(); + progressDocumentsBuilder_ = null; + } + progressBytes_ = null; + if (progressBytesBuilder_ != null) { + progressBytesBuilder_.dispose(); + progressBytesBuilder_ = null; + } + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + snapshotTime_ = null; + if (snapshotTimeBuilder_ != null) { + snapshotTimeBuilder_.dispose(); + snapshotTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.OperationProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata getDefaultInstanceForType() { + return com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata build() { + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata buildPartial() { + com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata result = + new com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.operationState_ = operationState_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.progressDocuments_ = + progressDocumentsBuilder_ == null + ? progressDocuments_ + : progressDocumentsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.progressBytes_ = + progressBytesBuilder_ == null ? progressBytes_ : progressBytesBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + collectionIds_.makeImmutable(); + result.collectionIds_ = collectionIds_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + namespaceIds_.makeImmutable(); + result.namespaceIds_ = namespaceIds_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.snapshotTime_ = + snapshotTimeBuilder_ == null ? snapshotTime_ : snapshotTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @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.admin.v1.BulkDeleteDocumentsMetadata) { + return mergeFrom((com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata other) { + if (other == com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.operationState_ != 0) { + setOperationStateValue(other.getOperationStateValue()); + } + if (other.hasProgressDocuments()) { + mergeProgressDocuments(other.getProgressDocuments()); + } + if (other.hasProgressBytes()) { + mergeProgressBytes(other.getProgressBytes()); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ |= 0x00000020; + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.namespaceIds_.isEmpty()) { + if (namespaceIds_.isEmpty()) { + namespaceIds_ = other.namespaceIds_; + bitField0_ |= 0x00000040; + } else { + ensureNamespaceIdsIsMutable(); + namespaceIds_.addAll(other.namespaceIds_); + } + onChanged(); + } + if (other.hasSnapshotTime()) { + mergeSnapshotTime(other.getSnapshotTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + operationState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + getProgressDocumentsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getProgressBytesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCollectionIdsIsMutable(); + collectionIds_.add(s); + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(s); + break; + } // case 58 + case 66: + { + input.readMessage(getSnapshotTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The time this operation started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * The time this operation completed. Will be unset if operation still in
+     * progress.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int operationState_ = 0; + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + @java.lang.Override + public int getOperationStateValue() { + return operationState_; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @param value The enum numeric value on the wire for operationState to set. + * @return This builder for chaining. + */ + public Builder setOperationStateValue(int value) { + operationState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + @java.lang.Override + public com.google.firestore.admin.v1.OperationState getOperationState() { + com.google.firestore.admin.v1.OperationState result = + com.google.firestore.admin.v1.OperationState.forNumber(operationState_); + return result == null ? com.google.firestore.admin.v1.OperationState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @param value The operationState to set. + * @return This builder for chaining. + */ + public Builder setOperationState(com.google.firestore.admin.v1.OperationState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + operationState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the operation.
+     * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return This builder for chaining. + */ + public Builder clearOperationState() { + bitField0_ = (bitField0_ & ~0x00000004); + operationState_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.admin.v1.Progress progressDocuments_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressDocumentsBuilder_; + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return Whether the progressDocuments field is set. + */ + public boolean hasProgressDocuments() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return The progressDocuments. + */ + public com.google.firestore.admin.v1.Progress getProgressDocuments() { + if (progressDocumentsBuilder_ == null) { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } else { + return progressDocumentsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressDocuments_ = value; + } else { + progressDocumentsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder setProgressDocuments( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressDocumentsBuilder_ == null) { + progressDocuments_ = builderForValue.build(); + } else { + progressDocumentsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder mergeProgressDocuments(com.google.firestore.admin.v1.Progress value) { + if (progressDocumentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && progressDocuments_ != null + && progressDocuments_ != com.google.firestore.admin.v1.Progress.getDefaultInstance()) { + getProgressDocumentsBuilder().mergeFrom(value); + } else { + progressDocuments_ = value; + } + } else { + progressDocumentsBuilder_.mergeFrom(value); + } + if (progressDocuments_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public Builder clearProgressDocuments() { + bitField0_ = (bitField0_ & ~0x00000008); + progressDocuments_ = null; + if (progressDocumentsBuilder_ != null) { + progressDocumentsBuilder_.dispose(); + progressDocumentsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressDocumentsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getProgressDocumentsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder() { + if (progressDocumentsBuilder_ != null) { + return progressDocumentsBuilder_.getMessageOrBuilder(); + } else { + return progressDocuments_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressDocuments_; + } + } + /** + * + * + *
+     * The progress, in documents, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressDocumentsFieldBuilder() { + if (progressDocumentsBuilder_ == null) { + progressDocumentsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressDocuments(), getParentForChildren(), isClean()); + progressDocuments_ = null; + } + return progressDocumentsBuilder_; + } + + private com.google.firestore.admin.v1.Progress progressBytes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + progressBytesBuilder_; + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return Whether the progressBytes field is set. + */ + public boolean hasProgressBytes() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return The progressBytes. + */ + public com.google.firestore.admin.v1.Progress getProgressBytes() { + if (progressBytesBuilder_ == null) { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } else { + return progressBytesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progressBytes_ = value; + } else { + progressBytesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder setProgressBytes( + com.google.firestore.admin.v1.Progress.Builder builderForValue) { + if (progressBytesBuilder_ == null) { + progressBytes_ = builderForValue.build(); + } else { + progressBytesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder mergeProgressBytes(com.google.firestore.admin.v1.Progress value) { + if (progressBytesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && progressBytes_ != null + && progressBytes_ != com.google.firestore.admin.v1.Progress.getDefaultInstance()) { + getProgressBytesBuilder().mergeFrom(value); + } else { + progressBytes_ = value; + } + } else { + progressBytesBuilder_.mergeFrom(value); + } + if (progressBytes_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public Builder clearProgressBytes() { + bitField0_ = (bitField0_ & ~0x00000010); + progressBytes_ = null; + if (progressBytesBuilder_ != null) { + progressBytesBuilder_.dispose(); + progressBytesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.Progress.Builder getProgressBytesBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getProgressBytesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + public com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder() { + if (progressBytesBuilder_ != null) { + return progressBytesBuilder_.getMessageOrBuilder(); + } else { + return progressBytes_ == null + ? com.google.firestore.admin.v1.Progress.getDefaultInstance() + : progressBytes_; + } + } + /** + * + * + *
+     * The progress, in bytes, of this operation.
+     * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder> + getProgressBytesFieldBuilder() { + if (progressBytesBuilder_ == null) { + progressBytesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.admin.v1.Progress, + com.google.firestore.admin.v1.Progress.Builder, + com.google.firestore.admin.v1.ProgressOrBuilder>( + getProgressBytes(), getParentForChildren(), isClean()); + progressBytes_ = null; + } + return progressBytesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList collectionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCollectionIdsIsMutable() { + if (!collectionIds_.isModifiable()) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + } + bitField0_ |= 0x00000020; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @return A list containing the collectionIds. + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + collectionIds_.makeImmutable(); + return collectionIds_; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @return The count of collectionIds. + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index to set the value at. + * @param value The collectionIds to set. + * @return This builder for chaining. + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param value The collectionIds to add. + * @return This builder for chaining. + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param values The collectionIds to add. + * @return This builder for chaining. + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @return This builder for chaining. + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The ids of the collection groups that are being deleted.
+     * 
+ * + * repeated string collection_ids = 6; + * + * @param value The bytes of the collectionIds to add. + * @return This builder for chaining. + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList namespaceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamespaceIdsIsMutable() { + if (!namespaceIds_.isModifiable()) { + namespaceIds_ = new com.google.protobuf.LazyStringArrayList(namespaceIds_); + } + bitField0_ |= 0x00000040; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @return A list containing the namespaceIds. + */ + public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { + namespaceIds_.makeImmutable(); + return namespaceIds_; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @return The count of namespaceIds. + */ + public int getNamespaceIdsCount() { + return namespaceIds_.size(); + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + public java.lang.String getNamespaceIds(int index) { + return namespaceIds_.get(index); + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { + return namespaceIds_.getByteString(index); + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index to set the value at. + * @param value The namespaceIds to set. + * @return This builder for chaining. + */ + public Builder setNamespaceIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespaceIdsIsMutable(); + namespaceIds_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param value The namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addNamespaceIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param values The namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addAllNamespaceIds(java.lang.Iterable values) { + ensureNamespaceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namespaceIds_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @return This builder for chaining. + */ + public Builder clearNamespaceIds() { + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Which namespace ids are being deleted.
+     * 
+ * + * repeated string namespace_ids = 7; + * + * @param value The bytes of the namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp snapshotTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + snapshotTimeBuilder_; + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return Whether the snapshotTime field is set. + */ + public boolean hasSnapshotTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return The snapshotTime. + */ + public com.google.protobuf.Timestamp getSnapshotTime() { + if (snapshotTimeBuilder_ == null) { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } else { + return snapshotTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public Builder setSnapshotTime(com.google.protobuf.Timestamp value) { + if (snapshotTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + snapshotTime_ = value; + } else { + snapshotTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public Builder setSnapshotTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (snapshotTimeBuilder_ == null) { + snapshotTime_ = builderForValue.build(); + } else { + snapshotTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public Builder mergeSnapshotTime(com.google.protobuf.Timestamp value) { + if (snapshotTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && snapshotTime_ != null + && snapshotTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSnapshotTimeBuilder().mergeFrom(value); + } else { + snapshotTime_ = value; + } + } else { + snapshotTimeBuilder_.mergeFrom(value); + } + if (snapshotTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public Builder clearSnapshotTime() { + bitField0_ = (bitField0_ & ~0x00000080); + snapshotTime_ = null; + if (snapshotTimeBuilder_ != null) { + snapshotTimeBuilder_.dispose(); + snapshotTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getSnapshotTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSnapshotTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder() { + if (snapshotTimeBuilder_ != null) { + return snapshotTimeBuilder_.getMessageOrBuilder(); + } else { + return snapshotTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : snapshotTime_; + } + } + /** + * + * + *
+     * The timestamp that corresponds to the version of the database that is being
+     * read to get the list of documents to delete. This time can also be used as
+     * the timestamp of PITR in case of disaster recovery (subject to PITR window
+     * limit).
+     * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getSnapshotTimeFieldBuilder() { + if (snapshotTimeBuilder_ == null) { + snapshotTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSnapshotTime(), getParentForChildren(), isClean()); + snapshotTime_ = null; + } + return snapshotTimeBuilder_; + } + + @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.admin.v1.BulkDeleteDocumentsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.BulkDeleteDocumentsMetadata) + private static final com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata(); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkDeleteDocumentsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.admin.v1.BulkDeleteDocumentsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java new file mode 100644 index 000000000..9686f1fec --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsMetadataOrBuilder.java @@ -0,0 +1,340 @@ +/* + * Copyright 2024 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/admin/v1/operation.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +public interface BulkDeleteDocumentsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.BulkDeleteDocumentsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The time this operation started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * The time this operation completed. Will be unset if operation still in
+   * progress.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The enum numeric value on the wire for operationState. + */ + int getOperationStateValue(); + /** + * + * + *
+   * The state of the operation.
+   * 
+ * + * .google.firestore.admin.v1.OperationState operation_state = 3; + * + * @return The operationState. + */ + com.google.firestore.admin.v1.OperationState getOperationState(); + + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return Whether the progressDocuments field is set. + */ + boolean hasProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + * + * @return The progressDocuments. + */ + com.google.firestore.admin.v1.Progress getProgressDocuments(); + /** + * + * + *
+   * The progress, in documents, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_documents = 4; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressDocumentsOrBuilder(); + + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return Whether the progressBytes field is set. + */ + boolean hasProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + * + * @return The progressBytes. + */ + com.google.firestore.admin.v1.Progress getProgressBytes(); + /** + * + * + *
+   * The progress, in bytes, of this operation.
+   * 
+ * + * .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + com.google.firestore.admin.v1.ProgressOrBuilder getProgressBytesOrBuilder(); + + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @return A list containing the collectionIds. + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @return The count of collectionIds. + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * The ids of the collection groups that are being deleted.
+   * 
+ * + * repeated string collection_ids = 6; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @return A list containing the namespaceIds. + */ + java.util.List getNamespaceIdsList(); + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @return The count of namespaceIds. + */ + int getNamespaceIdsCount(); + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + java.lang.String getNamespaceIds(int index); + /** + * + * + *
+   * Which namespace ids are being deleted.
+   * 
+ * + * repeated string namespace_ids = 7; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + com.google.protobuf.ByteString getNamespaceIdsBytes(int index); + + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return Whether the snapshotTime field is set. + */ + boolean hasSnapshotTime(); + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + * + * @return The snapshotTime. + */ + com.google.protobuf.Timestamp getSnapshotTime(); + /** + * + * + *
+   * The timestamp that corresponds to the version of the database that is being
+   * read to get the list of documents to delete. This time can also be used as
+   * the timestamp of PITR in case of disaster recovery (subject to PITR window
+   * limit).
+   * 
+ * + * .google.protobuf.Timestamp snapshot_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getSnapshotTimeOrBuilder(); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java new file mode 100644 index 000000000..85de49f35 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequest.java @@ -0,0 +1,1375 @@ +/* + * Copyright 2024 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/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The request for
+ * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+ *
+ * When both collection_ids and namespace_ids are set, only documents satisfying
+ * both conditions will be deleted.
+ *
+ * Requests with namespace_ids and collection_ids both empty will be rejected.
+ * Please use
+ * [FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase]
+ * instead.
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsRequest} + */ +public final class BulkDeleteDocumentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsRequest) + BulkDeleteDocumentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsRequest.newBuilder() to construct. + private BulkDeleteDocumentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BulkDeleteDocumentsRequest() { + name_ = ""; + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkDeleteDocumentsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Database to operate. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Database to operate. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @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) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList collectionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the collectionIds. + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + return collectionIds_; + } + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of collectionIds. + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + + public static final int NAMESPACE_IDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList namespaceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the namespaceIds. + */ + public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { + return namespaceIds_; + } + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of namespaceIds. + */ + public int getNamespaceIdsCount() { + return namespaceIds_.size(); + } + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + public java.lang.String getNamespaceIds(int index) { + return namespaceIds_.get(index); + } + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { + return namespaceIds_.getByteString(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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < collectionIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collectionIds_.getRaw(i)); + } + for (int i = 0; i < namespaceIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespaceIds_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < collectionIds_.size(); i++) { + dataSize += computeStringSizeNoTag(collectionIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getCollectionIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < namespaceIds_.size(); i++) { + dataSize += computeStringSizeNoTag(namespaceIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamespaceIdsList().size(); + } + size += getUnknownFields().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.admin.v1.BulkDeleteDocumentsRequest)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest other = + (com.google.firestore.admin.v1.BulkDeleteDocumentsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getCollectionIdsList().equals(other.getCollectionIdsList())) return false; + if (!getNamespaceIdsList().equals(other.getNamespaceIdsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getCollectionIdsCount() > 0) { + hash = (37 * hash) + COLLECTION_IDS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionIdsList().hashCode(); + } + if (getNamespaceIdsCount() > 0) { + hash = (37 * hash) + NAMESPACE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest 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.admin.v1.BulkDeleteDocumentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest 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.admin.v1.BulkDeleteDocumentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest 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.admin.v1.BulkDeleteDocumentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest 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.admin.v1.BulkDeleteDocumentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest 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.admin.v1.BulkDeleteDocumentsRequest 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
+   * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+   *
+   * When both collection_ids and namespace_ids are set, only documents satisfying
+   * both conditions will be deleted.
+   *
+   * Requests with namespace_ids and collection_ids both empty will be rejected.
+   * Please use
+   * [FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase]
+   * instead.
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.BulkDeleteDocumentsRequest) + com.google.firestore.admin.v1.BulkDeleteDocumentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsRequest getDefaultInstanceForType() { + return com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsRequest build() { + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsRequest buildPartial() { + com.google.firestore.admin.v1.BulkDeleteDocumentsRequest result = + new com.google.firestore.admin.v1.BulkDeleteDocumentsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.firestore.admin.v1.BulkDeleteDocumentsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + collectionIds_.makeImmutable(); + result.collectionIds_ = collectionIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + namespaceIds_.makeImmutable(); + result.namespaceIds_ = namespaceIds_; + } + } + + @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.admin.v1.BulkDeleteDocumentsRequest) { + return mergeFrom((com.google.firestore.admin.v1.BulkDeleteDocumentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.BulkDeleteDocumentsRequest other) { + if (other == com.google.firestore.admin.v1.BulkDeleteDocumentsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.collectionIds_.isEmpty()) { + if (collectionIds_.isEmpty()) { + collectionIds_ = other.collectionIds_; + bitField0_ |= 0x00000002; + } else { + ensureCollectionIdsIsMutable(); + collectionIds_.addAll(other.collectionIds_); + } + onChanged(); + } + if (!other.namespaceIds_.isEmpty()) { + if (namespaceIds_.isEmpty()) { + namespaceIds_ = other.namespaceIds_; + bitField0_ |= 0x00000004; + } else { + ensureNamespaceIdsIsMutable(); + namespaceIds_.addAll(other.namespaceIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCollectionIdsIsMutable(); + collectionIds_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Database to operate. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Database to operate. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Database to operate. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Database to operate. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Database to operate. Should be of the form:
+     * `projects/{project_id}/databases/{database_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList collectionIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCollectionIdsIsMutable() { + if (!collectionIds_.isModifiable()) { + collectionIds_ = new com.google.protobuf.LazyStringArrayList(collectionIds_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the collectionIds. + */ + public com.google.protobuf.ProtocolStringList getCollectionIdsList() { + collectionIds_.makeImmutable(); + return collectionIds_; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of collectionIds. + */ + public int getCollectionIdsCount() { + return collectionIds_.size(); + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + public java.lang.String getCollectionIds(int index) { + return collectionIds_.get(index); + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { + return collectionIds_.getByteString(index); + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The collectionIds to set. + * @return This builder for chaining. + */ + public Builder setCollectionIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The collectionIds to add. + * @return This builder for chaining. + */ + public Builder addCollectionIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The collectionIds to add. + * @return This builder for chaining. + */ + public Builder addAllCollectionIds(java.lang.Iterable values) { + ensureCollectionIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collectionIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCollectionIds() { + collectionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. IDs of the collection groups to delete. Unspecified means all
+     * collection groups.
+     *
+     * Each collection group in this list must be unique.
+     * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the collectionIds to add. + * @return This builder for chaining. + */ + public Builder addCollectionIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCollectionIdsIsMutable(); + collectionIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList namespaceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamespaceIdsIsMutable() { + if (!namespaceIds_.isModifiable()) { + namespaceIds_ = new com.google.protobuf.LazyStringArrayList(namespaceIds_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the namespaceIds. + */ + public com.google.protobuf.ProtocolStringList getNamespaceIdsList() { + namespaceIds_.makeImmutable(); + return namespaceIds_; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of namespaceIds. + */ + public int getNamespaceIdsCount() { + return namespaceIds_.size(); + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + public java.lang.String getNamespaceIds(int index) { + return namespaceIds_.get(index); + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + public com.google.protobuf.ByteString getNamespaceIdsBytes(int index) { + return namespaceIds_.getByteString(index); + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The namespaceIds to set. + * @return This builder for chaining. + */ + public Builder setNamespaceIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespaceIdsIsMutable(); + namespaceIds_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addNamespaceIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addAllNamespaceIds(java.lang.Iterable values) { + ensureNamespaceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namespaceIds_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNamespaceIds() { + namespaceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Namespaces to delete.
+     *
+     * An empty list means all namespaces. This is the recommended
+     * usage for databases that don't use namespaces.
+     *
+     * An empty string element represents the default namespace. This should be
+     * used if the database has data in non-default namespaces, but doesn't want
+     * to delete from them.
+     *
+     * Each namespace in this list must be unique.
+     * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the namespaceIds to add. + * @return This builder for chaining. + */ + public Builder addNamespaceIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamespaceIdsIsMutable(); + namespaceIds_.add(value); + bitField0_ |= 0x00000004; + 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.admin.v1.BulkDeleteDocumentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.BulkDeleteDocumentsRequest) + private static final com.google.firestore.admin.v1.BulkDeleteDocumentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.BulkDeleteDocumentsRequest(); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkDeleteDocumentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.admin.v1.BulkDeleteDocumentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java new file mode 100644 index 000000000..3d8cbb3fb --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsRequestOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2024 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/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +public interface BulkDeleteDocumentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.BulkDeleteDocumentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Database to operate. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Database to operate. Should be of the form:
+   * `projects/{project_id}/databases/{database_id}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the collectionIds. + */ + java.util.List getCollectionIdsList(); + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of collectionIds. + */ + int getCollectionIdsCount(); + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The collectionIds at the given index. + */ + java.lang.String getCollectionIds(int index); + /** + * + * + *
+   * Optional. IDs of the collection groups to delete. Unspecified means all
+   * collection groups.
+   *
+   * Each collection group in this list must be unique.
+   * 
+ * + * repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the collectionIds at the given index. + */ + com.google.protobuf.ByteString getCollectionIdsBytes(int index); + + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the namespaceIds. + */ + java.util.List getNamespaceIdsList(); + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of namespaceIds. + */ + int getNamespaceIdsCount(); + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The namespaceIds at the given index. + */ + java.lang.String getNamespaceIds(int index); + /** + * + * + *
+   * Optional. Namespaces to delete.
+   *
+   * An empty list means all namespaces. This is the recommended
+   * usage for databases that don't use namespaces.
+   *
+   * An empty string element represents the default namespace. This should be
+   * used if the database has data in non-default namespaces, but doesn't want
+   * to delete from them.
+   *
+   * Each namespace in this list must be unique.
+   * 
+ * + * repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the namespaceIds at the given index. + */ + com.google.protobuf.ByteString getNamespaceIdsBytes(int index); +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java new file mode 100644 index 000000000..92d0b8ae8 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 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/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +/** + * + * + *
+ * The response for
+ * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+ * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsResponse} + */ +public final class BulkDeleteDocumentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.firestore.admin.v1.BulkDeleteDocumentsResponse) + BulkDeleteDocumentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkDeleteDocumentsResponse.newBuilder() to construct. + private BulkDeleteDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BulkDeleteDocumentsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BulkDeleteDocumentsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.admin.v1.BulkDeleteDocumentsResponse)) { + return super.equals(obj); + } + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse other = + (com.google.firestore.admin.v1.BulkDeleteDocumentsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse 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.admin.v1.BulkDeleteDocumentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse 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.admin.v1.BulkDeleteDocumentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse 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.admin.v1.BulkDeleteDocumentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse 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.admin.v1.BulkDeleteDocumentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse 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.admin.v1.BulkDeleteDocumentsResponse 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
+   * [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
+   * 
+ * + * Protobuf type {@code google.firestore.admin.v1.BulkDeleteDocumentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.firestore.admin.v1.BulkDeleteDocumentsResponse) + com.google.firestore.admin.v1.BulkDeleteDocumentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.class, + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.Builder.class); + } + + // Construct using com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.firestore.admin.v1.FirestoreAdminProto + .internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsResponse getDefaultInstanceForType() { + return com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsResponse build() { + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.firestore.admin.v1.BulkDeleteDocumentsResponse buildPartial() { + com.google.firestore.admin.v1.BulkDeleteDocumentsResponse result = + new com.google.firestore.admin.v1.BulkDeleteDocumentsResponse(this); + 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.admin.v1.BulkDeleteDocumentsResponse) { + return mergeFrom((com.google.firestore.admin.v1.BulkDeleteDocumentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.firestore.admin.v1.BulkDeleteDocumentsResponse other) { + if (other == com.google.firestore.admin.v1.BulkDeleteDocumentsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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.admin.v1.BulkDeleteDocumentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.firestore.admin.v1.BulkDeleteDocumentsResponse) + private static final com.google.firestore.admin.v1.BulkDeleteDocumentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.firestore.admin.v1.BulkDeleteDocumentsResponse(); + } + + public static com.google.firestore.admin.v1.BulkDeleteDocumentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkDeleteDocumentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.admin.v1.BulkDeleteDocumentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java new file mode 100644 index 000000000..09e2e9768 --- /dev/null +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/BulkDeleteDocumentsResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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/admin/v1/firestore_admin.proto + +// Protobuf Java Version: 3.25.3 +package com.google.firestore.admin.v1; + +public interface BulkDeleteDocumentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.firestore.admin.v1.BulkDeleteDocumentsResponse) + com.google.protobuf.MessageOrBuilder {} 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 9fcd6160e..24d5b8f99 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 @@ -134,7 +134,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -148,7 +149,8 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -162,7 +164,8 @@ public int getCollectionIdsCount() { * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -177,7 +180,8 @@ public java.lang.String getCollectionIds(int index) { * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -1027,7 +1031,8 @@ private void ensureCollectionIdsIsMutable() { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1042,7 +1047,8 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1056,7 +1062,8 @@ public int getCollectionIdsCount() { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1071,7 +1078,8 @@ public java.lang.String getCollectionIds(int index) { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1086,7 +1094,8 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1109,7 +1118,8 @@ public Builder setCollectionIds(int index, java.lang.String value) { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1131,7 +1141,8 @@ public Builder addCollectionIds(java.lang.String value) { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1150,7 +1161,8 @@ public Builder addAllCollectionIds(java.lang.Iterable values) * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1168,7 +1180,8 @@ public Builder clearCollectionIds() { * * *
-     * Which collection ids to export. Unspecified means all collections.
+     * Which collection ids to export. Unspecified means all collections. Each
+     * collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java index 1744f8271..e8fbce08c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ExportDocumentsRequestOrBuilder.java @@ -59,7 +59,8 @@ public interface ExportDocumentsRequestOrBuilder * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -71,7 +72,8 @@ public interface ExportDocumentsRequestOrBuilder * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -83,7 +85,8 @@ public interface ExportDocumentsRequestOrBuilder * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -96,7 +99,8 @@ public interface ExportDocumentsRequestOrBuilder * * *
-   * Which collection ids to export. Unspecified means all collections.
+   * Which collection ids to export. Unspecified means all collections. Each
+   * collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; 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 27fff53b1..d73d9084a 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 @@ -142,8 +142,8 @@ public interface IndexConfigOrBuilder * * *
-     * Output only. Specifies the resource name of the `Field` from which this field's
-     * index configuration is set (when `uses_ancestor_config` is true),
+     * Output only. Specifies the resource name of the `Field` from which this
+     * field's index configuration is set (when `uses_ancestor_config` is true),
      * or from which it *would* be set if this field had no index configuration
      * (when `uses_ancestor_config` is false).
      * 
@@ -157,8 +157,8 @@ public interface IndexConfigOrBuilder * * *
-     * Output only. Specifies the resource name of the `Field` from which this field's
-     * index configuration is set (when `uses_ancestor_config` is true),
+     * Output only. Specifies the resource name of the `Field` from which this
+     * field's index configuration is set (when `uses_ancestor_config` is true),
      * or from which it *would* be set if this field had no index configuration
      * (when `uses_ancestor_config` is false).
      * 
@@ -330,8 +330,8 @@ public boolean getUsesAncestorConfig() { * * *
-     * Output only. Specifies the resource name of the `Field` from which this field's
-     * index configuration is set (when `uses_ancestor_config` is true),
+     * Output only. Specifies the resource name of the `Field` from which this
+     * field's index configuration is set (when `uses_ancestor_config` is true),
      * or from which it *would* be set if this field had no index configuration
      * (when `uses_ancestor_config` is false).
      * 
@@ -356,8 +356,8 @@ public java.lang.String getAncestorField() { * * *
-     * Output only. Specifies the resource name of the `Field` from which this field's
-     * index configuration is set (when `uses_ancestor_config` is true),
+     * Output only. Specifies the resource name of the `Field` from which this
+     * field's index configuration is set (when `uses_ancestor_config` is true),
      * or from which it *would* be set if this field had no index configuration
      * (when `uses_ancestor_config` is false).
      * 
@@ -1275,8 +1275,8 @@ public Builder clearUsesAncestorConfig() { * * *
-       * Output only. Specifies the resource name of the `Field` from which this field's
-       * index configuration is set (when `uses_ancestor_config` is true),
+       * Output only. Specifies the resource name of the `Field` from which this
+       * field's index configuration is set (when `uses_ancestor_config` is true),
        * or from which it *would* be set if this field had no index configuration
        * (when `uses_ancestor_config` is false).
        * 
@@ -1300,8 +1300,8 @@ public java.lang.String getAncestorField() { * * *
-       * Output only. Specifies the resource name of the `Field` from which this field's
-       * index configuration is set (when `uses_ancestor_config` is true),
+       * Output only. Specifies the resource name of the `Field` from which this
+       * field's index configuration is set (when `uses_ancestor_config` is true),
        * or from which it *would* be set if this field had no index configuration
        * (when `uses_ancestor_config` is false).
        * 
@@ -1325,8 +1325,8 @@ public com.google.protobuf.ByteString getAncestorFieldBytes() { * * *
-       * Output only. Specifies the resource name of the `Field` from which this field's
-       * index configuration is set (when `uses_ancestor_config` is true),
+       * Output only. Specifies the resource name of the `Field` from which this
+       * field's index configuration is set (when `uses_ancestor_config` is true),
        * or from which it *would* be set if this field had no index configuration
        * (when `uses_ancestor_config` is false).
        * 
@@ -1349,8 +1349,8 @@ public Builder setAncestorField(java.lang.String value) { * * *
-       * Output only. Specifies the resource name of the `Field` from which this field's
-       * index configuration is set (when `uses_ancestor_config` is true),
+       * Output only. Specifies the resource name of the `Field` from which this
+       * field's index configuration is set (when `uses_ancestor_config` is true),
        * or from which it *would* be set if this field had no index configuration
        * (when `uses_ancestor_config` is false).
        * 
@@ -1369,8 +1369,8 @@ public Builder clearAncestorField() { * * *
-       * Output only. Specifies the resource name of the `Field` from which this field's
-       * index configuration is set (when `uses_ancestor_config` is true),
+       * Output only. Specifies the resource name of the `Field` from which this
+       * field's index configuration is set (when `uses_ancestor_config` is true),
        * or from which it *would* be set if this field had no index configuration
        * (when `uses_ancestor_config` is false).
        * 
@@ -1560,9 +1560,12 @@ public interface TtlConfigOrBuilder *
    * The TTL (time-to-live) configuration for documents that have this `Field`
    * set.
+   *
    * Storing a timestamp value into a TTL-enabled field will be treated as
-   * the document's absolute expiration time. Using any other data type or
-   * leaving the field absent will disable the TTL for the individual document.
+   * the document's absolute expiration time. Timestamp values in the past
+   * indicate that the document is eligible for immediate expiration. Using any
+   * other data type or leaving the field absent will disable expiration for the
+   * individual document.
    * 
* * Protobuf type {@code google.firestore.admin.v1.Field.TtlConfig} @@ -2004,9 +2007,12 @@ protected Builder newBuilderForType( *
      * The TTL (time-to-live) configuration for documents that have this `Field`
      * set.
+     *
      * Storing a timestamp value into a TTL-enabled field will be treated as
-     * the document's absolute expiration time. Using any other data type or
-     * leaving the field absent will disable the TTL for the individual document.
+     * the document's absolute expiration time. Timestamp values in the past
+     * indicate that the document is eligible for immediate expiration. Using any
+     * other data type or leaving the field absent will disable expiration for the
+     * individual document.
      * 
* * Protobuf type {@code google.firestore.admin.v1.Field.TtlConfig} @@ -2361,26 +2367,24 @@ public com.google.firestore.admin.v1.Field.TtlConfig getDefaultInstanceForType() * * *
-   * Required. A field name of the form
+   * Required. A field name of the form:
    * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
    *
-   * A field path may be a simple field name, e.g. `address` or a path to fields
-   * within map_value , e.g. `address.city`,
+   * A field path can be a simple field name, e.g. `address` or a path to fields
+   * within `map_value` , e.g. `address.city`,
    * or a special field path. The only valid special field is `*`, which
    * represents any field.
    *
-   * Field paths may be quoted using ` (backtick). The only character that needs
-   * to be escaped within a quoted field path is the backtick character itself,
-   * escaped using a backslash. Special characters in field paths that
+   * Field paths can be quoted using `` ` `` (backtick). The only character that
+   * must be escaped within a quoted field path is the backtick character
+   * itself, escaped using a backslash. Special characters in field paths that
    * must be quoted include: `*`, `.`,
-   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
    *
    * Examples:
-   * (Note: Comments here are written in markdown syntax, so there is an
-   *  additional layer of backticks to represent a code block)
-   * `\`address.city\`` represents a field named `address.city`, not the map key
-   * `city` in the field `address`.
-   * `\`*\`` represents a field named `*`, not any field.
+   * `` `address.city` `` represents a field named `address.city`, not the map
+   * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+   * not any field.
    *
    * A special `Field` contains the default indexing settings for all fields.
    * This field's resource name is:
@@ -2409,26 +2413,24 @@ public java.lang.String getName() {
    *
    *
    * 
-   * Required. A field name of the form
+   * Required. A field name of the form:
    * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
    *
-   * A field path may be a simple field name, e.g. `address` or a path to fields
-   * within map_value , e.g. `address.city`,
+   * A field path can be a simple field name, e.g. `address` or a path to fields
+   * within `map_value` , e.g. `address.city`,
    * or a special field path. The only valid special field is `*`, which
    * represents any field.
    *
-   * Field paths may be quoted using ` (backtick). The only character that needs
-   * to be escaped within a quoted field path is the backtick character itself,
-   * escaped using a backslash. Special characters in field paths that
+   * Field paths can be quoted using `` ` `` (backtick). The only character that
+   * must be escaped within a quoted field path is the backtick character
+   * itself, escaped using a backslash. Special characters in field paths that
    * must be quoted include: `*`, `.`,
-   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
    *
    * Examples:
-   * (Note: Comments here are written in markdown syntax, so there is an
-   *  additional layer of backticks to represent a code block)
-   * `\`address.city\`` represents a field named `address.city`, not the map key
-   * `city` in the field `address`.
-   * `\`*\`` represents a field named `*`, not any field.
+   * `` `address.city` `` represents a field named `address.city`, not the map
+   * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+   * not any field.
    *
    * A special `Field` contains the default indexing settings for all fields.
    * This field's resource name is:
@@ -2992,26 +2994,24 @@ public Builder mergeFrom(
      *
      *
      * 
-     * Required. A field name of the form
+     * Required. A field name of the form:
      * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      *
-     * A field path may be a simple field name, e.g. `address` or a path to fields
-     * within map_value , e.g. `address.city`,
+     * A field path can be a simple field name, e.g. `address` or a path to fields
+     * within `map_value` , e.g. `address.city`,
      * or a special field path. The only valid special field is `*`, which
      * represents any field.
      *
-     * Field paths may be quoted using ` (backtick). The only character that needs
-     * to be escaped within a quoted field path is the backtick character itself,
-     * escaped using a backslash. Special characters in field paths that
+     * Field paths can be quoted using `` ` `` (backtick). The only character that
+     * must be escaped within a quoted field path is the backtick character
+     * itself, escaped using a backslash. Special characters in field paths that
      * must be quoted include: `*`, `.`,
-     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
      *
      * Examples:
-     * (Note: Comments here are written in markdown syntax, so there is an
-     *  additional layer of backticks to represent a code block)
-     * `\`address.city\`` represents a field named `address.city`, not the map key
-     * `city` in the field `address`.
-     * `\`*\`` represents a field named `*`, not any field.
+     * `` `address.city` `` represents a field named `address.city`, not the map
+     * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+     * not any field.
      *
      * A special `Field` contains the default indexing settings for all fields.
      * This field's resource name is:
@@ -3039,26 +3039,24 @@ public java.lang.String getName() {
      *
      *
      * 
-     * Required. A field name of the form
+     * Required. A field name of the form:
      * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      *
-     * A field path may be a simple field name, e.g. `address` or a path to fields
-     * within map_value , e.g. `address.city`,
+     * A field path can be a simple field name, e.g. `address` or a path to fields
+     * within `map_value` , e.g. `address.city`,
      * or a special field path. The only valid special field is `*`, which
      * represents any field.
      *
-     * Field paths may be quoted using ` (backtick). The only character that needs
-     * to be escaped within a quoted field path is the backtick character itself,
-     * escaped using a backslash. Special characters in field paths that
+     * Field paths can be quoted using `` ` `` (backtick). The only character that
+     * must be escaped within a quoted field path is the backtick character
+     * itself, escaped using a backslash. Special characters in field paths that
      * must be quoted include: `*`, `.`,
-     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
      *
      * Examples:
-     * (Note: Comments here are written in markdown syntax, so there is an
-     *  additional layer of backticks to represent a code block)
-     * `\`address.city\`` represents a field named `address.city`, not the map key
-     * `city` in the field `address`.
-     * `\`*\`` represents a field named `*`, not any field.
+     * `` `address.city` `` represents a field named `address.city`, not the map
+     * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+     * not any field.
      *
      * A special `Field` contains the default indexing settings for all fields.
      * This field's resource name is:
@@ -3086,26 +3084,24 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      *
      * 
-     * Required. A field name of the form
+     * Required. A field name of the form:
      * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      *
-     * A field path may be a simple field name, e.g. `address` or a path to fields
-     * within map_value , e.g. `address.city`,
+     * A field path can be a simple field name, e.g. `address` or a path to fields
+     * within `map_value` , e.g. `address.city`,
      * or a special field path. The only valid special field is `*`, which
      * represents any field.
      *
-     * Field paths may be quoted using ` (backtick). The only character that needs
-     * to be escaped within a quoted field path is the backtick character itself,
-     * escaped using a backslash. Special characters in field paths that
+     * Field paths can be quoted using `` ` `` (backtick). The only character that
+     * must be escaped within a quoted field path is the backtick character
+     * itself, escaped using a backslash. Special characters in field paths that
      * must be quoted include: `*`, `.`,
-     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
      *
      * Examples:
-     * (Note: Comments here are written in markdown syntax, so there is an
-     *  additional layer of backticks to represent a code block)
-     * `\`address.city\`` represents a field named `address.city`, not the map key
-     * `city` in the field `address`.
-     * `\`*\`` represents a field named `*`, not any field.
+     * `` `address.city` `` represents a field named `address.city`, not the map
+     * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+     * not any field.
      *
      * A special `Field` contains the default indexing settings for all fields.
      * This field's resource name is:
@@ -3132,26 +3128,24 @@ public Builder setName(java.lang.String value) {
      *
      *
      * 
-     * Required. A field name of the form
+     * Required. A field name of the form:
      * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      *
-     * A field path may be a simple field name, e.g. `address` or a path to fields
-     * within map_value , e.g. `address.city`,
+     * A field path can be a simple field name, e.g. `address` or a path to fields
+     * within `map_value` , e.g. `address.city`,
      * or a special field path. The only valid special field is `*`, which
      * represents any field.
      *
-     * Field paths may be quoted using ` (backtick). The only character that needs
-     * to be escaped within a quoted field path is the backtick character itself,
-     * escaped using a backslash. Special characters in field paths that
+     * Field paths can be quoted using `` ` `` (backtick). The only character that
+     * must be escaped within a quoted field path is the backtick character
+     * itself, escaped using a backslash. Special characters in field paths that
      * must be quoted include: `*`, `.`,
-     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
      *
      * Examples:
-     * (Note: Comments here are written in markdown syntax, so there is an
-     *  additional layer of backticks to represent a code block)
-     * `\`address.city\`` represents a field named `address.city`, not the map key
-     * `city` in the field `address`.
-     * `\`*\`` represents a field named `*`, not any field.
+     * `` `address.city` `` represents a field named `address.city`, not the map
+     * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+     * not any field.
      *
      * A special `Field` contains the default indexing settings for all fields.
      * This field's resource name is:
@@ -3174,26 +3168,24 @@ public Builder clearName() {
      *
      *
      * 
-     * Required. A field name of the form
+     * Required. A field name of the form:
      * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      *
-     * A field path may be a simple field name, e.g. `address` or a path to fields
-     * within map_value , e.g. `address.city`,
+     * A field path can be a simple field name, e.g. `address` or a path to fields
+     * within `map_value` , e.g. `address.city`,
      * or a special field path. The only valid special field is `*`, which
      * represents any field.
      *
-     * Field paths may be quoted using ` (backtick). The only character that needs
-     * to be escaped within a quoted field path is the backtick character itself,
-     * escaped using a backslash. Special characters in field paths that
+     * Field paths can be quoted using `` ` `` (backtick). The only character that
+     * must be escaped within a quoted field path is the backtick character
+     * itself, escaped using a backslash. Special characters in field paths that
      * must be quoted include: `*`, `.`,
-     * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+     * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
      *
      * Examples:
-     * (Note: Comments here are written in markdown syntax, so there is an
-     *  additional layer of backticks to represent a code block)
-     * `\`address.city\`` represents a field named `address.city`, not the map key
-     * `city` in the field `address`.
-     * `\`*\`` represents a field named `*`, not any field.
+     * `` `address.city` `` represents a field named `address.city`, not the map
+     * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+     * not any field.
      *
      * A special `Field` contains the default indexing settings for all fields.
      * This field's resource name is:
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java
index b2d3577f3..9c3a530b4 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FieldOrBuilder.java
@@ -28,26 +28,24 @@ public interface FieldOrBuilder
    *
    *
    * 
-   * Required. A field name of the form
+   * Required. A field name of the form:
    * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
    *
-   * A field path may be a simple field name, e.g. `address` or a path to fields
-   * within map_value , e.g. `address.city`,
+   * A field path can be a simple field name, e.g. `address` or a path to fields
+   * within `map_value` , e.g. `address.city`,
    * or a special field path. The only valid special field is `*`, which
    * represents any field.
    *
-   * Field paths may be quoted using ` (backtick). The only character that needs
-   * to be escaped within a quoted field path is the backtick character itself,
-   * escaped using a backslash. Special characters in field paths that
+   * Field paths can be quoted using `` ` `` (backtick). The only character that
+   * must be escaped within a quoted field path is the backtick character
+   * itself, escaped using a backslash. Special characters in field paths that
    * must be quoted include: `*`, `.`,
-   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
    *
    * Examples:
-   * (Note: Comments here are written in markdown syntax, so there is an
-   *  additional layer of backticks to represent a code block)
-   * `\`address.city\`` represents a field named `address.city`, not the map key
-   * `city` in the field `address`.
-   * `\`*\`` represents a field named `*`, not any field.
+   * `` `address.city` `` represents a field named `address.city`, not the map
+   * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+   * not any field.
    *
    * A special `Field` contains the default indexing settings for all fields.
    * This field's resource name is:
@@ -65,26 +63,24 @@ public interface FieldOrBuilder
    *
    *
    * 
-   * Required. A field name of the form
+   * Required. A field name of the form:
    * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
    *
-   * A field path may be a simple field name, e.g. `address` or a path to fields
-   * within map_value , e.g. `address.city`,
+   * A field path can be a simple field name, e.g. `address` or a path to fields
+   * within `map_value` , e.g. `address.city`,
    * or a special field path. The only valid special field is `*`, which
    * represents any field.
    *
-   * Field paths may be quoted using ` (backtick). The only character that needs
-   * to be escaped within a quoted field path is the backtick character itself,
-   * escaped using a backslash. Special characters in field paths that
+   * Field paths can be quoted using `` ` `` (backtick). The only character that
+   * must be escaped within a quoted field path is the backtick character
+   * itself, escaped using a backslash. Special characters in field paths that
    * must be quoted include: `*`, `.`,
-   * ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
+   * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters.
    *
    * Examples:
-   * (Note: Comments here are written in markdown syntax, so there is an
-   *  additional layer of backticks to represent a code block)
-   * `\`address.city\`` represents a field named `address.city`, not the map key
-   * `city` in the field `address`.
-   * `\`*\`` represents a field named `*`, not any field.
+   * `` `address.city` `` represents a field named `address.city`, not the map
+   * key `city` in the field `address`. `` `*` `` represents a field named `*`,
+   * not any field.
    *
    * A special `Field` contains the default indexing settings for all fields.
    * This field's resource name is:
diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java
index 580b7de71..3c2aff0bf 100644
--- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java
+++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/FirestoreAdminProto.java
@@ -132,6 +132,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_firestore_admin_v1_ImportDocumentsRequest_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_firestore_admin_v1_ImportDocumentsRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -175,214 +183,225 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "ogle/longrunning/operations.proto\032\033googl"
           + "e/protobuf/empty.proto\032 google/protobuf/"
           + "field_mask.proto\032\037google/protobuf/timest"
-          + "amp.proto\"Q\n\024ListDatabasesRequest\0229\n\006par"
+          + "amp.proto\"g\n\024ListDatabasesRequest\0229\n\006par"
           + "ent\030\001 \001(\tB)\340A\002\372A#\022!firestore.googleapis."
-          + "com/Database\"\250\001\n\025CreateDatabaseRequest\0229"
-          + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!firestore.google"
-          + "apis.com/Database\022:\n\010database\030\002 \001(\0132#.go"
-          + "ogle.firestore.admin.v1.DatabaseB\003\340A\002\022\030\n"
-          + "\013database_id\030\003 \001(\tB\003\340A\002\"\030\n\026CreateDatabas"
-          + "eMetadata\"d\n\025ListDatabasesResponse\0226\n\tda"
-          + "tabases\030\001 \003(\0132#.google.firestore.admin.v"
-          + "1.Database\022\023\n\013unreachable\030\003 \003(\t\"M\n\022GetDa"
-          + "tabaseRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!fir"
-          + "estore.googleapis.com/Database\"\204\001\n\025Updat"
-          + "eDatabaseRequest\022:\n\010database\030\001 \001(\0132#.goo"
-          + "gle.firestore.admin.v1.DatabaseB\003\340A\002\022/\n\013"
-          + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel"
-          + "dMask\"\030\n\026UpdateDatabaseMetadata\"^\n\025Delet"
-          + "eDatabaseRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!"
-          + "firestore.googleapis.com/Database\022\014\n\004eta"
-          + "g\030\003 \001(\t\"\030\n\026DeleteDatabaseMetadata\"\241\001\n\033Cr"
-          + "eateBackupScheduleRequest\0229\n\006parent\030\001 \001("
+          + "com/Database\022\024\n\014show_deleted\030\004 \001(\010\"\250\001\n\025C"
+          + "reateDatabaseRequest\0229\n\006parent\030\001 \001(\tB)\340A"
+          + "\002\372A#\022!firestore.googleapis.com/Database\022"
+          + ":\n\010database\030\002 \001(\0132#.google.firestore.adm"
+          + "in.v1.DatabaseB\003\340A\002\022\030\n\013database_id\030\003 \001(\t"
+          + "B\003\340A\002\"\030\n\026CreateDatabaseMetadata\"d\n\025ListD"
+          + "atabasesResponse\0226\n\tdatabases\030\001 \003(\0132#.go"
+          + "ogle.firestore.admin.v1.Database\022\023\n\013unre"
+          + "achable\030\003 \003(\t\"M\n\022GetDatabaseRequest\0227\n\004n"
+          + "ame\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis."
+          + "com/Database\"\204\001\n\025UpdateDatabaseRequest\022:"
+          + "\n\010database\030\001 \001(\0132#.google.firestore.admi"
+          + "n.v1.DatabaseB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132"
+          + "\032.google.protobuf.FieldMask\"\030\n\026UpdateDat"
+          + "abaseMetadata\"^\n\025DeleteDatabaseRequest\0227"
+          + "\n\004name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleap"
+          + "is.com/Database\022\014\n\004etag\030\003 \001(\t\"\030\n\026DeleteD"
+          + "atabaseMetadata\"\241\001\n\033CreateBackupSchedule"
+          + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firesto"
+          + "re.googleapis.com/Database\022G\n\017backup_sch"
+          + "edule\030\002 \001(\0132).google.firestore.admin.v1."
+          + "BackupScheduleB\003\340A\002\"Y\n\030GetBackupSchedule"
+          + "Request\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore"
+          + ".googleapis.com/BackupSchedule\"\227\001\n\033Updat"
+          + "eBackupScheduleRequest\022G\n\017backup_schedul"
+          + "e\030\001 \001(\0132).google.firestore.admin.v1.Back"
+          + "upScheduleB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g"
+          + "oogle.protobuf.FieldMask\"W\n\032ListBackupSc"
+          + "hedulesRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!"
+          + "firestore.googleapis.com/Database\"b\n\033Lis"
+          + "tBackupSchedulesResponse\022C\n\020backup_sched"
+          + "ules\030\001 \003(\0132).google.firestore.admin.v1.B"
+          + "ackupSchedule\"\\\n\033DeleteBackupScheduleReq"
+          + "uest\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'firestore.go"
+          + "ogleapis.com/BackupSchedule\"\214\001\n\022CreateIn"
+          + "dexRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(fire"
+          + "store.googleapis.com/CollectionGroup\0224\n\005"
+          + "index\030\002 \001(\0132 .google.firestore.admin.v1."
+          + "IndexB\003\340A\002\"\215\001\n\022ListIndexesRequest\022@\n\006par"
+          + "ent\030\001 \001(\tB0\340A\002\372A*\n(firestore.googleapis."
+          + "com/CollectionGroup\022\016\n\006filter\030\002 \001(\t\022\021\n\tp"
+          + "age_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"a\n\023Li"
+          + "stIndexesResponse\0221\n\007indexes\030\001 \003(\0132 .goo"
+          + "gle.firestore.admin.v1.Index\022\027\n\017next_pag"
+          + "e_token\030\002 \001(\t\"G\n\017GetIndexRequest\0224\n\004name"
+          + "\030\001 \001(\tB&\340A\002\372A \n\036firestore.googleapis.com"
+          + "/Index\"J\n\022DeleteIndexRequest\0224\n\004name\030\001 \001"
+          + "(\tB&\340A\002\372A \n\036firestore.googleapis.com/Ind"
+          + "ex\"{\n\022UpdateFieldRequest\0224\n\005field\030\001 \001(\0132"
+          + " .google.firestore.admin.v1.FieldB\003\340A\002\022/"
+          + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi"
+          + "eldMask\"G\n\017GetFieldRequest\0224\n\004name\030\001 \001(\t"
+          + "B&\340A\002\372A \n\036firestore.googleapis.com/Field"
+          + "\"\214\001\n\021ListFieldsRequest\022@\n\006parent\030\001 \001(\tB0"
+          + "\340A\002\372A*\n(firestore.googleapis.com/Collect"
+          + "ionGroup\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 "
+          + "\001(\005\022\022\n\npage_token\030\004 \001(\t\"_\n\022ListFieldsRes"
+          + "ponse\0220\n\006fields\030\001 \003(\0132 .google.firestore"
+          + ".admin.v1.Field\022\027\n\017next_page_token\030\002 \001(\t"
+          + "\"\316\001\n\026ExportDocumentsRequest\0227\n\004name\030\001 \001("
           + "\tB)\340A\002\372A#\n!firestore.googleapis.com/Data"
-          + "base\022G\n\017backup_schedule\030\002 \001(\0132).google.f"
-          + "irestore.admin.v1.BackupScheduleB\003\340A\002\"Y\n"
-          + "\030GetBackupScheduleRequest\022=\n\004name\030\001 \001(\tB"
-          + "/\340A\002\372A)\n\'firestore.googleapis.com/Backup"
-          + "Schedule\"\227\001\n\033UpdateBackupScheduleRequest"
-          + "\022G\n\017backup_schedule\030\001 \001(\0132).google.fires"
-          + "tore.admin.v1.BackupScheduleB\003\340A\002\022/\n\013upd"
-          + "ate_mask\030\002 \001(\0132\032.google.protobuf.FieldMa"
-          + "sk\"W\n\032ListBackupSchedulesRequest\0229\n\006pare"
-          + "nt\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis.c"
-          + "om/Database\"b\n\033ListBackupSchedulesRespon"
-          + "se\022C\n\020backup_schedules\030\001 \003(\0132).google.fi"
-          + "restore.admin.v1.BackupSchedule\"\\\n\033Delet"
-          + "eBackupScheduleRequest\022=\n\004name\030\001 \001(\tB/\340A"
-          + "\002\372A)\n\'firestore.googleapis.com/BackupSch"
-          + "edule\"\214\001\n\022CreateIndexRequest\022@\n\006parent\030\001"
-          + " \001(\tB0\340A\002\372A*\n(firestore.googleapis.com/C"
-          + "ollectionGroup\0224\n\005index\030\002 \001(\0132 .google.f"
-          + "irestore.admin.v1.IndexB\003\340A\002\"\215\001\n\022ListInd"
-          + "exesRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(fir"
-          + "estore.googleapis.com/CollectionGroup\022\016\n"
-          + "\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage"
-          + "_token\030\004 \001(\t\"a\n\023ListIndexesResponse\0221\n\007i"
-          + "ndexes\030\001 \003(\0132 .google.firestore.admin.v1"
-          + ".Index\022\027\n\017next_page_token\030\002 \001(\t\"G\n\017GetIn"
-          + "dexRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036firest"
-          + "ore.googleapis.com/Index\"J\n\022DeleteIndexR"
-          + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036firestore."
-          + "googleapis.com/Index\"{\n\022UpdateFieldReque"
-          + "st\0224\n\005field\030\001 \001(\0132 .google.firestore.adm"
-          + "in.v1.FieldB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032."
-          + "google.protobuf.FieldMask\"G\n\017GetFieldReq"
-          + "uest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036firestore.go"
-          + "ogleapis.com/Field\"\214\001\n\021ListFieldsRequest"
-          + "\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\n(firestore.goog"
-          + "leapis.com/CollectionGroup\022\016\n\006filter\030\002 \001"
-          + "(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001("
-          + "\t\"_\n\022ListFieldsResponse\0220\n\006fields\030\001 \003(\0132"
-          + " .google.firestore.admin.v1.Field\022\027\n\017nex"
-          + "t_page_token\030\002 \001(\t\"\316\001\n\026ExportDocumentsRe"
-          + "quest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!firestore.g"
-          + "oogleapis.com/Database\022\026\n\016collection_ids"
-          + "\030\002 \003(\t\022\031\n\021output_uri_prefix\030\003 \001(\t\022\025\n\rnam"
-          + "espace_ids\030\004 \003(\t\0221\n\rsnapshot_time\030\005 \001(\0132"
-          + "\032.google.protobuf.Timestamp\"\232\001\n\026ImportDo"
-          + "cumentsRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!fi"
-          + "restore.googleapis.com/Database\022\026\n\016colle"
-          + "ction_ids\030\002 \003(\t\022\030\n\020input_uri_prefix\030\003 \001("
-          + "\t\022\025\n\rnamespace_ids\030\004 \003(\t\"I\n\020GetBackupReq"
-          + "uest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037firestore.go"
-          + "ogleapis.com/Backup\"O\n\022ListBackupsReques"
-          + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firestore.goo"
-          + "gleapis.com/Location\"^\n\023ListBackupsRespo"
-          + "nse\0222\n\007backups\030\001 \003(\0132!.google.firestore."
-          + "admin.v1.Backup\022\023\n\013unreachable\030\003 \003(\t\"L\n\023"
-          + "DeleteBackupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A"
-          + "!\n\037firestore.googleapis.com/Backup\"\246\001\n\026R"
-          + "estoreDatabaseRequest\0229\n\006parent\030\001 \001(\tB)\340"
-          + "A\002\372A#\022!firestore.googleapis.com/Database"
-          + "\022\030\n\013database_id\030\002 \001(\tB\003\340A\002\0227\n\006backup\030\003 \001"
-          + "(\tB\'\340A\002\372A!\n\037firestore.googleapis.com/Bac"
-          + "kup2\326#\n\016FirestoreAdmin\022\333\001\n\013CreateIndex\022-"
-          + ".google.firestore.admin.v1.CreateIndexRe"
-          + "quest\032\035.google.longrunning.Operation\"~\312A"
-          + "\037\n\005Index\022\026IndexOperationMetadata\332A\014paren"
-          + "t,index\202\323\344\223\002G\">/v1/{parent=projects/*/da"
-          + "tabases/*/collectionGroups/*}/indexes:\005i"
-          + "ndex\022\275\001\n\013ListIndexes\022-.google.firestore."
-          + "admin.v1.ListIndexesRequest\032..google.fir"
-          + "estore.admin.v1.ListIndexesResponse\"O\332A\006"
-          + "parent\202\323\344\223\002@\022>/v1/{parent=projects/*/dat"
-          + "abases/*/collectionGroups/*}/indexes\022\247\001\n"
-          + "\010GetIndex\022*.google.firestore.admin.v1.Ge"
-          + "tIndexRequest\032 .google.firestore.admin.v"
-          + "1.Index\"M\332A\004name\202\323\344\223\002@\022>/v1/{name=projec"
-          + "ts/*/databases/*/collectionGroups/*/inde"
-          + "xes/*}\022\243\001\n\013DeleteIndex\022-.google.firestor"
-          + "e.admin.v1.DeleteIndexRequest\032\026.google.p"
-          + "rotobuf.Empty\"M\332A\004name\202\323\344\223\002@*>/v1/{name="
-          + "projects/*/databases/*/collectionGroups/"
-          + "*/indexes/*}\022\246\001\n\010GetField\022*.google.fires"
-          + "tore.admin.v1.GetFieldRequest\032 .google.f"
-          + "irestore.admin.v1.Field\"L\332A\004name\202\323\344\223\002?\022="
-          + "/v1/{name=projects/*/databases/*/collect"
-          + "ionGroups/*/fields/*}\022\331\001\n\013UpdateField\022-."
-          + "google.firestore.admin.v1.UpdateFieldReq"
-          + "uest\032\035.google.longrunning.Operation\"|\312A\037"
-          + "\n\005Field\022\026FieldOperationMetadata\332A\005field\202"
-          + "\323\344\223\002L2C/v1/{field.name=projects/*/databa"
-          + "ses/*/collectionGroups/*/fields/*}:\005fiel"
-          + "d\022\271\001\n\nListFields\022,.google.firestore.admi"
-          + "n.v1.ListFieldsRequest\032-.google.firestor"
-          + "e.admin.v1.ListFieldsResponse\"N\332A\006parent"
-          + "\202\323\344\223\002?\022=/v1/{parent=projects/*/databases"
-          + "/*/collectionGroups/*}/fields\022\335\001\n\017Export"
-          + "Documents\0221.google.firestore.admin.v1.Ex"
-          + "portDocumentsRequest\032\035.google.longrunnin"
-          + "g.Operation\"x\312A2\n\027ExportDocumentsRespons"
-          + "e\022\027ExportDocumentsMetadata\332A\004name\202\323\344\223\0026\""
-          + "1/v1/{name=projects/*/databases/*}:expor"
-          + "tDocuments:\001*\022\333\001\n\017ImportDocuments\0221.goog"
-          + "le.firestore.admin.v1.ImportDocumentsReq"
-          + "uest\032\035.google.longrunning.Operation\"v\312A0"
-          + "\n\025google.protobuf.Empty\022\027ImportDocuments"
-          + "Metadata\332A\004name\202\323\344\223\0026\"1/v1/{name=project"
-          + "s/*/databases/*}:importDocuments:\001*\022\331\001\n\016"
-          + "CreateDatabase\0220.google.firestore.admin."
-          + "v1.CreateDatabaseRequest\032\035.google.longru"
-          + "nning.Operation\"v\312A\"\n\010Database\022\026CreateDa"
-          + "tabaseMetadata\332A\033parent,database,databas"
-          + "e_id\202\323\344\223\002-\"!/v1/{parent=projects/*}/data"
-          + "bases:\010database\022\223\001\n\013GetDatabase\022-.google"
-          + ".firestore.admin.v1.GetDatabaseRequest\032#"
-          + ".google.firestore.admin.v1.Database\"0\332A\004"
-          + "name\202\323\344\223\002#\022!/v1/{name=projects/*/databas"
-          + "es/*}\022\246\001\n\rListDatabases\022/.google.firesto"
-          + "re.admin.v1.ListDatabasesRequest\0320.googl"
-          + "e.firestore.admin.v1.ListDatabasesRespon"
-          + "se\"2\332A\006parent\202\323\344\223\002#\022!/v1/{parent=project"
-          + "s/*}/databases\022\333\001\n\016UpdateDatabase\0220.goog"
-          + "le.firestore.admin.v1.UpdateDatabaseRequ"
-          + "est\032\035.google.longrunning.Operation\"x\312A\"\n"
-          + "\010Database\022\026UpdateDatabaseMetadata\332A\024data"
-          + "base,update_mask\202\323\344\223\00262*/v1/{database.na"
-          + "me=projects/*/databases/*}:\010database\022\270\001\n"
-          + "\016DeleteDatabase\0220.google.firestore.admin"
-          + ".v1.DeleteDatabaseRequest\032\035.google.longr"
-          + "unning.Operation\"U\312A\"\n\010Database\022\026DeleteD"
-          + "atabaseMetadata\332A\004name\202\323\344\223\002#*!/v1/{name="
-          + "projects/*/databases/*}\022\227\001\n\tGetBackup\022+."
-          + "google.firestore.admin.v1.GetBackupReque"
-          + "st\032!.google.firestore.admin.v1.Backup\":\332"
-          + "A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/locat"
-          + "ions/*/backups/*}\022\252\001\n\013ListBackups\022-.goog"
-          + "le.firestore.admin.v1.ListBackupsRequest"
-          + "\032..google.firestore.admin.v1.ListBackups"
-          + "Response\"<\332A\006parent\202\323\344\223\002-\022+/v1/{parent=p"
-          + "rojects/*/locations/*}/backups\022\222\001\n\014Delet"
-          + "eBackup\022..google.firestore.admin.v1.Dele"
-          + "teBackupRequest\032\026.google.protobuf.Empty\""
-          + ":\332A\004name\202\323\344\223\002-*+/v1/{name=projects/*/loc"
-          + "ations/*/backups/*}\022\277\001\n\017RestoreDatabase\022"
-          + "1.google.firestore.admin.v1.RestoreDatab"
-          + "aseRequest\032\035.google.longrunning.Operatio"
-          + "n\"Z\312A#\n\010Database\022\027RestoreDatabaseMetadat"
-          + "a\202\323\344\223\002.\")/v1/{parent=projects/*}/databas"
-          + "es:restore:\001*\022\340\001\n\024CreateBackupSchedule\0226"
-          + ".google.firestore.admin.v1.CreateBackupS"
-          + "cheduleRequest\032).google.firestore.admin."
-          + "v1.BackupSchedule\"e\332A\026parent,backup_sche"
-          + "dule\202\323\344\223\002F\"3/v1/{parent=projects/*/datab"
-          + "ases/*}/backupSchedules:\017backup_schedule"
-          + "\022\267\001\n\021GetBackupSchedule\0223.google.firestor"
-          + "e.admin.v1.GetBackupScheduleRequest\032).go"
-          + "ogle.firestore.admin.v1.BackupSchedule\"B"
-          + "\332A\004name\202\323\344\223\0025\0223/v1/{name=projects/*/data"
-          + "bases/*/backupSchedules/*}\022\312\001\n\023ListBacku"
-          + "pSchedules\0225.google.firestore.admin.v1.L"
-          + "istBackupSchedulesRequest\0326.google.fires"
-          + "tore.admin.v1.ListBackupSchedulesRespons"
-          + "e\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=projects"
-          + "/*/databases/*}/backupSchedules\022\365\001\n\024Upda"
-          + "teBackupSchedule\0226.google.firestore.admi"
-          + "n.v1.UpdateBackupScheduleRequest\032).googl"
-          + "e.firestore.admin.v1.BackupSchedule\"z\332A\033"
-          + "backup_schedule,update_mask\202\323\344\223\002V2C/v1/{"
-          + "backup_schedule.name=projects/*/database"
-          + "s/*/backupSchedules/*}:\017backup_schedule\022"
-          + "\252\001\n\024DeleteBackupSchedule\0226.google.firest"
-          + "ore.admin.v1.DeleteBackupScheduleRequest"
-          + "\032\026.google.protobuf.Empty\"B\332A\004name\202\323\344\223\0025*"
-          + "3/v1/{name=projects/*/databases/*/backup"
-          + "Schedules/*}\032v\312A\030firestore.googleapis.co"
-          + "m\322AXhttps://www.googleapis.com/auth/clou"
-          + "d-platform,https://www.googleapis.com/au"
-          + "th/datastoreB\245\003\n\035com.google.firestore.ad"
-          + "min.v1B\023FirestoreAdminProtoP\001Z9cloud.goo"
-          + "gle.com/go/firestore/apiv1/admin/adminpb"
-          + ";adminpb\242\002\004GCFS\252\002\037Google.Cloud.Firestore"
-          + ".Admin.V1\312\002\037Google\\Cloud\\Firestore\\Admin"
-          + "\\V1\352\002#Google::Cloud::Firestore::Admin::V"
-          + "1\352AL\n!firestore.googleapis.com/Location\022"
-          + "\'projects/{project}/locations/{location}"
-          + "\352Aq\n(firestore.googleapis.com/Collection"
-          + "Group\022Eprojects/{project}/databases/{dat"
-          + "abase}/collectionGroups/{collection}b\006pr"
-          + "oto3"
+          + "base\022\026\n\016collection_ids\030\002 \003(\t\022\031\n\021output_u"
+          + "ri_prefix\030\003 \001(\t\022\025\n\rnamespace_ids\030\004 \003(\t\0221"
+          + "\n\rsnapshot_time\030\005 \001(\0132\032.google.protobuf."
+          + "Timestamp\"\232\001\n\026ImportDocumentsRequest\0227\n\004"
+          + "name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapis"
+          + ".com/Database\022\026\n\016collection_ids\030\002 \003(\t\022\030\n"
+          + "\020input_uri_prefix\030\003 \001(\t\022\025\n\rnamespace_ids"
+          + "\030\004 \003(\t\"\216\001\n\032BulkDeleteDocumentsRequest\0227\n"
+          + "\004name\030\001 \001(\tB)\340A\002\372A#\n!firestore.googleapi"
+          + "s.com/Database\022\033\n\016collection_ids\030\002 \003(\tB\003"
+          + "\340A\001\022\032\n\rnamespace_ids\030\003 \003(\tB\003\340A\001\"\035\n\033BulkD"
+          + "eleteDocumentsResponse\"I\n\020GetBackupReque"
+          + "st\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037firestore.goog"
+          + "leapis.com/Backup\"O\n\022ListBackupsRequest\022"
+          + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!firestore.googl"
+          + "eapis.com/Location\"^\n\023ListBackupsRespons"
+          + "e\0222\n\007backups\030\001 \003(\0132!.google.firestore.ad"
+          + "min.v1.Backup\022\023\n\013unreachable\030\003 \003(\t\"L\n\023De"
+          + "leteBackupRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n"
+          + "\037firestore.googleapis.com/Backup\"\246\001\n\026Res"
+          + "toreDatabaseRequest\0229\n\006parent\030\001 \001(\tB)\340A\002"
+          + "\372A#\022!firestore.googleapis.com/Database\022\030"
+          + "\n\013database_id\030\002 \001(\tB\003\340A\002\0227\n\006backup\030\003 \001(\t"
+          + "B\'\340A\002\372A!\n\037firestore.googleapis.com/Backu"
+          + "p2\313%\n\016FirestoreAdmin\022\333\001\n\013CreateIndex\022-.g"
+          + "oogle.firestore.admin.v1.CreateIndexRequ"
+          + "est\032\035.google.longrunning.Operation\"~\312A\037\n"
+          + "\005Index\022\026IndexOperationMetadata\332A\014parent,"
+          + "index\202\323\344\223\002G\">/v1/{parent=projects/*/data"
+          + "bases/*/collectionGroups/*}/indexes:\005ind"
+          + "ex\022\275\001\n\013ListIndexes\022-.google.firestore.ad"
+          + "min.v1.ListIndexesRequest\032..google.fires"
+          + "tore.admin.v1.ListIndexesResponse\"O\332A\006pa"
+          + "rent\202\323\344\223\002@\022>/v1/{parent=projects/*/datab"
+          + "ases/*/collectionGroups/*}/indexes\022\247\001\n\010G"
+          + "etIndex\022*.google.firestore.admin.v1.GetI"
+          + "ndexRequest\032 .google.firestore.admin.v1."
+          + "Index\"M\332A\004name\202\323\344\223\002@\022>/v1/{name=projects"
+          + "/*/databases/*/collectionGroups/*/indexe"
+          + "s/*}\022\243\001\n\013DeleteIndex\022-.google.firestore."
+          + "admin.v1.DeleteIndexRequest\032\026.google.pro"
+          + "tobuf.Empty\"M\332A\004name\202\323\344\223\002@*>/v1/{name=pr"
+          + "ojects/*/databases/*/collectionGroups/*/"
+          + "indexes/*}\022\246\001\n\010GetField\022*.google.firesto"
+          + "re.admin.v1.GetFieldRequest\032 .google.fir"
+          + "estore.admin.v1.Field\"L\332A\004name\202\323\344\223\002?\022=/v"
+          + "1/{name=projects/*/databases/*/collectio"
+          + "nGroups/*/fields/*}\022\331\001\n\013UpdateField\022-.go"
+          + "ogle.firestore.admin.v1.UpdateFieldReque"
+          + "st\032\035.google.longrunning.Operation\"|\312A\037\n\005"
+          + "Field\022\026FieldOperationMetadata\332A\005field\202\323\344"
+          + "\223\002L2C/v1/{field.name=projects/*/database"
+          + "s/*/collectionGroups/*/fields/*}:\005field\022"
+          + "\271\001\n\nListFields\022,.google.firestore.admin."
+          + "v1.ListFieldsRequest\032-.google.firestore."
+          + "admin.v1.ListFieldsResponse\"N\332A\006parent\202\323"
+          + "\344\223\002?\022=/v1/{parent=projects/*/databases/*"
+          + "/collectionGroups/*}/fields\022\335\001\n\017ExportDo"
+          + "cuments\0221.google.firestore.admin.v1.Expo"
+          + "rtDocumentsRequest\032\035.google.longrunning."
+          + "Operation\"x\312A2\n\027ExportDocumentsResponse\022"
+          + "\027ExportDocumentsMetadata\332A\004name\202\323\344\223\0026\"1/"
+          + "v1/{name=projects/*/databases/*}:exportD"
+          + "ocuments:\001*\022\333\001\n\017ImportDocuments\0221.google"
+          + ".firestore.admin.v1.ImportDocumentsReque"
+          + "st\032\035.google.longrunning.Operation\"v\312A0\n\025"
+          + "google.protobuf.Empty\022\027ImportDocumentsMe"
+          + "tadata\332A\004name\202\323\344\223\0026\"1/v1/{name=projects/"
+          + "*/databases/*}:importDocuments:\001*\022\362\001\n\023Bu"
+          + "lkDeleteDocuments\0225.google.firestore.adm"
+          + "in.v1.BulkDeleteDocumentsRequest\032\035.googl"
+          + "e.longrunning.Operation\"\204\001\312A:\n\033BulkDelet"
+          + "eDocumentsResponse\022\033BulkDeleteDocumentsM"
+          + "etadata\332A\004name\202\323\344\223\002:\"5/v1/{name=projects"
+          + "/*/databases/*}:bulkDeleteDocuments:\001*\022\331"
+          + "\001\n\016CreateDatabase\0220.google.firestore.adm"
+          + "in.v1.CreateDatabaseRequest\032\035.google.lon"
+          + "grunning.Operation\"v\312A\"\n\010Database\022\026Creat"
+          + "eDatabaseMetadata\332A\033parent,database,data"
+          + "base_id\202\323\344\223\002-\"!/v1/{parent=projects/*}/d"
+          + "atabases:\010database\022\223\001\n\013GetDatabase\022-.goo"
+          + "gle.firestore.admin.v1.GetDatabaseReques"
+          + "t\032#.google.firestore.admin.v1.Database\"0"
+          + "\332A\004name\202\323\344\223\002#\022!/v1/{name=projects/*/data"
+          + "bases/*}\022\246\001\n\rListDatabases\022/.google.fire"
+          + "store.admin.v1.ListDatabasesRequest\0320.go"
+          + "ogle.firestore.admin.v1.ListDatabasesRes"
+          + "ponse\"2\332A\006parent\202\323\344\223\002#\022!/v1/{parent=proj"
+          + "ects/*}/databases\022\333\001\n\016UpdateDatabase\0220.g"
+          + "oogle.firestore.admin.v1.UpdateDatabaseR"
+          + "equest\032\035.google.longrunning.Operation\"x\312"
+          + "A\"\n\010Database\022\026UpdateDatabaseMetadata\332A\024d"
+          + "atabase,update_mask\202\323\344\223\00262*/v1/{database"
+          + ".name=projects/*/databases/*}:\010database\022"
+          + "\270\001\n\016DeleteDatabase\0220.google.firestore.ad"
+          + "min.v1.DeleteDatabaseRequest\032\035.google.lo"
+          + "ngrunning.Operation\"U\312A\"\n\010Database\022\026Dele"
+          + "teDatabaseMetadata\332A\004name\202\323\344\223\002#*!/v1/{na"
+          + "me=projects/*/databases/*}\022\227\001\n\tGetBackup"
+          + "\022+.google.firestore.admin.v1.GetBackupRe"
+          + "quest\032!.google.firestore.admin.v1.Backup"
+          + "\":\332A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/lo"
+          + "cations/*/backups/*}\022\252\001\n\013ListBackups\022-.g"
+          + "oogle.firestore.admin.v1.ListBackupsRequ"
+          + "est\032..google.firestore.admin.v1.ListBack"
+          + "upsResponse\"<\332A\006parent\202\323\344\223\002-\022+/v1/{paren"
+          + "t=projects/*/locations/*}/backups\022\222\001\n\014De"
+          + "leteBackup\022..google.firestore.admin.v1.D"
+          + "eleteBackupRequest\032\026.google.protobuf.Emp"
+          + "ty\":\332A\004name\202\323\344\223\002-*+/v1/{name=projects/*/"
+          + "locations/*/backups/*}\022\277\001\n\017RestoreDataba"
+          + "se\0221.google.firestore.admin.v1.RestoreDa"
+          + "tabaseRequest\032\035.google.longrunning.Opera"
+          + "tion\"Z\312A#\n\010Database\022\027RestoreDatabaseMeta"
+          + "data\202\323\344\223\002.\")/v1/{parent=projects/*}/data"
+          + "bases:restore:\001*\022\340\001\n\024CreateBackupSchedul"
+          + "e\0226.google.firestore.admin.v1.CreateBack"
+          + "upScheduleRequest\032).google.firestore.adm"
+          + "in.v1.BackupSchedule\"e\332A\026parent,backup_s"
+          + "chedule\202\323\344\223\002F\"3/v1/{parent=projects/*/da"
+          + "tabases/*}/backupSchedules:\017backup_sched"
+          + "ule\022\267\001\n\021GetBackupSchedule\0223.google.fires"
+          + "tore.admin.v1.GetBackupScheduleRequest\032)"
+          + ".google.firestore.admin.v1.BackupSchedul"
+          + "e\"B\332A\004name\202\323\344\223\0025\0223/v1/{name=projects/*/d"
+          + "atabases/*/backupSchedules/*}\022\312\001\n\023ListBa"
+          + "ckupSchedules\0225.google.firestore.admin.v"
+          + "1.ListBackupSchedulesRequest\0326.google.fi"
+          + "restore.admin.v1.ListBackupSchedulesResp"
+          + "onse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=proje"
+          + "cts/*/databases/*}/backupSchedules\022\365\001\n\024U"
+          + "pdateBackupSchedule\0226.google.firestore.a"
+          + "dmin.v1.UpdateBackupScheduleRequest\032).go"
+          + "ogle.firestore.admin.v1.BackupSchedule\"z"
+          + "\332A\033backup_schedule,update_mask\202\323\344\223\002V2C/v"
+          + "1/{backup_schedule.name=projects/*/datab"
+          + "ases/*/backupSchedules/*}:\017backup_schedu"
+          + "le\022\252\001\n\024DeleteBackupSchedule\0226.google.fir"
+          + "estore.admin.v1.DeleteBackupScheduleRequ"
+          + "est\032\026.google.protobuf.Empty\"B\332A\004name\202\323\344\223"
+          + "\0025*3/v1/{name=projects/*/databases/*/bac"
+          + "kupSchedules/*}\032v\312A\030firestore.googleapis"
+          + ".com\322AXhttps://www.googleapis.com/auth/c"
+          + "loud-platform,https://www.googleapis.com"
+          + "/auth/datastoreB\245\003\n\035com.google.firestore"
+          + ".admin.v1B\023FirestoreAdminProtoP\001Z9cloud."
+          + "google.com/go/firestore/apiv1/admin/admi"
+          + "npb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Firest"
+          + "ore.Admin.V1\312\002\037Google\\Cloud\\Firestore\\Ad"
+          + "min\\V1\352\002#Google::Cloud::Firestore::Admin"
+          + "::V1\352AL\n!firestore.googleapis.com/Locati"
+          + "on\022\'projects/{project}/locations/{locati"
+          + "on}\352Aq\n(firestore.googleapis.com/Collect"
+          + "ionGroup\022Eprojects/{project}/databases/{"
+          + "database}/collectionGroups/{collection}b"
+          + "\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -409,7 +428,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_ListDatabasesRequest_descriptor,
             new java.lang.String[] {
-              "Parent",
+              "Parent", "ShowDeleted",
             });
     internal_static_google_firestore_admin_v1_CreateDatabaseRequest_descriptor =
         getDescriptor().getMessageTypes().get(1);
@@ -605,8 +624,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "Name", "CollectionIds", "InputUriPrefix", "NamespaceIds",
             });
-    internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor =
+    internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor =
         getDescriptor().getMessageTypes().get(26);
+    internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_firestore_admin_v1_BulkDeleteDocumentsRequest_descriptor,
+            new java.lang.String[] {
+              "Name", "CollectionIds", "NamespaceIds",
+            });
+    internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor =
+        getDescriptor().getMessageTypes().get(27);
+    internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_fieldAccessorTable =
+        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+            internal_static_google_firestore_admin_v1_BulkDeleteDocumentsResponse_descriptor,
+            new java.lang.String[] {});
+    internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor =
+        getDescriptor().getMessageTypes().get(28);
     internal_static_google_firestore_admin_v1_GetBackupRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_GetBackupRequest_descriptor,
@@ -614,7 +647,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name",
             });
     internal_static_google_firestore_admin_v1_ListBackupsRequest_descriptor =
-        getDescriptor().getMessageTypes().get(27);
+        getDescriptor().getMessageTypes().get(29);
     internal_static_google_firestore_admin_v1_ListBackupsRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_ListBackupsRequest_descriptor,
@@ -622,7 +655,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Parent",
             });
     internal_static_google_firestore_admin_v1_ListBackupsResponse_descriptor =
-        getDescriptor().getMessageTypes().get(28);
+        getDescriptor().getMessageTypes().get(30);
     internal_static_google_firestore_admin_v1_ListBackupsResponse_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_ListBackupsResponse_descriptor,
@@ -630,7 +663,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Backups", "Unreachable",
             });
     internal_static_google_firestore_admin_v1_DeleteBackupRequest_descriptor =
-        getDescriptor().getMessageTypes().get(29);
+        getDescriptor().getMessageTypes().get(31);
     internal_static_google_firestore_admin_v1_DeleteBackupRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_DeleteBackupRequest_descriptor,
@@ -638,7 +671,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               "Name",
             });
     internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor =
-        getDescriptor().getMessageTypes().get(30);
+        getDescriptor().getMessageTypes().get(32);
     internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_firestore_admin_v1_RestoreDatabaseRequest_descriptor,
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 b2309f8a4..7e7e7723c 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
@@ -134,7 +134,7 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    * 
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -149,7 +149,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -164,7 +164,7 @@ public int getCollectionIdsCount() { * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -180,7 +180,7 @@ public java.lang.String getCollectionIds(int index) { * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -913,7 +913,7 @@ private void ensureCollectionIdsIsMutable() { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -929,7 +929,7 @@ public com.google.protobuf.ProtocolStringList getCollectionIdsList() { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -944,7 +944,7 @@ public int getCollectionIdsCount() { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -960,7 +960,7 @@ public java.lang.String getCollectionIds(int index) { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -976,7 +976,7 @@ public com.google.protobuf.ByteString getCollectionIdsBytes(int index) { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1000,7 +1000,7 @@ public Builder setCollectionIds(int index, java.lang.String value) { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1023,7 +1023,7 @@ public Builder addCollectionIds(java.lang.String value) { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1043,7 +1043,7 @@ public Builder addAllCollectionIds(java.lang.Iterable values) * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; @@ -1062,7 +1062,7 @@ public Builder clearCollectionIds() { * *
      * Which collection ids to import. Unspecified means all collections included
-     * in the import.
+     * in the import. Each collection id in this list must be unique.
      * 
* * repeated string collection_ids = 2; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java index 0ca695c00..912935b15 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ImportDocumentsRequestOrBuilder.java @@ -60,7 +60,7 @@ public interface ImportDocumentsRequestOrBuilder * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -73,7 +73,7 @@ public interface ImportDocumentsRequestOrBuilder * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -86,7 +86,7 @@ public interface ImportDocumentsRequestOrBuilder * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; @@ -100,7 +100,7 @@ public interface ImportDocumentsRequestOrBuilder * *
    * Which collection ids to import. Unspecified means all collections included
-   * in the import.
+   * in the import. Each collection id in this list must be unique.
    * 
* * repeated string collection_ids = 2; 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 4b98060c6..435dbcf87 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 @@ -717,7 +717,7 @@ public interface IndexFieldOrBuilder * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -730,7 +730,7 @@ public interface IndexFieldOrBuilder * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -743,7 +743,7 @@ public interface IndexFieldOrBuilder * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -2761,7 +2761,7 @@ public com.google.firestore.admin.v1.Index.IndexField.ArrayConfig getArrayConfig * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -2777,7 +2777,7 @@ public boolean hasVectorConfig() { * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -2796,7 +2796,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConf * * *
-     * Indicates that this field supports nearest neighbors and distance
+     * Indicates that this field supports nearest neighbor and distance
      * operations on vector.
      * 
* @@ -3645,7 +3645,7 @@ public Builder clearArrayConfig() { * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3661,7 +3661,7 @@ public boolean hasVectorConfig() { * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3687,7 +3687,7 @@ public com.google.firestore.admin.v1.Index.IndexField.VectorConfig getVectorConf * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3711,7 +3711,7 @@ public Builder setVectorConfig( * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3732,7 +3732,7 @@ public Builder setVectorConfig( * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3768,7 +3768,7 @@ public Builder mergeVectorConfig( * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3794,7 +3794,7 @@ public Builder clearVectorConfig() { * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3808,7 +3808,7 @@ public Builder clearVectorConfig() { * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* @@ -3830,7 +3830,7 @@ public Builder clearVectorConfig() { * * *
-       * Indicates that this field supports nearest neighbors and distance
+       * Indicates that this field supports nearest neighbor and distance
        * operations on vector.
        * 
* diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java index 28019a02f..40f129713 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequest.java @@ -120,6 +120,24 @@ public com.google.protobuf.ByteString getParentBytes() { } } + public static final int SHOW_DELETED_FIELD_NUMBER = 4; + private boolean showDeleted_ = false; + /** + * + * + *
+   * If true, also returns deleted resources.
+   * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -137,6 +155,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } + if (showDeleted_ != false) { + output.writeBool(4, showDeleted_); + } getUnknownFields().writeTo(output); } @@ -149,6 +170,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } + if (showDeleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, showDeleted_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -166,6 +190,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.firestore.admin.v1.ListDatabasesRequest) obj; if (!getParent().equals(other.getParent())) return false; + if (getShowDeleted() != other.getShowDeleted()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -179,6 +204,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SHOW_DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeleted()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -319,6 +346,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; + showDeleted_ = false; return this; } @@ -358,6 +386,9 @@ private void buildPartial0(com.google.firestore.admin.v1.ListDatabasesRequest re if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.showDeleted_ = showDeleted_; + } } @java.lang.Override @@ -411,6 +442,9 @@ public Builder mergeFrom(com.google.firestore.admin.v1.ListDatabasesRequest othe bitField0_ |= 0x00000001; onChanged(); } + if (other.getShowDeleted() != false) { + setShowDeleted(other.getShowDeleted()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -443,6 +477,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 32: + { + showDeleted_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -583,6 +623,59 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } + private boolean showDeleted_; + /** + * + * + *
+     * If true, also returns deleted resources.
+     * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + @java.lang.Override + public boolean getShowDeleted() { + return showDeleted_; + } + /** + * + * + *
+     * If true, also returns deleted resources.
+     * 
+ * + * bool show_deleted = 4; + * + * @param value The showDeleted to set. + * @return This builder for chaining. + */ + public Builder setShowDeleted(boolean value) { + + showDeleted_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, also returns deleted resources.
+     * 
+ * + * bool show_deleted = 4; + * + * @return This builder for chaining. + */ + public Builder clearShowDeleted() { + bitField0_ = (bitField0_ & ~0x00000002); + showDeleted_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java index be3325bb4..219346e4f 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListDatabasesRequestOrBuilder.java @@ -54,4 +54,17 @@ public interface ListDatabasesRequestOrBuilder * @return The bytes for parent. */ com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * If true, also returns deleted resources.
+   * 
+ * + * bool show_deleted = 4; + * + * @return The showDeleted. + */ + boolean getShowDeleted(); } 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 a07c1cee3..8fc78de07 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 @@ -136,7 +136,8 @@ public com.google.protobuf.ByteString getParentBytes() { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -164,7 +165,8 @@ public java.lang.String getFilter() { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -801,7 +803,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -828,7 +831,8 @@ public java.lang.String getFilter() { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -855,7 +859,8 @@ public com.google.protobuf.ByteString getFilterBytes() { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -881,7 +886,8 @@ public Builder setFilter(java.lang.String value) { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -903,7 +909,8 @@ public Builder clearFilter() { * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java index 7a92547e8..091d594c7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/ListFieldsRequestOrBuilder.java @@ -64,7 +64,8 @@ public interface ListFieldsRequestOrBuilder * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; @@ -81,7 +82,8 @@ public interface ListFieldsRequestOrBuilder * only supports listing fields that have been explicitly overridden. To issue * this query, call * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` . + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. *
* * string filter = 2; diff --git a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java index 9cc7fcd1c..ddd9168cf 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java +++ b/proto-google-cloud-firestore-admin-v1/src/main/java/com/google/firestore/admin/v1/OperationProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_firestore_admin_v1_ImportDocumentsMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -129,28 +133,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "s_bytes\030\005 \001(\0132#.google.firestore.admin.v" + "1.Progress\022\026\n\016collection_ids\030\006 \003(\t\022\030\n\020in" + "put_uri_prefix\030\007 \001(\t\022\025\n\rnamespace_ids\030\010 " - + "\003(\t\"4\n\027ExportDocumentsResponse\022\031\n\021output" - + "_uri_prefix\030\001 \001(\t\"\355\002\n\027RestoreDatabaseMet" - + "adata\022.\n\nstart_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google" - + ".protobuf.Timestamp\022B\n\017operation_state\030\003" - + " \001(\0162).google.firestore.admin.v1.Operati" - + "onState\0228\n\010database\030\004 \001(\tB&\372A#\n!firestor" - + "e.googleapis.com/Database\0224\n\006backup\030\005 \001(" - + "\tB$\372A!\n\037firestore.googleapis.com/Backup\022" - + "@\n\023progress_percentage\030\010 \001(\0132#.google.fi" - + "restore.admin.v1.Progress\":\n\010Progress\022\026\n" - + "\016estimated_work\030\001 \001(\003\022\026\n\016completed_work\030" - + "\002 \001(\003*\236\001\n\016OperationState\022\037\n\033OPERATION_ST" - + "ATE_UNSPECIFIED\020\000\022\020\n\014INITIALIZING\020\001\022\016\n\nP" - + "ROCESSING\020\002\022\016\n\nCANCELLING\020\003\022\016\n\nFINALIZIN" - + "G\020\004\022\016\n\nSUCCESSFUL\020\005\022\n\n\006FAILED\020\006\022\r\n\tCANCE" - + "LLED\020\007B\335\001\n\035com.google.firestore.admin.v1" - + "B\016OperationProtoP\001Z9cloud.google.com/go/" - + "firestore/apiv1/admin/adminpb;adminpb\242\002\004" - + "GCFS\252\002\037Google.Cloud.Firestore.Admin.V1\312\002" - + "\037Google\\Cloud\\Firestore\\Admin\\V1\352\002#Googl" - + "e::Cloud::Firestore::Admin::V1b\006proto3" + + "\003(\t\"\237\003\n\033BulkDeleteDocumentsMetadata\022.\n\ns" + + "tart_time\030\001 \001(\0132\032.google.protobuf.Timest" + + "amp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\022B\n\017operation_state\030\003 \001(\0162).goo" + + "gle.firestore.admin.v1.OperationState\022?\n" + + "\022progress_documents\030\004 \001(\0132#.google.fires" + + "tore.admin.v1.Progress\022;\n\016progress_bytes" + + "\030\005 \001(\0132#.google.firestore.admin.v1.Progr" + + "ess\022\026\n\016collection_ids\030\006 \003(\t\022\025\n\rnamespace" + + "_ids\030\007 \003(\t\0221\n\rsnapshot_time\030\010 \001(\0132\032.goog" + + "le.protobuf.Timestamp\"4\n\027ExportDocuments" + + "Response\022\031\n\021output_uri_prefix\030\001 \001(\t\"\355\002\n\027" + + "RestoreDatabaseMetadata\022.\n\nstart_time\030\001 " + + "\001(\0132\032.google.protobuf.Timestamp\022,\n\010end_t" + + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\022B\n" + + "\017operation_state\030\003 \001(\0162).google.firestor" + + "e.admin.v1.OperationState\0228\n\010database\030\004 " + + "\001(\tB&\372A#\n!firestore.googleapis.com/Datab" + + "ase\0224\n\006backup\030\005 \001(\tB$\372A!\n\037firestore.goog" + + "leapis.com/Backup\022@\n\023progress_percentage" + + "\030\010 \001(\0132#.google.firestore.admin.v1.Progr" + + "ess\":\n\010Progress\022\026\n\016estimated_work\030\001 \001(\003\022" + + "\026\n\016completed_work\030\002 \001(\003*\236\001\n\016OperationSta" + + "te\022\037\n\033OPERATION_STATE_UNSPECIFIED\020\000\022\020\n\014I" + + "NITIALIZING\020\001\022\016\n\nPROCESSING\020\002\022\016\n\nCANCELL" + + "ING\020\003\022\016\n\nFINALIZING\020\004\022\016\n\nSUCCESSFUL\020\005\022\n\n" + + "\006FAILED\020\006\022\r\n\tCANCELLED\020\007B\335\001\n\035com.google." + + "firestore.admin.v1B\016OperationProtoP\001Z9cl" + + "oud.google.com/go/firestore/apiv1/admin/" + + "adminpb;adminpb\242\002\004GCFS\252\002\037Google.Cloud.Fi" + + "restore.Admin.V1\312\002\037Google\\Cloud\\Firestor" + + "e\\Admin\\V1\352\002#Google::Cloud::Firestore::A" + + "dmin::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -234,8 +249,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InputUriPrefix", "NamespaceIds", }); - internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor = + internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_firestore_admin_v1_BulkDeleteDocumentsMetadata_descriptor, + new java.lang.String[] { + "StartTime", + "EndTime", + "OperationState", + "ProgressDocuments", + "ProgressBytes", + "CollectionIds", + "NamespaceIds", + "SnapshotTime", + }); + internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_firestore_admin_v1_ExportDocumentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_ExportDocumentsResponse_descriptor, @@ -243,7 +273,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputUriPrefix", }); internal_static_google_firestore_admin_v1_RestoreDatabaseMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_firestore_admin_v1_RestoreDatabaseMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_RestoreDatabaseMetadata_descriptor, @@ -251,7 +281,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "OperationState", "Database", "Backup", "ProgressPercentage", }); internal_static_google_firestore_admin_v1_Progress_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_firestore_admin_v1_Progress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_firestore_admin_v1_Progress_descriptor, diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto index 930f91146..eefee763c 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/field.proto @@ -49,8 +49,8 @@ message Field { // When false, the `Field`'s index configuration is defined explicitly. bool uses_ancestor_config = 2; - // Output only. Specifies the resource name of the `Field` from which this field's - // index configuration is set (when `uses_ancestor_config` is true), + // Output only. Specifies the resource name of the `Field` from which this + // field's index configuration is set (when `uses_ancestor_config` is true), // or from which it *would* be set if this field had no index configuration // (when `uses_ancestor_config` is false). string ancestor_field = 3; @@ -65,9 +65,12 @@ message Field { // The TTL (time-to-live) configuration for documents that have this `Field` // set. + // // Storing a timestamp value into a TTL-enabled field will be treated as - // the document's absolute expiration time. Using any other data type or - // leaving the field absent will disable the TTL for the individual document. + // the document's absolute expiration time. Timestamp values in the past + // indicate that the document is eligible for immediate expiration. Using any + // other data type or leaving the field absent will disable expiration for the + // individual document. message TtlConfig { // The state of applying the TTL configuration to all documents. enum State { @@ -95,26 +98,24 @@ message Field { State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Required. A field name of the form + // Required. A field name of the form: // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` // - // A field path may be a simple field name, e.g. `address` or a path to fields - // within map_value , e.g. `address.city`, + // A field path can be a simple field name, e.g. `address` or a path to fields + // within `map_value` , e.g. `address.city`, // or a special field path. The only valid special field is `*`, which // represents any field. // - // Field paths may be quoted using ` (backtick). The only character that needs - // to be escaped within a quoted field path is the backtick character itself, - // escaped using a backslash. Special characters in field paths that + // Field paths can be quoted using `` ` `` (backtick). The only character that + // must be escaped within a quoted field path is the backtick character + // itself, escaped using a backslash. Special characters in field paths that // must be quoted include: `*`, `.`, - // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. + // `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. // // Examples: - // (Note: Comments here are written in markdown syntax, so there is an - // additional layer of backticks to represent a code block) - // `\`address.city\`` represents a field named `address.city`, not the map key - // `city` in the field `address`. - // `\`*\`` represents a field named `*`, not any field. + // `` `address.city` `` represents a field named `address.city`, not the map + // key `city` in the field `address`. `` `*` `` represents a field named `*`, + // not any field. // // A special `Field` contains the default indexing settings for all fields. // This field's resource name is: diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto index 2a19b4fea..dd95c2ce7 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/firestore_admin.proto @@ -217,6 +217,27 @@ service FirestoreAdmin { }; } + // Bulk deletes a subset of documents from Google Cloud Firestore. + // Documents created or updated after the underlying system starts to process + // the request will not be deleted. The bulk delete occurs in the background + // and its progress can be monitored and managed via the Operation resource + // that is created. + // + // For more details on bulk delete behavior, refer to: + // https://cloud.google.com/firestore/docs/manage-data/bulk-delete + rpc BulkDeleteDocuments(BulkDeleteDocumentsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/databases/*}:bulkDeleteDocuments" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "BulkDeleteDocumentsResponse" + metadata_type: "BulkDeleteDocumentsMetadata" + }; + } + // Create a database. rpc CreateDatabase(CreateDatabaseRequest) returns (google.longrunning.Operation) { @@ -302,7 +323,7 @@ service FirestoreAdmin { // // The new database must be in the same cloud region or multi-region location // as the existing backup. This behaves similar to - // [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase] + // [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] // except instead of creating a new empty database, a new database is created // with the database type, index configuration, and documents from an existing // backup. @@ -386,6 +407,9 @@ message ListDatabasesRequest { child_type: "firestore.googleapis.com/Database" } ]; + + // If true, also returns deleted resources. + bool show_deleted = 4; } // The request for @@ -670,7 +694,8 @@ message ListFieldsRequest { // only supports listing fields that have been explicitly overridden. To issue // this query, call // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - // with a filter that includes `indexConfig.usesAncestorConfig:false` . + // with a filter that includes `indexConfig.usesAncestorConfig:false` or + // `ttlConfig:*`. string filter = 2; // The number of results to return. @@ -705,7 +730,8 @@ message ExportDocumentsRequest { } ]; - // Which collection ids to export. Unspecified means all collections. + // Which collection ids to export. Unspecified means all collections. Each + // collection id in this list must be unique. repeated string collection_ids = 2; // The output URI. Currently only supports Google Cloud Storage URIs of the @@ -749,7 +775,7 @@ message ImportDocumentsRequest { ]; // Which collection ids to import. Unspecified means all collections included - // in the import. + // in the import. Each collection id in this list must be unique. repeated string collection_ids = 2; // Location of the exported files. @@ -768,6 +794,49 @@ message ImportDocumentsRequest { repeated string namespace_ids = 4; } +// The request for +// [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +// +// When both collection_ids and namespace_ids are set, only documents satisfying +// both conditions will be deleted. +// +// Requests with namespace_ids and collection_ids both empty will be rejected. +// Please use +// [FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase] +// instead. +message BulkDeleteDocumentsRequest { + // Required. Database to operate. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "firestore.googleapis.com/Database" + } + ]; + + // Optional. IDs of the collection groups to delete. Unspecified means all + // collection groups. + // + // Each collection group in this list must be unique. + repeated string collection_ids = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Namespaces to delete. + // + // An empty list means all namespaces. This is the recommended + // usage for databases that don't use namespaces. + // + // An empty string element represents the default namespace. This should be + // used if the database has data in non-default namespaces, but doesn't want + // to delete from them. + // + // Each namespace in this list must be unique. + repeated string namespace_ids = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +message BulkDeleteDocumentsResponse {} + // The request for // [FirestoreAdmin.GetBackup][google.firestore.admin.v1.FirestoreAdmin.GetBackup]. message GetBackupRequest { diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto index 2eec079d3..f2a3cc373 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/index.proto @@ -126,7 +126,7 @@ message Index { // Indicates that this field supports operations on `array_value`s. ArrayConfig array_config = 3; - // Indicates that this field supports nearest neighbors and distance + // Indicates that this field supports nearest neighbor and distance // operations on vector. VectorConfig vector_config = 4; } diff --git a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto index 1087e8cfc..80b133764 100644 --- a/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto +++ b/proto-google-cloud-firestore-admin-v1/src/main/proto/google/firestore/admin/v1/operation.proto @@ -191,6 +191,39 @@ message ImportDocumentsMetadata { repeated string namespace_ids = 8; } +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +message BulkDeleteDocumentsMetadata { + // The time this operation started. + google.protobuf.Timestamp start_time = 1; + + // The time this operation completed. Will be unset if operation still in + // progress. + google.protobuf.Timestamp end_time = 2; + + // The state of the operation. + OperationState operation_state = 3; + + // The progress, in documents, of this operation. + Progress progress_documents = 4; + + // The progress, in bytes, of this operation. + Progress progress_bytes = 5; + + // The ids of the collection groups that are being deleted. + repeated string collection_ids = 6; + + // Which namespace ids are being deleted. + repeated string namespace_ids = 7; + + // The timestamp that corresponds to the version of the database that is being + // read to get the list of documents to delete. This time can also be used as + // the timestamp of PITR in case of disaster recovery (subject to PITR window + // limit). + google.protobuf.Timestamp snapshot_time = 8; +} + // Returned in the [google.longrunning.Operation][google.longrunning.Operation] // response field. message ExportDocumentsResponse {