Skip to content

Commit 89ee485

Browse files
feat(firestore): update the api
#### firestore:v1 The following keys were added: - resources.projects.resources.databases.methods.get (Total Keys: 11) - resources.projects.resources.databases.methods.list (Total Keys: 11) - resources.projects.resources.databases.methods.patch (Total Keys: 15) - schemas.GoogleFirestoreAdminV1Database (Total Keys: 6) - schemas.GoogleFirestoreAdminV1ListDatabasesResponse (Total Keys: 4)
1 parent 35e9aa4 commit 89ee485

File tree

4 files changed

+259
-3
lines changed

4 files changed

+259
-3
lines changed

docs/dyn/firestore_v1.projects.databases.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,18 @@ <h2>Instance Methods</h2>
9595
<p class="toc_element">
9696
<code><a href="#exportDocuments">exportDocuments(name, body=None, x__xgafv=None)</a></code></p>
9797
<p class="firstline">Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import</p>
98+
<p class="toc_element">
99+
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
100+
<p class="firstline">Gets information about a database.</p>
98101
<p class="toc_element">
99102
<code><a href="#importDocuments">importDocuments(name, body=None, x__xgafv=None)</a></code></p>
100103
<p class="firstline">Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.</p>
104+
<p class="toc_element">
105+
<code><a href="#list">list(parent, x__xgafv=None)</a></code></p>
106+
<p class="firstline">List all the databases in the project.</p>
107+
<p class="toc_element">
108+
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
109+
<p class="firstline">Updates a database.</p>
101110
<h3>Method Details</h3>
102111
<div class="method">
103112
<code class="details" id="close">close()</code>
@@ -149,6 +158,29 @@ <h3>Method Details</h3>
149158
}</pre>
150159
</div>
151160

161+
<div class="method">
162+
<code class="details" id="get">get(name, x__xgafv=None)</code>
163+
<pre>Gets information about a database.
164+
165+
Args:
166+
name: string, Required. A name of the form `projects/{project_id}/databases/{database_id}` (required)
167+
x__xgafv: string, V1 error format.
168+
Allowed values
169+
1 - v1 error format
170+
2 - v2 error format
171+
172+
Returns:
173+
An object of the form:
174+
175+
{ # A Cloud Firestore Database in Native Mode. Currently one database is allowed per cloud project. It is named &#x27;(default)&#x27;
176+
&quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
177+
&quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
178+
&quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.
179+
&quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
180+
&quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
181+
}</pre>
182+
</div>
183+
152184
<div class="method">
153185
<code class="details" id="importDocuments">importDocuments(name, body=None, x__xgafv=None)</code>
154186
<pre>Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.
@@ -194,4 +226,78 @@ <h3>Method Details</h3>
194226
}</pre>
195227
</div>
196228

229+
<div class="method">
230+
<code class="details" id="list">list(parent, x__xgafv=None)</code>
231+
<pre>List all the databases in the project.
232+
233+
Args:
234+
parent: string, Required. A parent name of the form `projects/{project_id}` (required)
235+
x__xgafv: string, V1 error format.
236+
Allowed values
237+
1 - v1 error format
238+
2 - v2 error format
239+
240+
Returns:
241+
An object of the form:
242+
243+
{ # The list of databases for a project.
244+
&quot;databases&quot;: [ # The databases in the project.
245+
{ # A Cloud Firestore Database in Native Mode. Currently one database is allowed per cloud project. It is named &#x27;(default)&#x27;
246+
&quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
247+
&quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
248+
&quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.
249+
&quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
250+
&quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
251+
},
252+
],
253+
}</pre>
254+
</div>
255+
256+
<div class="method">
257+
<code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
258+
<pre>Updates a database.
259+
260+
Args:
261+
name: string, The resource name of the Database. Format: `projects/{project}/databases/{database}` (required)
262+
body: object, The request body.
263+
The object takes the form of:
264+
265+
{ # A Cloud Firestore Database in Native Mode. Currently one database is allowed per cloud project. It is named &#x27;(default)&#x27;
266+
&quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
267+
&quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
268+
&quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.
269+
&quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
270+
&quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
271+
}
272+
273+
updateMask: string, The list of fields to be updated.
274+
x__xgafv: string, V1 error format.
275+
Allowed values
276+
1 - v1 error format
277+
2 - v2 error format
278+
279+
Returns:
280+
An object of the form:
281+
282+
{ # This resource represents a long-running operation that is the result of a network API call.
283+
&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.
284+
&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.
285+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
286+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
287+
{
288+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
289+
},
290+
],
291+
&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.
292+
},
293+
&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.
294+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
295+
},
296+
&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}`.
297+
&quot;response&quot;: { # The normal response of the operation in case of success. 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`.
298+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
299+
},
300+
}</pre>
301+
</div>
302+
197303
</body></html>

