getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.spanner.admin.instance.v1.AutoscalingConfig getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java
new file mode 100644
index 00000000000..b9449ad2a0f
--- /dev/null
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/spanner/admin/instance/v1/spanner_instance_admin.proto
+
+package com.google.spanner.admin.instance.v1;
+
+public interface AutoscalingConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. Autoscaling limits for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the autoscalingLimits field is set.
+ */
+ boolean hasAutoscalingLimits();
+ /**
+ *
+ *
+ *
+ * Required. Autoscaling limits for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The autoscalingLimits.
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits getAutoscalingLimits();
+ /**
+ *
+ *
+ *
+ * Required. Autoscaling limits for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder
+ getAutoscalingLimitsOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Required. The autoscaling targets for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the autoscalingTargets field is set.
+ */
+ boolean hasAutoscalingTargets();
+ /**
+ *
+ *
+ *
+ * Required. The autoscaling targets for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The autoscalingTargets.
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets getAutoscalingTargets();
+ /**
+ *
+ *
+ *
+ * Required. The autoscaling targets for an instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder
+ getAutoscalingTargetsOrBuilder();
+}
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java
index c18b78c6afd..de469ab4ee1 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/Instance.java
@@ -418,8 +418,12 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
*
*
* The number of nodes allocated to this instance. At most one of either
- * node_count or processing_units should be present in the message. This
- * may be zero in API responses for instances that are not yet in state
+ * node_count or processing_units should be present in the message.
+ *
+ * Users can set the node_count field to specify the target number of nodes
+ * allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
* `READY`.
*
* See [the
@@ -443,8 +447,13 @@ public int getNodeCount() {
*
*
* The number of processing units allocated to this instance. At most one of
- * processing_units or node_count should be present in the message. This may
- * be zero in API responses for instances that are not yet in state `READY`.
+ * processing_units or node_count should be present in the message.
+ *
+ * Users can set the processing_units field to specify the target number of
+ * processing units allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
+ * `READY`.
*
* See [the
* documentation](https://cloud.google.com/spanner/docs/compute-capacity)
@@ -460,6 +469,72 @@ public int getProcessingUnits() {
return processingUnits_;
}
+ public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 17;
+ private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_;
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the autoscalingConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasAutoscalingConfig() {
+ return autoscalingConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The autoscalingConfig.
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() {
+ return autoscalingConfig_ == null
+ ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()
+ : autoscalingConfig_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder
+ getAutoscalingConfigOrBuilder() {
+ return autoscalingConfig_ == null
+ ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()
+ : autoscalingConfig_;
+ }
+
public static final int STATE_FIELD_NUMBER = 6;
private int state_ = 0;
/**
@@ -897,6 +972,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (updateTime_ != null) {
output.writeMessage(12, getUpdateTime());
}
+ if (autoscalingConfig_ != null) {
+ output.writeMessage(17, getAutoscalingConfig());
+ }
getUnknownFields().writeTo(output);
}
@@ -949,6 +1027,9 @@ public int getSerializedSize() {
if (updateTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime());
}
+ if (autoscalingConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getAutoscalingConfig());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -970,6 +1051,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (getNodeCount() != other.getNodeCount()) return false;
if (getProcessingUnits() != other.getProcessingUnits()) return false;
+ if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false;
+ if (hasAutoscalingConfig()) {
+ if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false;
+ }
if (state_ != other.state_) return false;
if (!internalGetLabels().equals(other.internalGetLabels())) return false;
if (!getEndpointUrisList().equals(other.getEndpointUrisList())) return false;
@@ -1002,6 +1087,10 @@ public int hashCode() {
hash = (53 * hash) + getNodeCount();
hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER;
hash = (53 * hash) + getProcessingUnits();
+ if (hasAutoscalingConfig()) {
+ hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getAutoscalingConfig().hashCode();
+ }
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
if (!internalGetLabels().getMap().isEmpty()) {
@@ -1184,6 +1273,11 @@ public Builder clear() {
displayName_ = "";
nodeCount_ = 0;
processingUnits_ = 0;
+ autoscalingConfig_ = null;
+ if (autoscalingConfigBuilder_ != null) {
+ autoscalingConfigBuilder_.dispose();
+ autoscalingConfigBuilder_ = null;
+ }
state_ = 0;
internalGetMutableLabels().clear();
endpointUris_ = com.google.protobuf.LazyStringArrayList.emptyList();
@@ -1249,20 +1343,26 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.Instance result)
result.processingUnits_ = processingUnits_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
- result.state_ = state_;
+ result.autoscalingConfig_ =
+ autoscalingConfigBuilder_ == null
+ ? autoscalingConfig_
+ : autoscalingConfigBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.state_ = state_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
- if (((from_bitField0_ & 0x00000080) != 0)) {
+ if (((from_bitField0_ & 0x00000100) != 0)) {
endpointUris_.makeImmutable();
result.endpointUris_ = endpointUris_;
}
- if (((from_bitField0_ & 0x00000100) != 0)) {
+ if (((from_bitField0_ & 0x00000200) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
}
- if (((from_bitField0_ & 0x00000200) != 0)) {
+ if (((from_bitField0_ & 0x00000400) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
}
}
@@ -1333,15 +1433,18 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.Instance other) {
if (other.getProcessingUnits() != 0) {
setProcessingUnits(other.getProcessingUnits());
}
+ if (other.hasAutoscalingConfig()) {
+ mergeAutoscalingConfig(other.getAutoscalingConfig());
+ }
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
if (!other.endpointUris_.isEmpty()) {
if (endpointUris_.isEmpty()) {
endpointUris_ = other.endpointUris_;
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
} else {
ensureEndpointUrisIsMutable();
endpointUris_.addAll(other.endpointUris_);
@@ -1407,7 +1510,7 @@ public Builder mergeFrom(
case 48:
{
state_ = input.readEnum();
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
break;
} // case 48
case 58:
@@ -1419,7 +1522,7 @@ public Builder mergeFrom(
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
break;
} // case 58
case 66:
@@ -1438,15 +1541,22 @@ public Builder mergeFrom(
case 90:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
break;
} // case 90
case 98:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
break;
} // case 98
+ case 138:
+ {
+ input.readMessage(
+ getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 138
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1835,8 +1945,12 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
*
*
* The number of nodes allocated to this instance. At most one of either
- * node_count or processing_units should be present in the message. This
- * may be zero in API responses for instances that are not yet in state
+ * node_count or processing_units should be present in the message.
+ *
+ * Users can set the node_count field to specify the target number of nodes
+ * allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
* `READY`.
*
* See [the
@@ -1857,8 +1971,12 @@ public int getNodeCount() {
*
*
* The number of nodes allocated to this instance. At most one of either
- * node_count or processing_units should be present in the message. This
- * may be zero in API responses for instances that are not yet in state
+ * node_count or processing_units should be present in the message.
+ *
+ * Users can set the node_count field to specify the target number of nodes
+ * allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
* `READY`.
*
* See [the
@@ -1883,8 +2001,12 @@ public Builder setNodeCount(int value) {
*
*
* The number of nodes allocated to this instance. At most one of either
- * node_count or processing_units should be present in the message. This
- * may be zero in API responses for instances that are not yet in state
+ * node_count or processing_units should be present in the message.
+ *
+ * Users can set the node_count field to specify the target number of nodes
+ * allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
* `READY`.
*
* See [the
@@ -1909,8 +2031,13 @@ public Builder clearNodeCount() {
*
*
* The number of processing units allocated to this instance. At most one of
- * processing_units or node_count should be present in the message. This may
- * be zero in API responses for instances that are not yet in state `READY`.
+ * processing_units or node_count should be present in the message.
+ *
+ * Users can set the processing_units field to specify the target number of
+ * processing units allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
+ * `READY`.
*
* See [the
* documentation](https://cloud.google.com/spanner/docs/compute-capacity)
@@ -1930,8 +2057,13 @@ public int getProcessingUnits() {
*
*
* The number of processing units allocated to this instance. At most one of
- * processing_units or node_count should be present in the message. This may
- * be zero in API responses for instances that are not yet in state `READY`.
+ * processing_units or node_count should be present in the message.
+ *
+ * Users can set the processing_units field to specify the target number of
+ * processing units allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
+ * `READY`.
*
* See [the
* documentation](https://cloud.google.com/spanner/docs/compute-capacity)
@@ -1955,8 +2087,13 @@ public Builder setProcessingUnits(int value) {
*
*
* The number of processing units allocated to this instance. At most one of
- * processing_units or node_count should be present in the message. This may
- * be zero in API responses for instances that are not yet in state `READY`.
+ * processing_units or node_count should be present in the message.
+ *
+ * Users can set the processing_units field to specify the target number of
+ * processing units allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
+ * `READY`.
*
* See [the
* documentation](https://cloud.google.com/spanner/docs/compute-capacity)
@@ -1974,6 +2111,240 @@ public Builder clearProcessingUnits() {
return this;
}
+ private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.instance.v1.AutoscalingConfig,
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder,
+ com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>
+ autoscalingConfigBuilder_;
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the autoscalingConfig field is set.
+ */
+ public boolean hasAutoscalingConfig() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The autoscalingConfig.
+ */
+ public com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig() {
+ if (autoscalingConfigBuilder_ == null) {
+ return autoscalingConfig_ == null
+ ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()
+ : autoscalingConfig_;
+ } else {
+ return autoscalingConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setAutoscalingConfig(
+ com.google.spanner.admin.instance.v1.AutoscalingConfig value) {
+ if (autoscalingConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ autoscalingConfig_ = value;
+ } else {
+ autoscalingConfigBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setAutoscalingConfig(
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder builderForValue) {
+ if (autoscalingConfigBuilder_ == null) {
+ autoscalingConfig_ = builderForValue.build();
+ } else {
+ autoscalingConfigBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeAutoscalingConfig(
+ com.google.spanner.admin.instance.v1.AutoscalingConfig value) {
+ if (autoscalingConfigBuilder_ == null) {
+ if (((bitField0_ & 0x00000020) != 0)
+ && autoscalingConfig_ != null
+ && autoscalingConfig_
+ != com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()) {
+ getAutoscalingConfigBuilder().mergeFrom(value);
+ } else {
+ autoscalingConfig_ = value;
+ }
+ } else {
+ autoscalingConfigBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearAutoscalingConfig() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ autoscalingConfig_ = null;
+ if (autoscalingConfigBuilder_ != null) {
+ autoscalingConfigBuilder_.dispose();
+ autoscalingConfigBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder
+ getAutoscalingConfigBuilder() {
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return getAutoscalingConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder
+ getAutoscalingConfigOrBuilder() {
+ if (autoscalingConfigBuilder_ != null) {
+ return autoscalingConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return autoscalingConfig_ == null
+ ? com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()
+ : autoscalingConfig_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.instance.v1.AutoscalingConfig,
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder,
+ com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>
+ getAutoscalingConfigFieldBuilder() {
+ if (autoscalingConfigBuilder_ == null) {
+ autoscalingConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.admin.instance.v1.AutoscalingConfig,
+ com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder,
+ com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder>(
+ getAutoscalingConfig(), getParentForChildren(), isClean());
+ autoscalingConfig_ = null;
+ }
+ return autoscalingConfigBuilder_;
+ }
+
private int state_ = 0;
/**
*
@@ -2016,7 +2387,7 @@ public int getStateValue() {
*/
public Builder setStateValue(int value) {
state_ = value;
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -2067,7 +2438,7 @@ public Builder setState(com.google.spanner.admin.instance.v1.Instance.State valu
if (value == null) {
throw new NullPointerException();
}
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000040;
state_ = value.getNumber();
onChanged();
return this;
@@ -2090,7 +2461,7 @@ public Builder setState(com.google.spanner.admin.instance.v1.Instance.State valu
* @return This builder for chaining.
*/
public Builder clearState() {
- bitField0_ = (bitField0_ & ~0x00000020);
+ bitField0_ = (bitField0_ & ~0x00000040);
state_ = 0;
onChanged();
return this;
@@ -2113,7 +2484,7 @@ private com.google.protobuf.MapField interna
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
onChanged();
return labels_;
}
@@ -2278,7 +2649,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) {
}
public Builder clearLabels() {
- bitField0_ = (bitField0_ & ~0x00000040);
+ bitField0_ = (bitField0_ & ~0x00000080);
internalGetMutableLabels().getMutableMap().clear();
return this;
}
@@ -2321,7 +2692,7 @@ public Builder removeLabels(java.lang.String key) {
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableLabels() {
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
return internalGetMutableLabels().getMutableMap();
}
/**
@@ -2361,7 +2732,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap().put(key, value);
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
return this;
}
/**
@@ -2395,7 +2766,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) {
*/
public Builder putAllLabels(java.util.Map values) {
internalGetMutableLabels().getMutableMap().putAll(values);
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
return this;
}
@@ -2406,7 +2777,7 @@ private void ensureEndpointUrisIsMutable() {
if (!endpointUris_.isModifiable()) {
endpointUris_ = new com.google.protobuf.LazyStringArrayList(endpointUris_);
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
}
/**
*
@@ -2486,7 +2857,7 @@ public Builder setEndpointUris(int index, java.lang.String value) {
}
ensureEndpointUrisIsMutable();
endpointUris_.set(index, value);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2508,7 +2879,7 @@ public Builder addEndpointUris(java.lang.String value) {
}
ensureEndpointUrisIsMutable();
endpointUris_.add(value);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2527,7 +2898,7 @@ public Builder addEndpointUris(java.lang.String value) {
public Builder addAllEndpointUris(java.lang.Iterable values) {
ensureEndpointUrisIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpointUris_);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2544,7 +2915,7 @@ public Builder addAllEndpointUris(java.lang.Iterable values) {
*/
public Builder clearEndpointUris() {
endpointUris_ = com.google.protobuf.LazyStringArrayList.emptyList();
- bitField0_ = (bitField0_ & ~0x00000080);
+ bitField0_ = (bitField0_ & ~0x00000100);
;
onChanged();
return this;
@@ -2568,7 +2939,7 @@ public Builder addEndpointUrisBytes(com.google.protobuf.ByteString value) {
checkByteStringIsUtf8(value);
ensureEndpointUrisIsMutable();
endpointUris_.add(value);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2593,7 +2964,7 @@ public Builder addEndpointUrisBytes(com.google.protobuf.ByteString value) {
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
- return ((bitField0_ & 0x00000100) != 0);
+ return ((bitField0_ & 0x00000200) != 0);
}
/**
*
@@ -2637,7 +3008,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
} else {
createTimeBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -2658,7 +3029,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -2675,7 +3046,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
- if (((bitField0_ & 0x00000100) != 0)
+ if (((bitField0_ & 0x00000200) != 0)
&& createTime_ != null
&& createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateTimeBuilder().mergeFrom(value);
@@ -2685,7 +3056,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
} else {
createTimeBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -2701,7 +3072,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
*
*/
public Builder clearCreateTime() {
- bitField0_ = (bitField0_ & ~0x00000100);
+ bitField0_ = (bitField0_ & ~0x00000200);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
@@ -2722,7 +3093,7 @@ public Builder clearCreateTime() {
*
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
@@ -2794,7 +3165,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
* @return Whether the updateTime field is set.
*/
public boolean hasUpdateTime() {
- return ((bitField0_ & 0x00000200) != 0);
+ return ((bitField0_ & 0x00000400) != 0);
}
/**
*
@@ -2838,7 +3209,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
} else {
updateTimeBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -2859,7 +3230,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal
} else {
updateTimeBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -2876,7 +3247,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal
*/
public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
- if (((bitField0_ & 0x00000200) != 0)
+ if (((bitField0_ & 0x00000400) != 0)
&& updateTime_ != null
&& updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getUpdateTimeBuilder().mergeFrom(value);
@@ -2886,7 +3257,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
} else {
updateTimeBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -2902,7 +3273,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
*
*/
public Builder clearUpdateTime() {
- bitField0_ = (bitField0_ & ~0x00000200);
+ bitField0_ = (bitField0_ & ~0x00000400);
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
@@ -2923,7 +3294,7 @@ public Builder clearUpdateTime() {
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return getUpdateTimeFieldBuilder().getBuilder();
}
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java
index 58a85a5a460..81305322e75 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceOrBuilder.java
@@ -121,8 +121,12 @@ public interface InstanceOrBuilder
*
*
* The number of nodes allocated to this instance. At most one of either
- * node_count or processing_units should be present in the message. This
- * may be zero in API responses for instances that are not yet in state
+ * node_count or processing_units should be present in the message.
+ *
+ * Users can set the node_count field to specify the target number of nodes
+ * allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
* `READY`.
*
* See [the
@@ -141,8 +145,13 @@ public interface InstanceOrBuilder
*
*
* The number of processing units allocated to this instance. At most one of
- * processing_units or node_count should be present in the message. This may
- * be zero in API responses for instances that are not yet in state `READY`.
+ * processing_units or node_count should be present in the message.
+ *
+ * Users can set the processing_units field to specify the target number of
+ * processing units allocated to the instance.
+ *
+ * This may be zero in API responses for instances that are not yet in state
+ * `READY`.
*
* See [the
* documentation](https://cloud.google.com/spanner/docs/compute-capacity)
@@ -155,6 +164,56 @@ public interface InstanceOrBuilder
*/
int getProcessingUnits();
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the autoscalingConfig field is set.
+ */
+ boolean hasAutoscalingConfig();
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The autoscalingConfig.
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfig getAutoscalingConfig();
+ /**
+ *
+ *
+ *
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this
+ * field is set. When autoscaling is enabled, node_count and processing_units
+ * are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ * allocated to the instance.
+ *
+ *
+ *
+ * .google.spanner.admin.instance.v1.AutoscalingConfig autoscaling_config = 17 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java
index bbc4edd718a..a4e360935ef 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/SpannerInstanceAdminProto.java
@@ -39,6 +39,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_spanner_admin_instance_v1_InstanceConfig_LabelsEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_spanner_admin_instance_v1_Instance_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -165,183 +177,198 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020"
+ "\001\022\t\n\005READY\020\002:`\352A]\n%spanner.googleapis.co"
+ "m/InstanceConfig\0224projects/{project}/ins"
- + "tanceConfigs/{instance_config}\"\363\004\n\010Insta"
- + "nce\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022>\n\006config\030\002 \001(\tB"
- + ".\342A\001\002\372A\'\n%spanner.googleapis.com/Instanc"
- + "eConfig\022\032\n\014display_name\030\003 \001(\tB\004\342A\001\002\022\022\n\nn"
- + "ode_count\030\005 \001(\005\022\030\n\020processing_units\030\t \001("
- + "\005\022E\n\005state\030\006 \001(\01620.google.spanner.admin."
- + "instance.v1.Instance.StateB\004\342A\001\003\022F\n\006labe"
- + "ls\030\007 \003(\01326.google.spanner.admin.instance"
- + ".v1.Instance.LabelsEntry\022\025\n\rendpoint_uri"
- + "s\030\010 \003(\t\0225\n\013create_time\030\013 \001(\0132\032.google.pr"
- + "otobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030\014 "
- + "\001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\032-\n"
- + "\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t"
- + ":\0028\001\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010"
- + "CREATING\020\001\022\t\n\005READY\020\002:M\352AJ\n\037spanner.goog"
- + "leapis.com/Instance\022\'projects/{project}/"
- + "instances/{instance}\"\211\001\n\032ListInstanceCon"
- + "figsRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cl"
- + "oudresourcemanager.googleapis.com/Projec"
- + "t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t"
- + "\"\202\001\n\033ListInstanceConfigsResponse\022J\n\020inst"
- + "ance_configs\030\001 \003(\01320.google.spanner.admi"
- + "n.instance.v1.InstanceConfig\022\027\n\017next_pag"
- + "e_token\030\002 \001(\t\"X\n\030GetInstanceConfigReques"
- + "t\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%spanner.google"
- + "apis.com/InstanceConfig\"\355\001\n\033CreateInstan"
- + "ceConfigRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-"
- + "\n+cloudresourcemanager.googleapis.com/Pr"
- + "oject\022 \n\022instance_config_id\030\002 \001(\tB\004\342A\001\002\022"
- + "O\n\017instance_config\030\003 \001(\01320.google.spanne"
- + "r.admin.instance.v1.InstanceConfigB\004\342A\001\002"
- + "\022\025\n\rvalidate_only\030\004 \001(\010\"\274\001\n\033UpdateInstan"
- + "ceConfigRequest\022O\n\017instance_config\030\001 \001(\013"
- + "20.google.spanner.admin.instance.v1.Inst"
- + "anceConfigB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032."
- + "google.protobuf.FieldMaskB\004\342A\001\002\022\025\n\rvalid"
- + "ate_only\030\003 \001(\010\"\200\001\n\033DeleteInstanceConfigR"
- + "equest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%spanner.g"
- + "oogleapis.com/InstanceConfig\022\014\n\004etag\030\002 \001"
- + "(\t\022\025\n\rvalidate_only\030\003 \001(\010\"\242\001\n#ListInstan"
- + "ceConfigOperationsRequest\022D\n\006parent\030\001 \001("
- + "\tB4\342A\001\002\372A-\n+cloudresourcemanager.googlea"
- + "pis.com/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_"
- + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"r\n$ListIn"
- + "stanceConfigOperationsResponse\0221\n\noperat"
- + "ions\030\001 \003(\0132\035.google.longrunning.Operatio"
- + "n\022\027\n\017next_page_token\030\002 \001(\t\"|\n\022GetInstanc"
- + "eRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037spanner"
- + ".googleapis.com/Instance\022.\n\nfield_mask\030\002"
- + " \001(\0132\032.google.protobuf.FieldMask\"\274\001\n\025Cre"
- + "ateInstanceRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002"
+ + "tanceConfigs/{instance_config}\"\367\003\n\021Autos"
+ + "calingConfig\022g\n\022autoscaling_limits\030\001 \001(\013"
+ + "2E.google.spanner.admin.instance.v1.Auto"
+ + "scalingConfig.AutoscalingLimitsB\004\342A\001\002\022i\n"
+ + "\023autoscaling_targets\030\002 \001(\0132F.google.span"
+ + "ner.admin.instance.v1.AutoscalingConfig."
+ + "AutoscalingTargetsB\004\342A\001\002\032\227\001\n\021Autoscaling"
+ + "Limits\022\023\n\tmin_nodes\030\001 \001(\005H\000\022\036\n\024min_proce"
+ + "ssing_units\030\002 \001(\005H\000\022\023\n\tmax_nodes\030\003 \001(\005H\001"
+ + "\022\036\n\024max_processing_units\030\004 \001(\005H\001B\013\n\tmin_"
+ + "limitB\013\n\tmax_limit\032t\n\022AutoscalingTargets"
+ + "\0223\n%high_priority_cpu_utilization_percen"
+ + "t\030\001 \001(\005B\004\342A\001\002\022)\n\033storage_utilization_per"
+ + "cent\030\002 \001(\005B\004\342A\001\002\"\312\005\n\010Instance\022\022\n\004name\030\001 "
+ + "\001(\tB\004\342A\001\002\022>\n\006config\030\002 \001(\tB.\342A\001\002\372A\'\n%span"
+ + "ner.googleapis.com/InstanceConfig\022\032\n\014dis"
+ + "play_name\030\003 \001(\tB\004\342A\001\002\022\022\n\nnode_count\030\005 \001("
+ + "\005\022\030\n\020processing_units\030\t \001(\005\022U\n\022autoscali"
+ + "ng_config\030\021 \001(\01323.google.spanner.admin.i"
+ + "nstance.v1.AutoscalingConfigB\004\342A\001\001\022E\n\005st"
+ + "ate\030\006 \001(\01620.google.spanner.admin.instanc"
+ + "e.v1.Instance.StateB\004\342A\001\003\022F\n\006labels\030\007 \003("
+ + "\01326.google.spanner.admin.instance.v1.Ins"
+ + "tance.LabelsEntry\022\025\n\rendpoint_uris\030\010 \003(\t"
+ + "\0225\n\013create_time\030\013 \001(\0132\032.google.protobuf."
+ + "TimestampB\004\342A\001\003\0225\n\013update_time\030\014 \001(\0132\032.g"
+ + "oogle.protobuf.TimestampB\004\342A\001\003\032-\n\013Labels"
+ + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"7\n"
+ + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATIN"
+ + "G\020\001\022\t\n\005READY\020\002:M\352AJ\n\037spanner.googleapis."
+ + "com/Instance\022\'projects/{project}/instanc"
+ + "es/{instance}\"\211\001\n\032ListInstanceConfigsReq"
+ + "uest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudreso"
+ + "urcemanager.googleapis.com/Project\022\021\n\tpa"
+ + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n\033Li"
+ + "stInstanceConfigsResponse\022J\n\020instance_co"
+ + "nfigs\030\001 \003(\01320.google.spanner.admin.insta"
+ + "nce.v1.InstanceConfig\022\027\n\017next_page_token"
+ + "\030\002 \001(\t\"X\n\030GetInstanceConfigRequest\022<\n\004na"
+ + "me\030\001 \001(\tB.\342A\001\002\372A\'\n%spanner.googleapis.co"
+ + "m/InstanceConfig\"\355\001\n\033CreateInstanceConfi"
+ + "gRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloud"
+ + "resourcemanager.googleapis.com/Project\022 "
+ + "\n\022instance_config_id\030\002 \001(\tB\004\342A\001\002\022O\n\017inst"
+ + "ance_config\030\003 \001(\01320.google.spanner.admin"
+ + ".instance.v1.InstanceConfigB\004\342A\001\002\022\025\n\rval"
+ + "idate_only\030\004 \001(\010\"\274\001\n\033UpdateInstanceConfi"
+ + "gRequest\022O\n\017instance_config\030\001 \001(\01320.goog"
+ + "le.spanner.admin.instance.v1.InstanceCon"
+ + "figB\004\342A\001\002\0225\n\013update_mask\030\002 \001(\0132\032.google."
+ + "protobuf.FieldMaskB\004\342A\001\002\022\025\n\rvalidate_onl"
+ + "y\030\003 \001(\010\"\200\001\n\033DeleteInstanceConfigRequest\022"
+ + "<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%spanner.googleap"
+ + "is.com/InstanceConfig\022\014\n\004etag\030\002 \001(\t\022\025\n\rv"
+ + "alidate_only\030\003 \001(\010\"\242\001\n#ListInstanceConfi"
+ + "gOperationsRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002"
+ "\372A-\n+cloudresourcemanager.googleapis.com"
- + "/Project\022\031\n\013instance_id\030\002 \001(\tB\004\342A\001\002\022B\n\010i"
- + "nstance\030\003 \001(\0132*.google.spanner.admin.ins"
- + "tance.v1.InstanceB\004\342A\001\002\"\223\001\n\024ListInstance"
- + "sRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloud"
- + "resourcemanager.googleapis.com/Project\022\021"
- + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n"
- + "\006filter\030\004 \001(\t\"o\n\025ListInstancesResponse\022="
- + "\n\tinstances\030\001 \003(\0132*.google.spanner.admin"
- + ".instance.v1.Instance\022\027\n\017next_page_token"
- + "\030\002 \001(\t\"\221\001\n\025UpdateInstanceRequest\022B\n\010inst"
- + "ance\030\001 \001(\0132*.google.spanner.admin.instan"
- + "ce.v1.InstanceB\004\342A\001\002\0224\n\nfield_mask\030\002 \001(\013"
- + "2\032.google.protobuf.FieldMaskB\004\342A\001\002\"O\n\025De"
- + "leteInstanceRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372"
- + "A!\n\037spanner.googleapis.com/Instance\"\345\001\n\026"
- + "CreateInstanceMetadata\022<\n\010instance\030\001 \001(\013"
- + "2*.google.spanner.admin.instance.v1.Inst"
- + "ance\022.\n\nstart_time\030\002 \001(\0132\032.google.protob"
- + "uf.Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.goog"
- + "le.protobuf.Timestamp\022,\n\010end_time\030\004 \001(\0132"
- + "\032.google.protobuf.Timestamp\"\345\001\n\026UpdateIn"
- + "stanceMetadata\022<\n\010instance\030\001 \001(\0132*.googl"
- + "e.spanner.admin.instance.v1.Instance\022.\n\n"
- + "start_time\030\002 \001(\0132\032.google.protobuf.Times"
- + "tamp\022/\n\013cancel_time\030\003 \001(\0132\032.google.proto"
- + "buf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.google"
- + ".protobuf.Timestamp\"\341\001\n\034CreateInstanceCo"
- + "nfigMetadata\022I\n\017instance_config\030\001 \001(\01320."
- + "google.spanner.admin.instance.v1.Instanc"
- + "eConfig\022E\n\010progress\030\002 \001(\01323.google.spann"
- + "er.admin.instance.v1.OperationProgress\022/"
- + "\n\013cancel_time\030\003 \001(\0132\032.google.protobuf.Ti"
- + "mestamp\"\341\001\n\034UpdateInstanceConfigMetadata"
- + "\022I\n\017instance_config\030\001 \001(\01320.google.spann"
- + "er.admin.instance.v1.InstanceConfig\022E\n\010p"
- + "rogress\030\002 \001(\01323.google.spanner.admin.ins"
- + "tance.v1.OperationProgress\022/\n\013cancel_tim"
- + "e\030\003 \001(\0132\032.google.protobuf.Timestamp2\362\030\n\r"
- + "InstanceAdmin\022\314\001\n\023ListInstanceConfigs\022<."
- + "google.spanner.admin.instance.v1.ListIns"
- + "tanceConfigsRequest\032=.google.spanner.adm"
- + "in.instance.v1.ListInstanceConfigsRespon"
- + "se\"8\332A\006parent\202\323\344\223\002)\022\'/v1/{parent=project"
- + "s/*}/instanceConfigs\022\271\001\n\021GetInstanceConf"
- + "ig\022:.google.spanner.admin.instance.v1.Ge"
- + "tInstanceConfigRequest\0320.google.spanner."
- + "admin.instance.v1.InstanceConfig\"6\332A\004nam"
- + "e\202\323\344\223\002)\022\'/v1/{name=projects/*/instanceCo"
- + "nfigs/*}\022\310\002\n\024CreateInstanceConfig\022=.goog"
- + "le.spanner.admin.instance.v1.CreateInsta"
- + "nceConfigRequest\032\035.google.longrunning.Op"
- + "eration\"\321\001\312Ap\n/google.spanner.admin.inst"
- + "ance.v1.InstanceConfig\022=google.spanner.a"
- + "dmin.instance.v1.CreateInstanceConfigMet"
- + "adata\332A)parent,instance_config,instance_"
- + "config_id\202\323\344\223\002,\"\'/v1/{parent=projects/*}"
- + "/instanceConfigs:\001*\022\312\002\n\024UpdateInstanceCo"
- + "nfig\022=.google.spanner.admin.instance.v1."
- + "UpdateInstanceConfigRequest\032\035.google.lon"
- + "grunning.Operation\"\323\001\312Ap\n/google.spanner"
- + ".admin.instance.v1.InstanceConfig\022=googl"
- + "e.spanner.admin.instance.v1.UpdateInstan"
- + "ceConfigMetadata\332A\033instance_config,updat"
- + "e_mask\202\323\344\223\002<27/v1/{instance_config.name="
- + "projects/*/instanceConfigs/*}:\001*\022\245\001\n\024Del"
- + "eteInstanceConfig\022=.google.spanner.admin"
- + ".instance.v1.DeleteInstanceConfigRequest"
- + "\032\026.google.protobuf.Empty\"6\332A\004name\202\323\344\223\002)*"
- + "\'/v1/{name=projects/*/instanceConfigs/*}"
- + "\022\360\001\n\034ListInstanceConfigOperations\022E.goog"
- + "le.spanner.admin.instance.v1.ListInstanc"
- + "eConfigOperationsRequest\032F.google.spanne"
- + "r.admin.instance.v1.ListInstanceConfigOp"
- + "erationsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{"
- + "parent=projects/*}/instanceConfigOperati"
- + "ons\022\264\001\n\rListInstances\0226.google.spanner.a"
- + "dmin.instance.v1.ListInstancesRequest\0327."
- + "google.spanner.admin.instance.v1.ListIns"
- + "tancesResponse\"2\332A\006parent\202\323\344\223\002#\022!/v1/{pa"
- + "rent=projects/*}/instances\022\241\001\n\013GetInstan"
- + "ce\0224.google.spanner.admin.instance.v1.Ge"
- + "tInstanceRequest\032*.google.spanner.admin."
- + "instance.v1.Instance\"0\332A\004name\202\323\344\223\002#\022!/v1"
- + "/{name=projects/*/instances/*}\022\234\002\n\016Creat"
+ + "/Project\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 "
+ + "\001(\005\022\022\n\npage_token\030\004 \001(\t\"r\n$ListInstanceC"
+ + "onfigOperationsResponse\0221\n\noperations\030\001 "
+ + "\003(\0132\035.google.longrunning.Operation\022\027\n\017ne"
+ + "xt_page_token\030\002 \001(\t\"|\n\022GetInstanceReques"
+ + "t\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037spanner.google"
+ + "apis.com/Instance\022.\n\nfield_mask\030\002 \001(\0132\032."
+ + "google.protobuf.FieldMask\"\274\001\n\025CreateInst"
+ + "anceRequest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cl"
+ + "oudresourcemanager.googleapis.com/Projec"
+ + "t\022\031\n\013instance_id\030\002 \001(\tB\004\342A\001\002\022B\n\010instance"
+ + "\030\003 \001(\0132*.google.spanner.admin.instance.v"
+ + "1.InstanceB\004\342A\001\002\"\223\001\n\024ListInstancesReques"
+ + "t\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudresourc"
+ + "emanager.googleapis.com/Project\022\021\n\tpage_"
+ + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter"
+ + "\030\004 \001(\t\"o\n\025ListInstancesResponse\022=\n\tinsta"
+ + "nces\030\001 \003(\0132*.google.spanner.admin.instan"
+ + "ce.v1.Instance\022\027\n\017next_page_token\030\002 \001(\t\""
+ + "\221\001\n\025UpdateInstanceRequest\022B\n\010instance\030\001 "
+ + "\001(\0132*.google.spanner.admin.instance.v1.I"
+ + "nstanceB\004\342A\001\002\0224\n\nfield_mask\030\002 \001(\0132\032.goog"
+ + "le.protobuf.FieldMaskB\004\342A\001\002\"O\n\025DeleteIns"
+ + "tanceRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037spa"
+ + "nner.googleapis.com/Instance\"\345\001\n\026CreateI"
+ + "nstanceMetadata\022<\n\010instance\030\001 \001(\0132*.goog"
+ + "le.spanner.admin.instance.v1.Instance\022.\n"
+ + "\nstart_time\030\002 \001(\0132\032.google.protobuf.Time"
+ + "stamp\022/\n\013cancel_time\030\003 \001(\0132\032.google.prot"
+ + "obuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.googl"
+ + "e.protobuf.Timestamp\"\345\001\n\026UpdateInstanceM"
+ + "etadata\022<\n\010instance\030\001 \001(\0132*.google.spann"
+ + "er.admin.instance.v1.Instance\022.\n\nstart_t"
+ + "ime\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n"
+ + "\013cancel_time\030\003 \001(\0132\032.google.protobuf.Tim"
+ + "estamp\022,\n\010end_time\030\004 \001(\0132\032.google.protob"
+ + "uf.Timestamp\"\341\001\n\034CreateInstanceConfigMet"
+ + "adata\022I\n\017instance_config\030\001 \001(\01320.google."
+ + "spanner.admin.instance.v1.InstanceConfig"
+ + "\022E\n\010progress\030\002 \001(\01323.google.spanner.admi"
+ + "n.instance.v1.OperationProgress\022/\n\013cance"
+ + "l_time\030\003 \001(\0132\032.google.protobuf.Timestamp"
+ + "\"\341\001\n\034UpdateInstanceConfigMetadata\022I\n\017ins"
+ + "tance_config\030\001 \001(\01320.google.spanner.admi"
+ + "n.instance.v1.InstanceConfig\022E\n\010progress"
+ + "\030\002 \001(\01323.google.spanner.admin.instance.v"
+ + "1.OperationProgress\022/\n\013cancel_time\030\003 \001(\013"
+ + "2\032.google.protobuf.Timestamp2\362\030\n\rInstanc"
+ + "eAdmin\022\314\001\n\023ListInstanceConfigs\022<.google."
+ + "spanner.admin.instance.v1.ListInstanceCo"
+ + "nfigsRequest\032=.google.spanner.admin.inst"
+ + "ance.v1.ListInstanceConfigsResponse\"8\332A\006"
+ + "parent\202\323\344\223\002)\022\'/v1/{parent=projects/*}/in"
+ + "stanceConfigs\022\271\001\n\021GetInstanceConfig\022:.go"
+ + "ogle.spanner.admin.instance.v1.GetInstan"
+ + "ceConfigRequest\0320.google.spanner.admin.i"
+ + "nstance.v1.InstanceConfig\"6\332A\004name\202\323\344\223\002)"
+ + "\022\'/v1/{name=projects/*/instanceConfigs/*"
+ + "}\022\310\002\n\024CreateInstanceConfig\022=.google.span"
+ + "ner.admin.instance.v1.CreateInstanceConf"
+ + "igRequest\032\035.google.longrunning.Operation"
+ + "\"\321\001\312Ap\n/google.spanner.admin.instance.v1"
+ + ".InstanceConfig\022=google.spanner.admin.in"
+ + "stance.v1.CreateInstanceConfigMetadata\332A"
+ + ")parent,instance_config,instance_config_"
+ + "id\202\323\344\223\002,\"\'/v1/{parent=projects/*}/instan"
+ + "ceConfigs:\001*\022\312\002\n\024UpdateInstanceConfig\022=."
+ + "google.spanner.admin.instance.v1.UpdateI"
+ + "nstanceConfigRequest\032\035.google.longrunnin"
+ + "g.Operation\"\323\001\312Ap\n/google.spanner.admin."
+ + "instance.v1.InstanceConfig\022=google.spann"
+ + "er.admin.instance.v1.UpdateInstanceConfi"
+ + "gMetadata\332A\033instance_config,update_mask\202"
+ + "\323\344\223\002<27/v1/{instance_config.name=project"
+ + "s/*/instanceConfigs/*}:\001*\022\245\001\n\024DeleteInst"
+ + "anceConfig\022=.google.spanner.admin.instan"
+ + "ce.v1.DeleteInstanceConfigRequest\032\026.goog"
+ + "le.protobuf.Empty\"6\332A\004name\202\323\344\223\002)*\'/v1/{n"
+ + "ame=projects/*/instanceConfigs/*}\022\360\001\n\034Li"
+ + "stInstanceConfigOperations\022E.google.span"
+ + "ner.admin.instance.v1.ListInstanceConfig"
+ + "OperationsRequest\032F.google.spanner.admin"
+ + ".instance.v1.ListInstanceConfigOperation"
+ + "sResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{parent="
+ + "projects/*}/instanceConfigOperations\022\264\001\n"
+ + "\rListInstances\0226.google.spanner.admin.in"
+ + "stance.v1.ListInstancesRequest\0327.google."
+ + "spanner.admin.instance.v1.ListInstancesR"
+ + "esponse\"2\332A\006parent\202\323\344\223\002#\022!/v1/{parent=pr"
+ + "ojects/*}/instances\022\241\001\n\013GetInstance\0224.go"
+ + "ogle.spanner.admin.instance.v1.GetInstan"
+ + "ceRequest\032*.google.spanner.admin.instanc"
+ + "e.v1.Instance\"0\332A\004name\202\323\344\223\002#\022!/v1/{name="
+ + "projects/*/instances/*}\022\234\002\n\016CreateInstan"
+ + "ce\0227.google.spanner.admin.instance.v1.Cr"
+ + "eateInstanceRequest\032\035.google.longrunning"
+ + ".Operation\"\261\001\312Ad\n)google.spanner.admin.i"
+ + "nstance.v1.Instance\0227google.spanner.admi"
+ + "n.instance.v1.CreateInstanceMetadata\332A\033p"
+ + "arent,instance_id,instance\202\323\344\223\002&\"!/v1/{p"
+ + "arent=projects/*}/instances:\001*\022\235\002\n\016Updat"
+ "eInstance\0227.google.spanner.admin.instanc"
- + "e.v1.CreateInstanceRequest\032\035.google.long"
- + "running.Operation\"\261\001\312Ad\n)google.spanner."
+ + "e.v1.UpdateInstanceRequest\032\035.google.long"
+ + "running.Operation\"\262\001\312Ad\n)google.spanner."
+ "admin.instance.v1.Instance\0227google.spann"
- + "er.admin.instance.v1.CreateInstanceMetad"
- + "ata\332A\033parent,instance_id,instance\202\323\344\223\002&\""
- + "!/v1/{parent=projects/*}/instances:\001*\022\235\002"
- + "\n\016UpdateInstance\0227.google.spanner.admin."
- + "instance.v1.UpdateInstanceRequest\032\035.goog"
- + "le.longrunning.Operation\"\262\001\312Ad\n)google.s"
- + "panner.admin.instance.v1.Instance\0227googl"
- + "e.spanner.admin.instance.v1.UpdateInstan"
- + "ceMetadata\332A\023instance,field_mask\202\323\344\223\002/2*"
- + "/v1/{instance.name=projects/*/instances/"
- + "*}:\001*\022\223\001\n\016DeleteInstance\0227.google.spanne"
- + "r.admin.instance.v1.DeleteInstanceReques"
- + "t\032\026.google.protobuf.Empty\"0\332A\004name\202\323\344\223\002#"
- + "*!/v1/{name=projects/*/instances/*}\022\232\001\n\014"
- + "SetIamPolicy\022\".google.iam.v1.SetIamPolic"
- + "yRequest\032\025.google.iam.v1.Policy\"O\332A\017reso"
- + "urce,policy\202\323\344\223\0027\"2/v1/{resource=project"
- + "s/*/instances/*}:setIamPolicy:\001*\022\223\001\n\014Get"
- + "IamPolicy\022\".google.iam.v1.GetIamPolicyRe"
- + "quest\032\025.google.iam.v1.Policy\"H\332A\010resourc"
- + "e\202\323\344\223\0027\"2/v1/{resource=projects/*/instan"
- + "ces/*}:getIamPolicy:\001*\022\305\001\n\022TestIamPermis"
- + "sions\022(.google.iam.v1.TestIamPermissions"
- + "Request\032).google.iam.v1.TestIamPermissio"
- + "nsResponse\"Z\332A\024resource,permissions\202\323\344\223\002"
- + "=\"8/v1/{resource=projects/*/instances/*}"
- + ":testIamPermissions:\001*\032x\312A\026spanner.googl"
- + "eapis.com\322A\\https://www.googleapis.com/a"
- + "uth/cloud-platform,https://www.googleapi"
- + "s.com/auth/spanner.adminB\213\002\n$com.google."
- + "spanner.admin.instance.v1B\031SpannerInstan"
- + "ceAdminProtoP\001ZFcloud.google.com/go/span"
- + "ner/admin/instance/apiv1/instancepb;inst"
- + "ancepb\252\002&Google.Cloud.Spanner.Admin.Inst"
- + "ance.V1\312\002&Google\\Cloud\\Spanner\\Admin\\Ins"
- + "tance\\V1\352\002+Google::Cloud::Spanner::Admin"
- + "::Instance::V1b\006proto3"
+ + "er.admin.instance.v1.UpdateInstanceMetad"
+ + "ata\332A\023instance,field_mask\202\323\344\223\002/2*/v1/{in"
+ + "stance.name=projects/*/instances/*}:\001*\022\223"
+ + "\001\n\016DeleteInstance\0227.google.spanner.admin"
+ + ".instance.v1.DeleteInstanceRequest\032\026.goo"
+ + "gle.protobuf.Empty\"0\332A\004name\202\323\344\223\002#*!/v1/{"
+ + "name=projects/*/instances/*}\022\232\001\n\014SetIamP"
+ + "olicy\022\".google.iam.v1.SetIamPolicyReques"
+ + "t\032\025.google.iam.v1.Policy\"O\332A\017resource,po"
+ + "licy\202\323\344\223\0027\"2/v1/{resource=projects/*/ins"
+ + "tances/*}:setIamPolicy:\001*\022\223\001\n\014GetIamPoli"
+ + "cy\022\".google.iam.v1.GetIamPolicyRequest\032\025"
+ + ".google.iam.v1.Policy\"H\332A\010resource\202\323\344\223\0027"
+ + "\"2/v1/{resource=projects/*/instances/*}:"
+ + "getIamPolicy:\001*\022\305\001\n\022TestIamPermissions\022("
+ + ".google.iam.v1.TestIamPermissionsRequest"
+ + "\032).google.iam.v1.TestIamPermissionsRespo"
+ + "nse\"Z\332A\024resource,permissions\202\323\344\223\002=\"8/v1/"
+ + "{resource=projects/*/instances/*}:testIa"
+ + "mPermissions:\001*\032x\312A\026spanner.googleapis.c"
+ + "om\322A\\https://www.googleapis.com/auth/clo"
+ + "ud-platform,https://www.googleapis.com/a"
+ + "uth/spanner.adminB\213\002\n$com.google.spanner"
+ + ".admin.instance.v1B\031SpannerInstanceAdmin"
+ + "ProtoP\001ZFcloud.google.com/go/spanner/adm"
+ + "in/instance/apiv1/instancepb;instancepb\252"
+ + "\002&Google.Cloud.Spanner.Admin.Instance.V1"
+ + "\312\002&Google\\Cloud\\Spanner\\Admin\\Instance\\V"
+ + "1\352\002+Google::Cloud::Spanner::Admin::Insta"
+ + "nce::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -395,8 +422,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"Key", "Value",
});
- internal_static_google_spanner_admin_instance_v1_Instance_descriptor =
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor =
getDescriptor().getMessageTypes().get(2);
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor,
+ new java.lang.String[] {
+ "AutoscalingLimits", "AutoscalingTargets",
+ });
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor =
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor,
+ new java.lang.String[] {
+ "MinNodes",
+ "MinProcessingUnits",
+ "MaxNodes",
+ "MaxProcessingUnits",
+ "MinLimit",
+ "MaxLimit",
+ });
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor =
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor
+ .getNestedTypes()
+ .get(1);
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor,
+ new java.lang.String[] {
+ "HighPriorityCpuUtilizationPercent", "StorageUtilizationPercent",
+ });
+ internal_static_google_spanner_admin_instance_v1_Instance_descriptor =
+ getDescriptor().getMessageTypes().get(3);
internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_Instance_descriptor,
@@ -406,6 +466,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"DisplayName",
"NodeCount",
"ProcessingUnits",
+ "AutoscalingConfig",
"State",
"Labels",
"EndpointUris",
@@ -423,7 +484,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Key", "Value",
});
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor =
- getDescriptor().getMessageTypes().get(3);
+ getDescriptor().getMessageTypes().get(4);
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor,
@@ -431,7 +492,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "PageSize", "PageToken",
});
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor =
- getDescriptor().getMessageTypes().get(4);
+ getDescriptor().getMessageTypes().get(5);
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor,
@@ -439,7 +500,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"InstanceConfigs", "NextPageToken",
});
internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor =
- getDescriptor().getMessageTypes().get(5);
+ getDescriptor().getMessageTypes().get(6);
internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor,
@@ -447,7 +508,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name",
});
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor =
- getDescriptor().getMessageTypes().get(6);
+ getDescriptor().getMessageTypes().get(7);
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor,
@@ -455,7 +516,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "InstanceConfigId", "InstanceConfig", "ValidateOnly",
});
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor =
- getDescriptor().getMessageTypes().get(7);
+ getDescriptor().getMessageTypes().get(8);
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor,
@@ -463,7 +524,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"InstanceConfig", "UpdateMask", "ValidateOnly",
});
internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor =
- getDescriptor().getMessageTypes().get(8);
+ getDescriptor().getMessageTypes().get(9);
internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor,
@@ -471,7 +532,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name", "Etag", "ValidateOnly",
});
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor =
- getDescriptor().getMessageTypes().get(9);
+ getDescriptor().getMessageTypes().get(10);
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor,
@@ -479,7 +540,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "Filter", "PageSize", "PageToken",
});
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor =
- getDescriptor().getMessageTypes().get(10);
+ getDescriptor().getMessageTypes().get(11);
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor,
@@ -487,7 +548,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Operations", "NextPageToken",
});
internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor =
- getDescriptor().getMessageTypes().get(11);
+ getDescriptor().getMessageTypes().get(12);
internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor,
@@ -495,7 +556,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name", "FieldMask",
});
internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor =
- getDescriptor().getMessageTypes().get(12);
+ getDescriptor().getMessageTypes().get(13);
internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor,
@@ -503,7 +564,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "InstanceId", "Instance",
});
internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor =
- getDescriptor().getMessageTypes().get(13);
+ getDescriptor().getMessageTypes().get(14);
internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor,
@@ -511,7 +572,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "PageSize", "PageToken", "Filter",
});
internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor =
- getDescriptor().getMessageTypes().get(14);
+ getDescriptor().getMessageTypes().get(15);
internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor,
@@ -519,7 +580,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Instances", "NextPageToken",
});
internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor =
- getDescriptor().getMessageTypes().get(15);
+ getDescriptor().getMessageTypes().get(16);
internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor,
@@ -527,7 +588,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Instance", "FieldMask",
});
internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor =
- getDescriptor().getMessageTypes().get(16);
+ getDescriptor().getMessageTypes().get(17);
internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor,
@@ -535,7 +596,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name",
});
internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor =
- getDescriptor().getMessageTypes().get(17);
+ getDescriptor().getMessageTypes().get(18);
internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor,
@@ -543,7 +604,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Instance", "StartTime", "CancelTime", "EndTime",
});
internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor =
- getDescriptor().getMessageTypes().get(18);
+ getDescriptor().getMessageTypes().get(19);
internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor,
@@ -551,7 +612,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Instance", "StartTime", "CancelTime", "EndTime",
});
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor =
- getDescriptor().getMessageTypes().get(19);
+ getDescriptor().getMessageTypes().get(20);
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor,
@@ -559,7 +620,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"InstanceConfig", "Progress", "CancelTime",
});
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor =
- getDescriptor().getMessageTypes().get(20);
+ getDescriptor().getMessageTypes().get(21);
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor,
diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto
index 0b4a35705b4..58051df00f1 100644
--- a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto
+++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/spanner_instance_admin.proto
@@ -562,6 +562,66 @@ message InstanceConfig {
State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
}
+// Autoscaling config for an instance.
+message AutoscalingConfig {
+ // The autoscaling limits for the instance. Users can define the minimum and
+ // maximum compute capacity allocated to the instance, and the autoscaler will
+ // only scale within that range. Users can either use nodes or processing
+ // units to specify the limits, but should use the same unit to set both the
+ // min_limit and max_limit.
+ message AutoscalingLimits {
+ // The minimum compute capacity for the instance.
+ oneof min_limit {
+ // Minimum number of nodes allocated to the instance. If set, this number
+ // should be greater than or equal to 1.
+ int32 min_nodes = 1;
+
+ // Minimum number of processing units allocated to the instance. If set,
+ // this number should be multiples of 1000.
+ int32 min_processing_units = 2;
+ }
+
+ // The maximum compute capacity for the instance. The maximum compute
+ // capacity should be less than or equal to 10X the minimum compute
+ // capacity.
+ oneof max_limit {
+ // Maximum number of nodes allocated to the instance. If set, this number
+ // should be greater than or equal to min_nodes.
+ int32 max_nodes = 3;
+
+ // Maximum number of processing units allocated to the instance. If set,
+ // this number should be multiples of 1000 and be greater than or equal to
+ // min_processing_units.
+ int32 max_processing_units = 4;
+ }
+ }
+
+ // The autoscaling targets for an instance.
+ message AutoscalingTargets {
+ // Required. The target high priority cpu utilization percentage that the
+ // autoscaler should be trying to achieve for the instance. This number is
+ // on a scale from 0 (no utilization) to 100 (full utilization). The valid
+ // range is [10, 90] inclusive.
+ int32 high_priority_cpu_utilization_percent = 1
+ [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The target storage utilization percentage that the autoscaler
+ // should be trying to achieve for the instance. This number is on a scale
+ // from 0 (no utilization) to 100 (full utilization). The valid range is
+ // [10, 100] inclusive.
+ int32 storage_utilization_percent = 2
+ [(google.api.field_behavior) = REQUIRED];
+ }
+
+ // Required. Autoscaling limits for an instance.
+ AutoscalingLimits autoscaling_limits = 1
+ [(google.api.field_behavior) = REQUIRED];
+
+ // Required. The autoscaling targets for an instance.
+ AutoscalingTargets autoscaling_targets = 2
+ [(google.api.field_behavior) = REQUIRED];
+}
+
// An isolated set of Cloud Spanner resources on which databases can be hosted.
message Instance {
option (google.api.resource) = {
@@ -606,8 +666,12 @@ message Instance {
string display_name = 3 [(google.api.field_behavior) = REQUIRED];
// The number of nodes allocated to this instance. At most one of either
- // node_count or processing_units should be present in the message. This
- // may be zero in API responses for instances that are not yet in state
+ // node_count or processing_units should be present in the message.
+ //
+ // Users can set the node_count field to specify the target number of nodes
+ // allocated to the instance.
+ //
+ // This may be zero in API responses for instances that are not yet in state
// `READY`.
//
// See [the
@@ -616,14 +680,26 @@ message Instance {
int32 node_count = 5;
// The number of processing units allocated to this instance. At most one of
- // processing_units or node_count should be present in the message. This may
- // be zero in API responses for instances that are not yet in state `READY`.
+ // processing_units or node_count should be present in the message.
+ //
+ // Users can set the processing_units field to specify the target number of
+ // processing units allocated to the instance.
+ //
+ // This may be zero in API responses for instances that are not yet in state
+ // `READY`.
//
// See [the
// documentation](https://cloud.google.com/spanner/docs/compute-capacity)
// for more information about nodes and processing units.
int32 processing_units = 9;
+ // Optional. The autoscaling configuration. Autoscaling is enabled if this
+ // field is set. When autoscaling is enabled, node_count and processing_units
+ // are treated as OUTPUT_ONLY fields and reflect the current compute capacity
+ // allocated to the instance.
+ AutoscalingConfig autoscaling_config = 17
+ [(google.api.field_behavior) = OPTIONAL];
+
// Output only. The current instance state. For
// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
// the state must be either omitted or set to `CREATING`. For
From 54d45113a564c2f838c6f9a22d9df3684ae7cc94 Mon Sep 17 00:00:00 2001
From: gyang-google <48337601+gyang-google@users.noreply.github.com>
Date: Fri, 13 Oct 2023 17:02:29 +0000
Subject: [PATCH 5/7] chore: fix typos in the executor (#2671)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Update CloudClientExecutor.java
Fix typos in the executor.
* reformat the code.
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot
---
.../executor/spanner/CloudClientExecutor.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
index 651a920dec2..ffcf61b96b8 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
@@ -632,7 +632,7 @@ public void setDatabaseClient(DatabaseClient client) {
dbClient = client;
}
- /** Return a list of serviceKeyFile column types of the given table. */
+ /** Return a list of key column types of the given table. */
public List getKeyColumnTypes(String tableName)
throws SpannerException {
Preconditions.checkNotNull(metadata);
@@ -2381,7 +2381,7 @@ private Status executeRead(
String.format("Executing read %s\n%s\n", executionContext.getTransactionSeed(), action));
List typeList = new ArrayList<>();
if (action.hasIndex()) {
- // For index read, we assume the serviceKeyFile columns are listed at the front of the read
+ // For index read, we assume the key columns are listed at the front of the read
// column
// list.
for (int i = 0; i < action.getColumnCount(); ++i) {
@@ -2900,11 +2900,11 @@ private static com.google.cloud.spanner.KeyRange keyRangeProtoToCloudKeyRange(
// Unreachable.
default:
throw SpannerExceptionFactory.newSpannerException(
- ErrorCode.INVALID_ARGUMENT, "Unrecognized serviceKeyFile range type");
+ ErrorCode.INVALID_ARGUMENT, "Unrecognized key range type");
}
}
- /** Convert a serviceKeyFile proto(value list) to a cloud Key. */
+ /** Convert a key proto(value list) to a cloud Key. */
private static com.google.cloud.spanner.Key keyProtoToCloudKey(
com.google.spanner.executor.v1.ValueList keyProto, List typeList)
throws SpannerException {
@@ -2912,7 +2912,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
if (typeList.size() < keyProto.getValueCount()) {
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
- "There's more serviceKeyFile parts in " + keyProto + " than column types in " + typeList);
+ "There's more key parts in " + keyProto + " than column types in " + typeList);
}
for (int i = 0; i < keyProto.getValueCount(); ++i) {
@@ -2934,7 +2934,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
default:
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
- "Unsupported null serviceKeyFile part type: " + type.getCode().name());
+ "Unsupported null key part type: " + type.getCode().name());
}
} else if (part.hasIntValue()) {
cloudKey.append(part.getIntValue());
@@ -2953,8 +2953,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
// Unreachable
default:
throw SpannerExceptionFactory.newSpannerException(
- ErrorCode.INVALID_ARGUMENT,
- "Unsupported serviceKeyFile part type: " + type.getCode().name());
+ ErrorCode.INVALID_ARGUMENT, "Unsupported key part type: " + type.getCode().name());
}
} else if (part.hasStringValue()) {
if (type.getCode() == TypeCode.NUMERIC) {
@@ -2969,7 +2968,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
cloudKey.append(dateFromDays(part.getDateDaysValue()));
} else {
throw SpannerExceptionFactory.newSpannerException(
- ErrorCode.INVALID_ARGUMENT, "Unsupported serviceKeyFile part: " + part);
+ ErrorCode.INVALID_ARGUMENT, "Unsupported key part: " + part);
}
}
return cloudKey.build();
From 74fd174a84f6f97949b9caaadddf366aafd4a469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?=
Date: Sat, 14 Oct 2023 11:08:21 +0200
Subject: [PATCH 6/7] fix: always include default client lib header (#2676)
---
.../cloud/spanner/spi/v1/GapicSpannerRpc.java | 4 ++-
.../spanner/spi/v1/GapicSpannerRpcTest.java | 29 +++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
index bdf038f0be7..8499e7f4b67 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
@@ -55,6 +55,7 @@
import com.google.api.pathtemplate.PathTemplate;
import com.google.cloud.RetryHelper;
import com.google.cloud.RetryHelper.RetryHelperException;
+import com.google.cloud.ServiceOptions;
import com.google.cloud.grpc.GcpManagedChannelBuilder;
import com.google.cloud.grpc.GcpManagedChannelOptions;
import com.google.cloud.grpc.GcpManagedChannelOptions.GcpMetricsOptions;
@@ -296,7 +297,8 @@ public GapicSpannerRpc(final SpannerOptions options) {
ApiClientHeaderProvider internalHeaderProvider =
internalHeaderProviderBuilder
.setClientLibToken(
- options.getClientLibToken(), GaxProperties.getLibraryVersion(options.getClass()))
+ options.getClientLibToken() + " " + ServiceOptions.getGoogApiClientLibName(),
+ GaxProperties.getLibraryVersion(options.getClass()))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion())
.build();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
index d32dc518714..45945c0be08 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
@@ -33,6 +33,7 @@
import com.google.api.gax.rpc.HeaderProvider;
import com.google.auth.oauth2.AccessToken;
import com.google.auth.oauth2.OAuth2Credentials;
+import com.google.cloud.ServiceOptions;
import com.google.cloud.spanner.DatabaseClient;
import com.google.cloud.spanner.DatabaseId;
import com.google.cloud.spanner.Dialect;
@@ -77,6 +78,7 @@
import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Before;
@@ -181,6 +183,12 @@ public ServerCall.Listener interceptCall(
String auth =
headers.get(Key.of("authorization", Metadata.ASCII_STRING_MARSHALLER));
assertThat(auth).isEqualTo("Bearer " + VARIABLE_OAUTH_TOKEN);
+ String clientLibToken =
+ headers.get(
+ Metadata.Key.of("x-goog-api-client", Metadata.ASCII_STRING_MARSHALLER));
+ assertNotNull(clientLibToken);
+ assertTrue(
+ clientLibToken.contains(ServiceOptions.getGoogApiClientLibName() + "/"));
if (call.getMethodDescriptor()
.equals(SpannerGrpc.getExecuteStreamingSqlMethod())
|| call.getMethodDescriptor().equals(SpannerGrpc.getExecuteSqlMethod())) {
@@ -575,6 +583,27 @@ public void testRouteToLeaderHeaderWithLeaderAwareRoutingDisabled() {
assertFalse(isRouteToLeader);
}
+ @Test
+ public void testCustomClientLibToken_alsoContainsDefaultToken() {
+ SpannerOptions options =
+ createSpannerOptions().toBuilder().setClientLibToken("pg-adapter").build();
+ try (Spanner spanner = options.getService()) {
+ DatabaseClient databaseClient =
+ spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"));
+ TransactionRunner runner = databaseClient.readWriteTransaction();
+ runner.run(transaction -> transaction.executeUpdate(UPDATE_FOO_STATEMENT));
+ }
+ Key key = Key.of("x-goog-api-client", Metadata.ASCII_STRING_MARSHALLER);
+ assertTrue(lastSeenHeaders.containsKey(key));
+ assertTrue(
+ lastSeenHeaders.get(key),
+ Objects.requireNonNull(lastSeenHeaders.get(key)).contains("pg-adapter"));
+ assertTrue(
+ lastSeenHeaders.get(key),
+ Objects.requireNonNull(lastSeenHeaders.get(key))
+ .contains(ServiceOptions.getGoogApiClientLibName() + "/"));
+ }
+
private SpannerOptions createSpannerOptions() {
String endpoint = address.getHostString() + ":" + server.getPort();
return SpannerOptions.newBuilder()
From 3555719304af1438c8052bff382e501c8e49b1ba Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Sat, 14 Oct 2023 14:27:15 +0200
Subject: [PATCH 7/7] chore(main): release 6.51.0 (#2675)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
---
CHANGELOG.md | 12 +++++++++++
google-cloud-spanner-bom/pom.xml | 20 +++++++++----------
google-cloud-spanner-executor/pom.xml | 4 ++--
google-cloud-spanner/pom.xml | 4 ++--
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
grpc-google-cloud-spanner-v1/pom.xml | 4 ++--
pom.xml | 16 +++++++--------
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
proto-google-cloud-spanner-v1/pom.xml | 4 ++--
samples/snapshot/pom.xml | 2 +-
versions.txt | 16 +++++++--------
13 files changed, 55 insertions(+), 43 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 419b749542c..5a661788b4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## [6.51.0](https://github.com/googleapis/java-spanner/compare/v6.50.1...v6.51.0) (2023-10-14)
+
+
+### Features
+
+* **spanner:** Add autoscaling config to the instance proto ([#2674](https://github.com/googleapis/java-spanner/issues/2674)) ([8d38ca3](https://github.com/googleapis/java-spanner/commit/8d38ca393a6c0f9df18c9d02fa9392e11af01246))
+
+
+### Bug Fixes
+
+* Always include default client lib header ([#2676](https://github.com/googleapis/java-spanner/issues/2676)) ([74fd174](https://github.com/googleapis/java-spanner/commit/74fd174a84f6f97949b9caaadddf366aafd4a469))
+
## [6.50.1](https://github.com/googleapis/java-spanner/compare/v6.50.0...v6.50.1) (2023-10-11)
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index 88b565e0227..7aa2877e595 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-spanner-bom
- 6.50.2-SNAPSHOT
+ 6.51.0
pom
com.google.cloud
@@ -53,48 +53,48 @@
com.google.cloud
google-cloud-spanner
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.cloud
google-cloud-spanner-executor
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.cloud
google-cloud-spanner
test-jar
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
grpc-google-cloud-spanner-v1
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
proto-google-cloud-spanner-admin-instance-v1
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
proto-google-cloud-spanner-v1
- 6.50.2-SNAPSHOT
+ 6.51.0
com.google.api.grpc
proto-google-cloud-spanner-admin-database-v1
- 6.50.2-SNAPSHOT
+ 6.51.0