Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355606,6 +355606,7 @@
"/spanner:v1/AdaptMessageRequest/payload": payload
"/spanner:v1/AdaptMessageRequest/protocol": protocol
"/spanner:v1/AdaptMessageResponse": adapt_message_response
"/spanner:v1/AdaptMessageResponse/last": last
"/spanner:v1/AdaptMessageResponse/payload": payload
"/spanner:v1/AdaptMessageResponse/stateUpdates": state_updates
"/spanner:v1/AdaptMessageResponse/stateUpdates/state_update": state_update
Expand Down Expand Up @@ -355754,6 +355755,7 @@
"/spanner:v1/CommitResponse/commitStats": commit_stats
"/spanner:v1/CommitResponse/commitTimestamp": commit_timestamp
"/spanner:v1/CommitResponse/precommitToken": precommit_token
"/spanner:v1/CommitResponse/snapshotTimestamp": snapshot_timestamp
"/spanner:v1/CommitStats": commit_stats
"/spanner:v1/CommitStats/mutationCount": mutation_count
"/spanner:v1/Condition": condition
Expand Down
4 changes: 4 additions & 0 deletions generated/google-apis-spanner_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release history for google-apis-spanner_v1

### v0.45.0 (2025-10-05)

* Regenerated from discovery document revision 20250920

### v0.44.0 (2025-07-20)

* Regenerated from discovery document revision 20250708
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def update!(**args)
class AdaptMessageResponse
include Google::Apis::Core::Hashable

# Optional. Indicates whether this is the last AdaptMessageResponse in the
# stream. This field may be optionally set by the server. Clients should not
# rely on this field being set in all cases.
# Corresponds to the JSON property `last`
# @return [Boolean]
attr_accessor :last
alias_method :last?, :last

# Optional. Uninterpreted bytes from the underlying wire protocol.
# Corresponds to the JSON property `payload`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
Expand All @@ -75,6 +83,7 @@ def initialize(**args)

# Update properties of this object
def update!(**args)
@last = args[:last] if args.key?(:last)
@payload = args[:payload] if args.key?(:payload)
@state_updates = args[:state_updates] if args.key?(:state_updates)
end
Expand Down Expand Up @@ -408,9 +417,9 @@ class Backup
# @return [String]
attr_accessor :incremental_backup_chain_id

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

# If `TransactionOptions.isolation_level` is set to `IsolationLevel.
# REPEATABLE_READ`, then the snapshot timestamp is the timestamp at which all
# reads in the transaction ran. This timestamp is never returned.
# Corresponds to the JSON property `snapshotTimestamp`
# @return [String]
attr_accessor :snapshot_timestamp

def initialize(**args)
update!(**args)
end
Expand All @@ -1229,6 +1245,7 @@ def update!(**args)
@commit_stats = args[:commit_stats] if args.key?(:commit_stats)
@commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp)
@precommit_token = args[:precommit_token] if args.key?(:precommit_token)
@snapshot_timestamp = args[:snapshot_timestamp] if args.key?(:snapshot_timestamp)
end
end

Expand Down Expand Up @@ -1306,9 +1323,15 @@ class CopyBackupEncryptionConfig
# @return [String]
attr_accessor :encryption_type

# 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/`.
# Optional. This field is maintained for backwards compatibility. For new
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
# kms_key_name` if the location of the KMS key matches the database instance's
# configuration (location) exactly. For example, if the KMS location is in `us-
# central1` or `nam3`, then the database instance must also be in `us-central1`
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
# database. Set this field only when encryption_type is `
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
# keyRings//cryptoKeys/`.
# Corresponds to the JSON property `kmsKeyName`
# @return [String]
attr_accessor :kms_key_name
Expand Down Expand Up @@ -1442,9 +1465,15 @@ class CreateBackupEncryptionConfig
# @return [String]
attr_accessor :encryption_type

# 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/`.
# Optional. This field is maintained for backwards compatibility. For new
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
# kms_key_name` if the location of the KMS key matches the database instance's
# configuration (location) exactly. For example, if the KMS location is in `us-
# central1` or `nam3`, then the database instance must also be in `us-central1`
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
# database. Set this field only when encryption_type is `
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
# keyRings//cryptoKeys/`.
# Corresponds to the JSON property `kmsKeyName`
# @return [String]
attr_accessor :kms_key_name
Expand Down Expand Up @@ -2164,23 +2193,23 @@ def update!(**args)
class DdlStatementActionInfo
include Google::Apis::Core::Hashable

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

# The entity name(s) being operated on the DDL statement. E.g. 1. For statement "
# CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE
# r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "ANALYZE", `
# entity_names` = [].
# The entity names being operated on the DDL statement. For example, 1. For
# statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "
# GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "
# ANALYZE", `entity_names` = [].
# Corresponds to the JSON property `entityNames`
# @return [Array<String>]
attr_accessor :entity_names

# The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This
# field can be empty string for some DDL statement, e.g. for statement "ANALYZE",
# `entity_type` = "".
# The entity type for the DDL statement, for example, TABLE, INDEX, VIEW, etc.
# This field can be empty string for some DDL statement, for example, for
# statement "ANALYZE", `entity_type` = "".
# Corresponds to the JSON property `entityType`
# @return [String]
attr_accessor :entity_type
Expand Down Expand Up @@ -3366,12 +3395,12 @@ class InstanceEncryptionConfig
include Google::Apis::Core::Hashable

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

