Skip to content

Commit 5bbc848

Browse files
feat: Automated regeneration of spanner v1 client (googleapis#21479)
Auto-created at 2025-01-26 10:10:14 +0000 using the toys pull request generator.
1 parent f5bd221 commit 5bbc848

File tree

6 files changed

+210
-3
lines changed

6 files changed

+210
-3
lines changed

api_names_out.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322796,6 +322796,11 @@
322796322796
"/sourcerepo:v1/sourcerepo.projects.repos.testIamPermissions/resource": resource
322797322797
"/sourcerepo:v1/sourcerepo.projects.updateConfig": update_project_config
322798322798
"/sourcerepo:v1/sourcerepo.projects.updateConfig/name": name
322799+
"/spanner:v1/AddSplitPointsRequest": add_split_points_request
322800+
"/spanner:v1/AddSplitPointsRequest/initiator": initiator
322801+
"/spanner:v1/AddSplitPointsRequest/splitPoints": split_points
322802+
"/spanner:v1/AddSplitPointsRequest/splitPoints/split_point": split_point
322803+
"/spanner:v1/AddSplitPointsResponse": add_split_points_response
322799322804
"/spanner:v1/AsymmetricAutoscalingOption": asymmetric_autoscaling_option
322800322805
"/spanner:v1/AsymmetricAutoscalingOption/overrides": overrides
322801322806
"/spanner:v1/AsymmetricAutoscalingOption/replicaSelection": replica_selection
@@ -323176,6 +323181,9 @@
323176323181
"/spanner:v1/InstancePartition/updateTime": update_time
323177323182
"/spanner:v1/InstanceReplicaSelection": instance_replica_selection
323178323183
"/spanner:v1/InstanceReplicaSelection/location": location
323184+
"/spanner:v1/Key": key
323185+
"/spanner:v1/Key/keyParts": key_parts
323186+
"/spanner:v1/Key/keyParts/key_part": key_part
323179323187
"/spanner:v1/KeyRange": key_range
323180323188
"/spanner:v1/KeyRange/endClosed": end_closed
323181323189
"/spanner:v1/KeyRange/endClosed/end_closed": end_closed
@@ -323526,6 +323534,12 @@
323526323534
"/spanner:v1/ShortRepresentation/subqueries/subquery": subquery
323527323535
"/spanner:v1/SingleRegionQuorum": single_region_quorum
323528323536
"/spanner:v1/SingleRegionQuorum/servingLocation": serving_location
323537+
"/spanner:v1/SplitPoints": split_points
323538+
"/spanner:v1/SplitPoints/expireTime": expire_time
323539+
"/spanner:v1/SplitPoints/index": index
323540+
"/spanner:v1/SplitPoints/keys": keys
323541+
"/spanner:v1/SplitPoints/keys/key": key
323542+
"/spanner:v1/SplitPoints/table": table
323529323543
"/spanner:v1/Statement": statement
323530323544
"/spanner:v1/Statement/paramTypes": param_types
323531323545
"/spanner:v1/Statement/paramTypes/param_type": param_type
@@ -323730,6 +323744,8 @@
323730323744
"/spanner:v1/spanner.projects.instances.databaseOperations.list/pageSize": page_size
323731323745
"/spanner:v1/spanner.projects.instances.databaseOperations.list/pageToken": page_token
323732323746
"/spanner:v1/spanner.projects.instances.databaseOperations.list/parent": parent
323747+
"/spanner:v1/spanner.projects.instances.databases.addSplitPoints": add_database_split_points
323748+
"/spanner:v1/spanner.projects.instances.databases.addSplitPoints/database": database
323733323749
"/spanner:v1/spanner.projects.instances.databases.backupSchedules.create": create_project_instance_database_backup_schedule
323734323750
"/spanner:v1/spanner.projects.instances.databases.backupSchedules.create/backupScheduleId": backup_schedule_id
323735323751
"/spanner:v1/spanner.projects.instances.databases.backupSchedules.create/parent": parent

generated/google-apis-spanner_v1/CHANGELOG.md

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

3-
### v0.39.0 (2025-01-19)
3+
### v0.39.0 (2025-01-26)
44

5-
* Regenerated from discovery document revision 20241220
5+
* Regenerated from discovery document revision 20250113
66

77
### v0.38.0 (2025-01-12)
88

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

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,47 @@ module Google
2222
module Apis
2323
module SpannerV1
2424

25+
# The request for AddSplitPoints.
26+
class AddSplitPointsRequest
27+
include Google::Apis::Core::Hashable
28+
29+
# Optional. A user-supplied tag associated with the split points. For example, "
30+
# intital_data_load", "special_event_1". Defaults to "CloudAddSplitPointsAPI" if
31+
# not specified. The length of the tag must not exceed 50 characters,else will
32+
# be trimmed. Only valid UTF8 characters are allowed.
33+
# Corresponds to the JSON property `initiator`
34+
# @return [String]
35+
attr_accessor :initiator
36+
37+
# Required. The split points to add.
38+
# Corresponds to the JSON property `splitPoints`
39+
# @return [Array<Google::Apis::SpannerV1::SplitPoints>]
40+
attr_accessor :split_points
41+
42+
def initialize(**args)
43+
update!(**args)
44+
end
45+
46+
# Update properties of this object
47+
def update!(**args)
48+
@initiator = args[:initiator] if args.key?(:initiator)
49+
@split_points = args[:split_points] if args.key?(:split_points)
50+
end
51+
end
52+
53+
# The response for AddSplitPoints.
54+
class AddSplitPointsResponse
55+
include Google::Apis::Core::Hashable
56+
57+
def initialize(**args)
58+
update!(**args)
59+
end
60+
61+
# Update properties of this object
62+
def update!(**args)
63+
end
64+
end
65+
2566
# AsymmetricAutoscalingOption specifies the scaling of replicas identified by
2667
# the given selection.
2768
class AsymmetricAutoscalingOption
@@ -3472,6 +3513,25 @@ def update!(**args)
34723513
end
34733514
end
34743515

3516+
# A split key.
3517+
class Key
3518+
include Google::Apis::Core::Hashable
3519+
3520+
# Required. The column values making up the split key.
3521+
# Corresponds to the JSON property `keyParts`
3522+
# @return [Array<Object>]
3523+
attr_accessor :key_parts
3524+
3525+
def initialize(**args)
3526+
update!(**args)
3527+
end
3528+
3529+
# Update properties of this object
3530+
def update!(**args)
3531+
@key_parts = args[:key_parts] if args.key?(:key_parts)
3532+
end
3533+
end
3534+
34753535
# KeyRange represents a range of rows in a table or index. A range has a start
34763536
# key and an end key. These keys can be open or closed, indicating if the range
34773537
# includes rows with that key. Keys are represented by lists, where the ith
@@ -6079,6 +6139,46 @@ def update!(**args)
60796139
end
60806140
end
60816141

6142+
# The split points of a table/index.
6143+
class SplitPoints
6144+
include Google::Apis::Core::Hashable
6145+
6146+
# Optional. The expiration timestamp of the split points. A timestamp in the
6147+
# past means immediate expiration. The maximum value can be 30 days in the
6148+
# future. Defaults to 10 days in the future if not specified.
6149+
# Corresponds to the JSON property `expireTime`
6150+
# @return [String]
6151+
attr_accessor :expire_time
6152+
6153+
# The index to split. If specified, the `table` field must refer to the index's
6154+
# base table.
6155+
# Corresponds to the JSON property `index`
6156+
# @return [String]
6157+
attr_accessor :index
6158+
6159+
# Required. The list of split keys, i.e., the split boundaries.
6160+
# Corresponds to the JSON property `keys`
6161+
# @return [Array<Google::Apis::SpannerV1::Key>]
6162+
attr_accessor :keys
6163+
6164+
# The table to split.
6165+
# Corresponds to the JSON property `table`
6166+
# @return [String]
6167+
attr_accessor :table
6168+
6169+
def initialize(**args)
6170+
update!(**args)
6171+
end
6172+
6173+
# Update properties of this object
6174+
def update!(**args)
6175+
@expire_time = args[:expire_time] if args.key?(:expire_time)
6176+
@index = args[:index] if args.key?(:index)
6177+
@keys = args[:keys] if args.key?(:keys)
6178+
@table = args[:table] if args.key?(:table)
6179+
end
6180+
end
6181+
60826182
# A single DML statement.
60836183
class Statement
60846184
include Google::Apis::Core::Hashable

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module SpannerV1
2222
GENERATOR_VERSION = "0.16.0"
2323

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

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ module Google
2222
module Apis
2323
module SpannerV1
2424

25+
class AddSplitPointsRequest
26+
class Representation < Google::Apis::Core::JsonRepresentation; end
27+
28+
include Google::Apis::Core::JsonObjectSupport
29+
end
30+
31+
class AddSplitPointsResponse
32+
class Representation < Google::Apis::Core::JsonRepresentation; end
33+
34+
include Google::Apis::Core::JsonObjectSupport
35+
end
36+
2537
class AsymmetricAutoscalingOption
2638
class Representation < Google::Apis::Core::JsonRepresentation; end
2739

@@ -436,6 +448,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
436448
include Google::Apis::Core::JsonObjectSupport
437449
end
438450

451+
class Key
452+
class Representation < Google::Apis::Core::JsonRepresentation; end
453+
454+
include Google::Apis::Core::JsonObjectSupport
455+
end
456+
439457
class KeyRange
440458
class Representation < Google::Apis::Core::JsonRepresentation; end
441459

@@ -826,6 +844,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
826844
include Google::Apis::Core::JsonObjectSupport
827845
end
828846

847+
class SplitPoints
848+
class Representation < Google::Apis::Core::JsonRepresentation; end
849+
850+
include Google::Apis::Core::JsonObjectSupport
851+
end
852+
829853
class Statement
830854
class Representation < Google::Apis::Core::JsonRepresentation; end
831855

@@ -952,6 +976,21 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
952976
include Google::Apis::Core::JsonObjectSupport
953977
end
954978

979+
class AddSplitPointsRequest
980+
# @private
981+
class Representation < Google::Apis::Core::JsonRepresentation
982+
property :initiator, as: 'initiator'
983+
collection :split_points, as: 'splitPoints', class: Google::Apis::SpannerV1::SplitPoints, decorator: Google::Apis::SpannerV1::SplitPoints::Representation
984+
985+
end
986+
end
987+
988+
class AddSplitPointsResponse
989+
# @private
990+
class Representation < Google::Apis::Core::JsonRepresentation
991+
end
992+
end
993+
955994
class AsymmetricAutoscalingOption
956995
# @private
957996
class Representation < Google::Apis::Core::JsonRepresentation
@@ -1691,6 +1730,13 @@ class Representation < Google::Apis::Core::JsonRepresentation
16911730
end
16921731
end
16931732

1733+
class Key
1734+
# @private
1735+
class Representation < Google::Apis::Core::JsonRepresentation
1736+
collection :key_parts, as: 'keyParts'
1737+
end
1738+
end
1739+
16941740
class KeyRange
16951741
# @private
16961742
class Representation < Google::Apis::Core::JsonRepresentation
@@ -2374,6 +2420,17 @@ class Representation < Google::Apis::Core::JsonRepresentation
23742420
end
23752421
end
23762422

2423+
class SplitPoints
2424+
# @private
2425+
class Representation < Google::Apis::Core::JsonRepresentation
2426+
property :expire_time, as: 'expireTime'
2427+
property :index, as: 'index'
2428+
collection :keys, as: 'keys', class: Google::Apis::SpannerV1::Key, decorator: Google::Apis::SpannerV1::Key::Representation
2429+
2430+
property :table, as: 'table'
2431+
end
2432+
end
2433+
23772434
class Statement
23782435
# @private
23792436
class Representation < Google::Apis::Core::JsonRepresentation

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,40 @@ def list_project_instance_databaseoperations(parent, filter: nil, page_size: nil
17341734
execute_or_queue_command(command, &block)
17351735
end
17361736

1737+
# Adds split points to specified tables, indexes of a database.
1738+
# @param [String] database
1739+
# Required. The database on whose tables/indexes split points are to be added.
1740+
# Values are of the form `projects//instances//databases/`.
1741+
# @param [Google::Apis::SpannerV1::AddSplitPointsRequest] add_split_points_request_object
1742+
# @param [String] fields
1743+
# Selector specifying which fields to include in a partial response.
1744+
# @param [String] quota_user
1745+
# Available to use for quota purposes for server-side applications. Can be any
1746+
# arbitrary string assigned to a user, but should not exceed 40 characters.
1747+
# @param [Google::Apis::RequestOptions] options
1748+
# Request-specific options
1749+
#
1750+
# @yield [result, err] Result & error if block supplied
1751+
# @yieldparam result [Google::Apis::SpannerV1::AddSplitPointsResponse] parsed result object
1752+
# @yieldparam err [StandardError] error object if request failed
1753+
#
1754+
# @return [Google::Apis::SpannerV1::AddSplitPointsResponse]
1755+
#
1756+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1757+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1758+
# @raise [Google::Apis::AuthorizationError] Authorization is required
1759+
def add_database_split_points(database, add_split_points_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1760+
command = make_simple_command(:post, 'v1/{+database}:addSplitPoints', options)
1761+
command.request_representation = Google::Apis::SpannerV1::AddSplitPointsRequest::Representation
1762+
command.request_object = add_split_points_request_object
1763+
command.response_representation = Google::Apis::SpannerV1::AddSplitPointsResponse::Representation
1764+
command.response_class = Google::Apis::SpannerV1::AddSplitPointsResponse
1765+
command.params['database'] = database unless database.nil?
1766+
command.query['fields'] = fields unless fields.nil?
1767+
command.query['quotaUser'] = quota_user unless quota_user.nil?
1768+
execute_or_queue_command(command, &block)
1769+
end
1770+
17371771
# `ChangeQuorum` is strictly restricted to databases that use dual-region
17381772
# instance configurations. Initiates a background operation to change the quorum
17391773
# of a database from dual-region mode to single-region mode or vice versa. The

0 commit comments

Comments
 (0)