mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
regen all APIs
This commit is contained in:
@@ -23,7 +23,7 @@ use crate::{client, client::GetToken, client::serde_with};
|
||||
/// Identifies the an OAuth2 authorization scope.
|
||||
/// A scope is needed when requesting an
|
||||
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
|
||||
#[derive(PartialEq, Eq, Hash)]
|
||||
#[derive(PartialEq, Eq, Ord, PartialOrd, Hash, Debug, Clone, Copy)]
|
||||
pub enum Scope {
|
||||
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
CloudPlatform,
|
||||
@@ -168,19 +168,25 @@ impl<'a, S> Firestore<S> {
|
||||
// ############
|
||||
// SCHEMAS ###
|
||||
// ##########
|
||||
/// Defines a aggregation that produces a single result.
|
||||
/// Defines an aggregation that produces a single result.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Aggregation {
|
||||
/// Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.
|
||||
/// Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format `field_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to document field name limitations.
|
||||
|
||||
pub alias: Option<String>,
|
||||
/// Average aggregator.
|
||||
|
||||
pub avg: Option<Avg>,
|
||||
/// Count aggregator.
|
||||
|
||||
pub count: Option<Count>,
|
||||
/// Sum aggregator.
|
||||
|
||||
pub sum: Option<Sum>,
|
||||
}
|
||||
|
||||
impl client::Part for Aggregation {}
|
||||
@@ -217,6 +223,21 @@ pub struct ArrayValue {
|
||||
impl client::Part for ArrayValue {}
|
||||
|
||||
|
||||
/// Average of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. Infinity math follows IEEE-754 standards. * If the aggregated value set is empty, returns `NULL`. * Always returns the result as a double.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Avg {
|
||||
/// The field to aggregate on.
|
||||
|
||||
pub field: Option<FieldReference>,
|
||||
}
|
||||
|
||||
impl client::Part for Avg {}
|
||||
|
||||
|
||||
/// The request for Firestore.BatchGetDocuments.
|
||||
///
|
||||
/// # Activities
|
||||
@@ -238,13 +259,13 @@ pub struct BatchGetDocumentsRequest {
|
||||
#[serde(rename="newTransaction")]
|
||||
|
||||
pub new_transaction: Option<TransactionOptions>,
|
||||
/// Reads documents as they were at the given time. This may not be older than 270 seconds.
|
||||
/// Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Reads documents in a transaction.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -274,7 +295,7 @@ pub struct BatchGetDocumentsResponse {
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// The transaction that was started as part of this request. Will only be set in the first response, and only if BatchGetDocumentsRequest.new_transaction was set in the request.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -358,13 +379,51 @@ impl client::RequestValue for BeginTransactionRequest {}
|
||||
pub struct BeginTransactionResponse {
|
||||
/// The transaction that was started.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for BeginTransactionResponse {}
|
||||
|
||||
|
||||
/// A sequence of bits, encoded in a byte array. Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 _or fewer_ bits. The `padding` defines the number of bits of the last byte to be ignored as "padding". The values of these "padding" bits are unspecified and must be ignored. To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. The "size" of a `BitSequence` (the number of bits it contains) is calculated by this formula: `(bitmap.length * 8) - padding`.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct BitSequence {
|
||||
/// The bytes that encode the bit sequence. May have a length of zero.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub bitmap: Option<Vec<u8>>,
|
||||
/// The number of bits of the last byte in `bitmap` to ignore as "padding". If the length of `bitmap` is zero, then this value must be `0`. Otherwise, this value must be between 0 and 7, inclusive.
|
||||
|
||||
pub padding: Option<i32>,
|
||||
}
|
||||
|
||||
impl client::Part for BitSequence {}
|
||||
|
||||
|
||||
/// A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2's complement encoding. These two hash values, named `h1` and `h2`, are then used to compute the `hash_count` hash values using the formula, starting at `i=0`: h(i) = h1 + (i * h2) These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct BloomFilter {
|
||||
/// The bloom filter data.
|
||||
|
||||
pub bits: Option<BitSequence>,
|
||||
/// The number of hashes used by the algorithm.
|
||||
#[serde(rename="hashCount")]
|
||||
|
||||
pub hash_count: Option<i32>,
|
||||
}
|
||||
|
||||
impl client::Part for BloomFilter {}
|
||||
|
||||
|
||||
/// A selection of a collection, such as `messages as m1`.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
@@ -398,7 +457,7 @@ impl client::Part for CollectionSelector {}
|
||||
pub struct CommitRequest {
|
||||
/// If set, applies all writes in this transaction, and commits it.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
/// The writes to apply. Always executed atomically and in order.
|
||||
|
||||
@@ -457,7 +516,7 @@ impl client::Part for CompositeFilter {}
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Count {
|
||||
/// Optional. Optional constraint on the maximum number of documents to count. This provides a way to set an upper bound on the number of documents to scan, limiting latency and cost. Unspecified is interpreted as no bound. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be greater than zero when present.
|
||||
/// Optional. Optional constraint on the maximum number of documents to count. This provides a way to set an upper bound on the number of documents to scan, limiting latency, and cost. Unspecified is interpreted as no bound. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be greater than zero when present.
|
||||
#[serde(rename="upTo")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
@@ -502,7 +561,7 @@ pub struct Document {
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``.
|
||||
/// The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `` foo.`x&y` ``. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. A quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``.
|
||||
|
||||
pub fields: Option<HashMap<String, Value>>,
|
||||
/// The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
|
||||
@@ -661,13 +720,17 @@ impl client::ResponseResult for Empty {}
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ExistenceFilter {
|
||||
/// The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target.
|
||||
/// The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. The client can use the `unchanged_names` bloom filter to assist with this determination by testing ALL the document names against the filter; if the document name is NOT in the filter, it means the document no longer matches the target.
|
||||
|
||||
pub count: Option<i32>,
|
||||
/// The target ID to which this filter applies.
|
||||
#[serde(rename="targetId")]
|
||||
|
||||
pub target_id: Option<i32>,
|
||||
/// A bloom filter that, despite its name, contains the UTF-8 byte encodings of the resource names of ALL the documents that match target_id, in the form `projects/{project_id}/databases/{database_id}/documents/{document_path}`. This bloom filter may be omitted at the server's discretion, such as if it is deemed that the client will not make use of it or if it is too computationally expensive to calculate or transmit. Clients must gracefully handle this field being absent by falling back to the logic used before this field existed; that is, re-add the target without a resume token to figure out which documents in the client's cache are out of sync.
|
||||
#[serde(rename="unchangedNames")]
|
||||
|
||||
pub unchanged_names: Option<BloomFilter>,
|
||||
}
|
||||
|
||||
impl client::Part for ExistenceFilter {}
|
||||
@@ -701,7 +764,7 @@ impl client::Part for FieldFilter {}
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct FieldReference {
|
||||
/// The relative path of the document being referenced. Requires: * Conform to document field name limitations.
|
||||
/// A reference to a field in a document. Requires: * MUST be a dot-delimited (`.`) string of segments, where each segment conforms to document field name limitations.
|
||||
#[serde(rename="fieldPath")]
|
||||
|
||||
pub field_path: Option<String>,
|
||||
@@ -917,7 +980,7 @@ pub struct GoogleLongrunningOperation {
|
||||
/// 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}`.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// 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`.
|
||||
/// 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`.
|
||||
|
||||
pub response: Option<HashMap<String, json::Value>>,
|
||||
}
|
||||
@@ -962,7 +1025,7 @@ pub struct ListCollectionIdsRequest {
|
||||
#[serde(rename="pageToken")]
|
||||
|
||||
pub page_token: Option<String>,
|
||||
/// Reads documents as they were at the given time. This may not be older than 270 seconds.
|
||||
/// Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1138,7 +1201,7 @@ pub struct PartitionQueryRequest {
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub partition_count: Option<i64>,
|
||||
/// Reads documents as they were at the given time. This may not be older than 270 seconds.
|
||||
/// Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1166,7 +1229,7 @@ pub struct PartitionQueryResponse {
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// Partition results. Each partition is a split point that can be used by RunQuery as a starting or end point for the query results. The RunQuery requests must be made with the same query supplied to this PartitionQuery request. The partition cursors will be ordered according to same ordering as the results of the query supplied to PartitionQuery. For example, if a PartitionQuery request returns partition cursors A and B, running the following three queries will return the entire result set of the original query: * query, end_at A * query, start_at A, end_at B * query, start_at B An empty result may indicate that the query has too few results to be partitioned.
|
||||
/// Partition results. Each partition is a split point that can be used by RunQuery as a starting or end point for the query results. The RunQuery requests must be made with the same query supplied to this PartitionQuery request. The partition cursors will be ordered according to same ordering as the results of the query supplied to PartitionQuery. For example, if a PartitionQuery request returns partition cursors A and B, running the following three queries will return the entire result set of the original query: * query, end_at A * query, start_at A, end_at B * query, start_at B An empty result may indicate that the query has too few results to be partitioned, or that the query is not yet supported for partitioning.
|
||||
|
||||
pub partitions: Option<Vec<Cursor>>,
|
||||
}
|
||||
@@ -1234,7 +1297,7 @@ impl client::Part for QueryTarget {}
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ReadOnly {
|
||||
/// Reads documents at the given time. This may not be older than 60 seconds.
|
||||
/// Reads documents at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1243,7 +1306,7 @@ pub struct ReadOnly {
|
||||
impl client::Part for ReadOnly {}
|
||||
|
||||
|
||||
/// Options for a transaction that can be used to read and write documents.
|
||||
/// Options for a transaction that can be used to read and write documents. Firestore does not allow 3rd party auth requests to create read-write. transactions.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
@@ -1253,7 +1316,7 @@ pub struct ReadWrite {
|
||||
/// An optional transaction to retry.
|
||||
#[serde(rename="retryTransaction")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub retry_transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1273,7 +1336,7 @@ impl client::Part for ReadWrite {}
|
||||
pub struct RollbackRequest {
|
||||
/// Required. The transaction to roll back.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1295,7 +1358,7 @@ pub struct RunAggregationQueryRequest {
|
||||
#[serde(rename="newTransaction")]
|
||||
|
||||
pub new_transaction: Option<TransactionOptions>,
|
||||
/// Executes the query at the given timestamp. Requires: * Cannot be more than 270 seconds in the past.
|
||||
/// Executes the query at the given timestamp. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1305,7 +1368,7 @@ pub struct RunAggregationQueryRequest {
|
||||
pub structured_aggregation_query: Option<StructuredAggregationQuery>,
|
||||
/// Run the aggregation within an already active transaction. The value here is the opaque transaction ID to execute the query in.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1323,7 +1386,7 @@ impl client::RequestValue for RunAggregationQueryRequest {}
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct RunAggregationQueryResponse {
|
||||
/// The time at which the aggregate value is valid for.
|
||||
/// The time at which the aggregate result was computed. This is always monotonically increasing; in this case, the previous AggregationResult in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `result` will be sent, and this represents the time at which the query was run.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1332,7 +1395,7 @@ pub struct RunAggregationQueryResponse {
|
||||
pub result: Option<AggregationResult>,
|
||||
/// The transaction that was started as part of this request. Only present on the first response when the request requested to start a new transaction.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1354,7 +1417,7 @@ pub struct RunQueryRequest {
|
||||
#[serde(rename="newTransaction")]
|
||||
|
||||
pub new_transaction: Option<TransactionOptions>,
|
||||
/// Reads documents as they were at the given time. This may not be older than 270 seconds.
|
||||
/// Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
#[serde(rename="readTime")]
|
||||
|
||||
pub read_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
@@ -1364,7 +1427,7 @@ pub struct RunQueryRequest {
|
||||
pub structured_query: Option<StructuredQuery>,
|
||||
/// Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1398,7 +1461,7 @@ pub struct RunQueryResponse {
|
||||
pub skipped_results: Option<i32>,
|
||||
/// The transaction that was started as part of this request. Can only be set in the first response, and only if RunQueryRequest.new_transaction was set in the request. If set, no other fields will be set in this response.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub transaction: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
@@ -1445,7 +1508,7 @@ pub struct StructuredAggregationQuery {
|
||||
impl client::Part for StructuredAggregationQuery {}
|
||||
|
||||
|
||||
/// A Firestore query.
|
||||
/// A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order_by + start_at + end_at 5. offset 6. limit
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
@@ -1469,7 +1532,7 @@ pub struct StructuredQuery {
|
||||
#[serde(rename="orderBy")]
|
||||
|
||||
pub order_by: Option<Vec<Order>>,
|
||||
/// The projection to return.
|
||||
/// Optional sub-set of the fields to return. This acts as a DocumentMask over the documents returned from a query. When not set, assumes that the caller wants all fields returned.
|
||||
|
||||
pub select: Option<Projection>,
|
||||
/// A potential prefix of a position in the result set to start the query at. The ordering of the result set is based on the `ORDER BY` clause of the original query. ``` SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; ``` This query's results are ordered by `(b ASC, __name__ ASC)`. Cursors can reference either the full ordering or a prefix of the location, though it cannot reference more fields than what are in the provided `ORDER BY`. Continuing off the example above, attaching the following start cursors will have varying impact: - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND b > 2 AND __name__ > /k/123`. - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. Unlike `OFFSET` which requires scanning over the first N results to skip, a start cursor allows the query to begin at a logical position. This position is not required to match an actual result, it will scan forward from this position to find the next document. Requires: * The number of values cannot be greater than the number of fields specified in the `ORDER BY` clause.
|
||||
@@ -1485,6 +1548,21 @@ pub struct StructuredQuery {
|
||||
impl client::Part for StructuredQuery {}
|
||||
|
||||
|
||||
/// Sum of the values of the requested field. * Only numeric values will be aggregated. All non-numeric values including `NULL` are skipped. * If the aggregated values contain `NaN`, returns `NaN`. Infinity math follows IEEE-754 standards. * If the aggregated value set is empty, returns 0. * Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision. * When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Sum {
|
||||
/// The field to aggregate on.
|
||||
|
||||
pub field: Option<FieldReference>,
|
||||
}
|
||||
|
||||
impl client::Part for Sum {}
|
||||
|
||||
|
||||
/// A specification of a set of documents to listen to.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
@@ -1495,6 +1573,10 @@ pub struct Target {
|
||||
/// A target specified by a set of document names.
|
||||
|
||||
pub documents: Option<DocumentsTarget>,
|
||||
/// The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
|
||||
#[serde(rename="expectedCount")]
|
||||
|
||||
pub expected_count: Option<i32>,
|
||||
/// If the target should be removed once it is current and consistent.
|
||||
|
||||
pub once: Option<bool>,
|
||||
@@ -1508,9 +1590,9 @@ pub struct Target {
|
||||
/// A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail.
|
||||
#[serde(rename="resumeToken")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub resume_token: Option<Vec<u8>>,
|
||||
/// The target ID that identifies the target on the stream. Must be a positive number and non-zero.
|
||||
/// The target ID that identifies the target on the stream. Must be a positive number and non-zero. If `target_id` is 0 (or unspecified), the server will assign an ID for this target and return that in a `TargetChange::ADD` event. Once a target with `target_id=0` is added, all subsequent targets must also have `target_id=0`. If an `AddTarget` request with `target_id != 0` is sent to the server after a target with `target_id=0` is added, the server will immediately send a response with a `TargetChange::Remove` event. Note that if the client sends multiple `AddTarget` requests without an ID, the order of IDs returned in `TargetChage.target_ids` are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one. If `target_id` is non-zero, there must not be an existing active target on this stream with the same ID.
|
||||
#[serde(rename="targetId")]
|
||||
|
||||
pub target_id: Option<i32>,
|
||||
@@ -1536,7 +1618,7 @@ pub struct TargetChange {
|
||||
/// A token that can be used to resume the stream for the given `target_ids`, or all targets if `target_ids` is empty. Not set on every target change.
|
||||
#[serde(rename="resumeToken")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub resume_token: Option<Vec<u8>>,
|
||||
/// The type of change that occurred.
|
||||
#[serde(rename="targetChangeType")]
|
||||
@@ -1607,7 +1689,7 @@ pub struct Value {
|
||||
/// A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.
|
||||
#[serde(rename="bytesValue")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub bytes_value: Option<Vec<u8>>,
|
||||
/// A double value.
|
||||
#[serde(rename="doubleValue")]
|
||||
@@ -1701,7 +1783,7 @@ pub struct WriteRequest {
|
||||
/// A stream token that was previously sent by the server. The client should set this field to the token from the most recent WriteResponse it has received. This acknowledges that the client has received responses up to this token. After sending this token, earlier tokens may not be used anymore. The server may close the stream if there are too many unacknowledged responses. Leave this field unset when creating a new stream. To resume a stream at a specific point, set this field and the `stream_id` field. Leave this field unset when creating a new stream.
|
||||
#[serde(rename="streamToken")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub stream_token: Option<Vec<u8>>,
|
||||
/// The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
|
||||
|
||||
@@ -1733,7 +1815,7 @@ pub struct WriteResponse {
|
||||
/// A token that represents the position of this response in the stream. This can be used by a client to resume the stream at this point. This field is always set.
|
||||
#[serde(rename="streamToken")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
|
||||
pub stream_token: Option<Vec<u8>>,
|
||||
/// The result of applying the writes. This i-th write result corresponds to the i-th write in the request.
|
||||
#[serde(rename="writeResults")]
|
||||
@@ -2018,7 +2100,7 @@ impl<'a, S> ProjectMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Listens to changes.
|
||||
/// Listens to changes. This method is only available via gRPC or WebChannel (not REST).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
@@ -2136,7 +2218,7 @@ impl<'a, S> ProjectMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Streams batches of document updates and deletes, in order.
|
||||
/// Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
@@ -4137,7 +4219,7 @@ where
|
||||
let mut params = Params::with_capacity(6 + self._additional_params.len());
|
||||
params.push("name", self._name);
|
||||
if let Some(value) = self._transaction.as_ref() {
|
||||
params.push("transaction", ::client::serde::urlsafe_base64::to_string(&value));
|
||||
params.push("transaction", ::client::serde::standard_base64::to_string(&value));
|
||||
}
|
||||
if let Some(value) = self._read_time.as_ref() {
|
||||
params.push("readTime", ::client::serde::datetime_to_string(&value));
|
||||
@@ -4268,7 +4350,7 @@ where
|
||||
self._transaction = Some(new_value);
|
||||
self
|
||||
}
|
||||
/// Reads the version of the document at the given time. This may not be older than 270 seconds.
|
||||
/// Reads the version of the document at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
///
|
||||
/// Sets the *read time* query property to the given value.
|
||||
pub fn read_time(mut self, new_value: client::chrono::DateTime<client::chrono::offset::Utc>) -> ProjectDatabaseDocumentGetCall<'a, S> {
|
||||
@@ -4448,7 +4530,7 @@ where
|
||||
params.push("parent", self._parent);
|
||||
params.push("collectionId", self._collection_id);
|
||||
if let Some(value) = self._transaction.as_ref() {
|
||||
params.push("transaction", ::client::serde::urlsafe_base64::to_string(&value));
|
||||
params.push("transaction", ::client::serde::standard_base64::to_string(&value));
|
||||
}
|
||||
if let Some(value) = self._show_missing.as_ref() {
|
||||
params.push("showMissing", value.to_string());
|
||||
@@ -4608,7 +4690,7 @@ where
|
||||
self._show_missing = Some(new_value);
|
||||
self
|
||||
}
|
||||
/// Perform the read at the provided time. This may not be older than 270 seconds.
|
||||
/// Perform the read at the provided time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
///
|
||||
/// Sets the *read time* query property to the given value.
|
||||
pub fn read_time(mut self, new_value: client::chrono::DateTime<client::chrono::offset::Utc>) -> ProjectDatabaseDocumentListCall<'a, S> {
|
||||
@@ -5101,7 +5183,7 @@ where
|
||||
params.push("parent", self._parent);
|
||||
params.push("collectionId", self._collection_id);
|
||||
if let Some(value) = self._transaction.as_ref() {
|
||||
params.push("transaction", ::client::serde::urlsafe_base64::to_string(&value));
|
||||
params.push("transaction", ::client::serde::standard_base64::to_string(&value));
|
||||
}
|
||||
if let Some(value) = self._show_missing.as_ref() {
|
||||
params.push("showMissing", value.to_string());
|
||||
@@ -5261,7 +5343,7 @@ where
|
||||
self._show_missing = Some(new_value);
|
||||
self
|
||||
}
|
||||
/// Perform the read at the provided time. This may not be older than 270 seconds.
|
||||
/// Perform the read at the provided time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.
|
||||
///
|
||||
/// Sets the *read time* query property to the given value.
|
||||
pub fn read_time(mut self, new_value: client::chrono::DateTime<client::chrono::offset::Utc>) -> ProjectDatabaseDocumentListDocumentCall<'a, S> {
|
||||
@@ -5373,7 +5455,7 @@ where
|
||||
}
|
||||
|
||||
|
||||
/// Listens to changes.
|
||||
/// Listens to changes. This method is only available via gRPC or WebChannel (not REST).
|
||||
///
|
||||
/// A builder for the *databases.documents.listen* method supported by a *project* resource.
|
||||
/// It is not used directly, but through a [`ProjectMethods`] instance.
|
||||
@@ -7179,7 +7261,7 @@ where
|
||||
}
|
||||
|
||||
|
||||
/// Streams batches of document updates and deletes, in order.
|
||||
/// Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
|
||||
///
|
||||
/// A builder for the *databases.documents.write* method supported by a *project* resource.
|
||||
/// It is not used directly, but through a [`ProjectMethods`] instance.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *Firestore* crate version *5.0.3+20230118*, where *20230118* is the exact revision of the *firestore:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.3*.
|
||||
//! This documentation was generated from *Firestore* crate version *5.0.3+20240226*, where *20240226* is the exact revision of the *firestore:v1beta1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.3*.
|
||||
//!
|
||||
//! Everything else about the *Firestore* *v1_beta1* API can be found at the
|
||||
//! [official documentation site](https://cloud.google.com/firestore).
|
||||
|
||||
Reference in New Issue
Block a user