From b35ca1ee0225f0c2f7a5525f4cb839040e67a776 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:14:28 -0700 Subject: [PATCH] feat: Automated regeneration of Spanner client (#12433) Auto-created at 2024-10-30 13:12:42 +0000 using the toys pull request generator. --- clients/spanner/README.md | 2 +- .../lib/google_api/spanner/v1/api/projects.ex | 24 +++++++++---------- .../lib/google_api/spanner/v1/metadata.ex | 2 +- .../lib/google_api/spanner/v1/model/backup.ex | 2 +- .../v1/model/begin_transaction_request.ex | 3 +++ .../spanner/v1/model/commit_request.ex | 4 ++++ .../spanner/v1/model/commit_response.ex | 5 +++- .../v1/model/copy_backup_encryption_config.ex | 2 +- .../model/create_backup_encryption_config.ex | 2 +- .../google_api/spanner/v1/model/database.ex | 2 +- .../spanner/v1/model/encryption_config.ex | 2 +- .../v1/model/execute_batch_dml_response.ex | 4 ++++ .../google_api/spanner/v1/model/instance.ex | 7 ++++-- .../spanner/v1/model/partial_result_set.ex | 4 ++++ .../google_api/spanner/v1/model/read_write.ex | 3 +++ .../restore_database_encryption_config.ex | 2 +- .../google_api/spanner/v1/model/result_set.ex | 4 ++++ .../v1/model/update_database_ddl_request.ex | 2 +- clients/spanner/mix.exs | 2 +- 19 files changed, 53 insertions(+), 25 deletions(-) diff --git a/clients/spanner/README.md b/clients/spanner/README.md index 25e5c4f4c3..ac0580146d 100644 --- a/clients/spanner/README.md +++ b/clients/spanner/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_spanner, "~> 0.46"}] + [{:google_api_spanner, "~> 0.47"}] end ``` diff --git a/clients/spanner/lib/google_api/spanner/v1/api/projects.ex b/clients/spanner/lib/google_api/spanner/v1/api/projects.ex index 34d326650b..6da4a61f4f 100644 --- a/clients/spanner/lib/google_api/spanner/v1/api/projects.ex +++ b/clients/spanner/lib/google_api/spanner/v1/api/projects.ex @@ -1793,7 +1793,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do * `:backupId` (*type:* `String.t`) - Required. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`. * `:"encryptionConfig.encryptionType"` (*type:* `String.t`) - Required. The encryption type of the backup. * `:"encryptionConfig.kmsKeyName"` (*type:* `String.t`) - Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`. - * `:"encryptionConfig.kmsKeyNames"` (*type:* `list(String.t)`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs. + * `:"encryptionConfig.kmsKeyNames"` (*type:* `list(String.t)`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the backup's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. * `:body` (*type:* `GoogleApi.Spanner.V1.Model.Backup.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -1987,7 +1987,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. + Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.getIamPolicy` permission on resource. ## Parameters @@ -2209,7 +2209,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. + Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. ## Parameters @@ -2281,7 +2281,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. + Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database. ## Parameters @@ -2657,7 +2657,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:filter` (*type:* `String.t`) - An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time < \\"2018-03-28T14:50:00Z\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains "backup_howl". * The restored database's name contains "restored_howl". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. + * `:filter` (*type:* `String.t`) - An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time < \\"2018-03-28T14:50:00Z\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains "backup_howl". * The restored database's name contains "restored_howl". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `:pageSize` (*type:* `integer()`) - Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. * `:pageToken` (*type:* `String.t`) - If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseOperationsResponse to the same `parent` and with the same `filter`. * `opts` (*type:* `keyword()`) - Call options @@ -3071,7 +3071,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. + Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.getIamPolicy` permission on resource. ## Parameters @@ -3439,7 +3439,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. + Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. ## Parameters @@ -3511,7 +3511,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. + Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database. ## Parameters @@ -3869,7 +3869,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. + Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.getIamPolicy` permission on resource. ## Parameters @@ -4091,7 +4091,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. + Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. ## Parameters @@ -4163,7 +4163,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. + Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database. ## Parameters @@ -4309,7 +4309,7 @@ defmodule GoogleApi.Spanner.V1.Api.Projects do end @doc """ - Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. + Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the containing database. ## Parameters diff --git a/clients/spanner/lib/google_api/spanner/v1/metadata.ex b/clients/spanner/lib/google_api/spanner/v1/metadata.ex index 3f26e5c940..1e808008bd 100644 --- a/clients/spanner/lib/google_api/spanner/v1/metadata.ex +++ b/clients/spanner/lib/google_api/spanner/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Spanner.V1 do API client metadata for GoogleApi.Spanner.V1. """ - @discovery_revision "20241018" + @discovery_revision "20241020" def discovery_revision(), do: @discovery_revision end diff --git a/clients/spanner/lib/google_api/spanner/v1/model/backup.ex b/clients/spanner/lib/google_api/spanner/v1/model/backup.ex index 6f29286dc4..994fa72686 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/backup.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/backup.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.Spanner.V1.Model.Backup do * `database` (*type:* `String.t`, *default:* `nil`) - Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`. * `databaseDialect` (*type:* `String.t`, *default:* `nil`) - Output only. The database dialect information for the backup. * `encryptionInfo` (*type:* `GoogleApi.Spanner.V1.Model.EncryptionInfo.t`, *default:* `nil`) - Output only. The encryption information for the backup. - * `encryptionInformation` (*type:* `list(GoogleApi.Spanner.V1.Model.EncryptionInfo.t)`, *default:* `nil`) - Output only. The encryption information for the backup, whether it is protected by one or more KMS keys. The information includes all Cloud KMS key versions used to encrypt the backup. The `encryption_status' field inside of each `EncryptionInfo` is not populated. At least one of the key versions must be available for the backup to be restored. If a key version is revoked in the middle of a restore, the restore behavior is undefined. + * `encryptionInformation` (*type:* `list(GoogleApi.Spanner.V1.Model.EncryptionInfo.t)`, *default:* `nil`) - Output only. The encryption information for the backup, whether it is protected by one or more KMS keys. The information includes all Cloud KMS key versions used to encrypt the backup. The `encryption_status` field inside of each `EncryptionInfo` is not populated. At least one of the key versions must be available for the backup to be restored. If a key version is revoked in the middle of a restore, the restore behavior is undefined. * `exclusiveSizeBytes` (*type:* `String.t`, *default:* `nil`) - Output only. For a backup in an incremental backup chain, this is the storage space needed to keep the data that has changed since the previous backup. For all other backups, this is always the size of the backup. This value may change if backups on the same chain get deleted or expired. This field can be used to calculate the total storage space used by a set of backups. For example, the total space used by all backups of a database can be computed by summing up this field. * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup. * `freeableSizeBytes` (*type:* `String.t`, *default:* `nil`) - Output only. The number of bytes that will be freed by deleting this backup. This value will be zero if, for example, this backup is part of an incremental backup chain and younger backups in the chain require that we keep its data. For backups not in an incremental backup chain, this is always the size of the backup. This value may change if backups on the same chain get created, deleted or expired. diff --git a/clients/spanner/lib/google_api/spanner/v1/model/begin_transaction_request.ex b/clients/spanner/lib/google_api/spanner/v1/model/begin_transaction_request.ex index d2af941dd1..63218501c1 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/begin_transaction_request.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/begin_transaction_request.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Spanner.V1.Model.BeginTransactionRequest do ## Attributes + * `mutationKey` (*type:* `GoogleApi.Spanner.V1.Model.Mutation.t`, *default:* `nil`) - Optional. Required for read-write transactions on a multiplexed session that commit mutations but do not perform any reads or queries. Clients should randomly select one of the mutations from the mutation set and send it as a part of this request. * `options` (*type:* `GoogleApi.Spanner.V1.Model.TransactionOptions.t`, *default:* `nil`) - Required. Options for the new transaction. * `requestOptions` (*type:* `GoogleApi.Spanner.V1.Model.RequestOptions.t`, *default:* `nil`) - Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead. """ @@ -28,10 +29,12 @@ defmodule GoogleApi.Spanner.V1.Model.BeginTransactionRequest do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :mutationKey => GoogleApi.Spanner.V1.Model.Mutation.t() | nil, :options => GoogleApi.Spanner.V1.Model.TransactionOptions.t() | nil, :requestOptions => GoogleApi.Spanner.V1.Model.RequestOptions.t() | nil } + field(:mutationKey, as: GoogleApi.Spanner.V1.Model.Mutation) field(:options, as: GoogleApi.Spanner.V1.Model.TransactionOptions) field(:requestOptions, as: GoogleApi.Spanner.V1.Model.RequestOptions) end diff --git a/clients/spanner/lib/google_api/spanner/v1/model/commit_request.ex b/clients/spanner/lib/google_api/spanner/v1/model/commit_request.ex index be36929860..56ca22a1ef 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/commit_request.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/commit_request.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.Spanner.V1.Model.CommitRequest do * `maxCommitDelay` (*type:* `String.t`, *default:* `nil`) - Optional. The amount of latency this request is configured to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a commit delay value between 0 and 500 ms. * `mutations` (*type:* `list(GoogleApi.Spanner.V1.Model.Mutation.t)`, *default:* `nil`) - The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list. + * `precommitToken` (*type:* `GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t`, *default:* `nil`) - Optional. If the read-write transaction was executed on a multiplexed session, the precommit token with the highest sequence number received in this transaction attempt, should be included here. Failing to do so will result in a FailedPrecondition error. * `requestOptions` (*type:* `GoogleApi.Spanner.V1.Model.RequestOptions.t`, *default:* `nil`) - Common options for this request. * `returnCommitStats` (*type:* `boolean()`, *default:* `nil`) - If `true`, then statistics related to the transaction will be included in the CommitResponse. Default value is `false`. * `singleUseTransaction` (*type:* `GoogleApi.Spanner.V1.Model.TransactionOptions.t`, *default:* `nil`) - Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead. @@ -34,6 +35,8 @@ defmodule GoogleApi.Spanner.V1.Model.CommitRequest do @type t :: %__MODULE__{ :maxCommitDelay => String.t() | nil, :mutations => list(GoogleApi.Spanner.V1.Model.Mutation.t()) | nil, + :precommitToken => + GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t() | nil, :requestOptions => GoogleApi.Spanner.V1.Model.RequestOptions.t() | nil, :returnCommitStats => boolean() | nil, :singleUseTransaction => GoogleApi.Spanner.V1.Model.TransactionOptions.t() | nil, @@ -42,6 +45,7 @@ defmodule GoogleApi.Spanner.V1.Model.CommitRequest do field(:maxCommitDelay) field(:mutations, as: GoogleApi.Spanner.V1.Model.Mutation, type: :list) + field(:precommitToken, as: GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken) field(:requestOptions, as: GoogleApi.Spanner.V1.Model.RequestOptions) field(:returnCommitStats) field(:singleUseTransaction, as: GoogleApi.Spanner.V1.Model.TransactionOptions) diff --git a/clients/spanner/lib/google_api/spanner/v1/model/commit_response.ex b/clients/spanner/lib/google_api/spanner/v1/model/commit_response.ex index 29fb146bb2..b058a3e185 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/commit_response.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/commit_response.ex @@ -23,17 +23,20 @@ defmodule GoogleApi.Spanner.V1.Model.CommitResponse do * `commitStats` (*type:* `GoogleApi.Spanner.V1.Model.CommitStats.t`, *default:* `nil`) - The statistics about this Commit. Not returned by default. For more information, see CommitRequest.return_commit_stats. * `commitTimestamp` (*type:* `DateTime.t`, *default:* `nil`) - The Cloud Spanner timestamp at which the transaction committed. + * `precommitToken` (*type:* `GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t`, *default:* `nil`) - If specified, transaction has not committed yet. Clients must retry the commit with the new precommit token. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :commitStats => GoogleApi.Spanner.V1.Model.CommitStats.t() | nil, - :commitTimestamp => DateTime.t() | nil + :commitTimestamp => DateTime.t() | nil, + :precommitToken => GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t() | nil } field(:commitStats, as: GoogleApi.Spanner.V1.Model.CommitStats) field(:commitTimestamp, as: DateTime) + field(:precommitToken, as: GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken) end defimpl Poison.Decoder, for: GoogleApi.Spanner.V1.Model.CommitResponse do diff --git a/clients/spanner/lib/google_api/spanner/v1/model/copy_backup_encryption_config.ex b/clients/spanner/lib/google_api/spanner/v1/model/copy_backup_encryption_config.ex index 40b1544363..f5a63546ee 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/copy_backup_encryption_config.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/copy_backup_encryption_config.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Spanner.V1.Model.CopyBackupEncryptionConfig do * `encryptionType` (*type:* `String.t`, *default:* `nil`) - Required. The encryption type of the backup. * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`. - * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. Kms keys specified can be in any order. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs. + * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. KMS keys specified can be in any order. The keys referenced by `kms_key_names` must fully cover all regions of the backup's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. """ use GoogleApi.Gax.ModelBase diff --git a/clients/spanner/lib/google_api/spanner/v1/model/create_backup_encryption_config.ex b/clients/spanner/lib/google_api/spanner/v1/model/create_backup_encryption_config.ex index 3928f47ab0..d49adf3358 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/create_backup_encryption_config.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/create_backup_encryption_config.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Spanner.V1.Model.CreateBackupEncryptionConfig do * `encryptionType` (*type:* `String.t`, *default:* `nil`) - Required. The encryption type of the backup. * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`. - * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs. + * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the backup's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. """ use GoogleApi.Gax.ModelBase diff --git a/clients/spanner/lib/google_api/spanner/v1/model/database.ex b/clients/spanner/lib/google_api/spanner/v1/model/database.ex index 8d5e223da8..be831c20f4 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/database.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/database.ex @@ -27,7 +27,7 @@ defmodule GoogleApi.Spanner.V1.Model.Database do * `earliestVersionTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. * `enableDropProtection` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion). * `encryptionConfig` (*type:* `GoogleApi.Spanner.V1.Model.EncryptionConfig.t`, *default:* `nil`) - Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty. - * `encryptionInfo` (*type:* `list(GoogleApi.Spanner.V1.Model.EncryptionInfo.t)`, *default:* `nil`) - Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status' field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field. + * `encryptionInfo` (*type:* `list(GoogleApi.Spanner.V1.Model.EncryptionInfo.t)`, *default:* `nil`) - Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status` field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field. * `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. * `quorumInfo` (*type:* `GoogleApi.Spanner.V1.Model.QuorumInfo.t`, *default:* `nil`) - Output only. Applicable only for databases that use dual-region instance configurations. Contains information about the quorum. * `reconciling` (*type:* `boolean()`, *default:* `nil`) - Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database. diff --git a/clients/spanner/lib/google_api/spanner/v1/model/encryption_config.ex b/clients/spanner/lib/google_api/spanner/v1/model/encryption_config.ex index b067afc018..83a68f477e 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/encryption_config.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/encryption_config.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.Spanner.V1.Model.EncryptionConfig do ## Attributes * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. - * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples: * For single region database instance configs, specify a single regional location KMS key. * For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs. + * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the KMS configuration for one or more keys used to encrypt the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. """ use GoogleApi.Gax.ModelBase diff --git a/clients/spanner/lib/google_api/spanner/v1/model/execute_batch_dml_response.ex b/clients/spanner/lib/google_api/spanner/v1/model/execute_batch_dml_response.ex index d8d6e3f02a..b8e02a1209 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/execute_batch_dml_response.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/execute_batch_dml_response.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Spanner.V1.Model.ExecuteBatchDmlResponse do ## Attributes + * `precommitToken` (*type:* `GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t`, *default:* `nil`) - Optional. A precommit token will be included if the read-write transaction is on a multiplexed session. The precommit token with the highest sequence number from this transaction attempt should be passed to the Commit request for this transaction. * `resultSets` (*type:* `list(GoogleApi.Spanner.V1.Model.ResultSet.t)`, *default:* `nil`) - One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each ResultSet contain the number of rows modified by the statement. Only the first ResultSet in the response contains valid ResultSetMetadata. * `status` (*type:* `GoogleApi.Spanner.V1.Model.Status.t`, *default:* `nil`) - If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement. """ @@ -28,10 +29,13 @@ defmodule GoogleApi.Spanner.V1.Model.ExecuteBatchDmlResponse do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :precommitToken => + GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t() | nil, :resultSets => list(GoogleApi.Spanner.V1.Model.ResultSet.t()) | nil, :status => GoogleApi.Spanner.V1.Model.Status.t() | nil } + field(:precommitToken, as: GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken) field(:resultSets, as: GoogleApi.Spanner.V1.Model.ResultSet, type: :list) field(:status, as: GoogleApi.Spanner.V1.Model.Status) end diff --git a/clients/spanner/lib/google_api/spanner/v1/model/instance.ex b/clients/spanner/lib/google_api/spanner/v1/model/instance.ex index 9383a1be4a..cddd136876 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/instance.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/instance.ex @@ -24,6 +24,7 @@ defmodule GoogleApi.Spanner.V1.Model.Instance do * `autoscalingConfig` (*type:* `GoogleApi.Spanner.V1.Model.AutoscalingConfig.t`, *default:* `nil`) - Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance. * `config` (*type:* `String.t`, *default:* `nil`) - Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which the instance was created. + * `defaultBackupScheduleType` (*type:* `String.t`, *default:* `nil`) - Optional. Controls the default backup behavior for new databases within the instance. Note that `AUTOMATIC` is not permitted for free instances, as backups and backup schedules are not allowed for free instances. In the `GetInstance` or `ListInstances` response, if the value of default_backup_schedule_type is unset or NONE, no default backup schedule will be created for new databases within the instance. * `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. * `edition` (*type:* `String.t`, *default:* `nil`) - Optional. The `Edition` of the current instance. * `endpointUris` (*type:* `list(String.t)`, *default:* `nil`) - Deprecated. This field is not populated. @@ -31,8 +32,8 @@ defmodule GoogleApi.Spanner.V1.Model.Instance do * `instanceType` (*type:* `String.t`, *default:* `nil`) - The `InstanceType` of the current instance. * `labels` (*type:* `map()`, *default:* `nil`) - Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64 labels can be associated with a given resource. See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + "_" + value would prove problematic if we were to allow "_" in a future release. * `name` (*type:* `String.t`, *default:* `nil`) - Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. - * `nodeCount` (*type:* `integer()`, *default:* `nil`) - The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying node count across replicas (achieved by setting asymmetric_autoscaling_options in autoscaling config), the node_count here is the maximum node count across all replicas. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity). - * `processingUnits` (*type:* `integer()`, *default:* `nil`) - The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. If the instance has varying processing units per replica (achieved by setting asymmetric_autoscaling_options in autoscaling config), the processing_units here is the maximum processing units across all replicas. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity). + * `nodeCount` (*type:* `integer()`, *default:* `nil`) - The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity). + * `processingUnits` (*type:* `integer()`, *default:* `nil`) - The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity). * `replicaComputeCapacity` (*type:* `list(GoogleApi.Spanner.V1.Model.ReplicaComputeCapacity.t)`, *default:* `nil`) - Output only. Lists the compute capacity per ReplicaSelection. A replica selection identifies a set of replicas with common properties. Replicas identified by a ReplicaSelection are scaled with the same compute capacity. * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which the instance was most recently updated. @@ -44,6 +45,7 @@ defmodule GoogleApi.Spanner.V1.Model.Instance do :autoscalingConfig => GoogleApi.Spanner.V1.Model.AutoscalingConfig.t() | nil, :config => String.t() | nil, :createTime => DateTime.t() | nil, + :defaultBackupScheduleType => String.t() | nil, :displayName => String.t() | nil, :edition => String.t() | nil, :endpointUris => list(String.t()) | nil, @@ -62,6 +64,7 @@ defmodule GoogleApi.Spanner.V1.Model.Instance do field(:autoscalingConfig, as: GoogleApi.Spanner.V1.Model.AutoscalingConfig) field(:config) field(:createTime, as: DateTime) + field(:defaultBackupScheduleType) field(:displayName) field(:edition) field(:endpointUris, type: :list) diff --git a/clients/spanner/lib/google_api/spanner/v1/model/partial_result_set.ex b/clients/spanner/lib/google_api/spanner/v1/model/partial_result_set.ex index b3b9c1f4e8..5ea66d3404 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/partial_result_set.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/partial_result_set.ex @@ -23,6 +23,7 @@ defmodule GoogleApi.Spanner.V1.Model.PartialResultSet do * `chunkedValue` (*type:* `boolean()`, *default:* `nil`) - If true, then the final value in values is chunked, and must be combined with more values from subsequent `PartialResultSet`s to obtain a complete field value. * `metadata` (*type:* `GoogleApi.Spanner.V1.Model.ResultSetMetadata.t`, *default:* `nil`) - Metadata about the result set, such as row type information. Only present in the first response. + * `precommitToken` (*type:* `GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t`, *default:* `nil`) - Optional. A precommit token will be included if the read-write transaction is on a multiplexed session. The precommit token with the highest sequence number from this transaction attempt should be passed to the Commit request for this transaction. * `resumeToken` (*type:* `String.t`, *default:* `nil`) - Streaming calls might be interrupted for a variety of reasons, such as TCP connection loss. If this occurs, the stream of results can be resumed by re-sending the original request and including `resume_token`. Note that executing any other transaction in the same session invalidates the token. * `stats` (*type:* `GoogleApi.Spanner.V1.Model.ResultSetStats.t`, *default:* `nil`) - Query plan and execution statistics for the statement that produced this streaming result set. These can be requested by setting ExecuteSqlRequest.query_mode and are sent only once with the last response in the stream. This field will also be present in the last response for DML statements. * `values` (*type:* `list(any())`, *default:* `nil`) - A streamed result set consists of a stream of values, which might be split into many `PartialResultSet` messages to accommodate large rows and/or large values. Every N complete values defines a row, where N is equal to the number of entries in metadata.row_type.fields. Most values are encoded based on type as described here. It is possible that the last value in values is "chunked", meaning that the rest of the value is sent in subsequent `PartialResultSet`(s). This is denoted by the chunked_value field. Two or more chunked values can be merged to form a complete value as follows: * `bool/number/null`: cannot be chunked * `string`: concatenate the strings * `list`: concatenate the lists. If the last element in a list is a `string`, `list`, or `object`, merge it with the first element in the next list by applying these rules recursively. * `object`: concatenate the (field name, field value) pairs. If a field name is duplicated, then apply these rules recursively to merge the field values. Some examples of merging: # Strings are concatenated. "foo", "bar" => "foobar" # Lists of non-strings are concatenated. [2, 3], [4] => [2, 3, 4] # Lists are concatenated, but the last and first elements are merged # because they are strings. ["a", "b"], ["c", "d"] => ["a", "bc", "d"] # Lists are concatenated, but the last and first elements are merged # because they are lists. Recursively, the last and first elements # of the inner lists are merged because they are strings. ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] # Non-overlapping object fields are combined. {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} # Overlapping object fields are merged. {"a": "1"}, {"a": "2"} => {"a": "12"} # Examples of merging objects containing lists of strings. {"a": ["1"]}, {"a": ["2"]} => {"a": ["12"]} For a more complete example, suppose a streaming SQL query is yielding a result set whose rows contain a single string field. The following `PartialResultSet`s might be yielded: { "metadata": { ... } "values": ["Hello", "W"] "chunked_value": true "resume_token": "Af65..." } { "values": ["orl"] "chunked_value": true } { "values": ["d"] "resume_token": "Zx1B..." } This sequence of `PartialResultSet`s encodes two rows, one containing the field value `"Hello"`, and a second containing the field value `"World" = "W" + "orl" + "d"`. Not all `PartialResultSet`s contain a `resume_token`. Execution can only be resumed from a previously yielded `resume_token`. For the above sequence of `PartialResultSet`s, resuming the query with `"resume_token": "Af65..."` will yield results from the `PartialResultSet` with value `["orl"]`. @@ -33,6 +34,8 @@ defmodule GoogleApi.Spanner.V1.Model.PartialResultSet do @type t :: %__MODULE__{ :chunkedValue => boolean() | nil, :metadata => GoogleApi.Spanner.V1.Model.ResultSetMetadata.t() | nil, + :precommitToken => + GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t() | nil, :resumeToken => String.t() | nil, :stats => GoogleApi.Spanner.V1.Model.ResultSetStats.t() | nil, :values => list(any()) | nil @@ -40,6 +43,7 @@ defmodule GoogleApi.Spanner.V1.Model.PartialResultSet do field(:chunkedValue) field(:metadata, as: GoogleApi.Spanner.V1.Model.ResultSetMetadata) + field(:precommitToken, as: GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken) field(:resumeToken) field(:stats, as: GoogleApi.Spanner.V1.Model.ResultSetStats) field(:values, type: :list) diff --git a/clients/spanner/lib/google_api/spanner/v1/model/read_write.ex b/clients/spanner/lib/google_api/spanner/v1/model/read_write.ex index bd9f0008d2..d51f0344cd 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/read_write.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/read_write.ex @@ -21,15 +21,18 @@ defmodule GoogleApi.Spanner.V1.Model.ReadWrite do ## Attributes + * `multiplexedSessionPreviousTransactionId` (*type:* `String.t`, *default:* `nil`) - Optional. Clients should pass the transaction ID of the previous transaction attempt that was aborted if this transaction is being executed on a multiplexed session. * `readLockMode` (*type:* `String.t`, *default:* `nil`) - Read lock mode for the transaction. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :multiplexedSessionPreviousTransactionId => String.t() | nil, :readLockMode => String.t() | nil } + field(:multiplexedSessionPreviousTransactionId) field(:readLockMode) end diff --git a/clients/spanner/lib/google_api/spanner/v1/model/restore_database_encryption_config.ex b/clients/spanner/lib/google_api/spanner/v1/model/restore_database_encryption_config.ex index 49b42dc254..3ea4a7a934 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/restore_database_encryption_config.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/restore_database_encryption_config.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.Spanner.V1.Model.RestoreDatabaseEncryptionConfig do * `encryptionType` (*type:* `String.t`, *default:* `nil`) - Required. The encryption type of the restored database. * `kmsKeyName` (*type:* `String.t`, *default:* `nil`) - Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored database. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`. - * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for the one or more keys used to encrypt the database. Values have the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples: * For single region database instance configurations, specify a single regional location KMS key. * For multi-regional database instance configurations of type `GOOGLE_MANAGED`, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For a database instance configuration of type `USER_MANAGED`, please specify only regional location KMS keys to cover each region in the instance configuration. Multi-regional location KMS keys are not supported for USER_MANAGED instance configurations. + * `kmsKeyNames` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Specifies the KMS configuration for one or more keys used to encrypt the database. Values have the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by `kms_key_names` must fully cover all regions of the database's instance configuration. Some examples: * For regional (single-region) instance configurations, specify a regional location KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a multi-region location KMS key or multiple regional location KMS keys that cover all regions in the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify only regional location KMS keys to cover each region in the instance configuration. Multi-region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. """ use GoogleApi.Gax.ModelBase diff --git a/clients/spanner/lib/google_api/spanner/v1/model/result_set.ex b/clients/spanner/lib/google_api/spanner/v1/model/result_set.ex index 7d9c381ff9..c20d0086e7 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/result_set.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/result_set.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.Spanner.V1.Model.ResultSet do ## Attributes * `metadata` (*type:* `GoogleApi.Spanner.V1.Model.ResultSetMetadata.t`, *default:* `nil`) - Metadata about the result set, such as row type information. + * `precommitToken` (*type:* `GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t`, *default:* `nil`) - Optional. A precommit token will be included if the read-write transaction is on a multiplexed session. The precommit token with the highest sequence number from this transaction attempt should be passed to the Commit request for this transaction. * `rows` (*type:* `list(list(any()))`, *default:* `nil`) - Each element in `rows` is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here. * `stats` (*type:* `GoogleApi.Spanner.V1.Model.ResultSetStats.t`, *default:* `nil`) - Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode. """ @@ -30,11 +31,14 @@ defmodule GoogleApi.Spanner.V1.Model.ResultSet do @type t :: %__MODULE__{ :metadata => GoogleApi.Spanner.V1.Model.ResultSetMetadata.t() | nil, + :precommitToken => + GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken.t() | nil, :rows => list(list(any())) | nil, :stats => GoogleApi.Spanner.V1.Model.ResultSetStats.t() | nil } field(:metadata, as: GoogleApi.Spanner.V1.Model.ResultSetMetadata) + field(:precommitToken, as: GoogleApi.Spanner.V1.Model.MultiplexedSessionPrecommitToken) field(:rows, type: :listlist) field(:stats, as: GoogleApi.Spanner.V1.Model.ResultSetStats) end diff --git a/clients/spanner/lib/google_api/spanner/v1/model/update_database_ddl_request.ex b/clients/spanner/lib/google_api/spanner/v1/model/update_database_ddl_request.ex index ec7fcc4407..4f89c6791f 100644 --- a/clients/spanner/lib/google_api/spanner/v1/model/update_database_ddl_request.ex +++ b/clients/spanner/lib/google_api/spanner/v1/model/update_database_ddl_request.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.Spanner.V1.Model.UpdateDatabaseDdlRequest do ## Attributes - * `operationId` (*type:* `String.t`, *default:* `nil`) - If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting Operation. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and `operation_id` fields can be combined to form the name of the resulting longrunning.Operation: `/operations/`. `operation_id` should be unique within the database, and must be a valid identifier: `a-z*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns `ALREADY_EXISTS`. + * `operationId` (*type:* `String.t`, *default:* `nil`) - If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting Operation. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and `operation_id` fields can be combined to form the `name` of the resulting longrunning.Operation: `/operations/`. `operation_id` should be unique within the database, and must be a valid identifier: `a-z*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns `ALREADY_EXISTS`. * `protoDescriptors` (*type:* `String.t`, *default:* `nil`) - Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \\ --include_imports \\ --descriptor_set_out=descriptors.data \\ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description). * `statements` (*type:* `list(String.t)`, *default:* `nil`) - Required. DDL statements to be applied to the database. """ diff --git a/clients/spanner/mix.exs b/clients/spanner/mix.exs index 6f2b1c718c..5ea594ef92 100644 --- a/clients/spanner/mix.exs +++ b/clients/spanner/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Spanner.Mixfile do use Mix.Project - @version "0.46.0" + @version "0.47.0" def project() do [