Skip to content

Commit fd456c4

Browse files
feat(firestore): update the api
#### firestore:v1 The following keys were deleted: - schemas.GoogleFirestoreAdminV1DatabaseSnapshot (Total Keys: 5) - schemas.GoogleFirestoreAdminV1RestoreDatabaseRequest.properties.databaseSnapshot.$ref (Total Keys: 1) The following keys were added: - resources.projects.resources.databases.methods.bulkDeleteDocuments (Total Keys: 12) - schemas.GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata (Total Keys: 15) - schemas.GoogleFirestoreAdminV1BulkDeleteDocumentsRequest (Total Keys: 6) #### firestore:v1beta1 The following keys were added: - schemas.GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata (Total Keys: 15) #### firestore:v1beta2 The following keys were added: - schemas.GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata (Total Keys: 15)
1 parent f0f13cd commit fd456c4

File tree

4 files changed

+308
-28
lines changed

4 files changed

+308
-28
lines changed

docs/dyn/firestore_v1.projects.databases.html

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ <h2>Instance Methods</h2>
9494
</p>
9595
<p class="firstline">Returns the operations Resource.</p>
9696

97+
<p class="toc_element">
98+
<code><a href="#bulkDeleteDocuments">bulkDeleteDocuments(name, body=None, x__xgafv=None)</a></code></p>
99+
<p class="firstline">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</p>
97100
<p class="toc_element">
98101
<code><a href="#close">close()</a></code></p>
99102
<p class="firstline">Close httplib2 connections.</p>
@@ -122,6 +125,53 @@ <h2>Instance Methods</h2>
122125
<code><a href="#restore">restore(parent, body=None, x__xgafv=None)</a></code></p>
123126
<p class="firstline">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 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 can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed.</p>
124127
<h3>Method Details</h3>
128+
<div class="method">
129+
<code class="details" id="bulkDeleteDocuments">bulkDeleteDocuments(name, body=None, x__xgafv=None)</code>
130+
<pre>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
131+
132+
Args:
133+
name: string, Required. Database to operate. Should be of the form: `projects/{project_id}/databases/{database_id}`. (required)
134+
body: object, The request body.
135+
The object takes the form of:
136+
137+
{ # The request for 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 instead.
138+
&quot;collectionIds&quot;: [ # Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique.
139+
&quot;A String&quot;,
140+
],
141+
&quot;namespaceIds&quot;: [ # Optional. Namespaces to delete. An empty list means all namespaces. This is the recommended usage for databases that don&#x27;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&#x27;t want to delete from them. Each namespace in this list must be unique.
142+
&quot;A String&quot;,
143+
],
144+
}
145+
146+
x__xgafv: string, V1 error format.
147+
Allowed values
148+
1 - v1 error format
149+
2 - v2 error format
150+
151+
Returns:
152+
An object of the form:
153+
154+
{ # This resource represents a long-running operation that is the result of a network API call.
155+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
156+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
157+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
158+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
159+
{
160+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
161+
},
162+
],
163+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
164+
},
165+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
166+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
167+
},
168+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
169+
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
170+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
171+
},
172+
}</pre>
173+
</div>
174+
125175
<div class="method">
126176
<code class="details" id="close">close()</code>
127177
<pre>Close httplib2 connections.</pre>
@@ -488,10 +538,6 @@ <h3>Method Details</h3>
488538
{ # The request message for FirestoreAdmin.RestoreDatabase.
489539
&quot;backup&quot;: &quot;A String&quot;, # Backup to restore from. Must be from the same project as the parent. Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
490540
&quot;databaseId&quot;: &quot;A String&quot;, # Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database id is also valid.
491-
&quot;databaseSnapshot&quot;: { # A consistent snapshot of a database at a specific point in time. # Database snapshot to restore from. The source database must exist and have enabled PITR. The restored database will be created in the same location as the source database.
492-
&quot;database&quot;: &quot;A String&quot;, # Required. A name of the form `projects/{project_id}/databases/{database_id}`
493-
&quot;snapshotTime&quot;: &quot;A String&quot;, # Required. The timestamp at which the database snapshot is taken. The requested timestamp must be a whole minute within the PITR window.
494-
},
495541
&quot;kmsKeyName&quot;: &quot;A String&quot;, # Use Customer Managed Encryption Keys (CMEK) for encryption. Only keys in the same location as this database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
496542
&quot;useBackupEncryption&quot;: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } # The restored database will use the same encryption configuration as the backup. This is the default option when no `encryption_config` is specified.
497543
},

googleapiclient/discovery_cache/documents/firestore.v1.json

