From ac310c87777c70f004fae7e3d04773b0f171cdc0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 02:36:36 +0000 Subject: [PATCH] feat: Automated regeneration of Datastore client --- .../google_api/datastore/v1/api/projects.ex | 2 +- .../lib/google_api/datastore/v1/metadata.ex | 2 +- .../datastore/v1/model/aggregation.ex | 12 +++-- .../lib/google_api/datastore/v1/model/avg.ex | 46 +++++++++++++++++++ .../datastore/v1/model/commit_request.ex | 3 ++ .../google_api/datastore/v1/model/count.ex | 2 +- .../google_api/datastore/v1/model/entity.ex | 4 +- .../datastore/v1/model/entity_result.ex | 3 ++ .../v1/model/google_longrunning_operation.ex | 2 +- .../datastore/v1/model/lookup_response.ex | 5 +- .../datastore/v1/model/mutation_result.ex | 3 ++ .../datastore/v1/model/property_reference.ex | 2 +- .../google_api/datastore/v1/model/query.ex | 2 +- .../datastore/v1/model/read_only.ex | 2 +- .../datastore/v1/model/read_options.ex | 5 +- .../model/run_aggregation_query_response.ex | 5 +- .../datastore/v1/model/run_query_response.ex | 5 +- .../lib/google_api/datastore/v1/model/sum.ex | 46 +++++++++++++++++++ 18 files changed, 135 insertions(+), 16 deletions(-) create mode 100644 clients/datastore/lib/google_api/datastore/v1/model/avg.ex create mode 100644 clients/datastore/lib/google_api/datastore/v1/model/sum.ex diff --git a/clients/datastore/lib/google_api/datastore/v1/api/projects.ex b/clients/datastore/lib/google_api/datastore/v1/api/projects.ex index a68d8a6bbd..65beac6a13 100644 --- a/clients/datastore/lib/google_api/datastore/v1/api/projects.ex +++ b/clients/datastore/lib/google_api/datastore/v1/api/projects.ex @@ -1133,7 +1133,7 @@ defmodule GoogleApi.Datastore.V1.Api.Projects do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters diff --git a/clients/datastore/lib/google_api/datastore/v1/metadata.ex b/clients/datastore/lib/google_api/datastore/v1/metadata.ex index c15e68baf3..acca1c6253 100644 --- a/clients/datastore/lib/google_api/datastore/v1/metadata.ex +++ b/clients/datastore/lib/google_api/datastore/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Datastore.V1 do API client metadata for GoogleApi.Datastore.V1. """ - @discovery_revision "20221029" + @discovery_revision "20240226" def discovery_revision(), do: @discovery_revision end diff --git a/clients/datastore/lib/google_api/datastore/v1/model/aggregation.ex b/clients/datastore/lib/google_api/datastore/v1/model/aggregation.ex index 132cb94f28..3fb775fe82 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/aggregation.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/aggregation.ex @@ -17,23 +17,29 @@ defmodule GoogleApi.Datastore.V1.Model.Aggregation do @moduledoc """ - Defines a aggregation that produces a single result. + Defines an aggregation that produces a single result. ## Attributes - * `alias` (*type:* `String.t`, *default:* `nil`) - Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. 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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations. + * `alias` (*type:* `String.t`, *default:* `nil`) - Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. 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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations. + * `avg` (*type:* `GoogleApi.Datastore.V1.Model.Avg.t`, *default:* `nil`) - Average aggregator. * `count` (*type:* `GoogleApi.Datastore.V1.Model.Count.t`, *default:* `nil`) - Count aggregator. + * `sum` (*type:* `GoogleApi.Datastore.V1.Model.Sum.t`, *default:* `nil`) - Sum aggregator. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :alias => String.t() | nil, - :count => GoogleApi.Datastore.V1.Model.Count.t() | nil + :avg => GoogleApi.Datastore.V1.Model.Avg.t() | nil, + :count => GoogleApi.Datastore.V1.Model.Count.t() | nil, + :sum => GoogleApi.Datastore.V1.Model.Sum.t() | nil } field(:alias) + field(:avg, as: GoogleApi.Datastore.V1.Model.Avg) field(:count, as: GoogleApi.Datastore.V1.Model.Count) + field(:sum, as: GoogleApi.Datastore.V1.Model.Sum) end defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.Aggregation do diff --git a/clients/datastore/lib/google_api/datastore/v1/model/avg.ex b/clients/datastore/lib/google_api/datastore/v1/model/avg.ex new file mode 100644 index 0000000000..10ac90c670 --- /dev/null +++ b/clients/datastore/lib/google_api/datastore/v1/model/avg.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Datastore.V1.Model.Avg do + @moduledoc """ + Average of the values of the requested property. * 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. + + ## Attributes + + * `property` (*type:* `GoogleApi.Datastore.V1.Model.PropertyReference.t`, *default:* `nil`) - The property to aggregate on. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :property => GoogleApi.Datastore.V1.Model.PropertyReference.t() | nil + } + + field(:property, as: GoogleApi.Datastore.V1.Model.PropertyReference) +end + +defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.Avg do + def decode(value, options) do + GoogleApi.Datastore.V1.Model.Avg.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Datastore.V1.Model.Avg do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/datastore/lib/google_api/datastore/v1/model/commit_request.ex b/clients/datastore/lib/google_api/datastore/v1/model/commit_request.ex index 9c12789301..442b7f57c2 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/commit_request.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/commit_request.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.Datastore.V1.Model.CommitRequest do * `databaseId` (*type:* `String.t`, *default:* `nil`) - The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database. * `mode` (*type:* `String.t`, *default:* `nil`) - The type of commit to perform. Defaults to `TRANSACTIONAL`. * `mutations` (*type:* `list(GoogleApi.Datastore.V1.Model.Mutation.t)`, *default:* `nil`) - The mutations to perform. When mode is `TRANSACTIONAL`, mutations affecting a single entity are applied in order. The following sequences of mutations affecting a single entity are not permitted in a single `Commit` request: - `insert` followed by `insert` - `update` followed by `insert` - `upsert` followed by `insert` - `delete` followed by `update` When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single entity. + * `singleUseTransaction` (*type:* `GoogleApi.Datastore.V1.Model.TransactionOptions.t`, *default:* `nil`) - Options for beginning a new transaction for this request. The transaction is committed when the request completes. If specified, TransactionOptions.mode must be TransactionOptions.ReadWrite. * `transaction` (*type:* `String.t`, *default:* `nil`) - The identifier of the transaction associated with the commit. A transaction identifier is returned by a call to Datastore.BeginTransaction. """ @@ -33,12 +34,14 @@ defmodule GoogleApi.Datastore.V1.Model.CommitRequest do :databaseId => String.t() | nil, :mode => String.t() | nil, :mutations => list(GoogleApi.Datastore.V1.Model.Mutation.t()) | nil, + :singleUseTransaction => GoogleApi.Datastore.V1.Model.TransactionOptions.t() | nil, :transaction => String.t() | nil } field(:databaseId) field(:mode) field(:mutations, as: GoogleApi.Datastore.V1.Model.Mutation, type: :list) + field(:singleUseTransaction, as: GoogleApi.Datastore.V1.Model.TransactionOptions) field(:transaction) end diff --git a/clients/datastore/lib/google_api/datastore/v1/model/count.ex b/clients/datastore/lib/google_api/datastore/v1/model/count.ex index 92389df9e9..fa782ed7dc 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/count.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/count.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Datastore.V1.Model.Count do ## Attributes - * `upTo` (*type:* `String.t`, *default:* `nil`) - Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be non-negative when present. + * `upTo` (*type:* `String.t`, *default:* `nil`) - Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency, and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be non-negative when present. """ use GoogleApi.Gax.ModelBase diff --git a/clients/datastore/lib/google_api/datastore/v1/model/entity.ex b/clients/datastore/lib/google_api/datastore/v1/model/entity.ex index b4268de4e2..bd3b7b4158 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/entity.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/entity.ex @@ -17,12 +17,12 @@ defmodule GoogleApi.Datastore.V1.Model.Entity do @moduledoc """ - A Datastore data object. An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message. + A Datastore data object. Must not exceed 1 MiB - 4 bytes. ## Attributes * `key` (*type:* `GoogleApi.Datastore.V1.Model.Key.t`, *default:* `nil`) - The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in `Value.entity_value` may have no key). An entity's kind is its key path's last element's kind, or null if it has no key. - * `properties` (*type:* `%{optional(String.t) => GoogleApi.Datastore.V1.Model.Value.t}`, *default:* `nil`) - The entity's properties. The map's keys are property names. A property name matching regex `__.*__` is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. The name cannot be `""`. + * `properties` (*type:* `%{optional(String.t) => GoogleApi.Datastore.V1.Model.Value.t}`, *default:* `nil`) - The entity's properties. The map's keys are property names. A property name matching regex `__.*__` is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. """ use GoogleApi.Gax.ModelBase diff --git a/clients/datastore/lib/google_api/datastore/v1/model/entity_result.ex b/clients/datastore/lib/google_api/datastore/v1/model/entity_result.ex index d4f5245373..bf7ebd7dd0 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/entity_result.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/entity_result.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Datastore.V1.Model.EntityResult do ## Attributes + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the entity was created. This field is set for `FULL` entity results. If this entity is missing, this field will not be set. * `cursor` (*type:* `String.t`, *default:* `nil`) - A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message. * `entity` (*type:* `GoogleApi.Datastore.V1.Model.Entity.t`, *default:* `nil`) - The resulting entity. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the entity was last changed. This field is set for `FULL` entity results. If this entity is missing, this field will not be set. @@ -30,12 +31,14 @@ defmodule GoogleApi.Datastore.V1.Model.EntityResult do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, :cursor => String.t() | nil, :entity => GoogleApi.Datastore.V1.Model.Entity.t() | nil, :updateTime => DateTime.t() | nil, :version => String.t() | nil } + field(:createTime, as: DateTime) field(:cursor) field(:entity, as: GoogleApi.Datastore.V1.Model.Entity) field(:updateTime, as: DateTime) diff --git a/clients/datastore/lib/google_api/datastore/v1/model/google_longrunning_operation.ex b/clients/datastore/lib/google_api/datastore/v1/model/google_longrunning_operation.ex index 72acaa614c..953b185c3e 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/google_longrunning_operation.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/google_longrunning_operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation do * `error` (*type:* `GoogleApi.Datastore.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - 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. * `name` (*type:* `String.t`, *default:* `nil`) - 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}`. - * `response` (*type:* `map()`, *default:* `nil`) - 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`. + * `response` (*type:* `map()`, *default:* `nil`) - 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`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/datastore/lib/google_api/datastore/v1/model/lookup_response.ex b/clients/datastore/lib/google_api/datastore/v1/model/lookup_response.ex index ab633b6abf..e3a9d60866 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/lookup_response.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/lookup_response.ex @@ -25,6 +25,7 @@ defmodule GoogleApi.Datastore.V1.Model.LookupResponse do * `found` (*type:* `list(GoogleApi.Datastore.V1.Model.EntityResult.t)`, *default:* `nil`) - Entities found as `ResultType.FULL` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input. * `missing` (*type:* `list(GoogleApi.Datastore.V1.Model.EntityResult.t)`, *default:* `nil`) - Entities not found as `ResultType.KEY_ONLY` entities. The order of results in this field is undefined and has no relation to the order of the keys in the input. * `readTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which these entities were read or found missing. + * `transaction` (*type:* `String.t`, *default:* `nil`) - The identifier of the transaction that was started as part of this Lookup request. Set only when ReadOptions.new_transaction was set in LookupRequest.read_options. """ use GoogleApi.Gax.ModelBase @@ -33,13 +34,15 @@ defmodule GoogleApi.Datastore.V1.Model.LookupResponse do :deferred => list(GoogleApi.Datastore.V1.Model.Key.t()) | nil, :found => list(GoogleApi.Datastore.V1.Model.EntityResult.t()) | nil, :missing => list(GoogleApi.Datastore.V1.Model.EntityResult.t()) | nil, - :readTime => DateTime.t() | nil + :readTime => DateTime.t() | nil, + :transaction => String.t() | nil } field(:deferred, as: GoogleApi.Datastore.V1.Model.Key, type: :list) field(:found, as: GoogleApi.Datastore.V1.Model.EntityResult, type: :list) field(:missing, as: GoogleApi.Datastore.V1.Model.EntityResult, type: :list) field(:readTime, as: DateTime) + field(:transaction) end defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.LookupResponse do diff --git a/clients/datastore/lib/google_api/datastore/v1/model/mutation_result.ex b/clients/datastore/lib/google_api/datastore/v1/model/mutation_result.ex index 1b4bd36356..95f51a17bb 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/mutation_result.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/mutation_result.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.Datastore.V1.Model.MutationResult do ## Attributes * `conflictDetected` (*type:* `boolean()`, *default:* `nil`) - Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The create time of the entity. This field will not be set after a 'delete'. * `key` (*type:* `GoogleApi.Datastore.V1.Model.Key.t`, *default:* `nil`) - The automatically allocated key. Set only when the mutation allocated a key. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'. * `version` (*type:* `String.t`, *default:* `nil`) - The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity. @@ -31,12 +32,14 @@ defmodule GoogleApi.Datastore.V1.Model.MutationResult do @type t :: %__MODULE__{ :conflictDetected => boolean() | nil, + :createTime => DateTime.t() | nil, :key => GoogleApi.Datastore.V1.Model.Key.t() | nil, :updateTime => DateTime.t() | nil, :version => String.t() | nil } field(:conflictDetected) + field(:createTime, as: DateTime) field(:key, as: GoogleApi.Datastore.V1.Model.Key) field(:updateTime, as: DateTime) field(:version) diff --git a/clients/datastore/lib/google_api/datastore/v1/model/property_reference.ex b/clients/datastore/lib/google_api/datastore/v1/model/property_reference.ex index b63eac726a..c860c6c750 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/property_reference.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/property_reference.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Datastore.V1.Model.PropertyReference do ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - The name of the property. If name includes "."s, it may be interpreted as a property name path. + * `name` (*type:* `String.t`, *default:* `nil`) - A reference to a property. Requires: * MUST be a dot-delimited (`.`) string of segments, where each segment conforms to entity property name limitations. """ use GoogleApi.Gax.ModelBase diff --git a/clients/datastore/lib/google_api/datastore/v1/model/query.ex b/clients/datastore/lib/google_api/datastore/v1/model/query.ex index bedf7f3d9e..c2e7e6b046 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/query.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/query.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Datastore.V1.Model.Query do ## Attributes - * `distinctOn` (*type:* `list(GoogleApi.Datastore.V1.Model.PropertyReference.t)`, *default:* `nil`) - The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned). + * `distinctOn` (*type:* `list(GoogleApi.Datastore.V1.Model.PropertyReference.t)`, *default:* `nil`) - The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned). Requires: * If `order` is specified, the set of distinct on properties must appear before the non-distinct on properties in `order`. * `endCursor` (*type:* `String.t`, *default:* `nil`) - An ending point for the query results. Query cursors are returned in query result batches and [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets). * `filter` (*type:* `GoogleApi.Datastore.V1.Model.Filter.t`, *default:* `nil`) - The filter to apply. * `kind` (*type:* `list(GoogleApi.Datastore.V1.Model.KindExpression.t)`, *default:* `nil`) - The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified. diff --git a/clients/datastore/lib/google_api/datastore/v1/model/read_only.ex b/clients/datastore/lib/google_api/datastore/v1/model/read_only.ex index 62f949fca2..56516b1a5e 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/read_only.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/read_only.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Datastore.V1.Model.ReadOnly do ## Attributes - * `readTime` (*type:* `DateTime.t`, *default:* `nil`) - Reads entities at the given time. This may not be older than 60 seconds. + * `readTime` (*type:* `DateTime.t`, *default:* `nil`) - Reads entities 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. """ use GoogleApi.Gax.ModelBase diff --git a/clients/datastore/lib/google_api/datastore/v1/model/read_options.ex b/clients/datastore/lib/google_api/datastore/v1/model/read_options.ex index 49d7347bf4..b247ec38e0 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/read_options.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/read_options.ex @@ -21,19 +21,22 @@ defmodule GoogleApi.Datastore.V1.Model.ReadOptions do ## Attributes + * `newTransaction` (*type:* `GoogleApi.Datastore.V1.Model.TransactionOptions.t`, *default:* `nil`) - Options for beginning a new transaction for this request. The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction. * `readConsistency` (*type:* `String.t`, *default:* `nil`) - The non-transactional read consistency to use. - * `readTime` (*type:* `DateTime.t`, *default:* `nil`) - Reads entities as they were at the given time. This may not be older than 270 seconds. This value is only supported for Cloud Firestore in Datastore mode. + * `readTime` (*type:* `DateTime.t`, *default:* `nil`) - Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode. 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. * `transaction` (*type:* `String.t`, *default:* `nil`) - The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :newTransaction => GoogleApi.Datastore.V1.Model.TransactionOptions.t() | nil, :readConsistency => String.t() | nil, :readTime => DateTime.t() | nil, :transaction => String.t() | nil } + field(:newTransaction, as: GoogleApi.Datastore.V1.Model.TransactionOptions) field(:readConsistency) field(:readTime, as: DateTime) field(:transaction) diff --git a/clients/datastore/lib/google_api/datastore/v1/model/run_aggregation_query_response.ex b/clients/datastore/lib/google_api/datastore/v1/model/run_aggregation_query_response.ex index fa35d28dca..8ff544f08f 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/run_aggregation_query_response.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/run_aggregation_query_response.ex @@ -23,17 +23,20 @@ defmodule GoogleApi.Datastore.V1.Model.RunAggregationQueryResponse do * `batch` (*type:* `GoogleApi.Datastore.V1.Model.AggregationResultBatch.t`, *default:* `nil`) - A batch of aggregation results. Always present. * `query` (*type:* `GoogleApi.Datastore.V1.Model.AggregationQuery.t`, *default:* `nil`) - The parsed form of the `GqlQuery` from the request, if it was set. + * `transaction` (*type:* `String.t`, *default:* `nil`) - The identifier of the transaction that was started as part of this RunAggregationQuery request. Set only when ReadOptions.new_transaction was set in RunAggregationQueryRequest.read_options. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :batch => GoogleApi.Datastore.V1.Model.AggregationResultBatch.t() | nil, - :query => GoogleApi.Datastore.V1.Model.AggregationQuery.t() | nil + :query => GoogleApi.Datastore.V1.Model.AggregationQuery.t() | nil, + :transaction => String.t() | nil } field(:batch, as: GoogleApi.Datastore.V1.Model.AggregationResultBatch) field(:query, as: GoogleApi.Datastore.V1.Model.AggregationQuery) + field(:transaction) end defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.RunAggregationQueryResponse do diff --git a/clients/datastore/lib/google_api/datastore/v1/model/run_query_response.ex b/clients/datastore/lib/google_api/datastore/v1/model/run_query_response.ex index 96d2c3ceef..c240eed8cb 100644 --- a/clients/datastore/lib/google_api/datastore/v1/model/run_query_response.ex +++ b/clients/datastore/lib/google_api/datastore/v1/model/run_query_response.ex @@ -23,17 +23,20 @@ defmodule GoogleApi.Datastore.V1.Model.RunQueryResponse do * `batch` (*type:* `GoogleApi.Datastore.V1.Model.QueryResultBatch.t`, *default:* `nil`) - A batch of query results (always present). * `query` (*type:* `GoogleApi.Datastore.V1.Model.Query.t`, *default:* `nil`) - The parsed form of the `GqlQuery` from the request, if it was set. + * `transaction` (*type:* `String.t`, *default:* `nil`) - The identifier of the transaction that was started as part of this RunQuery request. Set only when ReadOptions.new_transaction was set in RunQueryRequest.read_options. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :batch => GoogleApi.Datastore.V1.Model.QueryResultBatch.t() | nil, - :query => GoogleApi.Datastore.V1.Model.Query.t() | nil + :query => GoogleApi.Datastore.V1.Model.Query.t() | nil, + :transaction => String.t() | nil } field(:batch, as: GoogleApi.Datastore.V1.Model.QueryResultBatch) field(:query, as: GoogleApi.Datastore.V1.Model.Query) + field(:transaction) end defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.RunQueryResponse do diff --git a/clients/datastore/lib/google_api/datastore/v1/model/sum.ex b/clients/datastore/lib/google_api/datastore/v1/model/sum.ex new file mode 100644 index 0000000000..7031133a18 --- /dev/null +++ b/clients/datastore/lib/google_api/datastore/v1/model/sum.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Datastore.V1.Model.Sum do + @moduledoc """ + Sum of the values of the requested property. * 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. + + ## Attributes + + * `property` (*type:* `GoogleApi.Datastore.V1.Model.PropertyReference.t`, *default:* `nil`) - The property to aggregate on. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :property => GoogleApi.Datastore.V1.Model.PropertyReference.t() | nil + } + + field(:property, as: GoogleApi.Datastore.V1.Model.PropertyReference) +end + +defimpl Poison.Decoder, for: GoogleApi.Datastore.V1.Model.Sum do + def decode(value, options) do + GoogleApi.Datastore.V1.Model.Sum.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Datastore.V1.Model.Sum do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end