From 8d38ca393a6c0f9df18c9d02fa9392e11af01246 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:09:30 +0530 Subject: [PATCH] feat(spanner): add autoscaling config to the instance proto (#2674) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(spanner): add autoscaling config to the instance proto PiperOrigin-RevId: 573098210 Source-Link: https://github.com/googleapis/googleapis/commit/d6467dbbb985d1777b6ab931ce09b8b3b1a7be08 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9ea8b7345ef2d93a49b15a332a682a61714f073e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWVhOGI3MzQ1ZWYyZDkzYTQ5YjE1YTMzMmE2ODJhNjE3MTRmMDczZSJ9 * 🦉 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 --- .../reflect-config.json | 54 + .../v1/InstanceAdminClientHttpJsonTest.java | 8 + .../instance/v1/InstanceAdminClientTest.java | 6 + .../admin/instance/v1/AutoscalingConfig.java | 3080 +++++++++++++++++ .../v1/AutoscalingConfigOrBuilder.java | 109 + .../spanner/admin/instance/v1/Instance.java | 479 ++- .../admin/instance/v1/InstanceOrBuilder.java | 67 +- .../v1/SpannerInstanceAdminProto.java | 447 +-- .../instance/v1/spanner_instance_admin.proto | 84 +- 9 files changed, 4079 insertions(+), 255 deletions(-) create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfigOrBuilder.java diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json index 2bcdc77a64..46cbdef659 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json @@ -1466,6 +1466,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingTargets", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingTargets$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata", "queryAllDeclaredConstructors": true, diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java index cca71a692d..f074c20b59 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java @@ -42,6 +42,7 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; +import com.google.spanner.admin.instance.v1.AutoscalingConfig; import com.google.spanner.admin.instance.v1.Instance; import com.google.spanner.admin.instance.v1.InstanceConfig; import com.google.spanner.admin.instance.v1.InstanceConfigName; @@ -801,6 +802,7 @@ public void getInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -853,6 +855,7 @@ public void getInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -905,6 +908,7 @@ public void createInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -966,6 +970,7 @@ public void createInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -1027,6 +1032,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -1047,6 +1053,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -1087,6 +1094,7 @@ public void updateInstanceExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java index dd2ebdd3ae..f4c1a6c355 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java @@ -44,6 +44,7 @@ import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; +import com.google.spanner.admin.instance.v1.AutoscalingConfig; import com.google.spanner.admin.instance.v1.CreateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.CreateInstanceRequest; import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest; @@ -740,6 +741,7 @@ public void getInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -786,6 +788,7 @@ public void getInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -832,6 +835,7 @@ public void createInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -892,6 +896,7 @@ public void createInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) @@ -952,6 +957,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java new file mode 100644 index 0000000000..ba30c86c6f --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/AutoscalingConfig.java @@ -0,0 +1,3080 @@ +/* + * 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; + +/** + * + * + *
+ * Autoscaling config for an instance.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig} + */ +public final class AutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig) + AutoscalingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingConfig.newBuilder() to construct. + private AutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder.class); + } + + public interface AutoscalingLimitsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Minimum number of nodes allocated to the instance. If set, this number
+     * should be greater than or equal to 1.
+     * 
+ * + * int32 min_nodes = 1; + * + * @return Whether the minNodes field is set. + */ + boolean hasMinNodes(); + /** + * + * + *
+     * Minimum number of nodes allocated to the instance. If set, this number
+     * should be greater than or equal to 1.
+     * 
+ * + * int32 min_nodes = 1; + * + * @return The minNodes. + */ + int getMinNodes(); + + /** + * + * + *
+     * Minimum number of processing units allocated to the instance. If set,
+     * this number should be multiples of 1000.
+     * 
+ * + * int32 min_processing_units = 2; + * + * @return Whether the minProcessingUnits field is set. + */ + boolean hasMinProcessingUnits(); + /** + * + * + *
+     * Minimum number of processing units allocated to the instance. If set,
+     * this number should be multiples of 1000.
+     * 
+ * + * int32 min_processing_units = 2; + * + * @return The minProcessingUnits. + */ + int getMinProcessingUnits(); + + /** + * + * + *
+     * 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; + * + * @return Whether the maxNodes field is set. + */ + boolean hasMaxNodes(); + /** + * + * + *
+     * 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; + * + * @return The maxNodes. + */ + int getMaxNodes(); + + /** + * + * + *
+     * 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; + * + * @return Whether the maxProcessingUnits field is set. + */ + boolean hasMaxProcessingUnits(); + /** + * + * + *
+     * 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; + * + * @return The maxProcessingUnits. + */ + int getMaxProcessingUnits(); + + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.MinLimitCase + getMinLimitCase(); + + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.MaxLimitCase + getMaxLimitCase(); + } + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits} + */ + public static final class AutoscalingLimits extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) + AutoscalingLimitsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingLimits.newBuilder() to construct. + private AutoscalingLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingLimits() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingLimits(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder + .class); + } + + private int minLimitCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object minLimit_; + + public enum MinLimitCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MIN_NODES(1), + MIN_PROCESSING_UNITS(2), + MINLIMIT_NOT_SET(0); + private final int value; + + private MinLimitCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MinLimitCase valueOf(int value) { + return forNumber(value); + } + + public static MinLimitCase forNumber(int value) { + switch (value) { + case 1: + return MIN_NODES; + case 2: + return MIN_PROCESSING_UNITS; + case 0: + return MINLIMIT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MinLimitCase getMinLimitCase() { + return MinLimitCase.forNumber(minLimitCase_); + } + + private int maxLimitCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object maxLimit_; + + public enum MaxLimitCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MAX_NODES(3), + MAX_PROCESSING_UNITS(4), + MAXLIMIT_NOT_SET(0); + private final int value; + + private MaxLimitCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MaxLimitCase valueOf(int value) { + return forNumber(value); + } + + public static MaxLimitCase forNumber(int value) { + switch (value) { + case 3: + return MAX_NODES; + case 4: + return MAX_PROCESSING_UNITS; + case 0: + return MAXLIMIT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MaxLimitCase getMaxLimitCase() { + return MaxLimitCase.forNumber(maxLimitCase_); + } + + public static final int MIN_NODES_FIELD_NUMBER = 1; + /** + * + * + *
+     * Minimum number of nodes allocated to the instance. If set, this number
+     * should be greater than or equal to 1.
+     * 
+ * + * int32 min_nodes = 1; + * + * @return Whether the minNodes field is set. + */ + @java.lang.Override + public boolean hasMinNodes() { + return minLimitCase_ == 1; + } + /** + * + * + *
+     * Minimum number of nodes allocated to the instance. If set, this number
+     * should be greater than or equal to 1.
+     * 
+ * + * int32 min_nodes = 1; + * + * @return The minNodes. + */ + @java.lang.Override + public int getMinNodes() { + if (minLimitCase_ == 1) { + return (java.lang.Integer) minLimit_; + } + return 0; + } + + public static final int MIN_PROCESSING_UNITS_FIELD_NUMBER = 2; + /** + * + * + *
+     * Minimum number of processing units allocated to the instance. If set,
+     * this number should be multiples of 1000.
+     * 
+ * + * int32 min_processing_units = 2; + * + * @return Whether the minProcessingUnits field is set. + */ + @java.lang.Override + public boolean hasMinProcessingUnits() { + return minLimitCase_ == 2; + } + /** + * + * + *
+     * Minimum number of processing units allocated to the instance. If set,
+     * this number should be multiples of 1000.
+     * 
+ * + * int32 min_processing_units = 2; + * + * @return The minProcessingUnits. + */ + @java.lang.Override + public int getMinProcessingUnits() { + if (minLimitCase_ == 2) { + return (java.lang.Integer) minLimit_; + } + return 0; + } + + public static final int MAX_NODES_FIELD_NUMBER = 3; + /** + * + * + *
+     * 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; + * + * @return Whether the maxNodes field is set. + */ + @java.lang.Override + public boolean hasMaxNodes() { + return maxLimitCase_ == 3; + } + /** + * + * + *
+     * 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; + * + * @return The maxNodes. + */ + @java.lang.Override + public int getMaxNodes() { + if (maxLimitCase_ == 3) { + return (java.lang.Integer) maxLimit_; + } + return 0; + } + + public static final int MAX_PROCESSING_UNITS_FIELD_NUMBER = 4; + /** + * + * + *
+     * 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; + * + * @return Whether the maxProcessingUnits field is set. + */ + @java.lang.Override + public boolean hasMaxProcessingUnits() { + return maxLimitCase_ == 4; + } + /** + * + * + *
+     * 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; + * + * @return The maxProcessingUnits. + */ + @java.lang.Override + public int getMaxProcessingUnits() { + if (maxLimitCase_ == 4) { + return (java.lang.Integer) maxLimit_; + } + return 0; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (minLimitCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) minLimit_)); + } + if (minLimitCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) minLimit_)); + } + if (maxLimitCase_ == 3) { + output.writeInt32(3, (int) ((java.lang.Integer) maxLimit_)); + } + if (maxLimitCase_ == 4) { + output.writeInt32(4, (int) ((java.lang.Integer) maxLimit_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minLimitCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, (int) ((java.lang.Integer) minLimit_)); + } + if (minLimitCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) minLimit_)); + } + if (maxLimitCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 3, (int) ((java.lang.Integer) maxLimit_)); + } + if (maxLimitCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 4, (int) ((java.lang.Integer) maxLimit_)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits other = + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) obj; + + if (!getMinLimitCase().equals(other.getMinLimitCase())) return false; + switch (minLimitCase_) { + case 1: + if (getMinNodes() != other.getMinNodes()) return false; + break; + case 2: + if (getMinProcessingUnits() != other.getMinProcessingUnits()) return false; + break; + case 0: + default: + } + if (!getMaxLimitCase().equals(other.getMaxLimitCase())) return false; + switch (maxLimitCase_) { + case 3: + if (getMaxNodes() != other.getMaxNodes()) return false; + break; + case 4: + if (getMaxProcessingUnits() != other.getMaxProcessingUnits()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (minLimitCase_) { + case 1: + hash = (37 * hash) + MIN_NODES_FIELD_NUMBER; + hash = (53 * hash) + getMinNodes(); + break; + case 2: + hash = (37 * hash) + MIN_PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getMinProcessingUnits(); + break; + case 0: + default: + } + switch (maxLimitCase_) { + case 3: + hash = (37 * hash) + MAX_NODES_FIELD_NUMBER; + hash = (53 * hash) + getMaxNodes(); + break; + case 4: + hash = (37 * hash) + MAX_PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getMaxProcessingUnits(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder + .class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minLimitCase_ = 0; + minLimit_ = null; + maxLimitCase_ = 0; + maxLimit_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits build() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + buildPartial() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits result = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits result) { + result.minLimitCase_ = minLimitCase_; + result.minLimit_ = this.minLimit_; + result.maxLimitCase_ = maxLimitCase_; + result.maxLimit_ = this.maxLimit_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits other) { + if (other + == com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance()) return this; + switch (other.getMinLimitCase()) { + case MIN_NODES: + { + setMinNodes(other.getMinNodes()); + break; + } + case MIN_PROCESSING_UNITS: + { + setMinProcessingUnits(other.getMinProcessingUnits()); + break; + } + case MINLIMIT_NOT_SET: + { + break; + } + } + switch (other.getMaxLimitCase()) { + case MAX_NODES: + { + setMaxNodes(other.getMaxNodes()); + break; + } + case MAX_PROCESSING_UNITS: + { + setMaxProcessingUnits(other.getMaxProcessingUnits()); + break; + } + case MAXLIMIT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + minLimit_ = input.readInt32(); + minLimitCase_ = 1; + break; + } // case 8 + case 16: + { + minLimit_ = input.readInt32(); + minLimitCase_ = 2; + break; + } // case 16 + case 24: + { + maxLimit_ = input.readInt32(); + maxLimitCase_ = 3; + break; + } // case 24 + case 32: + { + maxLimit_ = input.readInt32(); + maxLimitCase_ = 4; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int minLimitCase_ = 0; + private java.lang.Object minLimit_; + + public MinLimitCase getMinLimitCase() { + return MinLimitCase.forNumber(minLimitCase_); + } + + public Builder clearMinLimit() { + minLimitCase_ = 0; + minLimit_ = null; + onChanged(); + return this; + } + + private int maxLimitCase_ = 0; + private java.lang.Object maxLimit_; + + public MaxLimitCase getMaxLimitCase() { + return MaxLimitCase.forNumber(maxLimitCase_); + } + + public Builder clearMaxLimit() { + maxLimitCase_ = 0; + maxLimit_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Minimum number of nodes allocated to the instance. If set, this number
+       * should be greater than or equal to 1.
+       * 
+ * + * int32 min_nodes = 1; + * + * @return Whether the minNodes field is set. + */ + public boolean hasMinNodes() { + return minLimitCase_ == 1; + } + /** + * + * + *
+       * Minimum number of nodes allocated to the instance. If set, this number
+       * should be greater than or equal to 1.
+       * 
+ * + * int32 min_nodes = 1; + * + * @return The minNodes. + */ + public int getMinNodes() { + if (minLimitCase_ == 1) { + return (java.lang.Integer) minLimit_; + } + return 0; + } + /** + * + * + *
+       * Minimum number of nodes allocated to the instance. If set, this number
+       * should be greater than or equal to 1.
+       * 
+ * + * int32 min_nodes = 1; + * + * @param value The minNodes to set. + * @return This builder for chaining. + */ + public Builder setMinNodes(int value) { + + minLimitCase_ = 1; + minLimit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Minimum number of nodes allocated to the instance. If set, this number
+       * should be greater than or equal to 1.
+       * 
+ * + * int32 min_nodes = 1; + * + * @return This builder for chaining. + */ + public Builder clearMinNodes() { + if (minLimitCase_ == 1) { + minLimitCase_ = 0; + minLimit_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Minimum number of processing units allocated to the instance. If set,
+       * this number should be multiples of 1000.
+       * 
+ * + * int32 min_processing_units = 2; + * + * @return Whether the minProcessingUnits field is set. + */ + public boolean hasMinProcessingUnits() { + return minLimitCase_ == 2; + } + /** + * + * + *
+       * Minimum number of processing units allocated to the instance. If set,
+       * this number should be multiples of 1000.
+       * 
+ * + * int32 min_processing_units = 2; + * + * @return The minProcessingUnits. + */ + public int getMinProcessingUnits() { + if (minLimitCase_ == 2) { + return (java.lang.Integer) minLimit_; + } + return 0; + } + /** + * + * + *
+       * Minimum number of processing units allocated to the instance. If set,
+       * this number should be multiples of 1000.
+       * 
+ * + * int32 min_processing_units = 2; + * + * @param value The minProcessingUnits to set. + * @return This builder for chaining. + */ + public Builder setMinProcessingUnits(int value) { + + minLimitCase_ = 2; + minLimit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Minimum number of processing units allocated to the instance. If set,
+       * this number should be multiples of 1000.
+       * 
+ * + * int32 min_processing_units = 2; + * + * @return This builder for chaining. + */ + public Builder clearMinProcessingUnits() { + if (minLimitCase_ == 2) { + minLimitCase_ = 0; + minLimit_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * 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; + * + * @return Whether the maxNodes field is set. + */ + public boolean hasMaxNodes() { + return maxLimitCase_ == 3; + } + /** + * + * + *
+       * 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; + * + * @return The maxNodes. + */ + public int getMaxNodes() { + if (maxLimitCase_ == 3) { + return (java.lang.Integer) maxLimit_; + } + return 0; + } + /** + * + * + *
+       * 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; + * + * @param value The maxNodes to set. + * @return This builder for chaining. + */ + public Builder setMaxNodes(int value) { + + maxLimitCase_ = 3; + maxLimit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearMaxNodes() { + if (maxLimitCase_ == 3) { + maxLimitCase_ = 0; + maxLimit_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * 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; + * + * @return Whether the maxProcessingUnits field is set. + */ + public boolean hasMaxProcessingUnits() { + return maxLimitCase_ == 4; + } + /** + * + * + *
+       * 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; + * + * @return The maxProcessingUnits. + */ + public int getMaxProcessingUnits() { + if (maxLimitCase_ == 4) { + return (java.lang.Integer) maxLimit_; + } + return 0; + } + /** + * + * + *
+       * 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; + * + * @param value The maxProcessingUnits to set. + * @return This builder for chaining. + */ + public Builder setMaxProcessingUnits(int value) { + + maxLimitCase_ = 4; + maxLimit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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; + * + * @return This builder for chaining. + */ + public Builder clearMaxProcessingUnits() { + if (maxLimitCase_ == 4) { + maxLimitCase_ = 0; + maxLimit_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits) + private static final com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits(); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingLimits parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AutoscalingTargetsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * 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]; + * + * + * @return The highPriorityCpuUtilizationPercent. + */ + int getHighPriorityCpuUtilizationPercent(); + + /** + * + * + *
+     * 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]; + * + * @return The storageUtilizationPercent. + */ + int getStorageUtilizationPercent(); + } + /** + * + * + *
+   * The autoscaling targets for an instance.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets} + */ + public static final class AutoscalingTargets extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) + AutoscalingTargetsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingTargets.newBuilder() to construct. + private AutoscalingTargets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingTargets() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingTargets(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder + .class); + } + + public static final int HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER = 1; + private int highPriorityCpuUtilizationPercent_ = 0; + /** + * + * + *
+     * 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]; + * + * + * @return The highPriorityCpuUtilizationPercent. + */ + @java.lang.Override + public int getHighPriorityCpuUtilizationPercent() { + return highPriorityCpuUtilizationPercent_; + } + + public static final int STORAGE_UTILIZATION_PERCENT_FIELD_NUMBER = 2; + private int storageUtilizationPercent_ = 0; + /** + * + * + *
+     * 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]; + * + * @return The storageUtilizationPercent. + */ + @java.lang.Override + public int getStorageUtilizationPercent() { + return storageUtilizationPercent_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (highPriorityCpuUtilizationPercent_ != 0) { + output.writeInt32(1, highPriorityCpuUtilizationPercent_); + } + if (storageUtilizationPercent_ != 0) { + output.writeInt32(2, storageUtilizationPercent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (highPriorityCpuUtilizationPercent_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, highPriorityCpuUtilizationPercent_); + } + if (storageUtilizationPercent_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(2, storageUtilizationPercent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets other = + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) obj; + + if (getHighPriorityCpuUtilizationPercent() != other.getHighPriorityCpuUtilizationPercent()) + return false; + if (getStorageUtilizationPercent() != other.getStorageUtilizationPercent()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getHighPriorityCpuUtilizationPercent(); + hash = (37 * hash) + STORAGE_UTILIZATION_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getStorageUtilizationPercent(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The autoscaling targets for an instance.
+     * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder + .class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + highPriorityCpuUtilizationPercent_ = 0; + storageUtilizationPercent_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingTargets_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets build() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + buildPartial() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets result = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.highPriorityCpuUtilizationPercent_ = highPriorityCpuUtilizationPercent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.storageUtilizationPercent_ = storageUtilizationPercent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets other) { + if (other + == com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance()) return this; + if (other.getHighPriorityCpuUtilizationPercent() != 0) { + setHighPriorityCpuUtilizationPercent(other.getHighPriorityCpuUtilizationPercent()); + } + if (other.getStorageUtilizationPercent() != 0) { + setStorageUtilizationPercent(other.getStorageUtilizationPercent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + highPriorityCpuUtilizationPercent_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + storageUtilizationPercent_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int highPriorityCpuUtilizationPercent_; + /** + * + * + *
+       * 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]; + * + * + * @return The highPriorityCpuUtilizationPercent. + */ + @java.lang.Override + public int getHighPriorityCpuUtilizationPercent() { + return highPriorityCpuUtilizationPercent_; + } + /** + * + * + *
+       * 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]; + * + * + * @param value The highPriorityCpuUtilizationPercent to set. + * @return This builder for chaining. + */ + public Builder setHighPriorityCpuUtilizationPercent(int value) { + + highPriorityCpuUtilizationPercent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * 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]; + * + * + * @return This builder for chaining. + */ + public Builder clearHighPriorityCpuUtilizationPercent() { + bitField0_ = (bitField0_ & ~0x00000001); + highPriorityCpuUtilizationPercent_ = 0; + onChanged(); + return this; + } + + private int storageUtilizationPercent_; + /** + * + * + *
+       * 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]; + * + * + * @return The storageUtilizationPercent. + */ + @java.lang.Override + public int getStorageUtilizationPercent() { + return storageUtilizationPercent_; + } + /** + * + * + *
+       * 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]; + * + * + * @param value The storageUtilizationPercent to set. + * @return This builder for chaining. + */ + public Builder setStorageUtilizationPercent(int value) { + + storageUtilizationPercent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * 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]; + * + * + * @return This builder for chaining. + */ + public Builder clearStorageUtilizationPercent() { + bitField0_ = (bitField0_ & ~0x00000002); + storageUtilizationPercent_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets) + private static final com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets(); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingTargets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int AUTOSCALING_LIMITS_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + autoscalingLimits_; + /** + * + * + *
+   * 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. + */ + @java.lang.Override + public boolean hasAutoscalingLimits() { + return autoscalingLimits_ != null; + } + /** + * + * + *
+   * Required. Autoscaling limits for an instance.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscalingLimits. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getAutoscalingLimits() { + return autoscalingLimits_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance() + : autoscalingLimits_; + } + /** + * + * + *
+   * Required. Autoscaling limits for an instance.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder + getAutoscalingLimitsOrBuilder() { + return autoscalingLimits_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance() + : autoscalingLimits_; + } + + public static final int AUTOSCALING_TARGETS_FIELD_NUMBER = 2; + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + autoscalingTargets_; + /** + * + * + *
+   * 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. + */ + @java.lang.Override + public boolean hasAutoscalingTargets() { + return autoscalingTargets_ != null; + } + /** + * + * + *
+   * 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. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + getAutoscalingTargets() { + return autoscalingTargets_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance() + : autoscalingTargets_; + } + /** + * + * + *
+   * Required. The autoscaling targets for an instance.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder + getAutoscalingTargetsOrBuilder() { + return autoscalingTargets_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance() + : autoscalingTargets_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (autoscalingLimits_ != null) { + output.writeMessage(1, getAutoscalingLimits()); + } + if (autoscalingTargets_ != null) { + output.writeMessage(2, getAutoscalingTargets()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (autoscalingLimits_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoscalingLimits()); + } + if (autoscalingTargets_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscalingTargets()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.AutoscalingConfig other = + (com.google.spanner.admin.instance.v1.AutoscalingConfig) obj; + + if (hasAutoscalingLimits() != other.hasAutoscalingLimits()) return false; + if (hasAutoscalingLimits()) { + if (!getAutoscalingLimits().equals(other.getAutoscalingLimits())) return false; + } + if (hasAutoscalingTargets() != other.hasAutoscalingTargets()) return false; + if (hasAutoscalingTargets()) { + if (!getAutoscalingTargets().equals(other.getAutoscalingTargets())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAutoscalingLimits()) { + hash = (37 * hash) + AUTOSCALING_LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingLimits().hashCode(); + } + if (hasAutoscalingTargets()) { + hash = (37 * hash) + AUTOSCALING_TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingTargets().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.spanner.admin.instance.v1.AutoscalingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Autoscaling config for an instance.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.AutoscalingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig) + com.google.spanner.admin.instance.v1.AutoscalingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder.class); + } + + // Construct using com.google.spanner.admin.instance.v1.AutoscalingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoscalingLimits_ = null; + if (autoscalingLimitsBuilder_ != null) { + autoscalingLimitsBuilder_.dispose(); + autoscalingLimitsBuilder_ = null; + } + autoscalingTargets_ = null; + if (autoscalingTargetsBuilder_ != null) { + autoscalingTargetsBuilder_.dispose(); + autoscalingTargetsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig build() { + com.google.spanner.admin.instance.v1.AutoscalingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig buildPartial() { + com.google.spanner.admin.instance.v1.AutoscalingConfig result = + new com.google.spanner.admin.instance.v1.AutoscalingConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.admin.instance.v1.AutoscalingConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoscalingLimits_ = + autoscalingLimitsBuilder_ == null + ? autoscalingLimits_ + : autoscalingLimitsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autoscalingTargets_ = + autoscalingTargetsBuilder_ == null + ? autoscalingTargets_ + : autoscalingTargetsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.spanner.admin.instance.v1.AutoscalingConfig) { + return mergeFrom((com.google.spanner.admin.instance.v1.AutoscalingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.instance.v1.AutoscalingConfig other) { + if (other == com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()) + return this; + if (other.hasAutoscalingLimits()) { + mergeAutoscalingLimits(other.getAutoscalingLimits()); + } + if (other.hasAutoscalingTargets()) { + mergeAutoscalingTargets(other.getAutoscalingTargets()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getAutoscalingTargetsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + autoscalingLimits_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> + autoscalingLimitsBuilder_; + /** + * + * + *
+     * 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. + */ + public boolean hasAutoscalingLimits() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoscalingLimits. + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getAutoscalingLimits() { + if (autoscalingLimitsBuilder_ == null) { + return autoscalingLimits_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance() + : autoscalingLimits_; + } else { + return autoscalingLimitsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscalingLimits( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits value) { + if (autoscalingLimitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscalingLimits_ = value; + } else { + autoscalingLimitsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscalingLimits( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder + builderForValue) { + if (autoscalingLimitsBuilder_ == null) { + autoscalingLimits_ = builderForValue.build(); + } else { + autoscalingLimitsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoscalingLimits( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits value) { + if (autoscalingLimitsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && autoscalingLimits_ != null + && autoscalingLimits_ + != com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance()) { + getAutoscalingLimitsBuilder().mergeFrom(value); + } else { + autoscalingLimits_ = value; + } + } else { + autoscalingLimitsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoscalingLimits() { + bitField0_ = (bitField0_ & ~0x00000001); + autoscalingLimits_ = null; + if (autoscalingLimitsBuilder_ != null) { + autoscalingLimitsBuilder_.dispose(); + autoscalingLimitsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder + getAutoscalingLimitsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAutoscalingLimitsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder + getAutoscalingLimitsOrBuilder() { + if (autoscalingLimitsBuilder_ != null) { + return autoscalingLimitsBuilder_.getMessageOrBuilder(); + } else { + return autoscalingLimits_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + .getDefaultInstance() + : autoscalingLimits_; + } + } + /** + * + * + *
+     * Required. Autoscaling limits for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder> + getAutoscalingLimitsFieldBuilder() { + if (autoscalingLimitsBuilder_ == null) { + autoscalingLimitsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder>( + getAutoscalingLimits(), getParentForChildren(), isClean()); + autoscalingLimits_ = null; + } + return autoscalingLimitsBuilder_; + } + + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + autoscalingTargets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder> + autoscalingTargetsBuilder_; + /** + * + * + *
+     * 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. + */ + public boolean hasAutoscalingTargets() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * 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. + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + getAutoscalingTargets() { + if (autoscalingTargetsBuilder_ == null) { + return autoscalingTargets_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance() + : autoscalingTargets_; + } else { + return autoscalingTargetsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscalingTargets( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets value) { + if (autoscalingTargetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoscalingTargets_ = value; + } else { + autoscalingTargetsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoscalingTargets( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder + builderForValue) { + if (autoscalingTargetsBuilder_ == null) { + autoscalingTargets_ = builderForValue.build(); + } else { + autoscalingTargetsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoscalingTargets( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets value) { + if (autoscalingTargetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && autoscalingTargets_ != null + && autoscalingTargets_ + != com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance()) { + getAutoscalingTargetsBuilder().mergeFrom(value); + } else { + autoscalingTargets_ = value; + } + } else { + autoscalingTargetsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoscalingTargets() { + bitField0_ = (bitField0_ & ~0x00000002); + autoscalingTargets_ = null; + if (autoscalingTargetsBuilder_ != null) { + autoscalingTargetsBuilder_.dispose(); + autoscalingTargetsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder + getAutoscalingTargetsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAutoscalingTargetsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder + getAutoscalingTargetsOrBuilder() { + if (autoscalingTargetsBuilder_ != null) { + return autoscalingTargetsBuilder_.getMessageOrBuilder(); + } else { + return autoscalingTargets_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets + .getDefaultInstance() + : autoscalingTargets_; + } + } + /** + * + * + *
+     * Required. The autoscaling targets for an instance.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder> + getAutoscalingTargetsFieldBuilder() { + if (autoscalingTargetsBuilder_ == null) { + autoscalingTargetsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder>( + getAutoscalingTargets(), getParentForChildren(), isClean()); + autoscalingTargets_ = null; + } + return autoscalingTargetsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.spanner.admin.instance.v1.AutoscalingConfig) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.AutoscalingConfig) + private static final com.google.spanner.admin.instance.v1.AutoscalingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.AutoscalingConfig(); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 0000000000..b9449ad2a0 --- /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 c18b78c6af..de469ab4ee 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 58a85a5a46..81305322e7 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 bbc4edd718..a4e360935e 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 0b4a35705b..58051df00f 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