@@ -217,6 +217,27 @@ service FirestoreAdmin {
217217 };
218218 }
219219
220+ // Bulk deletes a subset of documents from Google Cloud Firestore.
221+ // Documents created or updated after the underlying system starts to process
222+ // the request will not be deleted. The bulk delete occurs in the background
223+ // and its progress can be monitored and managed via the Operation resource
224+ // that is created.
225+ //
226+ // For more details on bulk delete behavior, refer to:
227+ // https://cloud.google.com/firestore/docs/manage-data/bulk-delete
228+ rpc BulkDeleteDocuments (BulkDeleteDocumentsRequest )
229+ returns (google.longrunning.Operation ) {
230+ option (google.api.http ) = {
231+ post : "/v1/{name=projects/*/databases/*}:bulkDeleteDocuments"
232+ body : "*"
233+ };
234+ option (google.api.method_signature ) = "name" ;
235+ option (google.longrunning.operation_info ) = {
236+ response_type : "BulkDeleteDocumentsResponse"
237+ metadata_type : "BulkDeleteDocumentsMetadata"
238+ };
239+ }
240+
220241 // Create a database.
221242 rpc CreateDatabase (CreateDatabaseRequest )
222243 returns (google.longrunning.Operation ) {
@@ -302,7 +323,7 @@ service FirestoreAdmin {
302323 //
303324 // The new database must be in the same cloud region or multi-region location
304325 // as the existing backup. This behaves similar to
305- // [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase]
326+ // [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin. CreateDatabase]
306327 // except instead of creating a new empty database, a new database is created
307328 // with the database type, index configuration, and documents from an existing
308329 // backup.
@@ -386,6 +407,9 @@ message ListDatabasesRequest {
386407 child_type : "firestore.googleapis.com/Database"
387408 }
388409 ];
410+
411+ // If true, also returns deleted resources.
412+ bool show_deleted = 4 ;
389413}
390414
391415// The request for
@@ -670,7 +694,8 @@ message ListFieldsRequest {
670694 // only supports listing fields that have been explicitly overridden. To issue
671695 // this query, call
672696 // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
673- // with a filter that includes `indexConfig.usesAncestorConfig:false` .
697+ // with a filter that includes `indexConfig.usesAncestorConfig:false` or
698+ // `ttlConfig:*`.
674699 string filter = 2 ;
675700
676701 // The number of results to return.
@@ -705,7 +730,8 @@ message ExportDocumentsRequest {
705730 }
706731 ];
707732
708- // Which collection ids to export. Unspecified means all collections.
733+ // Which collection ids to export. Unspecified means all collections. Each
734+ // collection id in this list must be unique.
709735 repeated string collection_ids = 2 ;
710736
711737 // The output URI. Currently only supports Google Cloud Storage URIs of the
@@ -749,7 +775,7 @@ message ImportDocumentsRequest {
749775 ];
750776
751777 // Which collection ids to import. Unspecified means all collections included
752- // in the import.
778+ // in the import. Each collection id in this list must be unique.
753779 repeated string collection_ids = 2 ;
754780
755781 // Location of the exported files.
@@ -768,6 +794,49 @@ message ImportDocumentsRequest {
768794 repeated string namespace_ids = 4 ;
769795}
770796
797+ // The request for
798+ // [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
799+ //
800+ // When both collection_ids and namespace_ids are set, only documents satisfying
801+ // both conditions will be deleted.
802+ //
803+ // Requests with namespace_ids and collection_ids both empty will be rejected.
804+ // Please use
805+ // [FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase]
806+ // instead.
807+ message BulkDeleteDocumentsRequest {
808+ // Required. Database to operate. Should be of the form:
809+ // `projects/{project_id}/databases/{database_id}`.
810+ string name = 1 [
811+ (google.api.field_behavior ) = REQUIRED ,
812+ (google.api.resource_reference ) = {
813+ type : "firestore.googleapis.com/Database"
814+ }
815+ ];
816+
817+ // Optional. IDs of the collection groups to delete. Unspecified means all
818+ // collection groups.
819+ //
820+ // Each collection group in this list must be unique.
821+ repeated string collection_ids = 2 [(google.api.field_behavior ) = OPTIONAL ];
822+
823+ // Optional. Namespaces to delete.
824+ //
825+ // An empty list means all namespaces. This is the recommended
826+ // usage for databases that don't use namespaces.
827+ //
828+ // An empty string element represents the default namespace. This should be
829+ // used if the database has data in non-default namespaces, but doesn't want
830+ // to delete from them.
831+ //
832+ // Each namespace in this list must be unique.
833+ repeated string namespace_ids = 3 [(google.api.field_behavior ) = OPTIONAL ];
834+ }
835+
836+ // The response for
837+ // [FirestoreAdmin.BulkDeleteDocuments][google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments].
838+ message BulkDeleteDocumentsResponse {}
839+
771840// The request for
772841// [FirestoreAdmin.GetBackup][google.firestore.admin.v1.FirestoreAdmin.GetBackup].
773842message GetBackupRequest {
0 commit comments