Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 054e75a

Browse files
committed
feat: generate libraries
1 parent 8caf953 commit 054e75a

File tree

8 files changed

+237
-77
lines changed

8 files changed

+237
-77
lines changed

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-li
22
libraries:
33
- id: google-cloud-spanner
44
version: 3.63.0
5-
last_generated_commit: a17b84add8318f780fcc8a027815d5fee644b9f7
5+
last_generated_commit: 94bc991b3f1df58bc841801631715894a7ac5e28
66
apis:
77
- path: google/spanner/admin/instance/v1
88
service_config: spanner.yaml

google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,24 @@ class AutoscalingTargets(proto.Message):
542542
543543
Attributes:
544544
high_priority_cpu_utilization_percent (int):
545-
Required. The target high priority cpu utilization
545+
Optional. The target high priority cpu utilization
546546
percentage that the autoscaler should be trying to achieve
547547
for the instance. This number is on a scale from 0 (no
548548
utilization) to 100 (full utilization). The valid range is
549-
[10, 90] inclusive.
549+
[10, 90] inclusive. If not specified or set to 0, the
550+
autoscaler skips scaling based on high priority CPU
551+
utilization.
552+
total_cpu_utilization_percent (int):
553+
Optional. The target total CPU utilization percentage that
554+
the autoscaler should be trying to achieve for the instance.
555+
This number is on a scale from 0 (no utilization) to 100
556+
(full utilization). The valid range is [10, 90] inclusive.
557+
If not specified or set to 0, the autoscaler skips scaling
558+
based on total CPU utilization. If both
559+
``high_priority_cpu_utilization_percent`` and
560+
``total_cpu_utilization_percent`` are specified, the
561+
autoscaler provisions the larger of the two required compute
562+
capacities to satisfy both targets.
550563
storage_utilization_percent (int):
551564
Required. The target storage utilization percentage that the
552565
autoscaler should be trying to achieve for the instance.
@@ -558,6 +571,10 @@ class AutoscalingTargets(proto.Message):
558571
proto.INT32,
559572
number=1,
560573
)
574+
total_cpu_utilization_percent: int = proto.Field(
575+
proto.INT32,
576+
number=4,
577+
)
561578
storage_utilization_percent: int = proto.Field(
562579
proto.INT32,
563580
number=2,
@@ -593,6 +610,58 @@ class AutoscalingConfigOverrides(proto.Message):
593610
Optional. If specified, overrides the autoscaling target
594611
high_priority_cpu_utilization_percent in the top-level
595612
autoscaling configuration for the selected replicas.
613+
autoscaling_target_total_cpu_utilization_percent (int):
614+
Optional. If specified, overrides the autoscaling target
615+
``total_cpu_utilization_percent`` in the top-level
616+
autoscaling configuration for the selected replicas.
617+
disable_high_priority_cpu_autoscaling (bool):
618+
Optional. If true, disables high priority CPU autoscaling
619+
for the selected replicas and ignores
620+
[high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
621+
in the top-level autoscaling configuration.
622+
623+
When setting this field to true, setting
624+
[autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
625+
field to a non-zero value for the same replica is not
626+
supported.
627+
628+
If false, the
629+
[autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
630+
field in the replica will be used if set to a non-zero
631+
value. Otherwise, the
632+
[high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
633+
field in the top-level autoscaling configuration will be
634+
used.
635+
636+
Setting both
637+
[disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
638+
and
639+
[disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
640+
to true for the same replica is not supported.
641+
disable_total_cpu_autoscaling (bool):
642+
Optional. If true, disables total CPU autoscaling for the
643+
selected replicas and ignores
644+
[total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
645+
in the top-level autoscaling configuration.
646+
647+
When setting this field to true, setting
648+
[autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
649+
field to a non-zero value for the same replica is not
650+
supported.
651+
652+
If false, the
653+
[autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
654+
field in the replica will be used if set to a non-zero
655+
value. Otherwise, the
656+
[total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
657+
field in the top-level autoscaling configuration will be
658+
used.
659+
660+
Setting both
661+
[disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
662+
and
663+
[disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
664+
to true for the same replica is not supported.
596665
"""
597666

598667
autoscaling_limits: "AutoscalingConfig.AutoscalingLimits" = proto.Field(
@@ -604,6 +673,18 @@ class AutoscalingConfigOverrides(proto.Message):
604673
proto.INT32,
605674
number=2,
606675
)
676+
autoscaling_target_total_cpu_utilization_percent: int = proto.Field(
677+
proto.INT32,
678+
number=4,
679+
)
680+
disable_high_priority_cpu_autoscaling: bool = proto.Field(
681+
proto.BOOL,
682+
number=5,
683+
)
684+
disable_total_cpu_autoscaling: bool = proto.Field(
685+
proto.BOOL,
686+
number=6,
687+
)
607688

608689
replica_selection: common.ReplicaSelection = proto.Field(
609690
proto.MESSAGE,

google/cloud/spanner_v1/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
BatchWriteRequest,
3535
BatchWriteResponse,
3636
BeginTransactionRequest,
37-
ClientContext,
3837
CommitRequest,
3938
CreateSessionRequest,
4039
DeleteSessionRequest,
@@ -88,7 +87,6 @@
8887
"BatchWriteRequest",
8988
"BatchWriteResponse",
9089
"BeginTransactionRequest",
91-
"ClientContext",
9290
"CommitRequest",
9391
"CreateSessionRequest",
9492
"DeleteSessionRequest",

google/cloud/spanner_v1/types/commit_response.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from google.protobuf import timestamp_pb2 # type: ignore
2121
import proto # type: ignore
2222

23-
from google.cloud.spanner_v1.types import transaction
23+
from google.cloud.spanner_v1.types import location, transaction
2424

2525
__protobuf__ = proto.module(
2626
package="google.spanner.v1",
@@ -54,6 +54,14 @@ class CommitResponse(proto.Message):
5454
``IsolationLevel.REPEATABLE_READ``, then the snapshot
5555
timestamp is the timestamp at which all reads in the
5656
transaction ran. This timestamp is never returned.
57+
cache_update (google.cloud.spanner_v1.types.CacheUpdate):
58+
Optional. A cache update expresses a set of changes the
59+
client should incorporate into its location cache. The
60+
client should discard the changes if they are older than the
61+
data it already has. This data can be obtained in response
62+
to requests that included a ``RoutingHint`` field, but may
63+
also be obtained by explicit location-fetching RPCs which
64+
may be added in the future.
5765
"""
5866

5967
class CommitStats(proto.Message):
@@ -98,6 +106,11 @@ class CommitStats(proto.Message):
98106
number=5,
99107
message=timestamp_pb2.Timestamp,
100108
)
109+
cache_update: location.CacheUpdate = proto.Field(
110+
proto.MESSAGE,
111+
number=6,
112+
message=location.CacheUpdate,
113+
)
101114

102115

103116
__all__ = tuple(sorted(__protobuf__.manifest))

google/cloud/spanner_v1/types/location.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,9 @@ class Tablet(proto.Message):
111111
this tablet -- either an IP address or DNS
112112
hostname and a port number.
113113
location (str):
114-
Where this tablet is located. In the Spanner
115-
managed service, this is the name of a region,
116-
such as "us-central1". In Spanner Omni, this is
117-
a previously created location.
114+
Where this tablet is located. This is the
115+
name of a Google Cloud region, such as
116+
"us-central1".
118117
role (google.cloud.spanner_v1.types.Tablet.Role):
119118
The role of the tablet.
120119
incarnation (bytes):
@@ -593,11 +592,9 @@ class RoutingHint(proto.Message):
593592
incarnations. The server may include a ``CacheUpdate`` with
594593
new locations for those tablets.
595594
client_location (str):
596-
If present, the client's current location. In
597-
the Spanner managed service, this should be the
598-
name of a Google Cloud zone or region, such as
599-
"us-central1". In Spanner Omni, this should
600-
correspond to a previously created location.
595+
If present, the client's current location.
596+
This should be the name of a Google Cloud zone
597+
or region, such as "us-central1".
601598
602599
If absent, the client's location will be assumed
603600
to be the same as the location of the server the

google/cloud/spanner_v1/types/result_set.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ class ResultSet(proto.Message):
6868
token with the highest sequence number from this transaction
6969
attempt to the [Commit][google.spanner.v1.Spanner.Commit]
7070
request for this transaction.
71+
cache_update (google.cloud.spanner_v1.types.CacheUpdate):
72+
Optional. A cache update expresses a set of changes the
73+
client should incorporate into its location cache. The
74+
client should discard the changes if they are older than the
75+
data it already has. This data can be obtained in response
76+
to requests that included a ``RoutingHint`` field, but may
77+
also be obtained by explicit location-fetching RPCs which
78+
may be added in the future.
7179
"""
7280

7381
metadata: "ResultSetMetadata" = proto.Field(
@@ -90,6 +98,11 @@ class ResultSet(proto.Message):
9098
number=5,
9199
message=gs_transaction.MultiplexedSessionPrecommitToken,
92100
)
101+
cache_update: location.CacheUpdate = proto.Field(
102+
proto.MESSAGE,
103+
number=6,
104+
message=location.CacheUpdate,
105+
)
93106

94107

95108
class PartialResultSet(proto.Message):

0 commit comments

Comments
 (0)