Skip to content

Commit d35c6cb

Browse files
feat(firestore): update the api
#### firestore:v1 The following keys were added: - resources.projects.resources.databases.methods.create (Total Keys: 16) - schemas.GoogleFirestoreAdminV1Field.properties.ttlConfig.$ref (Total Keys: 1) - schemas.GoogleFirestoreAdminV1FieldOperationMetadata.properties.ttlConfigDelta.$ref (Total Keys: 1) - schemas.GoogleFirestoreAdminV1TtlConfig (Total Keys: 7) - schemas.ListCollectionIdsRequest.properties.readTime (Total Keys: 2) - schemas.PartitionQueryRequest.properties.readTime (Total Keys: 2)
1 parent b529083 commit d35c6cb

7 files changed

+401
-287
lines changed

docs/dyn/firestore_v1.projects.databases.collectionGroups.fields.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ <h3>Method Details</h3>
130130
&quot;usesAncestorConfig&quot;: True or False, # Output only. When true, the `Field`&#x27;s index configuration is set from the configuration specified by the `ancestor_field`. When false, the `Field`&#x27;s index configuration is defined explicitly.
131131
},
132132
&quot;name&quot;: &quot;A String&quot;, # 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`, 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 must be quoted include: `*`, `.`, ``` (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. A special `Field` contains the default indexing settings for all fields. This field&#x27;s resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.
133+
&quot;ttlConfig&quot;: { # 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&#x27;s absolute expiration time. Using any other data type or leaving the field absent will disable the TTL for the individual document. # The TTL configuration for this `Field`. Setting or unsetting this will enable or disable the TTL for documents that have this `Field`.
134+
&quot;state&quot;: &quot;A String&quot;, # Output only. The state of the TTL configuration.
135+
},
133136
}</pre>
134137
</div>
135138

@@ -173,6 +176,9 @@ <h3>Method Details</h3>
173176
&quot;usesAncestorConfig&quot;: True or False, # Output only. When true, the `Field`&#x27;s index configuration is set from the configuration specified by the `ancestor_field`. When false, the `Field`&#x27;s index configuration is defined explicitly.
174177
},
175178
&quot;name&quot;: &quot;A String&quot;, # 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`, 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 must be quoted include: `*`, `.`, ``` (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. A special `Field` contains the default indexing settings for all fields. This field&#x27;s resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.
179+
&quot;ttlConfig&quot;: { # 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&#x27;s absolute expiration time. Using any other data type or leaving the field absent will disable the TTL for the individual document. # The TTL configuration for this `Field`. Setting or unsetting this will enable or disable the TTL for documents that have this `Field`.
180+
&quot;state&quot;: &quot;A String&quot;, # Output only. The state of the TTL configuration.
181+
},
176182
},
177183
],
178184
&quot;nextPageToken&quot;: &quot;A String&quot;, # A page token that may be used to request another page of results. If blank, this is the last page.
@@ -223,6 +229,9 @@ <h3>Method Details</h3>
223229
&quot;usesAncestorConfig&quot;: True or False, # Output only. When true, the `Field`&#x27;s index configuration is set from the configuration specified by the `ancestor_field`. When false, the `Field`&#x27;s index configuration is defined explicitly.
224230
},
225231
&quot;name&quot;: &quot;A String&quot;, # 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`, 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 must be quoted include: `*`, `.`, ``` (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. A special `Field` contains the default indexing settings for all fields. This field&#x27;s resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.
232+
&quot;ttlConfig&quot;: { # 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&#x27;s absolute expiration time. Using any other data type or leaving the field absent will disable the TTL for the individual document. # The TTL configuration for this `Field`. Setting or unsetting this will enable or disable the TTL for documents that have this `Field`.
233+
&quot;state&quot;: &quot;A String&quot;, # Output only. The state of the TTL configuration.
234+
},
226235
}
227236

228237
updateMask: string, A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field.

docs/dyn/firestore_v1.projects.databases.documents.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ <h3>Method Details</h3>
10531053
{ # The request for Firestore.ListCollectionIds.
10541054
&quot;pageSize&quot;: 42, # The maximum number of results to return.
10551055
&quot;pageToken&quot;: &quot;A String&quot;, # A page token. Must be a value from ListCollectionIdsResponse.
1056+
&quot;readTime&quot;: &quot;A String&quot;, # Reads documents as they were at the given time. This may not be older than 270 seconds.
10561057
}
10571058

