Skip to content

Commit

Permalink
feat: Automated regeneration of Spanner client (#12433)
Browse files Browse the repository at this point in the history
Auto-created at 2024-10-30 13:12:42 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Oct 30, 2024
1 parent bcff158 commit b35ca1e
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 25 deletions.
2 changes: 1 addition & 1 deletion clients/spanner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
24 changes: 12 additions & 12 deletions clients/spanner/lib/google_api/spanner/v1/api/projects.ex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/spanner/lib/google_api/spanner/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion clients/spanner/lib/google_api/spanner/v1/model/backup.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@ 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.
"""

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit b35ca1e

Please sign in to comment.