From f46a6b34383fe45d63b2db912389b26067f3a853 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Fri, 4 Oct 2024 02:23:11 -0400 Subject: [PATCH] chore: Update generation configuration at Fri Oct 4 02:24:45 UTC 2024 (#3376) * chore: Update generation configuration at Thu Oct 3 02:24:40 UTC 2024 * chore: generate libraries at Thu Oct 3 02:28:26 UTC 2024 * chore: Update generation configuration at Fri Oct 4 02:24:45 UTC 2024 * chore: generate libraries at Fri Oct 4 02:25:13 UTC 2024 --- README.md | 2 +- generation_config.yaml | 4 +- .../reflect-config.json | 72 + .../reflect-config.json | 72 + .../v1/InstanceAdminClientHttpJsonTest.java | 8 + .../instance/v1/InstanceAdminClientTest.java | 6 + .../admin/instance/v1/AutoscalingConfig.java | 3424 ++++++++++++++++- .../v1/AutoscalingConfigOrBuilder.java | 108 + .../admin/instance/v1/CommonProto.java | 50 +- .../spanner/admin/instance/v1/Instance.java | 914 ++++- .../admin/instance/v1/InstanceOrBuilder.java | 122 +- .../instance/v1/ReplicaComputeCapacity.java | 1154 ++++++ .../v1/ReplicaComputeCapacityOrBuilder.java | 135 + .../admin/instance/v1/ReplicaSelection.java | 626 +++ .../v1/ReplicaSelectionOrBuilder.java | 51 + .../v1/SpannerInstanceAdminProto.java | 768 ++-- .../spanner/admin/instance/v1/common.proto | 7 + .../instance/v1/spanner_instance_admin.proto | 125 +- 18 files changed, 6944 insertions(+), 704 deletions(-) create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java create mode 100644 proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java diff --git a/README.md b/README.md index 54f97657419..d7455f36eb2 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.47.0') +implementation platform('com.google.cloud:libraries-bom:26.48.0') implementation 'com.google.cloud:google-cloud-spanner' ``` diff --git a/generation_config.yaml b/generation_config.yaml index 22e3d873bcf..0da6abef7b8 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.46.1 -googleapis_commitish: 16a1580c06b3b32e8ab33c39d846bba7e21bfae3 -libraries_bom_version: 26.47.0 +googleapis_commitish: b6a27d13a2f0223051ef720e4e9d0d52323560e6 +libraries_bom_version: 26.48.0 libraries: - api_shortname: spanner name_pretty: Cloud Spanner diff --git a/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json index 856cb45506f..2b261bc156b 100644 --- a/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json +++ b/google-cloud-spanner-executor/src/main/resources/META-INF/native-image/com.google.cloud.spanner.executor.v1/reflect-config.json @@ -2717,6 +2717,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$AutoscalingConfigOverrides", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$AutoscalingConfigOverrides$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits", "queryAllDeclaredConstructors": true, @@ -3338,6 +3374,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaComputeCapacity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaComputeCapacity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ReplicaInfo", "queryAllDeclaredConstructors": true, @@ -3365,6 +3419,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaSelection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaSelection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata", "queryAllDeclaredConstructors": true, 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 92c9b748465..cfe0908272e 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 @@ -1628,6 +1628,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$AutoscalingConfigOverrides", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$AutoscalingConfigOverrides$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AsymmetricAutoscalingOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.AutoscalingConfig$AutoscalingLimits", "queryAllDeclaredConstructors": true, @@ -2249,6 +2285,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaComputeCapacity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaComputeCapacity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.ReplicaInfo", "queryAllDeclaredConstructors": true, @@ -2276,6 +2330,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaSelection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.admin.instance.v1.ReplicaSelection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata", "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 84bd2b8e78c..50532826e53 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 @@ -59,6 +59,7 @@ import com.google.spanner.admin.instance.v1.MoveInstanceRequest; import com.google.spanner.admin.instance.v1.MoveInstanceResponse; import com.google.spanner.admin.instance.v1.ProjectName; +import com.google.spanner.admin.instance.v1.ReplicaComputeCapacity; import com.google.spanner.admin.instance.v1.ReplicaInfo; import java.io.IOException; import java.util.ArrayList; @@ -910,6 +911,7 @@ public void getInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -963,6 +965,7 @@ public void getInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1016,6 +1019,7 @@ public void createInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1078,6 +1082,7 @@ public void createInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1140,6 +1145,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1161,6 +1167,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1202,6 +1209,7 @@ public void updateInstanceExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) 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 d3ea4156e08..73c6de9b2ca 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 @@ -75,6 +75,7 @@ import com.google.spanner.admin.instance.v1.MoveInstanceRequest; import com.google.spanner.admin.instance.v1.MoveInstanceResponse; import com.google.spanner.admin.instance.v1.ProjectName; +import com.google.spanner.admin.instance.v1.ReplicaComputeCapacity; import com.google.spanner.admin.instance.v1.ReplicaInfo; import com.google.spanner.admin.instance.v1.UpdateInstanceConfigRequest; import com.google.spanner.admin.instance.v1.UpdateInstancePartitionRequest; @@ -845,6 +846,7 @@ public void getInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -892,6 +894,7 @@ public void getInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -939,6 +942,7 @@ public void createInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1000,6 +1004,7 @@ public void createInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) @@ -1061,6 +1066,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .setNodeCount(1539922066) .setProcessingUnits(-329117885) + .addAllReplicaComputeCapacity(new ArrayList()) .setAutoscalingConfig(AutoscalingConfig.newBuilder().build()) .putAllLabels(new HashMap()) .addAllEndpointUris(new ArrayList()) 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 index 0b0bae8f4d6..eeb39bfd3d2 100644 --- 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 @@ -38,7 +38,9 @@ private AutoscalingConfig(com.google.protobuf.GeneratedMessageV3.Builder buil super(builder); } - private AutoscalingConfig() {} + private AutoscalingConfig() { + asymmetricAutoscalingOptions_ = java.util.Collections.emptyList(); + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -2081,207 +2083,2615 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - 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 ((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. - */ - @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 interface AsymmetricAutoscalingOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + com.google.protobuf.MessageOrBuilder { - 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 ((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. - */ - @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. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + boolean hasReplicaSelection(); + /** + * + * + *
+     * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection(); + /** + * + * + *
+     * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder getReplicaSelectionOrBuilder(); + + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overrides field is set. + */ + boolean hasOverrides(); + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overrides. + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + getOverrides(); + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder + getOverridesOrBuilder(); } /** * * *
-   * Required. The autoscaling targets for an instance.
+   * AsymmetricAutoscalingOption specifies the scaling of replicas identified by
+   * the given selection.
    * 
* - * - * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - * + * Protobuf type {@code + * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} */ - @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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAutoscalingLimits()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getAutoscalingTargets()); + public static final class AsymmetricAutoscalingOption + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + AsymmetricAutoscalingOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AsymmetricAutoscalingOption.newBuilder() to construct. + private AsymmetricAutoscalingOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private AsymmetricAutoscalingOption() {} - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoscalingLimits()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscalingTargets()); + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AsymmetricAutoscalingOption(); } - 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); + 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_AsymmetricAutoscalingOption_descriptor; } - 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; + @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_AsymmetricAutoscalingOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder.class); } - 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; + public interface AutoscalingConfigOverridesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingLimits field is set. + */ + boolean hasAutoscalingLimits(); + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingLimits. + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + getAutoscalingLimits(); + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimitsOrBuilder + getAutoscalingLimitsOrBuilder(); + + /** + * + * + *
+       * Optional. If specified, overrides the autoscaling target
+       * high_priority_cpu_utilization_percent in the top-level autoscaling
+       * configuration for the selected replicas.
+       * 
+ * + * + * int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetHighPriorityCpuUtilizationPercent. + */ + int getAutoscalingTargetHighPriorityCpuUtilizationPercent(); + } + /** + * + * + *
+     * Overrides the top-level autoscaling configuration for the replicas
+     * identified by `replica_selection`. All fields in this message are
+     * optional. Any unspecified fields will use the corresponding values from
+     * the top-level autoscaling configuration.
+     * 
+ * + * Protobuf type {@code + * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} + */ + public static final class AutoscalingConfigOverrides + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + AutoscalingConfigOverridesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingConfigOverrides.newBuilder() to construct. + private AutoscalingConfigOverrides( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingConfigOverrides() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingConfigOverrides(); + } + + 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_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_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_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder.class); + } + + private int bitField0_; + public static final int AUTOSCALING_LIMITS_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits + autoscalingLimits_; + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingLimits field is set. + */ + @java.lang.Override + public boolean hasAutoscalingLimits() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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_; + } + /** + * + * + *
+       * Optional. If specified, overrides the min/max limit in the top-level
+       * autoscaling configuration for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @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_TARGET_HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER = 2; + private int autoscalingTargetHighPriorityCpuUtilizationPercent_ = 0; + /** + * + * + *
+       * Optional. If specified, overrides the autoscaling target
+       * high_priority_cpu_utilization_percent in the top-level autoscaling
+       * configuration for the selected replicas.
+       * 
+ * + * + * int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetHighPriorityCpuUtilizationPercent. + */ + @java.lang.Override + public int getAutoscalingTargetHighPriorityCpuUtilizationPercent() { + return autoscalingTargetHighPriorityCpuUtilizationPercent_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAutoscalingLimits()); + } + if (autoscalingTargetHighPriorityCpuUtilizationPercent_ != 0) { + output.writeInt32(2, autoscalingTargetHighPriorityCpuUtilizationPercent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoscalingLimits()); + } + if (autoscalingTargetHighPriorityCpuUtilizationPercent_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, autoscalingTargetHighPriorityCpuUtilizationPercent_); + } + 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.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + other = + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides) + obj; + + if (hasAutoscalingLimits() != other.hasAutoscalingLimits()) return false; + if (hasAutoscalingLimits()) { + if (!getAutoscalingLimits().equals(other.getAutoscalingLimits())) return false; + } + if (getAutoscalingTargetHighPriorityCpuUtilizationPercent() + != other.getAutoscalingTargetHighPriorityCpuUtilizationPercent()) 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(); + } + hash = (37 * hash) + AUTOSCALING_TARGET_HIGH_PRIORITY_CPU_UTILIZATION_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingTargetHighPriorityCpuUtilizationPercent(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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 + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + 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.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + 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; + } + /** + * + * + *
+       * Overrides the top-level autoscaling configuration for the replicas
+       * identified by `replica_selection`. All fields in this message are
+       * optional. Any unspecified fields will use the corresponding values from
+       * the top-level autoscaling configuration.
+       * 
+ * + * Protobuf type {@code + * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder { + 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_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_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_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAutoscalingLimitsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoscalingLimits_ = null; + if (autoscalingLimitsBuilder_ != null) { + autoscalingLimitsBuilder_.dispose(); + autoscalingLimitsBuilder_ = null; + } + autoscalingTargetHighPriorityCpuUtilizationPercent_ = 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_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + build() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + buildPartial() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + result = + new com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoscalingLimits_ = + autoscalingLimitsBuilder_ == null + ? autoscalingLimits_ + : autoscalingLimitsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autoscalingTargetHighPriorityCpuUtilizationPercent_ = + autoscalingTargetHighPriorityCpuUtilizationPercent_; + } + result.bitField0_ |= to_bitField0_; + } + + @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.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + other) { + if (other + == com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance()) return this; + if (other.hasAutoscalingLimits()) { + mergeAutoscalingLimits(other.getAutoscalingLimits()); + } + if (other.getAutoscalingTargetHighPriorityCpuUtilizationPercent() != 0) { + setAutoscalingTargetHighPriorityCpuUtilizationPercent( + other.getAutoscalingTargetHighPriorityCpuUtilizationPercent()); + } + 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 16: + { + autoscalingTargetHighPriorityCpuUtilizationPercent_ = 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 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_; + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoscalingLimits field is set. + */ + public boolean hasAutoscalingLimits() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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; + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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); + } + if (autoscalingLimits_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAutoscalingLimits() { + bitField0_ = (bitField0_ & ~0x00000001); + autoscalingLimits_ = null; + if (autoscalingLimitsBuilder_ != null) { + autoscalingLimitsBuilder_.dispose(); + autoscalingLimitsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.Builder + getAutoscalingLimitsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAutoscalingLimitsFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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_; + } + } + /** + * + * + *
+         * Optional. If specified, overrides the min/max limit in the top-level
+         * autoscaling configuration for the selected replicas.
+         * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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 int autoscalingTargetHighPriorityCpuUtilizationPercent_; + /** + * + * + *
+         * Optional. If specified, overrides the autoscaling target
+         * high_priority_cpu_utilization_percent in the top-level autoscaling
+         * configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoscalingTargetHighPriorityCpuUtilizationPercent. + */ + @java.lang.Override + public int getAutoscalingTargetHighPriorityCpuUtilizationPercent() { + return autoscalingTargetHighPriorityCpuUtilizationPercent_; + } + /** + * + * + *
+         * Optional. If specified, overrides the autoscaling target
+         * high_priority_cpu_utilization_percent in the top-level autoscaling
+         * configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The autoscalingTargetHighPriorityCpuUtilizationPercent to set. + * @return This builder for chaining. + */ + public Builder setAutoscalingTargetHighPriorityCpuUtilizationPercent(int value) { + + autoscalingTargetHighPriorityCpuUtilizationPercent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. If specified, overrides the autoscaling target
+         * high_priority_cpu_utilization_percent in the top-level autoscaling
+         * configuration for the selected replicas.
+         * 
+ * + * + * int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoscalingTargetHighPriorityCpuUtilizationPercent() { + bitField0_ = (bitField0_ & ~0x00000002); + autoscalingTargetHighPriorityCpuUtilizationPercent_ = 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.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + private static final com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides(); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingConfigOverrides 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.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int REPLICA_SELECTION_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.ReplicaSelection replicaSelection_; + /** + * + * + *
+     * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + @java.lang.Override + public boolean hasReplicaSelection() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection() { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + /** + * + * + *
+     * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+     * applies. Only read-only replicas are supported.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder + getReplicaSelectionOrBuilder() { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + + public static final int OVERRIDES_FIELD_NUMBER = 2; + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + overrides_; + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overrides field is set. + */ + @java.lang.Override + public boolean hasOverrides() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overrides. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + getOverrides() { + return overrides_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance() + : overrides_; + } + /** + * + * + *
+     * Optional. Overrides applied to the top-level autoscaling configuration
+     * for the selected replicas.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder + getOverridesOrBuilder() { + return overrides_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance() + : overrides_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getReplicaSelection()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getOverrides()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReplicaSelection()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOverrides()); + } + 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.AsymmetricAutoscalingOption)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption other = + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) obj; + + if (hasReplicaSelection() != other.hasReplicaSelection()) return false; + if (hasReplicaSelection()) { + if (!getReplicaSelection().equals(other.getReplicaSelection())) return false; + } + if (hasOverrides() != other.hasOverrides()) return false; + if (hasOverrides()) { + if (!getOverrides().equals(other.getOverrides())) 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 (hasReplicaSelection()) { + hash = (37 * hash) + REPLICA_SELECTION_FIELD_NUMBER; + hash = (53 * hash) + getReplicaSelection().hashCode(); + } + if (hasOverrides()) { + hash = (37 * hash) + OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + getOverrides().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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.AsymmetricAutoscalingOption + 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; + } + /** + * + * + *
+     * AsymmetricAutoscalingOption specifies the scaling of replicas identified by
+     * the given selection.
+     * 
+ * + * Protobuf type {@code + * google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder { + 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_AsymmetricAutoscalingOption_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_AsymmetricAutoscalingOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .class, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder.class); + } + + // Construct using + // com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReplicaSelectionFieldBuilder(); + getOverridesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + replicaSelection_ = null; + if (replicaSelectionBuilder_ != null) { + replicaSelectionBuilder_.dispose(); + replicaSelectionBuilder_ = null; + } + overrides_ = null; + if (overridesBuilder_ != null) { + overridesBuilder_.dispose(); + overridesBuilder_ = 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_AsymmetricAutoscalingOption_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + build() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + buildPartial() { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption result = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.replicaSelection_ = + replicaSelectionBuilder_ == null + ? replicaSelection_ + : replicaSelectionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.overrides_ = overridesBuilder_ == null ? overrides_ : overridesBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @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.AsymmetricAutoscalingOption) { + return mergeFrom( + (com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + other) { + if (other + == com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .getDefaultInstance()) return this; + if (other.hasReplicaSelection()) { + mergeReplicaSelection(other.getReplicaSelection()); + } + if (other.hasOverrides()) { + mergeOverrides(other.getOverrides()); + } + 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( + getReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getOverridesFieldBuilder().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.ReplicaSelection replicaSelection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> + replicaSelectionBuilder_; + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + public boolean hasReplicaSelection() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + public com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection() { + if (replicaSelectionBuilder_ == null) { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } else { + return replicaSelectionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection value) { + if (replicaSelectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replicaSelection_ = value; + } else { + replicaSelectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder builderForValue) { + if (replicaSelectionBuilder_ == null) { + replicaSelection_ = builderForValue.build(); + } else { + replicaSelectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection value) { + if (replicaSelectionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && replicaSelection_ != null + && replicaSelection_ + != com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance()) { + getReplicaSelectionBuilder().mergeFrom(value); + } else { + replicaSelection_ = value; + } + } else { + replicaSelectionBuilder_.mergeFrom(value); + } + if (replicaSelection_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReplicaSelection() { + bitField0_ = (bitField0_ & ~0x00000001); + replicaSelection_ = null; + if (replicaSelectionBuilder_ != null) { + replicaSelectionBuilder_.dispose(); + replicaSelectionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaSelection.Builder + getReplicaSelectionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReplicaSelectionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder + getReplicaSelectionOrBuilder() { + if (replicaSelectionBuilder_ != null) { + return replicaSelectionBuilder_.getMessageOrBuilder(); + } else { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + } + /** + * + * + *
+       * Required. Selects the replicas to which this AsymmetricAutoscalingOption
+       * applies. Only read-only replicas are supported.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> + getReplicaSelectionFieldBuilder() { + if (replicaSelectionBuilder_ == null) { + replicaSelectionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder>( + getReplicaSelection(), getParentForChildren(), isClean()); + replicaSelection_ = null; + } + return replicaSelectionBuilder_; + } + + private com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + overrides_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder> + overridesBuilder_; + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the overrides field is set. + */ + public boolean hasOverrides() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The overrides. + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + getOverrides() { + if (overridesBuilder_ == null) { + return overrides_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance() + : overrides_; + } else { + return overridesBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOverrides( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + value) { + if (overridesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + overrides_ = value; + } else { + overridesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOverrides( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder + builderForValue) { + if (overridesBuilder_ == null) { + overrides_ = builderForValue.build(); + } else { + overridesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOverrides( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides + value) { + if (overridesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && overrides_ != null + && overrides_ + != com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.AutoscalingConfigOverrides + .getDefaultInstance()) { + getOverridesBuilder().mergeFrom(value); + } else { + overrides_ = value; + } + } else { + overridesBuilder_.mergeFrom(value); + } + if (overrides_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOverrides() { + bitField0_ = (bitField0_ & ~0x00000002); + overrides_ = null; + if (overridesBuilder_ != null) { + overridesBuilder_.dispose(); + overridesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder + getOverridesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOverridesFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder + getOverridesOrBuilder() { + if (overridesBuilder_ != null) { + return overridesBuilder_.getMessageOrBuilder(); + } else { + return overrides_ == null + ? com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.getDefaultInstance() + : overrides_; + } + } + /** + * + * + *
+       * Optional. Overrides applied to the top-level autoscaling configuration
+       * for the selected replicas.
+       * 
+ * + * + * .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder> + getOverridesFieldBuilder() { + if (overridesBuilder_ == null) { + overridesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverrides.Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .AutoscalingConfigOverridesOrBuilder>( + getOverrides(), getParentForChildren(), isClean()); + overrides_ = null; + } + return overridesBuilder_; + } + + @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.AsymmetricAutoscalingOption) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + private static final com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption(); + } + + public static com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AsymmetricAutoscalingOption 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.AsymmetricAutoscalingOption + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + 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 ((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. + */ + @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 ((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. + */ + @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_; + } + + public static final int ASYMMETRIC_AUTOSCALING_OPTIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption> + asymmetricAutoscalingOptions_; + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption> + getAsymmetricAutoscalingOptionsList() { + return asymmetricAutoscalingOptions_; + } + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder> + getAsymmetricAutoscalingOptionsOrBuilderList() { + return asymmetricAutoscalingOptions_; + } + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAsymmetricAutoscalingOptionsCount() { + return asymmetricAutoscalingOptions_.size(); + } + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + getAsymmetricAutoscalingOptions(int index) { + return asymmetricAutoscalingOptions_.get(index); + } + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOptionOrBuilder + getAsymmetricAutoscalingOptionsOrBuilder(int index) { + return asymmetricAutoscalingOptions_.get(index); + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAutoscalingLimits()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAutoscalingTargets()); + } + for (int i = 0; i < asymmetricAutoscalingOptions_.size(); i++) { + output.writeMessage(3, asymmetricAutoscalingOptions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoscalingLimits()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscalingTargets()); + } + for (int i = 0; i < asymmetricAutoscalingOptions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, asymmetricAutoscalingOptions_.get(i)); + } + 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 (!getAsymmetricAutoscalingOptionsList().equals(other.getAsymmetricAutoscalingOptionsList())) + 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(); } + if (getAsymmetricAutoscalingOptionsCount() > 0) { + hash = (37 * hash) + ASYMMETRIC_AUTOSCALING_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getAsymmetricAutoscalingOptionsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2425,6 +4835,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getAutoscalingLimitsFieldBuilder(); getAutoscalingTargetsFieldBuilder(); + getAsymmetricAutoscalingOptionsFieldBuilder(); } } @@ -2442,6 +4853,13 @@ public Builder clear() { autoscalingTargetsBuilder_.dispose(); autoscalingTargetsBuilder_ = null; } + if (asymmetricAutoscalingOptionsBuilder_ == null) { + asymmetricAutoscalingOptions_ = java.util.Collections.emptyList(); + } else { + asymmetricAutoscalingOptions_ = null; + asymmetricAutoscalingOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -2469,11 +4887,26 @@ public com.google.spanner.admin.instance.v1.AutoscalingConfig build() { 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); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.spanner.admin.instance.v1.AutoscalingConfig result) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + asymmetricAutoscalingOptions_ = + java.util.Collections.unmodifiableList(asymmetricAutoscalingOptions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.asymmetricAutoscalingOptions_ = asymmetricAutoscalingOptions_; + } else { + result.asymmetricAutoscalingOptions_ = asymmetricAutoscalingOptionsBuilder_.build(); + } } private void buildPartial0(com.google.spanner.admin.instance.v1.AutoscalingConfig result) { @@ -2548,6 +4981,34 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.AutoscalingConfig if (other.hasAutoscalingTargets()) { mergeAutoscalingTargets(other.getAutoscalingTargets()); } + if (asymmetricAutoscalingOptionsBuilder_ == null) { + if (!other.asymmetricAutoscalingOptions_.isEmpty()) { + if (asymmetricAutoscalingOptions_.isEmpty()) { + asymmetricAutoscalingOptions_ = other.asymmetricAutoscalingOptions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.addAll(other.asymmetricAutoscalingOptions_); + } + onChanged(); + } + } else { + if (!other.asymmetricAutoscalingOptions_.isEmpty()) { + if (asymmetricAutoscalingOptionsBuilder_.isEmpty()) { + asymmetricAutoscalingOptionsBuilder_.dispose(); + asymmetricAutoscalingOptionsBuilder_ = null; + asymmetricAutoscalingOptions_ = other.asymmetricAutoscalingOptions_; + bitField0_ = (bitField0_ & ~0x00000004); + asymmetricAutoscalingOptionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAsymmetricAutoscalingOptionsFieldBuilder() + : null; + } else { + asymmetricAutoscalingOptionsBuilder_.addAllMessages( + other.asymmetricAutoscalingOptions_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2588,6 +5049,22 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + m = + input.readMessage( + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption.parser(), + extensionRegistry); + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.add(m); + } else { + asymmetricAutoscalingOptionsBuilder_.addMessage(m); + } + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3037,6 +5514,585 @@ public Builder clearAutoscalingTargets() { return autoscalingTargetsBuilder_; } + private java.util.List< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption> + asymmetricAutoscalingOptions_ = java.util.Collections.emptyList(); + + private void ensureAsymmetricAutoscalingOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + asymmetricAutoscalingOptions_ = + new java.util.ArrayList< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption>( + asymmetricAutoscalingOptions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder> + asymmetricAutoscalingOptionsBuilder_; + + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption> + getAsymmetricAutoscalingOptionsList() { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(asymmetricAutoscalingOptions_); + } else { + return asymmetricAutoscalingOptionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAsymmetricAutoscalingOptionsCount() { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + return asymmetricAutoscalingOptions_.size(); + } else { + return asymmetricAutoscalingOptionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + getAsymmetricAutoscalingOptions(int index) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + return asymmetricAutoscalingOptions_.get(index); + } else { + return asymmetricAutoscalingOptionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAsymmetricAutoscalingOptions( + int index, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption value) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.set(index, value); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAsymmetricAutoscalingOptions( + int index, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.Builder + builderForValue) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.set(index, builderForValue.build()); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAsymmetricAutoscalingOptions( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption value) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.add(value); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAsymmetricAutoscalingOptions( + int index, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption value) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.add(index, value); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAsymmetricAutoscalingOptions( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.Builder + builderForValue) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.add(builderForValue.build()); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAsymmetricAutoscalingOptions( + int index, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.Builder + builderForValue) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.add(index, builderForValue.build()); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAsymmetricAutoscalingOptions( + java.lang.Iterable< + ? extends + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOption> + values) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, asymmetricAutoscalingOptions_); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAsymmetricAutoscalingOptions() { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + asymmetricAutoscalingOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAsymmetricAutoscalingOptions(int index) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + ensureAsymmetricAutoscalingOptionsIsMutable(); + asymmetricAutoscalingOptions_.remove(index); + onChanged(); + } else { + asymmetricAutoscalingOptionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder + getAsymmetricAutoscalingOptionsBuilder(int index) { + return getAsymmetricAutoscalingOptionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder + getAsymmetricAutoscalingOptionsOrBuilder(int index) { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + return asymmetricAutoscalingOptions_.get(index); + } else { + return asymmetricAutoscalingOptionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder> + getAsymmetricAutoscalingOptionsOrBuilderList() { + if (asymmetricAutoscalingOptionsBuilder_ != null) { + return asymmetricAutoscalingOptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(asymmetricAutoscalingOptions_); + } + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder + addAsymmetricAutoscalingOptionsBuilder() { + return getAsymmetricAutoscalingOptionsFieldBuilder() + .addBuilder( + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder + addAsymmetricAutoscalingOptionsBuilder(int index) { + return getAsymmetricAutoscalingOptionsFieldBuilder() + .addBuilder( + index, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Optional asymmetric autoscaling options.
+     * Replicas matching the replica selection criteria will be autoscaled
+     * independently from other replicas. The autoscaler will scale the replicas
+     * based on the utilization of replicas identified by the replica selection.
+     * Replica selections should not overlap with each other.
+     *
+     * Other replicas (those do not match any replica selection) will be
+     * autoscaled together and will have the same compute capacity allocated to
+     * them.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder> + getAsymmetricAutoscalingOptionsBuilderList() { + return getAsymmetricAutoscalingOptionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder> + getAsymmetricAutoscalingOptionsFieldBuilder() { + if (asymmetricAutoscalingOptionsBuilder_ == null) { + asymmetricAutoscalingOptionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + .Builder, + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder>( + asymmetricAutoscalingOptions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + asymmetricAutoscalingOptions_ = null; + } + return asymmetricAutoscalingOptionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); 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 index e8471ed717f..9e9a6222286 100644 --- 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 @@ -107,4 +107,112 @@ public interface AutoscalingConfigOrBuilder */ com.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargetsOrBuilder getAutoscalingTargetsOrBuilder(); + + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAsymmetricAutoscalingOptionsList(); + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + getAsymmetricAutoscalingOptions(int index); + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAsymmetricAutoscalingOptionsCount(); + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.spanner.admin.instance.v1.AutoscalingConfig + .AsymmetricAutoscalingOptionOrBuilder> + getAsymmetricAutoscalingOptionsOrBuilderList(); + /** + * + * + *
+   * Optional. Optional asymmetric autoscaling options.
+   * Replicas matching the replica selection criteria will be autoscaled
+   * independently from other replicas. The autoscaler will scale the replicas
+   * based on the utilization of replicas identified by the replica selection.
+   * Replica selections should not overlap with each other.
+   *
+   * Other replicas (those do not match any replica selection) will be
+   * autoscaled together and will have the same compute capacity allocated to
+   * them.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOptionOrBuilder + getAsymmetricAutoscalingOptionsOrBuilder(int index); } diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java index 488b513ca0a..a589f16c104 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/CommonProto.java @@ -32,6 +32,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_spanner_admin_instance_v1_OperationProgress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -43,26 +47,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n-google/spanner/admin/instance/v1/commo" + "n.proto\022 google.spanner.admin.instance.v" - + "1\032\037google/protobuf/timestamp.proto\"\213\001\n\021O" - + "perationProgress\022\030\n\020progress_percent\030\001 \001" - + "(\005\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022,\n\010end_time\030\003 \001(\0132\032.google.pr" - + "otobuf.Timestamp*w\n\021FulfillmentPeriod\022\"\n" - + "\036FULFILLMENT_PERIOD_UNSPECIFIED\020\000\022\035\n\031FUL" - + "FILLMENT_PERIOD_NORMAL\020\001\022\037\n\033FULFILLMENT_" - + "PERIOD_EXTENDED\020\002B\375\001\n$com.google.spanner" - + ".admin.instance.v1B\013CommonProtoP\001ZFcloud" - + ".google.com/go/spanner/admin/instance/ap" - + "iv1/instancepb;instancepb\252\002&Google.Cloud" - + ".Spanner.Admin.Instance.V1\312\002&Google\\Clou" - + "d\\Spanner\\Admin\\Instance\\V1\352\002+Google::Cl" - + "oud::Spanner::Admin::Instance::V1b\006proto" - + "3" + + "1\032\037google/api/field_behavior.proto\032\037goog" + + "le/protobuf/timestamp.proto\"\213\001\n\021Operatio" + + "nProgress\022\030\n\020progress_percent\030\001 \001(\005\022.\n\ns" + + "tart_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf." + + "Timestamp\")\n\020ReplicaSelection\022\025\n\010locatio" + + "n\030\001 \001(\tB\003\340A\002*w\n\021FulfillmentPeriod\022\"\n\036FUL" + + "FILLMENT_PERIOD_UNSPECIFIED\020\000\022\035\n\031FULFILL" + + "MENT_PERIOD_NORMAL\020\001\022\037\n\033FULFILLMENT_PERI" + + "OD_EXTENDED\020\002B\375\001\n$com.google.spanner.adm" + + "in.instance.v1B\013CommonProtoP\001ZFcloud.goo" + + "gle.com/go/spanner/admin/instance/apiv1/" + + "instancepb;instancepb\252\002&Google.Cloud.Spa" + + "nner.Admin.Instance.V1\312\002&Google\\Cloud\\Sp" + + "anner\\Admin\\Instance\\V1\352\002+Google::Cloud:" + + ":Spanner::Admin::Instance::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_spanner_admin_instance_v1_OperationProgress_descriptor = @@ -73,6 +79,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ProgressPercent", "StartTime", "EndTime", }); + internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor, + new java.lang.String[] { + "Location", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } 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 823b4e595b9..1caf9592536 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 @@ -42,6 +42,7 @@ private Instance() { name_ = ""; config_ = ""; displayName_ = ""; + replicaComputeCapacity_ = java.util.Collections.emptyList(); state_ = 0; endpointUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); edition_ = 0; @@ -601,18 +602,25 @@ 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.
+   * The number of nodes allocated to this instance. At most, one of either
+   * `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
+   * 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`.
+   * If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
+   * field and reflects the current number of nodes allocated to the instance.
    *
-   * See [the
-   * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-   * for more information about nodes and processing units.
+   * This might be zero in API responses for instances that are not yet in the
+   * `READY` state.
+   *
+   * If the instance has varying node count across replicas (achieved by
+   * setting asymmetric_autoscaling_options in autoscaling config), the
+   * node_count here is the maximum node count across all replicas.
+   *
+   * For more information, see
+   * [Compute capacity, nodes, and processing
+   * units](https://cloud.google.com/spanner/docs/compute-capacity).
    * 
* * int32 node_count = 5; @@ -630,18 +638,27 @@ 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.
+   * The number of processing units allocated to this instance. At most, one of
+   * either `processing_units` or `node_count` should be present in the message.
    *
-   * Users can set the processing_units field to specify the target number of
+   * 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`.
+   * If autoscaling is enabled, `processing_units` is treated as an
+   * `OUTPUT_ONLY` field and reflects the current number of processing units
+   * allocated to the instance.
+   *
+   * This might be zero in API responses for instances that are not yet in the
+   * `READY` state.
    *
-   * See [the
-   * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-   * for more information about nodes and processing units.
+   * If the instance has varying processing units per replica
+   * (achieved by setting asymmetric_autoscaling_options in autoscaling config),
+   * the processing_units here is the maximum processing units across all
+   * replicas.
+   *
+   * For more information, see
+   * [Compute capacity, nodes and processing
+   * units](https://cloud.google.com/spanner/docs/compute-capacity).
    * 
* * int32 processing_units = 9; @@ -653,6 +670,102 @@ public int getProcessingUnits() { return processingUnits_; } + public static final int REPLICA_COMPUTE_CAPACITY_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private java.util.List + replicaComputeCapacity_; + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getReplicaComputeCapacityList() { + return replicaComputeCapacity_; + } + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> + getReplicaComputeCapacityOrBuilderList() { + return replicaComputeCapacity_; + } + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getReplicaComputeCapacityCount() { + return replicaComputeCapacity_.size(); + } + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity getReplicaComputeCapacity( + int index) { + return replicaComputeCapacity_.get(index); + } + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder + getReplicaComputeCapacityOrBuilder(int index) { + return replicaComputeCapacity_.get(index); + } + public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 17; private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; /** @@ -1200,6 +1313,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(17, getAutoscalingConfig()); } + for (int i = 0; i < replicaComputeCapacity_.size(); i++) { + output.writeMessage(19, replicaComputeCapacity_.get(i)); + } if (edition_ != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { output.writeEnum(20, edition_); @@ -1259,6 +1375,11 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getAutoscalingConfig()); } + for (int i = 0; i < replicaComputeCapacity_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, replicaComputeCapacity_.get(i)); + } if (edition_ != com.google.spanner.admin.instance.v1.Instance.Edition.EDITION_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, edition_); @@ -1284,6 +1405,8 @@ 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 (!getReplicaComputeCapacityList().equals(other.getReplicaComputeCapacityList())) + return false; if (hasAutoscalingConfig() != other.hasAutoscalingConfig()) return false; if (hasAutoscalingConfig()) { if (!getAutoscalingConfig().equals(other.getAutoscalingConfig())) return false; @@ -1321,6 +1444,10 @@ public int hashCode() { hash = (53 * hash) + getNodeCount(); hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER; hash = (53 * hash) + getProcessingUnits(); + if (getReplicaComputeCapacityCount() > 0) { + hash = (37 * hash) + REPLICA_COMPUTE_CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + getReplicaComputeCapacityList().hashCode(); + } if (hasAutoscalingConfig()) { hash = (37 * hash) + AUTOSCALING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getAutoscalingConfig().hashCode(); @@ -1507,6 +1634,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReplicaComputeCapacityFieldBuilder(); getAutoscalingConfigFieldBuilder(); getCreateTimeFieldBuilder(); getUpdateTimeFieldBuilder(); @@ -1522,6 +1650,13 @@ public Builder clear() { displayName_ = ""; nodeCount_ = 0; processingUnits_ = 0; + if (replicaComputeCapacityBuilder_ == null) { + replicaComputeCapacity_ = java.util.Collections.emptyList(); + } else { + replicaComputeCapacity_ = null; + replicaComputeCapacityBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); autoscalingConfig_ = null; if (autoscalingConfigBuilder_ != null) { autoscalingConfigBuilder_.dispose(); @@ -1568,6 +1703,7 @@ public com.google.spanner.admin.instance.v1.Instance build() { public com.google.spanner.admin.instance.v1.Instance buildPartial() { com.google.spanner.admin.instance.v1.Instance result = new com.google.spanner.admin.instance.v1.Instance(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1575,6 +1711,18 @@ public com.google.spanner.admin.instance.v1.Instance buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.spanner.admin.instance.v1.Instance result) { + if (replicaComputeCapacityBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + replicaComputeCapacity_ = java.util.Collections.unmodifiableList(replicaComputeCapacity_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.replicaComputeCapacity_ = replicaComputeCapacity_; + } else { + result.replicaComputeCapacity_ = replicaComputeCapacityBuilder_.build(); + } + } + private void buildPartial0(com.google.spanner.admin.instance.v1.Instance result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -1593,33 +1741,33 @@ private void buildPartial0(com.google.spanner.admin.instance.v1.Instance result) result.processingUnits_ = processingUnits_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.autoscalingConfig_ = autoscalingConfigBuilder_ == null ? autoscalingConfig_ : autoscalingConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.state_ = state_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { endpointUris_.makeImmutable(); result.endpointUris_ = endpointUris_; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.edition_ = edition_; } result.bitField0_ |= to_bitField0_; @@ -1691,6 +1839,33 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.Instance other) { if (other.getProcessingUnits() != 0) { setProcessingUnits(other.getProcessingUnits()); } + if (replicaComputeCapacityBuilder_ == null) { + if (!other.replicaComputeCapacity_.isEmpty()) { + if (replicaComputeCapacity_.isEmpty()) { + replicaComputeCapacity_ = other.replicaComputeCapacity_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.addAll(other.replicaComputeCapacity_); + } + onChanged(); + } + } else { + if (!other.replicaComputeCapacity_.isEmpty()) { + if (replicaComputeCapacityBuilder_.isEmpty()) { + replicaComputeCapacityBuilder_.dispose(); + replicaComputeCapacityBuilder_ = null; + replicaComputeCapacity_ = other.replicaComputeCapacity_; + bitField0_ = (bitField0_ & ~0x00000020); + replicaComputeCapacityBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReplicaComputeCapacityFieldBuilder() + : null; + } else { + replicaComputeCapacityBuilder_.addAllMessages(other.replicaComputeCapacity_); + } + } + } if (other.hasAutoscalingConfig()) { mergeAutoscalingConfig(other.getAutoscalingConfig()); } @@ -1698,11 +1873,11 @@ public Builder mergeFrom(com.google.spanner.admin.instance.v1.Instance other) { setStateValue(other.getStateValue()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; if (!other.endpointUris_.isEmpty()) { if (endpointUris_.isEmpty()) { endpointUris_ = other.endpointUris_; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } else { ensureEndpointUrisIsMutable(); endpointUris_.addAll(other.endpointUris_); @@ -1771,7 +1946,7 @@ public Builder mergeFrom( case 48: { state_ = input.readEnum(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 48 case 58: @@ -1783,7 +1958,7 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 58 case 66: @@ -1802,26 +1977,40 @@ public Builder mergeFrom( case 90: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 90 case 98: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 98 case 138: { input.readMessage( getAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 138 + case 154: + { + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity m = + input.readMessage( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.parser(), + extensionRegistry); + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.add(m); + } else { + replicaComputeCapacityBuilder_.addMessage(m); + } + break; + } // case 154 case 160: { edition_ = input.readEnum(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 160 default: @@ -2211,18 +2400,25 @@ 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.
+     * The number of nodes allocated to this instance. At most, one of either
+     * `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
+     * 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`.
+     * If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
+     * field and reflects the current number of nodes allocated to the instance.
+     *
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * If the instance has varying node count across replicas (achieved by
+     * setting asymmetric_autoscaling_options in autoscaling config), the
+     * node_count here is the maximum node count across all replicas.
+     *
+     * For more information, see
+     * [Compute capacity, nodes, and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 node_count = 5; @@ -2237,18 +2433,25 @@ 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.
+     * The number of nodes allocated to this instance. At most, one of either
+     * `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
+     * 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`.
+     * If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
+     * field and reflects the current number of nodes allocated to the instance.
+     *
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * If the instance has varying node count across replicas (achieved by
+     * setting asymmetric_autoscaling_options in autoscaling config), the
+     * node_count here is the maximum node count across all replicas.
+     *
+     * For more information, see
+     * [Compute capacity, nodes, and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 node_count = 5; @@ -2267,18 +2470,25 @@ 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.
+     * The number of nodes allocated to this instance. At most, one of either
+     * `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
+     * 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`.
+     * If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
+     * field and reflects the current number of nodes allocated to the instance.
+     *
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
+     *
+     * If the instance has varying node count across replicas (achieved by
+     * setting asymmetric_autoscaling_options in autoscaling config), the
+     * node_count here is the maximum node count across all replicas.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * For more information, see
+     * [Compute capacity, nodes, and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 node_count = 5; @@ -2297,18 +2507,27 @@ 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.
+     * The number of processing units allocated to this instance. At most, one of
+     * either `processing_units` or `node_count` should be present in the message.
      *
-     * Users can set the processing_units field to specify the target number of
+     * 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`.
+     * If autoscaling is enabled, `processing_units` is treated as an
+     * `OUTPUT_ONLY` field and reflects the current number of processing units
+     * allocated to the instance.
+     *
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * If the instance has varying processing units per replica
+     * (achieved by setting asymmetric_autoscaling_options in autoscaling config),
+     * the processing_units here is the maximum processing units across all
+     * replicas.
+     *
+     * For more information, see
+     * [Compute capacity, nodes and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 processing_units = 9; @@ -2323,18 +2542,27 @@ 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.
+     * The number of processing units allocated to this instance. At most, one of
+     * either `processing_units` or `node_count` should be present in the message.
      *
-     * Users can set the processing_units field to specify the target number of
+     * 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`.
+     * If autoscaling is enabled, `processing_units` is treated as an
+     * `OUTPUT_ONLY` field and reflects the current number of processing units
+     * allocated to the instance.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
+     *
+     * If the instance has varying processing units per replica
+     * (achieved by setting asymmetric_autoscaling_options in autoscaling config),
+     * the processing_units here is the maximum processing units across all
+     * replicas.
+     *
+     * For more information, see
+     * [Compute capacity, nodes and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 processing_units = 9; @@ -2353,18 +2581,27 @@ 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.
+     * The number of processing units allocated to this instance. At most, one of
+     * either `processing_units` or `node_count` should be present in the message.
      *
-     * Users can set the processing_units field to specify the target number of
+     * 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`.
+     * If autoscaling is enabled, `processing_units` is treated as an
+     * `OUTPUT_ONLY` field and reflects the current number of processing units
+     * allocated to the instance.
      *
-     * See [the
-     * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-     * for more information about nodes and processing units.
+     * This might be zero in API responses for instances that are not yet in the
+     * `READY` state.
+     *
+     * If the instance has varying processing units per replica
+     * (achieved by setting asymmetric_autoscaling_options in autoscaling config),
+     * the processing_units here is the maximum processing units across all
+     * replicas.
+     *
+     * For more information, see
+     * [Compute capacity, nodes and processing
+     * units](https://cloud.google.com/spanner/docs/compute-capacity).
      * 
* * int32 processing_units = 9; @@ -2378,6 +2615,449 @@ public Builder clearProcessingUnits() { return this; } + private java.util.List + replicaComputeCapacity_ = java.util.Collections.emptyList(); + + private void ensureReplicaComputeCapacityIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + replicaComputeCapacity_ = + new java.util.ArrayList( + replicaComputeCapacity_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> + replicaComputeCapacityBuilder_; + + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getReplicaComputeCapacityList() { + if (replicaComputeCapacityBuilder_ == null) { + return java.util.Collections.unmodifiableList(replicaComputeCapacity_); + } else { + return replicaComputeCapacityBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getReplicaComputeCapacityCount() { + if (replicaComputeCapacityBuilder_ == null) { + return replicaComputeCapacity_.size(); + } else { + return replicaComputeCapacityBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity getReplicaComputeCapacity( + int index) { + if (replicaComputeCapacityBuilder_ == null) { + return replicaComputeCapacity_.get(index); + } else { + return replicaComputeCapacityBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReplicaComputeCapacity( + int index, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity value) { + if (replicaComputeCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.set(index, value); + onChanged(); + } else { + replicaComputeCapacityBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReplicaComputeCapacity( + int index, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder builderForValue) { + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.set(index, builderForValue.build()); + onChanged(); + } else { + replicaComputeCapacityBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReplicaComputeCapacity( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity value) { + if (replicaComputeCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.add(value); + onChanged(); + } else { + replicaComputeCapacityBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReplicaComputeCapacity( + int index, com.google.spanner.admin.instance.v1.ReplicaComputeCapacity value) { + if (replicaComputeCapacityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.add(index, value); + onChanged(); + } else { + replicaComputeCapacityBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReplicaComputeCapacity( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder builderForValue) { + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.add(builderForValue.build()); + onChanged(); + } else { + replicaComputeCapacityBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReplicaComputeCapacity( + int index, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder builderForValue) { + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.add(index, builderForValue.build()); + onChanged(); + } else { + replicaComputeCapacityBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllReplicaComputeCapacity( + java.lang.Iterable + values) { + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicaComputeCapacity_); + onChanged(); + } else { + replicaComputeCapacityBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearReplicaComputeCapacity() { + if (replicaComputeCapacityBuilder_ == null) { + replicaComputeCapacity_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + replicaComputeCapacityBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeReplicaComputeCapacity(int index) { + if (replicaComputeCapacityBuilder_ == null) { + ensureReplicaComputeCapacityIsMutable(); + replicaComputeCapacity_.remove(index); + onChanged(); + } else { + replicaComputeCapacityBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder + getReplicaComputeCapacityBuilder(int index) { + return getReplicaComputeCapacityFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder + getReplicaComputeCapacityOrBuilder(int index) { + if (replicaComputeCapacityBuilder_ == null) { + return replicaComputeCapacity_.get(index); + } else { + return replicaComputeCapacityBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> + getReplicaComputeCapacityOrBuilderList() { + if (replicaComputeCapacityBuilder_ != null) { + return replicaComputeCapacityBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(replicaComputeCapacity_); + } + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder + addReplicaComputeCapacityBuilder() { + return getReplicaComputeCapacityFieldBuilder() + .addBuilder( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder + addReplicaComputeCapacityBuilder(int index) { + return getReplicaComputeCapacityFieldBuilder() + .addBuilder( + index, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Lists the compute capacity per ReplicaSelection. A replica
+     * selection identifies a set of replicas with common properties. Replicas
+     * identified by a ReplicaSelection are scaled with the same compute capacity.
+     * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getReplicaComputeCapacityBuilderList() { + return getReplicaComputeCapacityFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder> + getReplicaComputeCapacityFieldBuilder() { + if (replicaComputeCapacityBuilder_ == null) { + replicaComputeCapacityBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder>( + replicaComputeCapacity_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + replicaComputeCapacity_ = null; + } + return replicaComputeCapacityBuilder_; + } + private com.google.spanner.admin.instance.v1.AutoscalingConfig autoscalingConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.spanner.admin.instance.v1.AutoscalingConfig, @@ -2401,7 +3081,7 @@ public Builder clearProcessingUnits() { * @return Whether the autoscalingConfig field is set. */ public boolean hasAutoscalingConfig() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -2452,7 +3132,7 @@ public Builder setAutoscalingConfig( } else { autoscalingConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2477,7 +3157,7 @@ public Builder setAutoscalingConfig( } else { autoscalingConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2498,7 +3178,7 @@ public Builder setAutoscalingConfig( public Builder mergeAutoscalingConfig( com.google.spanner.admin.instance.v1.AutoscalingConfig value) { if (autoscalingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && autoscalingConfig_ != null && autoscalingConfig_ != com.google.spanner.admin.instance.v1.AutoscalingConfig.getDefaultInstance()) { @@ -2510,7 +3190,7 @@ public Builder mergeAutoscalingConfig( autoscalingConfigBuilder_.mergeFrom(value); } if (autoscalingConfig_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -2530,7 +3210,7 @@ public Builder mergeAutoscalingConfig( * */ public Builder clearAutoscalingConfig() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); autoscalingConfig_ = null; if (autoscalingConfigBuilder_ != null) { autoscalingConfigBuilder_.dispose(); @@ -2555,7 +3235,7 @@ public Builder clearAutoscalingConfig() { */ public com.google.spanner.admin.instance.v1.AutoscalingConfig.Builder getAutoscalingConfigBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return getAutoscalingConfigFieldBuilder().getBuilder(); } @@ -2656,7 +3336,7 @@ public int getStateValue() { */ public Builder setStateValue(int value) { state_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2707,7 +3387,7 @@ public Builder setState(com.google.spanner.admin.instance.v1.Instance.State valu if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; state_ = value.getNumber(); onChanged(); return this; @@ -2730,7 +3410,7 @@ public Builder setState(com.google.spanner.admin.instance.v1.Instance.State valu * @return This builder for chaining. */ public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); state_ = 0; onChanged(); return this; @@ -2753,7 +3433,7 @@ private com.google.protobuf.MapField interna if (!labels_.isMutable()) { labels_ = labels_.copy(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return labels_; } @@ -2918,7 +3598,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableLabels().getMutableMap().clear(); return this; } @@ -2961,7 +3641,7 @@ public Builder removeLabels(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; return internalGetMutableLabels().getMutableMap(); } /** @@ -3001,7 +3681,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; return this; } /** @@ -3035,7 +3715,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; return this; } @@ -3046,7 +3726,7 @@ private void ensureEndpointUrisIsMutable() { if (!endpointUris_.isModifiable()) { endpointUris_ = new com.google.protobuf.LazyStringArrayList(endpointUris_); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } /** * @@ -3126,7 +3806,7 @@ public Builder setEndpointUris(int index, java.lang.String value) { } ensureEndpointUrisIsMutable(); endpointUris_.set(index, value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3148,7 +3828,7 @@ public Builder addEndpointUris(java.lang.String value) { } ensureEndpointUrisIsMutable(); endpointUris_.add(value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3167,7 +3847,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_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3184,7 +3864,7 @@ public Builder addAllEndpointUris(java.lang.Iterable values) { */ public Builder clearEndpointUris() { endpointUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); ; onChanged(); return this; @@ -3208,7 +3888,7 @@ public Builder addEndpointUrisBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureEndpointUrisIsMutable(); endpointUris_.add(value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3233,7 +3913,7 @@ public Builder addEndpointUrisBytes(com.google.protobuf.ByteString value) { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * @@ -3277,7 +3957,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3298,7 +3978,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3315,7 +3995,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000400) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -3326,7 +4006,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -3343,7 +4023,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -3364,7 +4044,7 @@ public Builder clearCreateTime() { * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -3436,7 +4116,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** * @@ -3480,7 +4160,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3501,7 +4181,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3518,7 +4198,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) + if (((bitField0_ & 0x00000800) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -3529,7 +4209,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } return this; @@ -3546,7 +4226,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -3567,7 +4247,7 @@ public Builder clearUpdateTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } @@ -3653,7 +4333,7 @@ public int getEditionValue() { */ public Builder setEditionValue(int value) { edition_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3696,7 +4376,7 @@ public Builder setEdition(com.google.spanner.admin.instance.v1.Instance.Edition if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; edition_ = value.getNumber(); onChanged(); return this; @@ -3715,7 +4395,7 @@ public Builder setEdition(com.google.spanner.admin.instance.v1.Instance.Edition * @return This builder for chaining. */ public Builder clearEdition() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); edition_ = 0; onChanged(); return this; 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 17425ffd0a4..db7d23f94e0 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,18 +121,25 @@ 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.
+   * The number of nodes allocated to this instance. At most, one of either
+   * `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
+   * 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`.
+   * If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
+   * field and reflects the current number of nodes allocated to the instance.
    *
-   * See [the
-   * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-   * for more information about nodes and processing units.
+   * This might be zero in API responses for instances that are not yet in the
+   * `READY` state.
+   *
+   * If the instance has varying node count across replicas (achieved by
+   * setting asymmetric_autoscaling_options in autoscaling config), the
+   * node_count here is the maximum node count across all replicas.
+   *
+   * For more information, see
+   * [Compute capacity, nodes, and processing
+   * units](https://cloud.google.com/spanner/docs/compute-capacity).
    * 
* * int32 node_count = 5; @@ -145,18 +152,27 @@ 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.
+   * The number of processing units allocated to this instance. At most, one of
+   * either `processing_units` or `node_count` should be present in the message.
    *
-   * Users can set the processing_units field to specify the target number of
+   * 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`.
+   * If autoscaling is enabled, `processing_units` is treated as an
+   * `OUTPUT_ONLY` field and reflects the current number of processing units
+   * allocated to the instance.
+   *
+   * This might be zero in API responses for instances that are not yet in the
+   * `READY` state.
    *
-   * See [the
-   * documentation](https://cloud.google.com/spanner/docs/compute-capacity)
-   * for more information about nodes and processing units.
+   * If the instance has varying processing units per replica
+   * (achieved by setting asymmetric_autoscaling_options in autoscaling config),
+   * the processing_units here is the maximum processing units across all
+   * replicas.
+   *
+   * For more information, see
+   * [Compute capacity, nodes and processing
+   * units](https://cloud.google.com/spanner/docs/compute-capacity).
    * 
* * int32 processing_units = 9; @@ -165,6 +181,80 @@ public interface InstanceOrBuilder */ int getProcessingUnits(); + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getReplicaComputeCapacityList(); + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity getReplicaComputeCapacity(int index); + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getReplicaComputeCapacityCount(); + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getReplicaComputeCapacityOrBuilderList(); + /** + * + * + *
+   * Output only. Lists the compute capacity per ReplicaSelection. A replica
+   * selection identifies a set of replicas with common properties. Replicas
+   * identified by a ReplicaSelection are scaled with the same compute capacity.
+   * 
+ * + * + * repeated .google.spanner.admin.instance.v1.ReplicaComputeCapacity replica_compute_capacity = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder + getReplicaComputeCapacityOrBuilder(int index); + /** * * diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java new file mode 100644 index 00000000000..1e64f6b80b9 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacity.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2024 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 + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * ReplicaComputeCapacity describes the amount of server resources that are
+ * allocated to each replica identified by the replica selection.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaComputeCapacity} + */ +public final class ReplicaComputeCapacity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ReplicaComputeCapacity) + ReplicaComputeCapacityOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReplicaComputeCapacity.newBuilder() to construct. + private ReplicaComputeCapacity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReplicaComputeCapacity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReplicaComputeCapacity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_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_ReplicaComputeCapacity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.class, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder.class); + } + + private int bitField0_; + private int computeCapacityCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object computeCapacity_; + + public enum ComputeCapacityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NODE_COUNT(2), + PROCESSING_UNITS(3), + COMPUTECAPACITY_NOT_SET(0); + private final int value; + + private ComputeCapacityCase(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 ComputeCapacityCase valueOf(int value) { + return forNumber(value); + } + + public static ComputeCapacityCase forNumber(int value) { + switch (value) { + case 2: + return NODE_COUNT; + case 3: + return PROCESSING_UNITS; + case 0: + return COMPUTECAPACITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ComputeCapacityCase getComputeCapacityCase() { + return ComputeCapacityCase.forNumber(computeCapacityCase_); + } + + public static final int REPLICA_SELECTION_FIELD_NUMBER = 1; + private com.google.spanner.admin.instance.v1.ReplicaSelection replicaSelection_; + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + @java.lang.Override + public boolean hasReplicaSelection() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection() { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder + getReplicaSelectionOrBuilder() { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + + public static final int NODE_COUNT_FIELD_NUMBER = 2; + /** + * + * + *
+   * The number of nodes allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 node_count = 2; + * + * @return Whether the nodeCount field is set. + */ + @java.lang.Override + public boolean hasNodeCount() { + return computeCapacityCase_ == 2; + } + /** + * + * + *
+   * The number of nodes allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 node_count = 2; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + if (computeCapacityCase_ == 2) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + + public static final int PROCESSING_UNITS_FIELD_NUMBER = 3; + /** + * + * + *
+   * The number of processing units allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 processing_units = 3; + * + * @return Whether the processingUnits field is set. + */ + @java.lang.Override + public boolean hasProcessingUnits() { + return computeCapacityCase_ == 3; + } + /** + * + * + *
+   * The number of processing units allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 processing_units = 3; + * + * @return The processingUnits. + */ + @java.lang.Override + public int getProcessingUnits() { + if (computeCapacityCase_ == 3) { + return (java.lang.Integer) computeCapacity_; + } + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getReplicaSelection()); + } + if (computeCapacityCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) computeCapacity_)); + } + if (computeCapacityCase_ == 3) { + output.writeInt32(3, (int) ((java.lang.Integer) computeCapacity_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReplicaSelection()); + } + if (computeCapacityCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) computeCapacity_)); + } + if (computeCapacityCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 3, (int) ((java.lang.Integer) computeCapacity_)); + } + 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.ReplicaComputeCapacity)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity other = + (com.google.spanner.admin.instance.v1.ReplicaComputeCapacity) obj; + + if (hasReplicaSelection() != other.hasReplicaSelection()) return false; + if (hasReplicaSelection()) { + if (!getReplicaSelection().equals(other.getReplicaSelection())) return false; + } + if (!getComputeCapacityCase().equals(other.getComputeCapacityCase())) return false; + switch (computeCapacityCase_) { + case 2: + if (getNodeCount() != other.getNodeCount()) return false; + break; + case 3: + if (getProcessingUnits() != other.getProcessingUnits()) 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(); + if (hasReplicaSelection()) { + hash = (37 * hash) + REPLICA_SELECTION_FIELD_NUMBER; + hash = (53 * hash) + getReplicaSelection().hashCode(); + } + switch (computeCapacityCase_) { + case 2: + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + break; + case 3: + hash = (37 * hash) + PROCESSING_UNITS_FIELD_NUMBER; + hash = (53 * hash) + getProcessingUnits(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity 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.ReplicaComputeCapacity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity 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.ReplicaComputeCapacity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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.ReplicaComputeCapacity 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; + } + /** + * + * + *
+   * ReplicaComputeCapacity describes the amount of server resources that are
+   * allocated to each replica identified by the replica selection.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaComputeCapacity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ReplicaComputeCapacity) + com.google.spanner.admin.instance.v1.ReplicaComputeCapacityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.SpannerInstanceAdminProto + .internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_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_ReplicaComputeCapacity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.class, + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.Builder.class); + } + + // Construct using com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReplicaSelectionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + replicaSelection_ = null; + if (replicaSelectionBuilder_ != null) { + replicaSelectionBuilder_.dispose(); + replicaSelectionBuilder_ = null; + } + computeCapacityCase_ = 0; + computeCapacity_ = 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_ReplicaComputeCapacity_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity build() { + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaComputeCapacity buildPartial() { + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity result = + new com.google.spanner.admin.instance.v1.ReplicaComputeCapacity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.admin.instance.v1.ReplicaComputeCapacity result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.replicaSelection_ = + replicaSelectionBuilder_ == null ? replicaSelection_ : replicaSelectionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity result) { + result.computeCapacityCase_ = computeCapacityCase_; + result.computeCapacity_ = this.computeCapacity_; + } + + @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.ReplicaComputeCapacity) { + return mergeFrom((com.google.spanner.admin.instance.v1.ReplicaComputeCapacity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.instance.v1.ReplicaComputeCapacity other) { + if (other == com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.getDefaultInstance()) + return this; + if (other.hasReplicaSelection()) { + mergeReplicaSelection(other.getReplicaSelection()); + } + switch (other.getComputeCapacityCase()) { + case NODE_COUNT: + { + setNodeCount(other.getNodeCount()); + break; + } + case PROCESSING_UNITS: + { + setProcessingUnits(other.getProcessingUnits()); + break; + } + case COMPUTECAPACITY_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 10: + { + input.readMessage( + getReplicaSelectionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + computeCapacity_ = input.readInt32(); + computeCapacityCase_ = 2; + break; + } // case 16 + case 24: + { + computeCapacity_ = input.readInt32(); + computeCapacityCase_ = 3; + break; + } // case 24 + 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 computeCapacityCase_ = 0; + private java.lang.Object computeCapacity_; + + public ComputeCapacityCase getComputeCapacityCase() { + return ComputeCapacityCase.forNumber(computeCapacityCase_); + } + + public Builder clearComputeCapacity() { + computeCapacityCase_ = 0; + computeCapacity_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.spanner.admin.instance.v1.ReplicaSelection replicaSelection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> + replicaSelectionBuilder_; + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + public boolean hasReplicaSelection() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + public com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection() { + if (replicaSelectionBuilder_ == null) { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } else { + return replicaSelectionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection value) { + if (replicaSelectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replicaSelection_ = value; + } else { + replicaSelectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder builderForValue) { + if (replicaSelectionBuilder_ == null) { + replicaSelection_ = builderForValue.build(); + } else { + replicaSelectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReplicaSelection( + com.google.spanner.admin.instance.v1.ReplicaSelection value) { + if (replicaSelectionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && replicaSelection_ != null + && replicaSelection_ + != com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance()) { + getReplicaSelectionBuilder().mergeFrom(value); + } else { + replicaSelection_ = value; + } + } else { + replicaSelectionBuilder_.mergeFrom(value); + } + if (replicaSelection_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReplicaSelection() { + bitField0_ = (bitField0_ & ~0x00000001); + replicaSelection_ = null; + if (replicaSelectionBuilder_ != null) { + replicaSelectionBuilder_.dispose(); + replicaSelectionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaSelection.Builder + getReplicaSelectionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReplicaSelectionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder + getReplicaSelectionOrBuilder() { + if (replicaSelectionBuilder_ != null) { + return replicaSelectionBuilder_.getMessageOrBuilder(); + } else { + return replicaSelection_ == null + ? com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance() + : replicaSelection_; + } + } + /** + * + * + *
+     * Required. Identifies replicas by specified properties.
+     * All replicas in the selection have the same amount of compute capacity.
+     * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder> + getReplicaSelectionFieldBuilder() { + if (replicaSelectionBuilder_ == null) { + replicaSelectionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.spanner.admin.instance.v1.ReplicaSelection, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder, + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder>( + getReplicaSelection(), getParentForChildren(), isClean()); + replicaSelection_ = null; + } + return replicaSelectionBuilder_; + } + + /** + * + * + *
+     * The number of nodes allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 node_count = 2; + * + * @return Whether the nodeCount field is set. + */ + public boolean hasNodeCount() { + return computeCapacityCase_ == 2; + } + /** + * + * + *
+     * The number of nodes allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 node_count = 2; + * + * @return The nodeCount. + */ + public int getNodeCount() { + if (computeCapacityCase_ == 2) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + /** + * + * + *
+     * The number of nodes allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 node_count = 2; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + computeCapacityCase_ = 2; + computeCapacity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of nodes allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 node_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + if (computeCapacityCase_ == 2) { + computeCapacityCase_ = 0; + computeCapacity_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The number of processing units allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 processing_units = 3; + * + * @return Whether the processingUnits field is set. + */ + public boolean hasProcessingUnits() { + return computeCapacityCase_ == 3; + } + /** + * + * + *
+     * The number of processing units allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 processing_units = 3; + * + * @return The processingUnits. + */ + public int getProcessingUnits() { + if (computeCapacityCase_ == 3) { + return (java.lang.Integer) computeCapacity_; + } + return 0; + } + /** + * + * + *
+     * The number of processing units allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 processing_units = 3; + * + * @param value The processingUnits to set. + * @return This builder for chaining. + */ + public Builder setProcessingUnits(int value) { + + computeCapacityCase_ = 3; + computeCapacity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of processing units allocated to each replica.
+     *
+     * This may be zero in API responses for instances that are not yet in
+     * state `READY`.
+     * 
+ * + * int32 processing_units = 3; + * + * @return This builder for chaining. + */ + public Builder clearProcessingUnits() { + if (computeCapacityCase_ == 3) { + computeCapacityCase_ = 0; + computeCapacity_ = 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.ReplicaComputeCapacity) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ReplicaComputeCapacity) + private static final com.google.spanner.admin.instance.v1.ReplicaComputeCapacity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.ReplicaComputeCapacity(); + } + + public static com.google.spanner.admin.instance.v1.ReplicaComputeCapacity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplicaComputeCapacity 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.ReplicaComputeCapacity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java new file mode 100644 index 00000000000..a8eeea2cdcb --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaComputeCapacityOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2024 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 + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.instance.v1; + +public interface ReplicaComputeCapacityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ReplicaComputeCapacity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the replicaSelection field is set. + */ + boolean hasReplicaSelection(); + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The replicaSelection. + */ + com.google.spanner.admin.instance.v1.ReplicaSelection getReplicaSelection(); + /** + * + * + *
+   * Required. Identifies replicas by specified properties.
+   * All replicas in the selection have the same amount of compute capacity.
+   * 
+ * + * + * .google.spanner.admin.instance.v1.ReplicaSelection replica_selection = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder getReplicaSelectionOrBuilder(); + + /** + * + * + *
+   * The number of nodes allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 node_count = 2; + * + * @return Whether the nodeCount field is set. + */ + boolean hasNodeCount(); + /** + * + * + *
+   * The number of nodes allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 node_count = 2; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * The number of processing units allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 processing_units = 3; + * + * @return Whether the processingUnits field is set. + */ + boolean hasProcessingUnits(); + /** + * + * + *
+   * The number of processing units allocated to each replica.
+   *
+   * This may be zero in API responses for instances that are not yet in
+   * state `READY`.
+   * 
+ * + * int32 processing_units = 3; + * + * @return The processingUnits. + */ + int getProcessingUnits(); + + com.google.spanner.admin.instance.v1.ReplicaComputeCapacity.ComputeCapacityCase + getComputeCapacityCase(); +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java new file mode 100644 index 00000000000..4ad522000a1 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelection.java @@ -0,0 +1,626 @@ +/* + * Copyright 2024 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/common.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.instance.v1; + +/** + * + * + *
+ * ReplicaSelection identifies replicas with common properties.
+ * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaSelection} + */ +public final class ReplicaSelection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.admin.instance.v1.ReplicaSelection) + ReplicaSelectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReplicaSelection.newBuilder() to construct. + private ReplicaSelection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReplicaSelection() { + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReplicaSelection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.CommonProto + .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.CommonProto + .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ReplicaSelection.class, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + /** + * + * + *
+   * Required. Name of the location of the replicas (e.g., "us-central1").
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the location of the replicas (e.g., "us-central1").
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + 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.ReplicaSelection)) { + return super.equals(obj); + } + com.google.spanner.admin.instance.v1.ReplicaSelection other = + (com.google.spanner.admin.instance.v1.ReplicaSelection) obj; + + if (!getLocation().equals(other.getLocation())) 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) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.spanner.admin.instance.v1.ReplicaSelection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaSelection 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.ReplicaSelection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaSelection 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.ReplicaSelection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.spanner.admin.instance.v1.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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.ReplicaSelection 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; + } + /** + * + * + *
+   * ReplicaSelection identifies replicas with common properties.
+   * 
+ * + * Protobuf type {@code google.spanner.admin.instance.v1.ReplicaSelection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.spanner.admin.instance.v1.ReplicaSelection) + com.google.spanner.admin.instance.v1.ReplicaSelectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.admin.instance.v1.CommonProto + .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.admin.instance.v1.CommonProto + .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.admin.instance.v1.ReplicaSelection.class, + com.google.spanner.admin.instance.v1.ReplicaSelection.Builder.class); + } + + // Construct using com.google.spanner.admin.instance.v1.ReplicaSelection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.spanner.admin.instance.v1.CommonProto + .internal_static_google_spanner_admin_instance_v1_ReplicaSelection_descriptor; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelection getDefaultInstanceForType() { + return com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelection build() { + com.google.spanner.admin.instance.v1.ReplicaSelection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.spanner.admin.instance.v1.ReplicaSelection buildPartial() { + com.google.spanner.admin.instance.v1.ReplicaSelection result = + new com.google.spanner.admin.instance.v1.ReplicaSelection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.spanner.admin.instance.v1.ReplicaSelection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.location_ = location_; + } + } + + @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.ReplicaSelection) { + return mergeFrom((com.google.spanner.admin.instance.v1.ReplicaSelection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.spanner.admin.instance.v1.ReplicaSelection other) { + if (other == com.google.spanner.admin.instance.v1.ReplicaSelection.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000001; + onChanged(); + } + 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: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + 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 java.lang.Object location_ = ""; + /** + * + * + *
+     * Required. Name of the location of the replicas (e.g., "us-central1").
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the location of the replicas (e.g., "us-central1").
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the location of the replicas (e.g., "us-central1").
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the location of the replicas (e.g., "us-central1").
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the location of the replicas (e.g., "us-central1").
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000001; + 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.ReplicaSelection) + } + + // @@protoc_insertion_point(class_scope:google.spanner.admin.instance.v1.ReplicaSelection) + private static final com.google.spanner.admin.instance.v1.ReplicaSelection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.spanner.admin.instance.v1.ReplicaSelection(); + } + + public static com.google.spanner.admin.instance.v1.ReplicaSelection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplicaSelection 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.ReplicaSelection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java new file mode 100644 index 00000000000..60c9b0edca0 --- /dev/null +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/ReplicaSelectionOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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/common.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.admin.instance.v1; + +public interface ReplicaSelectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.admin.instance.v1.ReplicaSelection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the location of the replicas (e.g., "us-central1").
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Required. Name of the location of the replicas (e.g., "us-central1").
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} 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 427a450fb01..2edfb759d12 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 @@ -40,6 +40,10 @@ 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_ReplicaComputeCapacity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -52,6 +56,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_spanner_admin_instance_v1_Instance_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -234,327 +246,348 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n" + "\005READY\020\002:`\352A]\n%spanner.googleapis.com/In" + "stanceConfig\0224projects/{project}/instanc" - + "eConfigs/{instance_config}\"\363\003\n\021Autoscali" - + "ngConfig\022f\n\022autoscaling_limits\030\001 \001(\0132E.g" - + "oogle.spanner.admin.instance.v1.Autoscal" - + "ingConfig.AutoscalingLimitsB\003\340A\002\022h\n\023auto" - + "scaling_targets\030\002 \001(\0132F.google.spanner.a" - + "dmin.instance.v1.AutoscalingConfig.Autos" - + "calingTargetsB\003\340A\002\032\227\001\n\021AutoscalingLimits" - + "\022\023\n\tmin_nodes\030\001 \001(\005H\000\022\036\n\024min_processing_" - + "units\030\002 \001(\005H\000\022\023\n\tmax_nodes\030\003 \001(\005H\001\022\036\n\024ma" - + "x_processing_units\030\004 \001(\005H\001B\013\n\tmin_limitB" - + "\013\n\tmax_limit\032r\n\022AutoscalingTargets\0222\n%hi" - + "gh_priority_cpu_utilization_percent\030\001 \001(" - + "\005B\003\340A\002\022(\n\033storage_utilization_percent\030\002 " - + "\001(\005B\003\340A\002\"\344\006\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\002" - + "\022=\n\006config\030\002 \001(\tB-\340A\002\372A\'\n%spanner.google" - + "apis.com/InstanceConfig\022\031\n\014display_name\030" - + "\003 \001(\tB\003\340A\002\022\022\n\nnode_count\030\005 \001(\005\022\030\n\020proces" - + "sing_units\030\t \001(\005\022T\n\022autoscaling_config\030\021" - + " \001(\01323.google.spanner.admin.instance.v1." - + "AutoscalingConfigB\003\340A\001\022D\n\005state\030\006 \001(\01620." - + "google.spanner.admin.instance.v1.Instanc" - + "e.StateB\003\340A\003\022F\n\006labels\030\007 \003(\01326.google.sp" - + "anner.admin.instance.v1.Instance.LabelsE" - + "ntry\022\025\n\rendpoint_uris\030\010 \003(\t\0224\n\013create_ti" - + "me\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0224\n\013update_time\030\014 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\022H\n\007edition\030\024 \001(\01622.googl" - + "e.spanner.admin.instance.v1.Instance.Edi" - + "tionB\003\340A\001\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_UNSPE" - + "CIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\"U\n\007Edi" - + "tion\022\027\n\023EDITION_UNSPECIFIED\020\000\022\014\n\010STANDAR" - + "D\020\001\022\016\n\nENTERPRISE\020\002\022\023\n\017ENTERPRISE_PLUS\020\003" - + ":M\352AJ\n\037spanner.googleapis.com/Instance\022\'" - + "projects/{project}/instances/{instance}\"" - + "\210\001\n\032ListInstanceConfigsRequest\022C\n\006parent" - + "\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo" - + "gleapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022\022" - + "\n\npage_token\030\003 \001(\t\"\202\001\n\033ListInstanceConfi" - + "gsResponse\022J\n\020instance_configs\030\001 \003(\01320.g" - + "oogle.spanner.admin.instance.v1.Instance" - + "Config\022\027\n\017next_page_token\030\002 \001(\t\"W\n\030GetIn" - + "stanceConfigRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A" - + "\'\n%spanner.googleapis.com/InstanceConfig" - + "\"\352\001\n\033CreateInstanceConfigRequest\022C\n\006pare" - + "nt\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.g" - + "oogleapis.com/Project\022\037\n\022instance_config" - + "_id\030\002 \001(\tB\003\340A\002\022N\n\017instance_config\030\003 \001(\0132" - + "0.google.spanner.admin.instance.v1.Insta" - + "nceConfigB\003\340A\002\022\025\n\rvalidate_only\030\004 \001(\010\"\272\001" - + "\n\033UpdateInstanceConfigRequest\022N\n\017instanc" - + "e_config\030\001 \001(\01320.google.spanner.admin.in" - + "stance.v1.InstanceConfigB\003\340A\002\0224\n\013update_" - + "mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003" - + "\340A\002\022\025\n\rvalidate_only\030\003 \001(\010\"\177\n\033DeleteInst" - + "anceConfigRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n" - + "%spanner.googleapis.com/InstanceConfig\022\014" - + "\n\004etag\030\002 \001(\t\022\025\n\rvalidate_only\030\003 \001(\010\"\241\001\n#" - + "ListInstanceConfigOperationsRequest\022C\n\006p" - + "arent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" - + "r.googleapis.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$ListInstanceConfigOperationsResponse\022" - + "1\n\noperations\030\001 \003(\0132\035.google.longrunning" - + ".Operation\022\027\n\017next_page_token\030\002 \001(\t\"{\n\022G" - + "etInstanceRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" - + "\037spanner.googleapis.com/Instance\022.\n\nfiel" - + "d_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" - + "\"\271\001\n\025CreateInstanceRequest\022C\n\006parent\030\001 \001" - + "(\tB3\340A\002\372A-\n+cloudresourcemanager.googlea" - + "pis.com/Project\022\030\n\013instance_id\030\002 \001(\tB\003\340A" - + "\002\022A\n\010instance\030\003 \001(\0132*.google.spanner.adm" - + "in.instance.v1.InstanceB\003\340A\002\"\311\001\n\024ListIns" - + "tancesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+c" - + "loudresourcemanager.googleapis.com/Proje" - + "ct\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\0225\n\021instance_deadline\030\005" - + " \001(\0132\032.google.protobuf.Timestamp\"\204\001\n\025Lis" - + "tInstancesResponse\022=\n\tinstances\030\001 \003(\0132*." - + "google.spanner.admin.instance.v1.Instanc" - + "e\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" - + "e\030\003 \003(\t\"\217\001\n\025UpdateInstanceRequest\022A\n\010ins" - + "tance\030\001 \001(\0132*.google.spanner.admin.insta" - + "nce.v1.InstanceB\003\340A\002\0223\n\nfield_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMaskB\003\340A\002\"N\n\025Del" - + "eteInstanceRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!" - + "\n\037spanner.googleapis.com/Instance\"\277\002\n\026Cr" - + "eateInstanceMetadata\022<\n\010instance\030\001 \001(\0132*" + + "eConfigs/{instance_config}\"\262\001\n\026ReplicaCo" + + "mputeCapacity\022R\n\021replica_selection\030\001 \001(\013" + + "22.google.spanner.admin.instance.v1.Repl" + + "icaSelectionB\003\340A\002\022\024\n\nnode_count\030\002 \001(\005H\000\022" + + "\032\n\020processing_units\030\003 \001(\005H\000B\022\n\020compute_c" + + "apacity\"\270\010\n\021AutoscalingConfig\022f\n\022autosca" + + "ling_limits\030\001 \001(\0132E.google.spanner.admin" + + ".instance.v1.AutoscalingConfig.Autoscali" + + "ngLimitsB\003\340A\002\022h\n\023autoscaling_targets\030\002 \001" + + "(\0132F.google.spanner.admin.instance.v1.Au" + + "toscalingConfig.AutoscalingTargetsB\003\340A\002\022" + + "|\n\036asymmetric_autoscaling_options\030\003 \003(\0132" + + "O.google.spanner.admin.instance.v1.Autos" + + "calingConfig.AsymmetricAutoscalingOption" + + "B\003\340A\001\032\227\001\n\021AutoscalingLimits\022\023\n\tmin_nodes" + + "\030\001 \001(\005H\000\022\036\n\024min_processing_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\032" + + "r\n\022AutoscalingTargets\0222\n%high_priority_c" + + "pu_utilization_percent\030\001 \001(\005B\003\340A\002\022(\n\033sto" + + "rage_utilization_percent\030\002 \001(\005B\003\340A\002\032\304\003\n\033" + + "AsymmetricAutoscalingOption\022R\n\021replica_s" + + "election\030\001 \001(\01322.google.spanner.admin.in" + + "stance.v1.ReplicaSelectionB\003\340A\002\022\202\001\n\tover" + + "rides\030\002 \001(\0132j.google.spanner.admin.insta" + + "nce.v1.AutoscalingConfig.AsymmetricAutos" + + "calingOption.AutoscalingConfigOverridesB" + + "\003\340A\001\032\313\001\n\032AutoscalingConfigOverrides\022f\n\022a" + + "utoscaling_limits\030\001 \001(\0132E.google.spanner" + + ".admin.instance.v1.AutoscalingConfig.Aut" + + "oscalingLimitsB\003\340A\001\022E\n8autoscaling_targe" + + "t_high_priority_cpu_utilization_percent\030" + + "\002 \001(\005B\003\340A\001\"\305\007\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\002\022=\n\006config\030\002 \001(\tB-\340A\002\372A\'\n%spanner.goog" + + "leapis.com/InstanceConfig\022\031\n\014display_nam" + + "e\030\003 \001(\tB\003\340A\002\022\022\n\nnode_count\030\005 \001(\005\022\030\n\020proc" + + "essing_units\030\t \001(\005\022_\n\030replica_compute_ca" + + "pacity\030\023 \003(\01328.google.spanner.admin.inst" + + "ance.v1.ReplicaComputeCapacityB\003\340A\003\022T\n\022a" + + "utoscaling_config\030\021 \001(\01323.google.spanner" + + ".admin.instance.v1.AutoscalingConfigB\003\340A" + + "\001\022D\n\005state\030\006 \001(\01620.google.spanner.admin." + + "instance.v1.Instance.StateB\003\340A\003\022F\n\006label" + + "s\030\007 \003(\01326.google.spanner.admin.instance." + + "v1.Instance.LabelsEntry\022\025\n\rendpoint_uris" + + "\030\010 \003(\t\0224\n\013create_time\030\013 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0224\n\013update_time\030\014 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\022H\n\007ed" + + "ition\030\024 \001(\01622.google.spanner.admin.insta" + + "nce.v1.Instance.EditionB\003\340A\001\032-\n\013LabelsEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"7\n\005S" + + "tate\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020" + + "\001\022\t\n\005READY\020\002\"U\n\007Edition\022\027\n\023EDITION_UNSPE" + + "CIFIED\020\000\022\014\n\010STANDARD\020\001\022\016\n\nENTERPRISE\020\002\022\023" + + "\n\017ENTERPRISE_PLUS\020\003:M\352AJ\n\037spanner.google" + + "apis.com/Instance\022\'projects/{project}/in" + + "stances/{instance}\"\210\001\n\032ListInstanceConfi" + + "gsRequest\022C\n\006parent\030\001 \001(\tB3\340A\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\"\202\001" + + "\n\033ListInstanceConfigsResponse\022J\n\020instanc" + + "e_configs\030\001 \003(\01320.google.spanner.admin.i" + + "nstance.v1.InstanceConfig\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"W\n\030GetInstanceConfigRequest\022;" + + "\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%spanner.googleapis" + + ".com/InstanceConfig\"\352\001\n\033CreateInstanceCo" + + "nfigRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+clo" + + "udresourcemanager.googleapis.com/Project" + + "\022\037\n\022instance_config_id\030\002 \001(\tB\003\340A\002\022N\n\017ins" + + "tance_config\030\003 \001(\01320.google.spanner.admi" + + "n.instance.v1.InstanceConfigB\003\340A\002\022\025\n\rval" + + "idate_only\030\004 \001(\010\"\272\001\n\033UpdateInstanceConfi" + + "gRequest\022N\n\017instance_config\030\001 \001(\01320.goog" + + "le.spanner.admin.instance.v1.InstanceCon" + + "figB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.p" + + "rotobuf.FieldMaskB\003\340A\002\022\025\n\rvalidate_only\030" + + "\003 \001(\010\"\177\n\033DeleteInstanceConfigRequest\022;\n\004" + + "name\030\001 \001(\tB-\340A\002\372A\'\n%spanner.googleapis.c" + + "om/InstanceConfig\022\014\n\004etag\030\002 \001(\t\022\025\n\rvalid" + + "ate_only\030\003 \001(\010\"\241\001\n#ListInstanceConfigOpe" + + "rationsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+" + + "cloudresourcemanager.googleapis.com/Proj" + + "ect\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$ListInstanceConfig" + + "OperationsResponse\0221\n\noperations\030\001 \003(\0132\035" + + ".google.longrunning.Operation\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\"{\n\022GetInstanceRequest\0225\n\004" + + "name\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.c" + + "om/Instance\022.\n\nfield_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMask\"\271\001\n\025CreateInstanceRe" + + "quest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudreso" + + "urcemanager.googleapis.com/Project\022\030\n\013in" + + "stance_id\030\002 \001(\tB\003\340A\002\022A\n\010instance\030\003 \001(\0132*" + ".google.spanner.admin.instance.v1.Instan" - + "ce\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.google" - + ".protobuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032." - + "google.protobuf.Timestamp\022X\n\033expected_fu" - + "lfillment_period\030\005 \001(\01623.google.spanner." - + "admin.instance.v1.FulfillmentPeriod\"\277\002\n\026" - + "UpdateInstanceMetadata\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\022X\n\033expected_" - + "fulfillment_period\030\005 \001(\01623.google.spanne" - + "r.admin.instance.v1.FulfillmentPeriod\"\341\001" - + "\n\034CreateInstanceConfigMetadata\022I\n\017instan" - + "ce_config\030\001 \001(\01320.google.spanner.admin.i" - + "nstance.v1.InstanceConfig\022E\n\010progress\030\002 " - + "\001(\01323.google.spanner.admin.instance.v1.O" - + "perationProgress\022/\n\013cancel_time\030\003 \001(\0132\032." - + "google.protobuf.Timestamp\"\341\001\n\034UpdateInst" - + "anceConfigMetadata\022I\n\017instance_config\030\001 " - + "\001(\01320.google.spanner.admin.instance.v1.I" - + "nstanceConfig\022E\n\010progress\030\002 \001(\01323.google" - + ".spanner.admin.instance.v1.OperationProg" - + "ress\022/\n\013cancel_time\030\003 \001(\0132\032.google.proto" - + "buf.Timestamp\"\216\005\n\021InstancePartition\022\021\n\004n" - + "ame\030\001 \001(\tB\003\340A\002\022=\n\006config\030\002 \001(\tB-\340A\002\372A\'\n%" - + "spanner.googleapis.com/InstanceConfig\022\031\n" - + "\014display_name\030\003 \001(\tB\003\340A\002\022\024\n\nnode_count\030\005" - + " \001(\005H\000\022\032\n\020processing_units\030\006 \001(\005H\000\022M\n\005st" - + "ate\030\007 \001(\01629.google.spanner.admin.instanc" - + "e.v1.InstancePartition.StateB\003\340A\003\0224\n\013cre" - + "ate_time\030\010 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\0224\n\013update_time\030\t \001(\0132\032.google.pr" - + "otobuf.TimestampB\003\340A\003\022\"\n\025referencing_dat" - + "abases\030\n \003(\tB\003\340A\003\022 \n\023referencing_backups" - + "\030\013 \003(\tB\003\340A\003\022\014\n\004etag\030\014 \001(\t\"7\n\005State\022\025\n\021ST" - + "ATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY" - + "\020\002:~\352A{\n(spanner.googleapis.com/Instance" - + "Partition\022Oprojects/{project}/instances/" - + "{instance}/instancePartitions/{instance_" - + "partition}B\022\n\020compute_capacity\"\201\002\n\037Creat" - + "eInstancePartitionMetadata\022O\n\022instance_p" - + "artition\030\001 \001(\01323.google.spanner.admin.in" - + "stance.v1.InstancePartition\022.\n\nstart_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\022/\n\013c" + + "ceB\003\340A\002\"\311\001\n\024ListInstancesRequest\022C\n\006pare" + + "nt\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.g" + + "oogleapis.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\0225\n\021" + + "instance_deadline\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp\"\204\001\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\022\023\n\013unreachable\030\003 \003(\t\"\217\001\n\025UpdateIns" + + "tanceRequest\022A\n\010instance\030\001 \001(\0132*.google." + + "spanner.admin.instance.v1.InstanceB\003\340A\002\022" + + "3\n\nfield_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMaskB\003\340A\002\"N\n\025DeleteInstanceRequest\0225\n" + + "\004name\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis." + + "com/Instance\"\277\002\n\026CreateInstanceMetadata\022" + + "<\n\010instance\030\001 \001(\0132*.google.spanner.admin" + + ".instance.v1.Instance\022.\n\nstart_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\022/\n\013cancel_" + + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022," + + "\n\010end_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tamp\022X\n\033expected_fulfillment_period\030\005 \001(" + + "\01623.google.spanner.admin.instance.v1.Ful" + + "fillmentPeriod\"\277\002\n\026UpdateInstanceMetadat" + + "a\022<\n\010instance\030\001 \001(\0132*.google.spanner.adm" + + "in.instance.v1.Instance\022.\n\nstart_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013cance" + + "l_time\030\003 \001(\0132\032.google.protobuf.Timestamp" + + "\022,\n\010end_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estamp\022X\n\033expected_fulfillment_period\030\005 " + + "\001(\01623.google.spanner.admin.instance.v1.F" + + "ulfillmentPeriod\"\341\001\n\034CreateInstanceConfi" + + "gMetadata\022I\n\017instance_config\030\001 \001(\01320.goo" + + "gle.spanner.admin.instance.v1.InstanceCo" + + "nfig\022E\n\010progress\030\002 \001(\01323.google.spanner." + + "admin.instance.v1.OperationProgress\022/\n\013c" + "ancel_time\030\003 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\004 \001(\0132\032.google.protobuf" - + ".Timestamp\"\323\001\n\036CreateInstancePartitionRe" - + "quest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.g" - + "oogleapis.com/Instance\022\"\n\025instance_parti" - + "tion_id\030\002 \001(\tB\003\340A\002\022T\n\022instance_partition" - + "\030\003 \001(\01323.google.spanner.admin.instance.v" - + "1.InstancePartitionB\003\340A\002\"n\n\036DeleteInstan" - + "cePartitionRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*" - + "\n(spanner.googleapis.com/InstancePartiti" - + "on\022\014\n\004etag\030\002 \001(\t\"]\n\033GetInstancePartition" - + "Request\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(spanner.g" - + "oogleapis.com/InstancePartition\"\253\001\n\036Upda" - + "teInstancePartitionRequest\022T\n\022instance_p" - + "artition\030\001 \001(\01323.google.spanner.admin.in" - + "stance.v1.InstancePartitionB\003\340A\002\0223\n\nfiel" - + "d_mask\030\002 \001(\0132\032.google.protobuf.FieldMask" - + "B\003\340A\002\"\201\002\n\037UpdateInstancePartitionMetadat" - + "a\022O\n\022instance_partition\030\001 \001(\01323.google.s" + + "tamp\"\341\001\n\034UpdateInstanceConfigMetadata\022I\n" + + "\017instance_config\030\001 \001(\01320.google.spanner." + + "admin.instance.v1.InstanceConfig\022E\n\010prog" + + "ress\030\002 \001(\01323.google.spanner.admin.instan" + + "ce.v1.OperationProgress\022/\n\013cancel_time\030\003" + + " \001(\0132\032.google.protobuf.Timestamp\"\216\005\n\021Ins" + + "tancePartition\022\021\n\004name\030\001 \001(\tB\003\340A\002\022=\n\006con" + + "fig\030\002 \001(\tB-\340A\002\372A\'\n%spanner.googleapis.co" + + "m/InstanceConfig\022\031\n\014display_name\030\003 \001(\tB\003" + + "\340A\002\022\024\n\nnode_count\030\005 \001(\005H\000\022\032\n\020processing_" + + "units\030\006 \001(\005H\000\022M\n\005state\030\007 \001(\01629.google.sp" + + "anner.admin.instance.v1.InstancePartitio" + + "n.StateB\003\340A\003\0224\n\013create_time\030\010 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim" + + "e\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022\"\n\025referencing_databases\030\n \003(\tB\003\340A\003\022 \n\023" + + "referencing_backups\030\013 \003(\tB\003\340A\003\022\014\n\004etag\030\014" + + " \001(\t\"7\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010" + + "CREATING\020\001\022\t\n\005READY\020\002:~\352A{\n(spanner.goog" + + "leapis.com/InstancePartition\022Oprojects/{" + + "project}/instances/{instance}/instancePa" + + "rtitions/{instance_partition}B\022\n\020compute" + + "_capacity\"\201\002\n\037CreateInstancePartitionMet" + + "adata\022O\n\022instance_partition\030\001 \001(\01323.goog" + + "le.spanner.admin.instance.v1.InstancePar" + + "tition\022.\n\nstart_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022,\n\010end_time\030\004 \001(" + + "\0132\032.google.protobuf.Timestamp\"\323\001\n\036Create" + + "InstancePartitionRequest\0227\n\006parent\030\001 \001(\t" + + "B\'\340A\002\372A!\n\037spanner.googleapis.com/Instanc" + + "e\022\"\n\025instance_partition_id\030\002 \001(\tB\003\340A\002\022T\n" + + "\022instance_partition\030\003 \001(\01323.google.spann" + + "er.admin.instance.v1.InstancePartitionB\003" + + "\340A\002\"n\n\036DeleteInstancePartitionRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n(spanner.googleapis." + + "com/InstancePartition\022\014\n\004etag\030\002 \001(\t\"]\n\033G" + + "etInstancePartitionRequest\022>\n\004name\030\001 \001(\t" + + "B0\340A\002\372A*\n(spanner.googleapis.com/Instanc" + + "ePartition\"\253\001\n\036UpdateInstancePartitionRe" + + "quest\022T\n\022instance_partition\030\001 \001(\01323.goog" + + "le.spanner.admin.instance.v1.InstancePar" + + "titionB\003\340A\002\0223\n\nfield_mask\030\002 \001(\0132\032.google" + + ".protobuf.FieldMaskB\003\340A\002\"\201\002\n\037UpdateInsta" + + "ncePartitionMetadata\022O\n\022instance_partiti" + + "on\030\001 \001(\01323.google.spanner.admin.instance" + + ".v1.InstancePartition\022.\n\nstart_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\022/\n\013cancel_" + + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022," + + "\n\010end_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tamp\"\305\001\n\035ListInstancePartitionsRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleap" + + "is.com/Instance\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\022D\n\033instance_partition_dea" + + "dline\030\004 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\001\"\240\001\n\036ListInstancePartitionsResponse\022" + + "P\n\023instance_partitions\030\001 \003(\01323.google.sp" + + "anner.admin.instance.v1.InstancePartitio" + + "n\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" + + "e\030\003 \003(\t\"\355\001\n&ListInstancePartitionOperati" + + "onsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037span" + + "ner.googleapis.com/Instance\022\023\n\006filter\030\002 " + + "\001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\npage" + + "_token\030\004 \001(\tB\003\340A\001\022D\n\033instance_partition_" + + "deadline\030\005 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\001\"\236\001\n\'ListInstancePartitionOperati" + + "onsResponse\0221\n\noperations\030\001 \003(\0132\035.google" + + ".longrunning.Operation\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\022\'\n\037unreachable_instance_partitio" + + "ns\030\003 \003(\t\"\222\001\n\023MoveInstanceRequest\0225\n\004name" + + "\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/I" + + "nstance\022D\n\rtarget_config\030\002 \001(\tB-\340A\002\372A\'\n%" + + "spanner.googleapis.com/InstanceConfig\"\026\n" + + "\024MoveInstanceResponse\"\245\001\n\024MoveInstanceMe" + + "tadata\022\025\n\rtarget_config\030\001 \001(\t\022E\n\010progres" + + "s\030\002 \001(\01323.google.spanner.admin.instance." + + "v1.OperationProgress\022/\n\013cancel_time\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp2\332\'\n\rInstan" + + "ceAdmin\022\314\001\n\023ListInstanceConfigs\022<.google" + + ".spanner.admin.instance.v1.ListInstanceC" + + "onfigsRequest\032=.google.spanner.admin.ins" + + "tance.v1.ListInstanceConfigsResponse\"8\332A" + + "\006parent\202\323\344\223\002)\022\'/v1/{parent=projects/*}/i" + + "nstanceConfigs\022\271\001\n\021GetInstanceConfig\022:.g" + + "oogle.spanner.admin.instance.v1.GetInsta" + + "nceConfigRequest\0320.google.spanner.admin." + + "instance.v1.InstanceConfig\"6\332A\004name\202\323\344\223\002" + + ")\022\'/v1/{name=projects/*/instanceConfigs/" + + "*}\022\310\002\n\024CreateInstanceConfig\022=.google.spa" + + "nner.admin.instance.v1.CreateInstanceCon" + + "figRequest\032\035.google.longrunning.Operatio" + + "n\"\321\001\312Ap\n/google.spanner.admin.instance.v" + + "1.InstanceConfig\022=google.spanner.admin.i" + + "nstance.v1.CreateInstanceConfigMetadata\332" + + "A)parent,instance_config,instance_config" + + "_id\202\323\344\223\002,\"\'/v1/{parent=projects/*}/insta" + + "nceConfigs:\001*\022\312\002\n\024UpdateInstanceConfig\022=" + + ".google.spanner.admin.instance.v1.Update" + + "InstanceConfigRequest\032\035.google.longrunni" + + "ng.Operation\"\323\001\312Ap\n/google.spanner.admin" + + ".instance.v1.InstanceConfig\022=google.span" + + "ner.admin.instance.v1.UpdateInstanceConf" + + "igMetadata\332A\033instance_config,update_mask" + + "\202\323\344\223\002<27/v1/{instance_config.name=projec" + + "ts/*/instanceConfigs/*}:\001*\022\245\001\n\024DeleteIns" + + "tanceConfig\022=.google.spanner.admin.insta" + + "nce.v1.DeleteInstanceConfigRequest\032\026.goo" + + "gle.protobuf.Empty\"6\332A\004name\202\323\344\223\002)*\'/v1/{" + + "name=projects/*/instanceConfigs/*}\022\360\001\n\034L" + + "istInstanceConfigOperations\022E.google.spa" + + "nner.admin.instance.v1.ListInstanceConfi" + + "gOperationsRequest\032F.google.spanner.admi" + + "n.instance.v1.ListInstanceConfigOperatio" + + "nsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{parent" + + "=projects/*}/instanceConfigOperations\022\264\001" + + "\n\rListInstances\0226.google.spanner.admin.i" + + "nstance.v1.ListInstancesRequest\0327.google" + + ".spanner.admin.instance.v1.ListInstances" + + "Response\"2\332A\006parent\202\323\344\223\002#\022!/v1/{parent=p" + + "rojects/*}/instances\022\344\001\n\026ListInstancePar" + + "titions\022?.google.spanner.admin.instance." + + "v1.ListInstancePartitionsRequest\032@.googl" + + "e.spanner.admin.instance.v1.ListInstance" + + "PartitionsResponse\"G\332A\006parent\202\323\344\223\0028\0226/v1" + + "/{parent=projects/*/instances/*}/instanc" + + "ePartitions\022\241\001\n\013GetInstance\0224.google.spa" + + "nner.admin.instance.v1.GetInstanceReques" + + "t\032*.google.spanner.admin.instance.v1.Ins" + + "tance\"0\332A\004name\202\323\344\223\002#\022!/v1/{name=projects" + + "/*/instances/*}\022\234\002\n\016CreateInstance\0227.goo" + + "gle.spanner.admin.instance.v1.CreateInst" + + "anceRequest\032\035.google.longrunning.Operati" + + "on\"\261\001\312Ad\n)google.spanner.admin.instance." + + "v1.Instance\0227google.spanner.admin.instan" + + "ce.v1.CreateInstanceMetadata\332A\033parent,in" + + "stance_id,instance\202\323\344\223\002&\"!/v1/{parent=pr" + + "ojects/*}/instances:\001*\022\235\002\n\016UpdateInstanc" + + "e\0227.google.spanner.admin.instance.v1.Upd" + + "ateInstanceRequest\032\035.google.longrunning." + + "Operation\"\262\001\312Ad\n)google.spanner.admin.in" + + "stance.v1.Instance\0227google.spanner.admin" + + ".instance.v1.UpdateInstanceMetadata\332A\023in" + + "stance,field_mask\202\323\344\223\002/2*/v1/{instance.n" + + "ame=projects/*/instances/*}:\001*\022\223\001\n\016Delet" + + "eInstance\0227.google.spanner.admin.instanc" + + "e.v1.DeleteInstanceRequest\032\026.google.prot" + + "obuf.Empty\"0\332A\004name\202\323\344\223\002#*!/v1/{name=pro" + + "jects/*/instances/*}\022\232\001\n\014SetIamPolicy\022\"." + + "google.iam.v1.SetIamPolicyRequest\032\025.goog" + + "le.iam.v1.Policy\"O\332A\017resource,policy\202\323\344\223" + + "\0027\"2/v1/{resource=projects/*/instances/*" + + "}:setIamPolicy:\001*\022\223\001\n\014GetIamPolicy\022\".goo" + + "gle.iam.v1.GetIamPolicyRequest\032\025.google." + + "iam.v1.Policy\"H\332A\010resource\202\323\344\223\0027\"2/v1/{r" + + "esource=projects/*/instances/*}:getIamPo" + + "licy:\001*\022\305\001\n\022TestIamPermissions\022(.google." + + "iam.v1.TestIamPermissionsRequest\032).googl" + + "e.iam.v1.TestIamPermissionsResponse\"Z\332A\024" + + "resource,permissions\202\323\344\223\002=\"8/v1/{resourc" + + "e=projects/*/instances/*}:testIamPermiss" + + "ions:\001*\022\321\001\n\024GetInstancePartition\022=.googl" + + "e.spanner.admin.instance.v1.GetInstanceP" + + "artitionRequest\0323.google.spanner.admin.i" + + "nstance.v1.InstancePartition\"E\332A\004name\202\323\344" + + "\223\0028\0226/v1/{name=projects/*/instances/*/in" + + "stancePartitions/*}\022\351\002\n\027CreateInstancePa" + + "rtition\022@.google.spanner.admin.instance." + + "v1.CreateInstancePartitionRequest\032\035.goog" + + "le.longrunning.Operation\"\354\001\312Av\n2google.s" + "panner.admin.instance.v1.InstancePartiti" - + "on\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013cancel_time\030\003 \001(\0132\032.google" - + ".protobuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032." - + "google.protobuf.Timestamp\"\305\001\n\035ListInstan" - + "cePartitionsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002" - + "\372A!\n\037spanner.googleapis.com/Instance\022\021\n\t" - + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022D\n\033i" - + "nstance_partition_deadline\030\004 \001(\0132\032.googl" - + "e.protobuf.TimestampB\003\340A\001\"\240\001\n\036ListInstan" - + "cePartitionsResponse\022P\n\023instance_partiti" - + "ons\030\001 \003(\01323.google.spanner.admin.instanc" - + "e.v1.InstancePartition\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"\355\001\n&ListIns" - + "tancePartitionOperationsRequest\0227\n\006paren" - + "t\030\001 \001(\tB\'\340A\002\372A!\n\037spanner.googleapis.com/" - + "Instance\022\023\n\006filter\030\002 \001(\tB\003\340A\001\022\026\n\tpage_si" - + "ze\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022D" - + "\n\033instance_partition_deadline\030\005 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\003\340A\001\"\236\001\n\'ListIns" - + "tancePartitionOperationsResponse\0221\n\noper" - + "ations\030\001 \003(\0132\035.google.longrunning.Operat" - + "ion\022\027\n\017next_page_token\030\002 \001(\t\022\'\n\037unreacha" - + "ble_instance_partitions\030\003 \003(\t\"\222\001\n\023MoveIn" - + "stanceRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037spa" - + "nner.googleapis.com/Instance\022D\n\rtarget_c" - + "onfig\030\002 \001(\tB-\340A\002\372A\'\n%spanner.googleapis." - + "com/InstanceConfig\"\026\n\024MoveInstanceRespon" - + "se\"\245\001\n\024MoveInstanceMetadata\022\025\n\rtarget_co" - + "nfig\030\001 \001(\t\022E\n\010progress\030\002 \001(\01323.google.sp" - + "anner.admin.instance.v1.OperationProgres" - + "s\022/\n\013cancel_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp2\332\'\n\rInstanceAdmin\022\314\001\n\023ListIns" - + "tanceConfigs\022<.google.spanner.admin.inst" - + "ance.v1.ListInstanceConfigsRequest\032=.goo" - + "gle.spanner.admin.instance.v1.ListInstan" - + "ceConfigsResponse\"8\332A\006parent\202\323\344\223\002)\022\'/v1/" - + "{parent=projects/*}/instanceConfigs\022\271\001\n\021" - + "GetInstanceConfig\022:.google.spanner.admin" - + ".instance.v1.GetInstanceConfigRequest\0320." - + "google.spanner.admin.instance.v1.Instanc" - + "eConfig\"6\332A\004name\202\323\344\223\002)\022\'/v1/{name=projec" - + "ts/*/instanceConfigs/*}\022\310\002\n\024CreateInstan" - + "ceConfig\022=.google.spanner.admin.instance" - + ".v1.CreateInstanceConfigRequest\032\035.google" - + ".longrunning.Operation\"\321\001\312Ap\n/google.spa" - + "nner.admin.instance.v1.InstanceConfig\022=g" - + "oogle.spanner.admin.instance.v1.CreateIn" - + "stanceConfigMetadata\332A)parent,instance_c" - + "onfig,instance_config_id\202\323\344\223\002,\"\'/v1/{par" - + "ent=projects/*}/instanceConfigs:\001*\022\312\002\n\024U" - + "pdateInstanceConfig\022=.google.spanner.adm" - + "in.instance.v1.UpdateInstanceConfigReque" - + "st\032\035.google.longrunning.Operation\"\323\001\312Ap\n" - + "/google.spanner.admin.instance.v1.Instan" - + "ceConfig\022=google.spanner.admin.instance." - + "v1.UpdateInstanceConfigMetadata\332A\033instan" - + "ce_config,update_mask\202\323\344\223\002<27/v1/{instan" - + "ce_config.name=projects/*/instanceConfig" - + "s/*}:\001*\022\245\001\n\024DeleteInstanceConfig\022=.googl" - + "e.spanner.admin.instance.v1.DeleteInstan" - + "ceConfigRequest\032\026.google.protobuf.Empty\"" - + "6\332A\004name\202\323\344\223\002)*\'/v1/{name=projects/*/ins" - + "tanceConfigs/*}\022\360\001\n\034ListInstanceConfigOp" - + "erations\022E.google.spanner.admin.instance" - + ".v1.ListInstanceConfigOperationsRequest\032" - + "F.google.spanner.admin.instance.v1.ListI" - + "nstanceConfigOperationsResponse\"A\332A\006pare" - + "nt\202\323\344\223\0022\0220/v1/{parent=projects/*}/instan" - + "ceConfigOperations\022\264\001\n\rListInstances\0226.g" - + "oogle.spanner.admin.instance.v1.ListInst" - + "ancesRequest\0327.google.spanner.admin.inst" - + "ance.v1.ListInstancesResponse\"2\332A\006parent" - + "\202\323\344\223\002#\022!/v1/{parent=projects/*}/instance" - + "s\022\344\001\n\026ListInstancePartitions\022?.google.sp" - + "anner.admin.instance.v1.ListInstancePart" - + "itionsRequest\032@.google.spanner.admin.ins" - + "tance.v1.ListInstancePartitionsResponse\"" - + "G\332A\006parent\202\323\344\223\0028\0226/v1/{parent=projects/*" - + "/instances/*}/instancePartitions\022\241\001\n\013Get" - + "Instance\0224.google.spanner.admin.instance" - + ".v1.GetInstanceRequest\032*.google.spanner." - + "admin.instance.v1.Instance\"0\332A\004name\202\323\344\223\002" - + "#\022!/v1/{name=projects/*/instances/*}\022\234\002\n" - + "\016CreateInstance\0227.google.spanner.admin.i" - + "nstance.v1.CreateInstanceRequest\032\035.googl" - + "e.longrunning.Operation\"\261\001\312Ad\n)google.sp" - + "anner.admin.instance.v1.Instance\0227google" - + ".spanner.admin.instance.v1.CreateInstanc" - + "eMetadata\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.google.longrunning.Operation\"\262\001\312Ad\n)go" - + "ogle.spanner.admin.instance.v1.Instance\022" - + "7google.spanner.admin.instance.v1.Update" - + "InstanceMetadata\332A\023instance,field_mask\202\323" - + "\344\223\002/2*/v1/{instance.name=projects/*/inst" - + "ances/*}:\001*\022\223\001\n\016DeleteInstance\0227.google." - + "spanner.admin.instance.v1.DeleteInstance" - + "Request\032\026.google.protobuf.Empty\"0\332A\004name" - + "\202\323\344\223\002#*!/v1/{name=projects/*/instances/*" - + "}\022\232\001\n\014SetIamPolicy\022\".google.iam.v1.SetIa" - + "mPolicyRequest\032\025.google.iam.v1.Policy\"O\332" - + "A\017resource,policy\202\323\344\223\0027\"2/v1/{resource=p" - + "rojects/*/instances/*}:setIamPolicy:\001*\022\223" - + "\001\n\014GetIamPolicy\022\".google.iam.v1.GetIamPo" - + "licyRequest\032\025.google.iam.v1.Policy\"H\332A\010r" - + "esource\202\323\344\223\0027\"2/v1/{resource=projects/*/" - + "instances/*}:getIamPolicy:\001*\022\305\001\n\022TestIam" - + "Permissions\022(.google.iam.v1.TestIamPermi" - + "ssionsRequest\032).google.iam.v1.TestIamPer" - + "missionsResponse\"Z\332A\024resource,permission" - + "s\202\323\344\223\002=\"8/v1/{resource=projects/*/instan" - + "ces/*}:testIamPermissions:\001*\022\321\001\n\024GetInst" - + "ancePartition\022=.google.spanner.admin.ins" - + "tance.v1.GetInstancePartitionRequest\0323.g" - + "oogle.spanner.admin.instance.v1.Instance" - + "Partition\"E\332A\004name\202\323\344\223\0028\0226/v1/{name=proj" - + "ects/*/instances/*/instancePartitions/*}" - + "\022\351\002\n\027CreateInstancePartition\022@.google.sp" - + "anner.admin.instance.v1.CreateInstancePa" - + "rtitionRequest\032\035.google.longrunning.Oper" - + "ation\"\354\001\312Av\n2google.spanner.admin.instan" - + "ce.v1.InstancePartition\022@google.spanner." - + "admin.instance.v1.CreateInstancePartitio" - + "nMetadata\332A/parent,instance_partition,in" - + "stance_partition_id\202\323\344\223\002;\"6/v1/{parent=p" - + "rojects/*/instances/*}/instancePartition" - + "s:\001*\022\272\001\n\027DeleteInstancePartition\022@.googl" - + "e.spanner.admin.instance.v1.DeleteInstan" - + "cePartitionRequest\032\026.google.protobuf.Emp" - + "ty\"E\332A\004name\202\323\344\223\0028*6/v1/{name=projects/*/" - + "instances/*/instancePartitions/*}\022\352\002\n\027Up" - + "dateInstancePartition\022@.google.spanner.a" - + "dmin.instance.v1.UpdateInstancePartition" - + "Request\032\035.google.longrunning.Operation\"\355" - + "\001\312Av\n2google.spanner.admin.instance.v1.I" - + "nstancePartition\022@google.spanner.admin.i" - + "nstance.v1.UpdateInstancePartitionMetada" - + "ta\332A\035instance_partition,field_mask\202\323\344\223\002N" - + "2I/v1/{instance_partition.name=projects/" - + "*/instances/*/instancePartitions/*}:\001*\022\210" - + "\002\n\037ListInstancePartitionOperations\022H.goo" - + "gle.spanner.admin.instance.v1.ListInstan" - + "cePartitionOperationsRequest\032I.google.sp" - + "anner.admin.instance.v1.ListInstancePart" - + "itionOperationsResponse\"P\332A\006parent\202\323\344\223\002A" - + "\022?/v1/{parent=projects/*/instances/*}/in" - + "stancePartitionOperations\022\211\002\n\014MoveInstan" - + "ce\0225.google.spanner.admin.instance.v1.Mo" - + "veInstanceRequest\032\035.google.longrunning.O" - + "peration\"\242\001\312An\n5google.spanner.admin.ins" - + "tance.v1.MoveInstanceResponse\0225google.sp" - + "anner.admin.instance.v1.MoveInstanceMeta" - + "data\202\323\344\223\002+\"&/v1/{name=projects/*/instanc" - + "es/*}:move:\001*\032x\312A\026spanner.googleapis.com" - + "\322A\\https://www.googleapis.com/auth/cloud" - + "-platform,https://www.googleapis.com/aut" - + "h/spanner.adminB\213\002\n$com.google.spanner.a" - + "dmin.instance.v1B\031SpannerInstanceAdminPr" - + "otoP\001ZFcloud.google.com/go/spanner/admin" - + "/instance/apiv1/instancepb;instancepb\252\002&" - + "Google.Cloud.Spanner.Admin.Instance.V1\312\002" - + "&Google\\Cloud\\Spanner\\Admin\\Instance\\V1\352" - + "\002+Google::Cloud::Spanner::Admin::Instanc" - + "e::V1b\006proto3" + + "on\022@google.spanner.admin.instance.v1.Cre" + + "ateInstancePartitionMetadata\332A/parent,in" + + "stance_partition,instance_partition_id\202\323" + + "\344\223\002;\"6/v1/{parent=projects/*/instances/*" + + "}/instancePartitions:\001*\022\272\001\n\027DeleteInstan" + + "cePartition\022@.google.spanner.admin.insta" + + "nce.v1.DeleteInstancePartitionRequest\032\026." + + "google.protobuf.Empty\"E\332A\004name\202\323\344\223\0028*6/v" + + "1/{name=projects/*/instances/*/instanceP" + + "artitions/*}\022\352\002\n\027UpdateInstancePartition" + + "\022@.google.spanner.admin.instance.v1.Upda" + + "teInstancePartitionRequest\032\035.google.long" + + "running.Operation\"\355\001\312Av\n2google.spanner." + + "admin.instance.v1.InstancePartition\022@goo" + + "gle.spanner.admin.instance.v1.UpdateInst" + + "ancePartitionMetadata\332A\035instance_partiti" + + "on,field_mask\202\323\344\223\002N2I/v1/{instance_parti" + + "tion.name=projects/*/instances/*/instanc" + + "ePartitions/*}:\001*\022\210\002\n\037ListInstancePartit" + + "ionOperations\022H.google.spanner.admin.ins" + + "tance.v1.ListInstancePartitionOperations" + + "Request\032I.google.spanner.admin.instance." + + "v1.ListInstancePartitionOperationsRespon" + + "se\"P\332A\006parent\202\323\344\223\002A\022?/v1/{parent=project" + + "s/*/instances/*}/instancePartitionOperat" + + "ions\022\211\002\n\014MoveInstance\0225.google.spanner.a" + + "dmin.instance.v1.MoveInstanceRequest\032\035.g" + + "oogle.longrunning.Operation\"\242\001\312An\n5googl" + + "e.spanner.admin.instance.v1.MoveInstance" + + "Response\0225google.spanner.admin.instance." + + "v1.MoveInstanceMetadata\202\323\344\223\002+\"&/v1/{name" + + "=projects/*/instances/*}:move:\001*\032x\312A\026spa" + + "nner.googleapis.com\322A\\https://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/spanner.adminB\213\002\n$c" + + "om.google.spanner.admin.instance.v1B\031Spa" + + "nnerInstanceAdminProtoP\001ZFcloud.google.c" + + "om/go/spanner/admin/instance/apiv1/insta" + + "ncepb;instancepb\252\002&Google.Cloud.Spanner." + + "Admin.Instance.V1\312\002&Google\\Cloud\\Spanner" + + "\\Admin\\Instance\\V1\352\002+Google::Cloud::Span" + + "ner::Admin::Instance::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -608,13 +641,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); - internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor = + internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_ReplicaComputeCapacity_descriptor, + new java.lang.String[] { + "ReplicaSelection", "NodeCount", "ProcessingUnits", "ComputeCapacity", + }); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor = + getDescriptor().getMessageTypes().get(3); 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", + "AutoscalingLimits", "AutoscalingTargets", "AsymmetricAutoscalingOptions", }); internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AutoscalingLimits_descriptor = internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor @@ -641,8 +682,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "HighPriorityCpuUtilizationPercent", "StorageUtilizationPercent", }); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor = + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor, + new java.lang.String[] { + "ReplicaSelection", "Overrides", + }); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor = + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_admin_instance_v1_AutoscalingConfig_AsymmetricAutoscalingOption_AutoscalingConfigOverrides_descriptor, + new java.lang.String[] { + "AutoscalingLimits", "AutoscalingTargetHighPriorityCpuUtilizationPercent", + }); internal_static_google_spanner_admin_instance_v1_Instance_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_spanner_admin_instance_v1_Instance_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_Instance_descriptor, @@ -652,6 +713,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "NodeCount", "ProcessingUnits", + "ReplicaComputeCapacity", "AutoscalingConfig", "State", "Labels", @@ -671,7 +733,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsRequest_descriptor, @@ -679,7 +741,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigsResponse_descriptor, @@ -687,7 +749,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstanceConfigs", "NextPageToken", }); internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstanceConfigRequest_descriptor, @@ -695,7 +757,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigRequest_descriptor, @@ -703,7 +765,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(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigRequest_descriptor, @@ -711,7 +773,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstanceConfig", "UpdateMask", "ValidateOnly", }); internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstanceConfigRequest_descriptor, @@ -719,7 +781,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Etag", "ValidateOnly", }); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsRequest_descriptor, @@ -727,7 +789,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(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstanceConfigOperationsResponse_descriptor, @@ -735,7 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Operations", "NextPageToken", }); internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstanceRequest_descriptor, @@ -743,7 +805,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceRequest_descriptor, @@ -751,7 +813,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "InstanceId", "Instance", }); internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesRequest_descriptor, @@ -759,7 +821,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "InstanceDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancesResponse_descriptor, @@ -767,7 +829,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Instances", "NextPageToken", "Unreachable", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceRequest_descriptor, @@ -775,7 +837,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Instance", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstanceRequest_descriptor, @@ -783,7 +845,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceMetadata_descriptor, @@ -791,7 +853,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Instance", "StartTime", "CancelTime", "EndTime", "ExpectedFulfillmentPeriod", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceMetadata_descriptor, @@ -799,7 +861,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Instance", "StartTime", "CancelTime", "EndTime", "ExpectedFulfillmentPeriod", }); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstanceConfigMetadata_descriptor, @@ -807,7 +869,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstanceConfig", "Progress", "CancelTime", }); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstanceConfigMetadata_descriptor, @@ -815,7 +877,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstanceConfig", "Progress", "CancelTime", }); internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_spanner_admin_instance_v1_InstancePartition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_InstancePartition_descriptor, @@ -834,7 +896,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ComputeCapacity", }); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionMetadata_descriptor, @@ -842,7 +904,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstancePartition", "StartTime", "CancelTime", "EndTime", }); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_CreateInstancePartitionRequest_descriptor, @@ -850,7 +912,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "InstancePartitionId", "InstancePartition", }); internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_DeleteInstancePartitionRequest_descriptor, @@ -858,7 +920,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Etag", }); internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_GetInstancePartitionRequest_descriptor, @@ -866,7 +928,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionRequest_descriptor, @@ -874,7 +936,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstancePartition", "FieldMask", }); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_UpdateInstancePartitionMetadata_descriptor, @@ -882,7 +944,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstancePartition", "StartTime", "CancelTime", "EndTime", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsRequest_descriptor, @@ -890,7 +952,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "InstancePartitionDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(31); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionsResponse_descriptor, @@ -898,7 +960,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InstancePartitions", "NextPageToken", "Unreachable", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(32); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsRequest_descriptor, @@ -906,7 +968,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "InstancePartitionDeadline", }); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(33); internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_ListInstancePartitionOperationsResponse_descriptor, @@ -914,7 +976,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Operations", "NextPageToken", "UnreachableInstancePartitions", }); internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(34); internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceRequest_descriptor, @@ -922,13 +984,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "TargetConfig", }); internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(35); internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceResponse_descriptor, new java.lang.String[] {}); internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(36); internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_spanner_admin_instance_v1_MoveInstanceMetadata_descriptor, diff --git a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/common.proto b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/common.proto index 075b45feaf6..69717ec228a 100644 --- a/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/common.proto +++ b/proto-google-cloud-spanner-admin-instance-v1/src/main/proto/google/spanner/admin/instance/v1/common.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.spanner.admin.instance.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1"; @@ -54,3 +55,9 @@ enum FulfillmentPeriod { // to complete. FULFILLMENT_PERIOD_EXTENDED = 2; } + +// ReplicaSelection identifies replicas with common properties. +message ReplicaSelection { + // Required. Name of the location of the replicas (e.g., "us-central1"). + string location = 1 [(google.api.field_behavior) = REQUIRED]; +} 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 b8c49260aac..ece99467a40 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 @@ -803,6 +803,34 @@ message InstanceConfig { State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// ReplicaComputeCapacity describes the amount of server resources that are +// allocated to each replica identified by the replica selection. +message ReplicaComputeCapacity { + // Required. Identifies replicas by specified properties. + // All replicas in the selection have the same amount of compute capacity. + ReplicaSelection replica_selection = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Compute capacity allocated to each replica identified by the specified + // selection. + // The unit is selected based on the unit used to specify the instance size + // for non-autoscaling instances, or the unit used in autoscaling limit for + // autoscaling instances. + oneof compute_capacity { + // The number of nodes allocated to each replica. + // + // This may be zero in API responses for instances that are not yet in + // state `READY`. + int32 node_count = 2; + + // The number of processing units allocated to each replica. + // + // This may be zero in API responses for instances that are not yet in + // state `READY`. + int32 processing_units = 3; + } +} + // Autoscaling configuration for an instance. message AutoscalingConfig { // The autoscaling limits for the instance. Users can define the minimum and @@ -854,6 +882,37 @@ message AutoscalingConfig { [(google.api.field_behavior) = REQUIRED]; } + // AsymmetricAutoscalingOption specifies the scaling of replicas identified by + // the given selection. + message AsymmetricAutoscalingOption { + // Overrides the top-level autoscaling configuration for the replicas + // identified by `replica_selection`. All fields in this message are + // optional. Any unspecified fields will use the corresponding values from + // the top-level autoscaling configuration. + message AutoscalingConfigOverrides { + // Optional. If specified, overrides the min/max limit in the top-level + // autoscaling configuration for the selected replicas. + AutoscalingLimits autoscaling_limits = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, overrides the autoscaling target + // high_priority_cpu_utilization_percent in the top-level autoscaling + // configuration for the selected replicas. + int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Selects the replicas to which this AsymmetricAutoscalingOption + // applies. Only read-only replicas are supported. + ReplicaSelection replica_selection = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Overrides applied to the top-level autoscaling configuration + // for the selected replicas. + AutoscalingConfigOverrides overrides = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + // Required. Autoscaling limits for an instance. AutoscalingLimits autoscaling_limits = 1 [(google.api.field_behavior) = REQUIRED]; @@ -861,6 +920,18 @@ message AutoscalingConfig { // Required. The autoscaling targets for an instance. AutoscalingTargets autoscaling_targets = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Optional asymmetric autoscaling options. + // Replicas matching the replica selection criteria will be autoscaled + // independently from other replicas. The autoscaler will scale the replicas + // based on the utilization of replicas identified by the replica selection. + // Replica selections should not overlap with each other. + // + // Other replicas (those do not match any replica selection) will be + // autoscaled together and will have the same compute capacity allocated to + // them. + repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 + [(google.api.field_behavior) = OPTIONAL]; } // An isolated set of Cloud Spanner resources on which databases can be hosted. @@ -922,34 +993,56 @@ message Instance { // Must be unique per project and between 4 and 30 characters in length. 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. + // The number of nodes allocated to this instance. At most, one of either + // `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 + // 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`. + // If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` + // field and reflects the current number of nodes allocated to the instance. // - // See [the - // documentation](https://cloud.google.com/spanner/docs/compute-capacity) - // for more information about nodes and processing units. + // This might be zero in API responses for instances that are not yet in the + // `READY` state. + // + // If the instance has varying node count across replicas (achieved by + // setting asymmetric_autoscaling_options in autoscaling config), the + // node_count here is the maximum node count across all replicas. + // + // For more information, see + // [Compute capacity, nodes, and processing + // units](https://cloud.google.com/spanner/docs/compute-capacity). 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. + // The number of processing units allocated to this instance. At most, one of + // either `processing_units` or `node_count` should be present in the message. // - // Users can set the processing_units field to specify the target number of + // 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`. + // If autoscaling is enabled, `processing_units` is treated as an + // `OUTPUT_ONLY` field and reflects the current number of processing units + // allocated to the instance. // - // See [the - // documentation](https://cloud.google.com/spanner/docs/compute-capacity) - // for more information about nodes and processing units. + // This might be zero in API responses for instances that are not yet in the + // `READY` state. + // + // If the instance has varying processing units per replica + // (achieved by setting asymmetric_autoscaling_options in autoscaling config), + // the processing_units here is the maximum processing units across all + // replicas. + // + // For more information, see + // [Compute capacity, nodes and processing + // units](https://cloud.google.com/spanner/docs/compute-capacity). int32 processing_units = 9; + // Output only. Lists the compute capacity per ReplicaSelection. A replica + // selection identifies a set of replicas with common properties. Replicas + // identified by a ReplicaSelection are scaled with the same compute capacity. + repeated ReplicaComputeCapacity replica_compute_capacity = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // 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