10581059
x__xgafv: string, V1 error format.
@@ -1429,6 +1430,7 @@ <h3>Method Details</h3>
14291430
&quot;pageSize&quot;: 42, # The maximum number of partitions to return in this call, subject to `partition_count`. For example, if `partition_count` = 10 and `page_size` = 8, the first call to PartitionQuery will return up to 8 partitions and a `next_page_token` if more results exist. A second call to PartitionQuery will return up to 2 partitions, to complete the total of 10 specified in `partition_count`.
14301431
&quot;pageToken&quot;: &quot;A String&quot;, # The `next_page_token` value returned from a previous call to PartitionQuery that may be used to get an additional set of results. There are no ordering guarantees between sets of results. Thus, using multiple sets of results will require merging the different result sets. For example, two subsequent calls using a page_token may return: * cursor B, cursor M, cursor Q * cursor A, cursor U, cursor W To obtain a complete result set ordered with respect to the results of the query supplied to PartitionQuery, the results sets should be merged: cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W
14311432
&quot;partitionCount&quot;: &quot;A String&quot;, # The desired maximum number of partition points. The partitions may be returned across multiple pages of results. The number must be positive. The actual number of partitions returned may be fewer. For example, this may be set to one fewer than the number of parallel queries to be run, or in running a data pipeline job, one fewer than the number of workers or compute instances available.
1433+
&quot;readTime&quot;: &quot;A String&quot;, # Reads documents as they were at the given time. This may not be older than 270 seconds.
14321434
&quot;structuredQuery&quot;: { # A Firestore query. # A structured query. Query must specify collection with all descendants and be ordered by name ascending. Other filters, order bys, limits, offsets, and start/end cursors are not supported.
14331435
&quot;endAt&quot;: { # A position in a query result set. # A end point for the query results.
14341436
&quot;before&quot;: True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query.

docs/dyn/firestore_v1.projects.databases.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ <h2>Instance Methods</h2>
9292
<p class="toc_element">
9393
<code><a href="#close">close()</a></code></p>
9494
<p class="firstline">Close httplib2 connections.</p>
95+
<p class="toc_element">
96+
<code><a href="#create">create(parent, body=None, databaseId=None, validateOnly=None, x__xgafv=None)</a></code></p>
97+
<p class="firstline">Create a database.</p>
9598
<p class="toc_element">
9699
<code><a href="#exportDocuments">exportDocuments(name, body=None, x__xgafv=None)</a></code></p>
97100
<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>
@@ -113,6 +116,56 @@ <h3>Method Details</h3>
113116
<pre>Close httplib2 connections.</pre>
114117
</div>
115118

119+
<div class="method">
120+
<code class="details" id="create">create(parent, body=None, databaseId=None, validateOnly=None, x__xgafv=None)</code>
121+
<pre>Create a database.
122+
123+
Args:
124+
parent: string, Required. A parent name of the form `projects/{project_id}` (required)
125+
body: object, The request body.
126+
The object takes the form of:
127+
128+
{ # A Cloud Firestore Database. Currently only one database is allowed per cloud project; this database must have a `database_id` of &#x27;(default)&#x27;.
129+
&quot;appEngineIntegrationMode&quot;: &quot;A String&quot;, # The App Engine integration mode to use for this database.
130+
&quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
131+
&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.
132+
&quot;keyPrefix&quot;: &quot;A String&quot;, # Output only. The key_prefix for this database. This key_prefix is used, in combination with the project id (&quot;~&quot;) to construct the application id that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
133+
&quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.
134+
&quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
135+
&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.
136+
}
137+
138+
databaseId: string, Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. 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.
139+
validateOnly: boolean, If set, validate the request and preview the response, but do not actually create the database.
140+
x__xgafv: string, V1 error format.
141+
Allowed values
142+
1 - v1 error format
143+
2 - v2 error format
144+
145+
Returns:
146+
An object of the form:
147+
148+
{ # This resource represents a long-running operation that is the result of a network API call.
149+
&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.
150+
&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.
151+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
152+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
153+
{
154+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
155+
},
156+
],
157+
&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.
158+
},
159+
&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.
160+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
161+
},
162+
&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}`.
163+
&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`.
164+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
165+
},
166+
}</pre>
167+
</div>
168+
116169
<div class="method">
117170
<code class="details" id="exportDocuments">exportDocuments(name, body=None, x__xgafv=None)</code>
118171
<pre>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

0 commit comments

Comments
 (0)