Skip to content

Commit c4b0e27

Browse files
feat: Automated regeneration of spanner v1 client (#24511)
Auto-created at 2025-10-05 10:15:03 +0000 using the toys pull request generator.
1 parent a996e7d commit c4b0e27

File tree

6 files changed

+105
-58
lines changed

6 files changed

+105
-58
lines changed

api_names_out.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356108,6 +356108,7 @@
356108356108
"/spanner:v1/AdaptMessageRequest/payload": payload
356109356109
"/spanner:v1/AdaptMessageRequest/protocol": protocol
356110356110
"/spanner:v1/AdaptMessageResponse": adapt_message_response
356111+
"/spanner:v1/AdaptMessageResponse/last": last
356111356112
"/spanner:v1/AdaptMessageResponse/payload": payload
356112356113
"/spanner:v1/AdaptMessageResponse/stateUpdates": state_updates
356113356114
"/spanner:v1/AdaptMessageResponse/stateUpdates/state_update": state_update
@@ -356256,6 +356257,7 @@
356256356257
"/spanner:v1/CommitResponse/commitStats": commit_stats
356257356258
"/spanner:v1/CommitResponse/commitTimestamp": commit_timestamp
356258356259
"/spanner:v1/CommitResponse/precommitToken": precommit_token
356260+
"/spanner:v1/CommitResponse/snapshotTimestamp": snapshot_timestamp
356259356261
"/spanner:v1/CommitStats": commit_stats
356260356262
"/spanner:v1/CommitStats/mutationCount": mutation_count
356261356263
"/spanner:v1/Condition": condition

generated/google-apis-spanner_v1/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-spanner_v1
22

3+
### v0.45.0 (2025-10-05)
4+
5+
* Regenerated from discovery document revision 20250920
6+
37
### v0.44.0 (2025-07-20)
48

59
* Regenerated from discovery document revision 20250708

generated/google-apis-spanner_v1/lib/google/apis/spanner_v1/classes.rb

Lines changed: 76 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ def update!(**args)
5858
class AdaptMessageResponse
5959
include Google::Apis::Core::Hashable
6060

61+
# Optional. Indicates whether this is the last AdaptMessageResponse in the
62+
# stream. This field may be optionally set by the server. Clients should not
63+
# rely on this field being set in all cases.
64+
# Corresponds to the JSON property `last`
65+
# @return [Boolean]
66+
attr_accessor :last
67+
alias_method :last?, :last
68+
6169
# Optional. Uninterpreted bytes from the underlying wire protocol.
6270
# Corresponds to the JSON property `payload`
6371
# NOTE: Values are automatically base64 encoded/decoded in the client library.
@@ -75,6 +83,7 @@ def initialize(**args)
7583

7684
# Update properties of this object
7785
def update!(**args)
86+
@last = args[:last] if args.key?(:last)
7887
@payload = args[:payload] if args.key?(:payload)
7988
@state_updates = args[:state_updates] if args.key?(:state_updates)
8089
end
@@ -408,9 +417,9 @@ class Backup
408417
# @return [String]
409418
attr_accessor :incremental_backup_chain_id
410419

411-
# Output only. The instance partition(s) storing the backup. This is the same as
412-
# the list of the instance partition(s) that the database had footprint in at
413-
# the backup's `version_time`.
420+
# Output only. The instance partition storing the backup. This is the same as
421+
# the list of the instance partitions that the database recorded at the backup's
422+
# `version_time`.
414423
# Corresponds to the JSON property `instancePartitions`
415424
# @return [Array<Google::Apis::SpannerV1::BackupInstancePartition>]
416425
attr_accessor :instance_partitions
@@ -1220,6 +1229,13 @@ class CommitResponse
12201229
# @return [Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken]
12211230
attr_accessor :precommit_token
12221231

1232+
# If `TransactionOptions.isolation_level` is set to `IsolationLevel.
1233+
# REPEATABLE_READ`, then the snapshot timestamp is the timestamp at which all
1234+
# reads in the transaction ran. This timestamp is never returned.
1235+
# Corresponds to the JSON property `snapshotTimestamp`
1236+
# @return [String]
1237+
attr_accessor :snapshot_timestamp
1238+
12231239
def initialize(**args)
12241240
update!(**args)
12251241
end
@@ -1229,6 +1245,7 @@ def update!(**args)
12291245
@commit_stats = args[:commit_stats] if args.key?(:commit_stats)
12301246
@commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
12311247
@precommit_token = args[:precommit_token] if args.key?(:precommit_token)
1248+
@snapshot_timestamp = args[:snapshot_timestamp] if args.key?(:snapshot_timestamp)
12321249
end
12331250
end
12341251

@@ -1306,9 +1323,15 @@ class CopyBackupEncryptionConfig
13061323
# @return [String]
13071324
attr_accessor :encryption_type
13081325

1309-
# Optional. The Cloud KMS key that will be used to protect the backup. This
1310-
# field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
1311-
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1326+
# Optional. This field is maintained for backwards compatibility. For new
1327+
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
1328+
# kms_key_name` if the location of the KMS key matches the database instance's
1329+
# configuration (location) exactly. For example, if the KMS location is in `us-
1330+
# central1` or `nam3`, then the database instance must also be in `us-central1`
1331+
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
1332+
# database. Set this field only when encryption_type is `
1333+
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
1334+
# keyRings//cryptoKeys/`.
13121335
# Corresponds to the JSON property `kmsKeyName`
13131336
# @return [String]
13141337
attr_accessor :kms_key_name
@@ -1442,9 +1465,15 @@ class CreateBackupEncryptionConfig
14421465
# @return [String]
14431466
attr_accessor :encryption_type
14441467

1445-
# Optional. The Cloud KMS key that will be used to protect the backup. This
1446-
# field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
1447-
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1468+
# Optional. This field is maintained for backwards compatibility. For new
1469+
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
1470+
# kms_key_name` if the location of the KMS key matches the database instance's
1471+
# configuration (location) exactly. For example, if the KMS location is in `us-
1472+
# central1` or `nam3`, then the database instance must also be in `us-central1`
1473+
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
1474+
# database. Set this field only when encryption_type is `
1475+
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
1476+
# keyRings//cryptoKeys/`.
14481477
# Corresponds to the JSON property `kmsKeyName`
14491478
# @return [String]
14501479
attr_accessor :kms_key_name
@@ -2164,23 +2193,23 @@ def update!(**args)
21642193
class DdlStatementActionInfo
21652194
include Google::Apis::Core::Hashable
21662195

2167-
# The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This
2168-
# field is a non-empty string.
2196+
# The action for the DDL statement, for example, CREATE, ALTER, DROP, GRANT, etc.
2197+
# This field is a non-empty string.
21692198
# Corresponds to the JSON property `action`
21702199
# @return [String]
21712200
attr_accessor :action
21722201

2173-
# The entity name(s) being operated on the DDL statement. E.g. 1. For statement "
2174-
# CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE
2175-
# r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "ANALYZE", `
2176-
# entity_names` = [].
2202+
# The entity names being operated on the DDL statement. For example, 1. For
2203+
# statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "
2204+
# GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "
2205+
# ANALYZE", `entity_names` = [].
21772206
# Corresponds to the JSON property `entityNames`
21782207
# @return [Array<String>]
21792208
attr_accessor :entity_names
21802209

2181-
# The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This
2182-
# field can be empty string for some DDL statement, e.g. for statement "ANALYZE",
2183-
# `entity_type` = "".
2210+
# The entity type for the DDL statement, for example, TABLE, INDEX, VIEW, etc.
2211+
# This field can be empty string for some DDL statement, for example, for
2212+
# statement "ANALYZE", `entity_type` = "".
21842213
# Corresponds to the JSON property `entityType`
21852214
# @return [String]
21862215
attr_accessor :entity_type
@@ -3366,12 +3395,12 @@ class InstanceEncryptionConfig
33663395
include Google::Apis::Core::Hashable
33673396

33683397
# Optional. This field is maintained for backwards compatibility. For new
3369-
# callers, we recommend using `kms_key_names` to specify the KMS key. `
3370-
# kms_key_name` should only be used if the location of the KMS key matches the
3371-
# database instance’s configuration (location) exactly. E.g. The KMS location is
3372-
# in us-central1 or nam3 and the database instance is also in us-central1 or
3373-
# nam3. The Cloud KMS key to be used for encrypting and decrypting the database.
3374-
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
3398+
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
3399+
# kms_key_name` if the location of the KMS key matches the database instance's
3400+
# configuration (location) exactly. For example, if the KMS location is in `us-
3401+
# central1` or `nam3`, then the database instance must also be in `us-central1`
3402+
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
3403+
# database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
33753404
# Corresponds to the JSON property `kmsKeyName`
33763405
# @return [String]
33773406
attr_accessor :kms_key_name
@@ -3545,7 +3574,7 @@ def update!(**args)
35453574
class InstanceReplicaSelection
35463575
include Google::Apis::Core::Hashable
35473576

3548-
# Required. Name of the location of the replicas (e.g., "us-central1").
3577+
# Required. Name of the location of the replicas (for example, "us-central1").
35493578
# Corresponds to the JSON property `location`
35503579
# @return [String]
35513580
attr_accessor :location
@@ -5956,8 +5985,13 @@ class RestoreDatabaseEncryptionConfig
59565985
# @return [String]
59575986
attr_accessor :encryption_type
59585987

5959-
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
5960-
# database. This field should be set only when encryption_type is `
5988+
# Optional. This field is maintained for backwards compatibility. For new
5989+
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
5990+
# kms_key_name` if the location of the KMS key matches the database instance's
5991+
# configuration (location) exactly. For example, if the KMS location is in `us-
5992+
# central1` or `nam3`, then the database instance must also be in `us-central1`
5993+
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
5994+
# database. Set this field only when encryption_type is `
59615995
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
59625996
# keyRings//cryptoKeys/`.
59635997
# Corresponds to the JSON property `kmsKeyName`
@@ -6467,11 +6501,11 @@ def update!(**args)
64676501
class SingleRegionQuorum
64686502
include Google::Apis::Core::Hashable
64696503

6470-
# Required. The location of the serving region, e.g. "us-central1". The location
6471-
# must be one of the regions within the dual-region instance configuration of
6472-
# your database. The list of valid locations is available using the
6473-
# GetInstanceConfig API. This should only be used if you plan to change quorum
6474-
# to the single-region quorum type.
6504+
# Required. The location of the serving region, for example, "us-central1". The
6505+
# location must be one of the regions within the dual-region instance
6506+
# configuration of your database. The list of valid locations is available using
6507+
# the GetInstanceConfig API. This should only be used if you plan to change
6508+
# quorum to the single-region quorum type.
64756509
# Corresponds to the JSON property `servingLocation`
64766510
# @return [String]
64776511
attr_accessor :serving_location
@@ -6884,9 +6918,9 @@ class UpdateDatabaseDdlMetadata
68846918
# @return [Array<String>]
68856919
attr_accessor :statements
68866920

6887-
# Output only. When true, indicates that the operation is throttled e.g. due to
6888-
# resource constraints. When resources become available the operation will
6889-
# resume and this field will be false again.
6921+
# Output only. When true, indicates that the operation is throttled, for example,
6922+
# due to resource constraints. When resources become available the operation
6923+
# will resume and this field will be false again.
68906924
# Corresponds to the JSON property `throttled`
68916925
# @return [Boolean]
68926926
attr_accessor :throttled
@@ -6911,13 +6945,13 @@ def update!(**args)
69116945
# all at once, to the database schema at some point (or points) in the future.
69126946
# The server checks that the statements are executable (syntactically valid,
69136947
# name tables that exist, etc.) before enqueueing them, but they may still fail
6914-
# upon later execution (e.g., if a statement from another batch of statements is
6915-
# applied first and it conflicts in some way, or if there is some data-related
6916-
# problem like a `NULL` value in a column to which `NOT NULL` would be added).
6917-
# If a statement fails, all subsequent statements in the batch are automatically
6918-
# cancelled. Each batch of statements is assigned a name which can be used with
6919-
# the Operations API to monitor progress. See the operation_id field for more
6920-
# details.
6948+
# upon later execution (for example, if a statement from another batch of
6949+
# statements is applied first and it conflicts in some way, or if there is some
6950+
# data-related problem like a `NULL` value in a column to which `NOT NULL` would
6951+
# be added). If a statement fails, all subsequent statements in the batch are
6952+
# automatically cancelled. Each batch of statements is assigned a name which can
6953+
# be used with the Operations API to monitor progress. See the operation_id
6954+
# field for more details.
69216955
class UpdateDatabaseDdlRequest
69226956
include Google::Apis::Core::Hashable
69236957

generated/google-apis-spanner_v1/lib/google/apis/spanner_v1/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module SpannerV1
1818
# Version of the google-apis-spanner_v1 gem
19-
GEM_VERSION = "0.44.0"
19+
GEM_VERSION = "0.45.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.18.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250708"
25+
REVISION = "20250920"
2626
end
2727
end
2828
end

generated/google-apis-spanner_v1/lib/google/apis/spanner_v1/representations.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
10901090
class AdaptMessageResponse
10911091
# @private
10921092
class Representation < Google::Apis::Core::JsonRepresentation
1093+
property :last, as: 'last'
10931094
property :payload, :base64 => true, as: 'payload'
10941095
hash :state_updates, as: 'stateUpdates'
10951096
end
@@ -1377,6 +1378,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
13771378
property :commit_timestamp, as: 'commitTimestamp'
13781379
property :precommit_token, as: 'precommitToken', class: Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken, decorator: Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken::Representation
13791380

1381+
property :snapshot_timestamp, as: 'snapshotTimestamp'
13801382
end
13811383
end
13821384

generated/google-apis-spanner_v1/lib/google/apis/spanner_v1/service.rb

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,21 +1169,26 @@ def copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_use
11691169
# delete the backup. There can be only one pending backup creation per database.
11701170
# Backup creation of different databases can run concurrently.
11711171
# @param [String] parent
1172-
# Required. The name of the instance in which the backup will be created. This
1173-
# must be the same instance that contains the database the backup will be
1174-
# created from. The backup will be stored in the location(s) specified in the
1175-
# instance configuration of this instance. Values are of the form `projects//
1176-
# instances/`.
1172+
# Required. The name of the instance in which the backup is created. This must
1173+
# be the same instance that contains the database the backup is created from.
1174+
# The backup will be stored in the locations specified in the instance
1175+
# configuration of this instance. Values are of the form `projects//instances/`.
11771176
# @param [Google::Apis::SpannerV1::Backup] backup_object
11781177
# @param [String] backup_id
11791178
# Required. The id of the backup to be created. The `backup_id` appended to `
11801179
# parent` forms the full backup name of the form `projects//instances//backups/`.
11811180
# @param [String] encryption_config_encryption_type
11821181
# Required. The encryption type of the backup.
11831182
# @param [String] encryption_config_kms_key_name
1184-
# Optional. The Cloud KMS key that will be used to protect the backup. This
1185-
# field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`.
1186-
# Values are of the form `projects//locations//keyRings//cryptoKeys/`.
1183+
# Optional. This field is maintained for backwards compatibility. For new
1184+
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
1185+
# kms_key_name` if the location of the KMS key matches the database instance's
1186+
# configuration (location) exactly. For example, if the KMS location is in `us-
1187+
# central1` or `nam3`, then the database instance must also be in `us-central1`
1188+
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
1189+
# database. Set this field only when encryption_type is `
1190+
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
1191+
# keyRings//cryptoKeys/`.
11871192
# @param [Array<String>, String] encryption_config_kms_key_names
11881193
# Optional. Specifies the KMS configuration for the one or more keys used to
11891194
# protect the backup. Values are of the form `projects//locations//keyRings//
@@ -1406,11 +1411,11 @@ def list_project_instance_backups(parent, filter: nil, page_size: nil, page_toke
14061411
# the form `projects//instances/`.
14071412
# @param [Google::Apis::SpannerV1::Backup] backup_object
14081413
# @param [String] update_mask
1409-
# Required. A mask specifying which fields (e.g. `expire_time`) in the Backup
1410-
# resource should be updated. This mask is relative to the Backup resource, not
1411-
# to the request message. The field mask must always be specified; this prevents
1412-
# any future fields from being erased accidentally by clients that do not know
1413-
# about them.
1414+
# Required. A mask specifying which fields (for example, `expire_time`) in the
1415+
# backup resource should be updated. This mask is relative to the backup
1416+
# resource, not to the request message. The field mask must always be specified;
1417+
# this prevents any future fields from being erased accidentally by clients that
1418+
# do not know about them.
14141419
# @param [String] fields
14151420
# Selector specifying which fields to include in a partial response.
14161421
# @param [String] quota_user
@@ -2252,7 +2257,7 @@ def test_database_iam_permissions(resource, test_iam_permissions_request_object
22522257
# Updates the schema of a Cloud Spanner database by creating/altering/dropping
22532258
# tables, columns, indexes, etc. The returned long-running operation will have a
22542259
# name of the format `/operations/` and can be used to track execution of the
2255-
# schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The
2260+
# schema changes. The metadata field type is UpdateDatabaseDdlMetadata. The
22562261
# operation has no response.
22572262
# @param [String] database
22582263
# Required. The database to update.

0 commit comments

Comments
 (0)