googleapiclient/discovery_cache/documents/firestore.v1.json

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,32 @@
141141
"https://www.googleapis.com/auth/datastore"
142142
]
143143
},
144+
"get": {
145+
"description": "Gets information about a database.",
146+
"flatPath": "v1/projects/{projectsId}/databases/{databasesId}",
147+
"httpMethod": "GET",
148+
"id": "firestore.projects.databases.get",
149+
"parameterOrder": [
150+
"name"
151+
],
152+
"parameters": {
153+
"name": {
154+
"description": "Required. A name of the form `projects/{project_id}/databases/{database_id}`",
155+
"location": "path",
156+
"pattern": "^projects/[^/]+/databases/[^/]+$",
157+
"required": true,
158+
"type": "string"
159+
}
160+
},
161+
"path": "v1/{+name}",
162+
"response": {
163+
"$ref": "GoogleFirestoreAdminV1Database"
164+
},
165+
"scopes": [
166+
"https://www.googleapis.com/auth/cloud-platform",
167+
"https://www.googleapis.com/auth/datastore"
168+
]
169+
},
144170
"importDocuments": {
145171
"description": "Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.",
146172
"flatPath": "v1/projects/{projectsId}/databases/{databasesId}:importDocuments",
@@ -169,6 +195,67 @@
169195
"https://www.googleapis.com/auth/cloud-platform",
170196
"https://www.googleapis.com/auth/datastore"
171197
]
198+
},
199+
"list": {
200+
"description": "List all the databases in the project.",
201+
"flatPath": "v1/projects/{projectsId}/databases",
202+
"httpMethod": "GET",
203+
"id": "firestore.projects.databases.list",
204+
"parameterOrder": [
205+
"parent"
206+
],
207+
"parameters": {
208+
"parent": {
209+
"description": "Required. A parent name of the form `projects/{project_id}`",
210+
"location": "path",
211+
"pattern": "^projects/[^/]+$",
212+
"required": true,
213+
"type": "string"
214+
}
215+
},
216+
"path": "v1/{+parent}/databases",
217+
"response": {
218+
"$ref": "GoogleFirestoreAdminV1ListDatabasesResponse"
219+
},
220+
"scopes": [
221+
"https://www.googleapis.com/auth/cloud-platform",
222+
"https://www.googleapis.com/auth/datastore"
223+
]
224+
},
225+
"patch": {
226+
"description": "Updates a database.",
227+
"flatPath": "v1/projects/{projectsId}/databases/{databasesId}",
228+
"httpMethod": "PATCH",
229+
"id": "firestore.projects.databases.patch",
230+
"parameterOrder": [
231+
"name"
232+
],
233+
"parameters": {
234+
"name": {
235+
"description": "The resource name of the Database. Format: `projects/{project}/databases/{database}`",
236+
"location": "path",
237+
"pattern": "^projects/[^/]+/databases/[^/]+$",
238+
"required": true,
239+
"type": "string"
240+
},
241+
"updateMask": {
242+
"description": "The list of fields to be updated.",
243+
"format": "google-fieldmask",
244+
"location": "query",
245+
"type": "string"
246+
}
247+
},
248+
"path": "v1/{+name}",
249+
"request": {
250+
"$ref": "GoogleFirestoreAdminV1Database"
251+
},
252+
"response": {
253+
"$ref": "GoogleLongrunningOperation"
254+
},
255+
"scopes": [
256+
"https://www.googleapis.com/auth/cloud-platform",
257+
"https://www.googleapis.com/auth/datastore"
258+
]
172259
}
173260
},
174261
"resources": {
@@ -1160,7 +1247,7 @@
11601247
}
11611248
}
11621249
},
1163-
"revision": "20210901",
1250+
"revision": "20210916",
11641251
"rootUrl": "https://firestore.googleapis.com/",
11651252
"schemas": {
11661253
"ArrayValue": {
@@ -1685,6 +1772,55 @@
16851772
},
16861773
"type": "object"
16871774
},
1775+
"GoogleFirestoreAdminV1Database": {
1776+
"description": "A Cloud Firestore Database in Native Mode. Currently one database is allowed per cloud project. It is named '(default)'",
1777+
"id": "GoogleFirestoreAdminV1Database",
1778+
"properties": {
1779+
"concurrencyMode": {
1780+
"description": "The concurrency control mode to use for this database.",
1781+
"enum": [
1782+
"CONCURRENCY_MODE_UNSPECIFIED",
1783+
"OPTIMISTIC",
1784+
"PESSIMISTIC",
1785+
"OPTIMISTIC_WITH_ENTITY_GROUPS"
1786+
],
1787+
"enumDescriptions": [
1788+
"Not used.",
1789+
"Use optimistic concurrency control by default. This is the setting for Cloud Firestore customers.",
1790+
"Use pessimistic concurrency control by default. This is the setting for Cloud Firestore customers.",
1791+
"Use optimistic concurrency control with entity groups by default. This is the setting for Cloud Datastore customers."
1792+
],
1793+
"type": "string"
1794+
},
1795+
"etag": {
1796+
"description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.",
1797+
"type": "string"
1798+
},
1799+
"locationId": {
1800+
"description": "The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.",
1801+
"type": "string"
1802+
},
1803+
"name": {
1804+
"description": "The resource name of the Database. Format: `projects/{project}/databases/{database}`",
1805+
"type": "string"
1806+
},
1807+
"type": {
1808+
"description": "The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.",
1809+
"enum": [
1810+
"DATABASE_TYPE_UNSPECIFIED",
1811+
"FIRESTORE_NATIVE",
1812+
"DATASTORE_MODE"
1813+
],
1814+
"enumDescriptions": [
1815+
"The default value. This value is used if the database type is omitted.",
1816+
"Firestore Native Mode",
1817+
"Firestore in Datastore Mode."
1818+
],
1819+
"type": "string"
1820+
}
1821+
},
1822+
"type": "object"
1823+
},
16881824
"GoogleFirestoreAdminV1ExportDocumentsMetadata": {
16891825
"description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.ExportDocuments.",
16901826
"id": "GoogleFirestoreAdminV1ExportDocumentsMetadata",
@@ -2116,6 +2252,20 @@
21162252
},
21172253
"type": "object"
21182254
},
2255+
"GoogleFirestoreAdminV1ListDatabasesResponse": {
2256+
"description": "The list of databases for a project.",
2257+
"id": "GoogleFirestoreAdminV1ListDatabasesResponse",
2258+
"properties": {
2259+
"databases": {
2260+
"description": "The databases in the project.",
2261+
"items": {
2262+
"$ref": "GoogleFirestoreAdminV1Database"
2263+
},
2264+
"type": "array"
2265+
}
2266+
},
2267+
"type": "object"
2268+
},
21192269
"GoogleFirestoreAdminV1ListFieldsResponse": {
21202270
"description": "The response for FirestoreAdmin.ListFields.",
21212271
"id": "GoogleFirestoreAdminV1ListFieldsResponse",

googleapiclient/discovery_cache/documents/firestore.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@
849849
}
850850
}
851851
},
852-
"revision": "20210901",
852+
"revision": "20210916",
853853
"rootUrl": "https://firestore.googleapis.com/",
854854
"schemas": {
855855
"ArrayValue": {

googleapiclient/discovery_cache/documents/firestore.v1beta2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
}
416416
}
417417
},
418-
"revision": "20210901",
418+
"revision": "20210916",
419419
"rootUrl": "https://firestore.googleapis.com/",
420420
"schemas": {
421421
"Empty": {

0 commit comments

Comments
 (0)