Lines changed: 120 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,35 @@
112112
"resources": {
113113
"databases": {
114114
"methods": {
115+
"bulkDeleteDocuments": {
116+
"description": "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",
117+
"flatPath": "v1/projects/{projectsId}/databases/{databasesId}:bulkDeleteDocuments",
118+
"httpMethod": "POST",
119+
"id": "firestore.projects.databases.bulkDeleteDocuments",
120+
"parameterOrder": [
121+
"name"
122+
],
123+
"parameters": {
124+
"name": {
125+
"description": "Required. Database to operate. Should be of the form: `projects/{project_id}/databases/{database_id}`.",
126+
"location": "path",
127+
"pattern": "^projects/[^/]+/databases/[^/]+$",
128+
"required": true,
129+
"type": "string"
130+
}
131+
},
132+
"path": "v1/{+name}:bulkDeleteDocuments",
133+
"request": {
134+
"$ref": "GoogleFirestoreAdminV1BulkDeleteDocumentsRequest"
135+
},
136+
"response": {
137+
"$ref": "GoogleLongrunningOperation"
138+
},
139+
"scopes": [
140+
"https://www.googleapis.com/auth/cloud-platform",
141+
"https://www.googleapis.com/auth/datastore"
142+
]
143+
},
115144
"create": {
116145
"description": "Create a database.",
117146
"flatPath": "v1/projects/{projectsId}/databases",
@@ -1677,7 +1706,7 @@
16771706
}
16781707
}
16791708
},
1680-
"revision": "20240610",
1709+
"revision": "20240617",
16811710
"rootUrl": "https://firestore.googleapis.com/",
16821711
"schemas": {
16831712
"Aggregation": {
@@ -2487,6 +2516,95 @@
24872516
},
24882517
"type": "object"
24892518
},
2519+
"GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": {
2520+
"description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.",
2521+
"id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata",
2522+
"properties": {
2523+
"collectionIds": {
2524+
"description": "The ids of the collection groups that are being deleted.",
2525+
"items": {
2526+
"type": "string"
2527+
},
2528+
"type": "array"
2529+
},
2530+
"endTime": {
2531+
"description": "The time this operation completed. Will be unset if operation still in progress.",
2532+
"format": "google-datetime",
2533+
"type": "string"
2534+
},
2535+
"namespaceIds": {
2536+
"description": "Which namespace ids are being deleted.",
2537+
"items": {
2538+
"type": "string"
2539+
},
2540+
"type": "array"
2541+
},
2542+
"operationState": {
2543+
"description": "The state of the operation.",
2544+
"enum": [
2545+
"OPERATION_STATE_UNSPECIFIED",
2546+
"INITIALIZING",
2547+
"PROCESSING",
2548+
"CANCELLING",
2549+
"FINALIZING",
2550+
"SUCCESSFUL",
2551+
"FAILED",
2552+
"CANCELLED"
2553+
],
2554+
"enumDescriptions": [
2555+
"Unspecified.",
2556+
"Request is being prepared for processing.",
2557+
"Request is actively being processed.",
2558+
"Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.",
2559+
"Request has been processed and is in its finalization stage.",
2560+
"Request has completed successfully.",
2561+
"Request has finished being processed, but encountered an error.",
2562+
"Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation."
2563+
],
2564+
"type": "string"
2565+
},
2566+
"progressBytes": {
2567+
"$ref": "GoogleFirestoreAdminV1Progress",
2568+
"description": "The progress, in bytes, of this operation."
2569+
},
2570+
"progressDocuments": {
2571+
"$ref": "GoogleFirestoreAdminV1Progress",
2572+
"description": "The progress, in documents, of this operation."
2573+
},
2574+
"snapshotTime": {
2575+
"description": "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).",
2576+
"format": "google-datetime",
2577+
"type": "string"
2578+
},
2579+
"startTime": {
2580+
"description": "The time this operation started.",
2581+
"format": "google-datetime",
2582+
"type": "string"
2583+
}
2584+
},
2585+
"type": "object"
2586+
},
2587+
"GoogleFirestoreAdminV1BulkDeleteDocumentsRequest": {
2588+
"description": "The request for 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 instead.",
2589+
"id": "GoogleFirestoreAdminV1BulkDeleteDocumentsRequest",
2590+
"properties": {
2591+
"collectionIds": {
2592+
"description": "Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique.",
2593+
"items": {
2594+
"type": "string"
2595+
},
2596+
"type": "array"
2597+
},
2598+
"namespaceIds": {
2599+
"description": "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.",
2600+
"items": {
2601+
"type": "string"
2602+
},
2603+
"type": "array"
2604+
}
2605+
},
2606+
"type": "object"
2607+
},
24902608
"GoogleFirestoreAdminV1CmekConfig": {
24912609
"description": "The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.",
24922610
"id": "GoogleFirestoreAdminV1CmekConfig",
@@ -2637,7 +2755,7 @@
26372755
"DATASTORE_MODE"
26382756
],
26392757
"enumDescriptions": [
2640-
"The default value. This value is used if the database type is omitted.",
2758+
"Not used.",
26412759
"Firestore Native Mode",
26422760
"Firestore in Datastore Mode."
26432761
],
@@ -2663,22 +2781,6 @@
26632781
},
26642782
"type": "object"
26652783
},
2666-
"GoogleFirestoreAdminV1DatabaseSnapshot": {
2667-
"description": "A consistent snapshot of a database at a specific point in time.",
2668-
"id": "GoogleFirestoreAdminV1DatabaseSnapshot",
2669-
"properties": {
2670-
"database": {
2671-
"description": "Required. A name of the form `projects/{project_id}/databases/{database_id}`",
2672-
"type": "string"
2673-
},
2674-
"snapshotTime": {
2675-
"description": "Required. The timestamp at which the database snapshot is taken. The requested timestamp must be a whole minute within the PITR window.",
2676-
"format": "google-datetime",
2677-
"type": "string"
2678-
}
2679-
},
2680-
"type": "object"
2681-
},
26822784
"GoogleFirestoreAdminV1DeleteDatabaseMetadata": {
26832785
"description": "Metadata related to the delete database operation.",
26842786
"id": "GoogleFirestoreAdminV1DeleteDatabaseMetadata",
@@ -3366,10 +3468,6 @@
33663468
"description": "Required. The ID to use for the database, which will become the final component of the database's resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. \"(default)\" database id is also valid.",
33673469
"type": "string"
33683470
},
3369-
"databaseSnapshot": {
3370-
"$ref": "GoogleFirestoreAdminV1DatabaseSnapshot",
3371-
"description": "Database snapshot to restore from. The source database must exist and have enabled PITR. The restored database will be created in the same location as the source database."
3372-
},
33733471
"kmsKeyName": {
33743472
"description": "Use Customer Managed Encryption Keys (CMEK) for encryption. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.",
33753473
"type": "string"

googleapiclient/discovery_cache/documents/firestore.v1beta1.json

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@
950950
}
951951
}
952952
},
953-
"revision": "20240610",
953+
"revision": "20240617",
954954
"rootUrl": "https://firestore.googleapis.com/",
955955
"schemas": {
956956
"Aggregation": {
@@ -1667,6 +1667,74 @@
16671667
},
16681668
"type": "object"
16691669
},
1670+
"GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": {
1671+
"description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.",
1672+
"id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata",
1673+
"properties": {
1674+
"collectionIds": {
1675+
"description": "The ids of the collection groups that are being deleted.",
1676+
"items": {
1677+
"type": "string"
1678+
},
1679+
"type": "array"
1680+
},
1681+
"endTime": {
1682+
"description": "The time this operation completed. Will be unset if operation still in progress.",
1683+
"format": "google-datetime",
1684+
"type": "string"
1685+
},
1686+
"namespaceIds": {
1687+
"description": "Which namespace ids are being deleted.",
1688+
"items": {
1689+
"type": "string"
1690+
},
1691+
"type": "array"
1692+
},
1693+
"operationState": {
1694+
"description": "The state of the operation.",
1695+
"enum": [
1696+
"OPERATION_STATE_UNSPECIFIED",
1697+
"INITIALIZING",
1698+
"PROCESSING",
1699+
"CANCELLING",
1700+
"FINALIZING",
1701+
"SUCCESSFUL",
1702+
"FAILED",
1703+
"CANCELLED"
1704+
],
1705+
"enumDescriptions": [
1706+
"Unspecified.",
1707+
"Request is being prepared for processing.",
1708+
"Request is actively being processed.",
1709+
"Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.",
1710+
"Request has been processed and is in its finalization stage.",
1711+
"Request has completed successfully.",
1712+
"Request has finished being processed, but encountered an error.",
1713+
"Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation."
1714+
],
1715+
"type": "string"
1716+
},
1717+
"progressBytes": {
1718+
"$ref": "GoogleFirestoreAdminV1Progress",
1719+
"description": "The progress, in bytes, of this operation."
1720+
},
1721+
"progressDocuments": {
1722+
"$ref": "GoogleFirestoreAdminV1Progress",
1723+
"description": "The progress, in documents, of this operation."
1724+
},
1725+
"snapshotTime": {
1726+
"description": "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).",
1727+
"format": "google-datetime",
1728+
"type": "string"
1729+
},
1730+
"startTime": {
1731+
"description": "The time this operation started.",
1732+
"format": "google-datetime",
1733+
"type": "string"
1734+
}
1735+
},
1736+
"type": "object"
1737+
},
16701738
"GoogleFirestoreAdminV1CreateDatabaseMetadata": {
16711739
"description": "Metadata related to the create database operation.",
16721740
"id": "GoogleFirestoreAdminV1CreateDatabaseMetadata",

0 commit comments

Comments
 (0)