# Required. Name of the location of the replicas (e.g., "us-central1").
# Required. Name of the location of the replicas (for example, "us-central1").
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
Expand Down Expand Up @@ -5956,8 +5985,13 @@ class RestoreDatabaseEncryptionConfig
# @return [String]
attr_accessor :encryption_type

# 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 `
# Optional. This field is maintained for backwards compatibility. For new
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
# kms_key_name` if the location of the KMS key matches the database instance's
# configuration (location) exactly. For example, if the KMS location is in `us-
# central1` or `nam3`, then the database instance must also be in `us-central1`
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
# database. Set this field only when encryption_type is `
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
# keyRings//cryptoKeys/`.
# Corresponds to the JSON property `kmsKeyName`
Expand Down Expand Up @@ -6467,11 +6501,11 @@ def update!(**args)
class SingleRegionQuorum
include Google::Apis::Core::Hashable

# Required. The location of the serving region, e.g. "us-central1". The location
# must be one of the regions within the dual-region instance configuration of
# your database. The list of valid locations is available using the
# GetInstanceConfig API. This should only be used if you plan to change quorum
# to the single-region quorum type.
# Required. The location of the serving region, for example, "us-central1". The
# location must be one of the regions within the dual-region instance
# configuration of your database. The list of valid locations is available using
# the GetInstanceConfig API. This should only be used if you plan to change
# quorum to the single-region quorum type.
# Corresponds to the JSON property `servingLocation`
# @return [String]
attr_accessor :serving_location
Expand Down Expand Up @@ -6884,9 +6918,9 @@ class UpdateDatabaseDdlMetadata
# @return [Array<String>]
attr_accessor :statements

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module Google
module Apis
module SpannerV1
# Version of the google-apis-spanner_v1 gem
GEM_VERSION = "0.44.0"
GEM_VERSION = "0.45.0"

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

# Revision of the discovery document this client was generated from
REVISION = "20250708"
REVISION = "20250920"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
class AdaptMessageResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :last, as: 'last'
property :payload, :base64 => true, as: 'payload'
hash :state_updates, as: 'stateUpdates'
end
Expand Down Expand Up @@ -1377,6 +1378,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
property :commit_timestamp, as: 'commitTimestamp'
property :precommit_token, as: 'precommitToken', class: Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken, decorator: Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken::Representation

property :snapshot_timestamp, as: 'snapshotTimestamp'
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,21 +1169,26 @@ def copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_use
# delete the backup. There can be only one pending backup creation per database.
# Backup creation of different databases can run concurrently.
# @param [String] parent
# Required. The name of the instance in which the backup will be created. This
# must be the same instance that contains the database the backup will be
# created from. The backup will be stored in the location(s) specified in the
# instance configuration of this instance. Values are of the form `projects//
# instances/`.
# Required. The name of the instance in which the backup is created. This must
# be the same instance that contains the database the backup is created from.
# The backup will be stored in the locations specified in the instance
# configuration of this instance. Values are of the form `projects//instances/`.
# @param [Google::Apis::SpannerV1::Backup] backup_object
# @param [String] backup_id
# 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/`.
# @param [String] encryption_config_encryption_type
# Required. The encryption type of the backup.
# @param [String] encryption_config_kms_key_name
# 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/`.
# Optional. This field is maintained for backwards compatibility. For new
# callers, we recommend using `kms_key_names` to specify the KMS key. Only use `
# kms_key_name` if the location of the KMS key matches the database instance's
# configuration (location) exactly. For example, if the KMS location is in `us-
# central1` or `nam3`, then the database instance must also be in `us-central1`
# or `nam3`. The Cloud KMS key that is used to encrypt and decrypt the restored
# database. Set this field only when encryption_type is `
# CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//
# keyRings//cryptoKeys/`.
# @param [Array<String>, String] encryption_config_kms_key_names
# Optional. Specifies the KMS configuration for the one or more keys used to
# protect the backup. Values are of the form `projects//locations//keyRings//
Expand Down Expand Up @@ -1406,11 +1411,11 @@ def list_project_instance_backups(parent, filter: nil, page_size: nil, page_toke
# the form `projects//instances/`.
# @param [Google::Apis::SpannerV1::Backup] backup_object
# @param [String] update_mask
# Required. A mask specifying which fields (e.g. `expire_time`) in the Backup
# resource should be updated. This mask is relative to the Backup resource, not
# to the request message. The field mask must always be specified; this prevents
# any future fields from being erased accidentally by clients that do not know
# about them.
# Required. A mask specifying which fields (for example, `expire_time`) in the
# backup resource should be updated. This mask is relative to the backup
# resource, not to the request message. The field mask must always be specified;
# this prevents any future fields from being erased accidentally by clients that
# do not know about them.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
Expand Down Expand Up @@ -2252,7 +2257,7 @@ def test_database_iam_permissions(resource, test_iam_permissions_request_object
# Updates the schema of a Cloud Spanner database by creating/altering/dropping
# tables, columns, indexes, etc. The returned long-running operation will have a
# name of the format `/operations/` and can be used to track execution of the
# schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The
# schema changes. The metadata field type is UpdateDatabaseDdlMetadata. The
# operation has no response.
# @param [String] database
# Required. The database to update.
Expand Down