diff --git a/.gitignore b/.gitignore
index 6b8637e01fc0..8bd08dcd00d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,10 @@ MANIFEST
.flattened-pom.xml
+# Vim files
+*.swp
+*.swo
+
# Python utilities
__pycache__/
*.py[cod]
diff --git a/generation_config.yaml b/generation_config.yaml
index 89fe8e87958e..f03239e7a11d 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,6 +1,6 @@
gapic_generator_version: 2.41.0
protoc_version: '25.3'
-googleapis_commitish: ede5e02ad747c9199a7953b222b85715e097189c
+googleapis_commitish: ac90fa9958bd6f7622674f52f77e4dc01d98bee8
libraries_bom_version: 26.40.0
template_excludes:
- .github/*
diff --git a/java-batch/README.md b/java-batch/README.md
index 1aee59f1a5a6..fe6017132e60 100644
--- a/java-batch/README.md
+++ b/java-batch/README.md
@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-batch.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.44.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-batch/0.45.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java
index d51c91a201c7..286eddb0360f 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/AllocationPolicy.java
@@ -8507,9 +8507,9 @@ public interface InstancePolicyOrTemplateOrBuilder
*
*
*
- * Set this field true if users want Batch to help fetch drivers from a
- * third party location and install them for GPUs specified in
- * policy.accelerators or instance_template on their behalf. Default is
+ * Set this field true if you want Batch to help fetch drivers from a third
+ * party location and install them for GPUs specified in
+ * `policy.accelerators` or `instance_template` on your behalf. Default is
* false.
*
* For Container-Optimized Image cases, Batch will install the
@@ -8755,9 +8755,9 @@ public com.google.protobuf.ByteString getInstanceTemplateBytes() {
*
*
*
- * Set this field true if users want Batch to help fetch drivers from a
- * third party location and install them for GPUs specified in
- * policy.accelerators or instance_template on their behalf. Default is
+ * Set this field true if you want Batch to help fetch drivers from a third
+ * party location and install them for GPUs specified in
+ * `policy.accelerators` or `instance_template` on your behalf. Default is
* false.
*
* For Container-Optimized Image cases, Batch will install the
@@ -9594,9 +9594,9 @@ public Builder setInstanceTemplateBytes(com.google.protobuf.ByteString value) {
*
*
*
- * Set this field true if users want Batch to help fetch drivers from a
- * third party location and install them for GPUs specified in
- * policy.accelerators or instance_template on their behalf. Default is
+ * Set this field true if you want Batch to help fetch drivers from a third
+ * party location and install them for GPUs specified in
+ * `policy.accelerators` or `instance_template` on your behalf. Default is
* false.
*
* For Container-Optimized Image cases, Batch will install the
@@ -9618,9 +9618,9 @@ public boolean getInstallGpuDrivers() {
*
*
*
- * Set this field true if users want Batch to help fetch drivers from a
- * third party location and install them for GPUs specified in
- * policy.accelerators or instance_template on their behalf. Default is
+ * Set this field true if you want Batch to help fetch drivers from a third
+ * party location and install them for GPUs specified in
+ * `policy.accelerators` or `instance_template` on your behalf. Default is
* false.
*
* For Container-Optimized Image cases, Batch will install the
@@ -9646,9 +9646,9 @@ public Builder setInstallGpuDrivers(boolean value) {
*
*
*
- * Set this field true if users want Batch to help fetch drivers from a
- * third party location and install them for GPUs specified in
- * policy.accelerators or instance_template on their behalf. Default is
+ * Set this field true if you want Batch to help fetch drivers from a third
+ * party location and install them for GPUs specified in
+ * `policy.accelerators` or `instance_template` on your behalf. Default is
* false.
*
* For Container-Optimized Image cases, Batch will install the
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
index 31a5835cb532..149d6dc0b186 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java
@@ -74,12 +74,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* due to the following reasons, the exit code will be 50000.
*
* Otherwise, it can be from different sources:
- * - Batch known failures as
+ * * Batch known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- * - Batch runnable execution failures: You can rely on Batch logs for further
- * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- * If there are multiple runnables failures, Batch only exposes the first
- * error caught for now.
+ * * Batch runnable execution failures; you can rely on Batch logs to further
+ * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ * there are multiple runnables failures, Batch only exposes the first error.
*
*
* int32 exit_code = 1;
@@ -441,12 +440,11 @@ public Builder mergeFrom(
* due to the following reasons, the exit code will be 50000.
*
* Otherwise, it can be from different sources:
- * - Batch known failures as
+ * * Batch known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- * - Batch runnable execution failures: You can rely on Batch logs for further
- * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- * If there are multiple runnables failures, Batch only exposes the first
- * error caught for now.
+ * * Batch runnable execution failures; you can rely on Batch logs to further
+ * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ * there are multiple runnables failures, Batch only exposes the first error.
*
*
* int32 exit_code = 1;
@@ -467,12 +465,11 @@ public int getExitCode() {
* due to the following reasons, the exit code will be 50000.
*
* Otherwise, it can be from different sources:
- * - Batch known failures as
+ * * Batch known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- * - Batch runnable execution failures: You can rely on Batch logs for further
- * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- * If there are multiple runnables failures, Batch only exposes the first
- * error caught for now.
+ * * Batch runnable execution failures; you can rely on Batch logs to further
+ * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ * there are multiple runnables failures, Batch only exposes the first error.
*
*
* int32 exit_code = 1;
@@ -497,12 +494,11 @@ public Builder setExitCode(int value) {
* due to the following reasons, the exit code will be 50000.
*
* Otherwise, it can be from different sources:
- * - Batch known failures as
+ * * Batch known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- * - Batch runnable execution failures: You can rely on Batch logs for further
- * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- * If there are multiple runnables failures, Batch only exposes the first
- * error caught for now.
+ * * Batch runnable execution failures; you can rely on Batch logs to further
+ * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ * there are multiple runnables failures, Batch only exposes the first error.
*
*
* int32 exit_code = 1;
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java
index d49b68bb2d37..945532e6767e 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java
@@ -34,12 +34,11 @@ public interface TaskExecutionOrBuilder
* due to the following reasons, the exit code will be 50000.
*
* Otherwise, it can be from different sources:
- * - Batch known failures as
+ * * Batch known failures:
* https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- * - Batch runnable execution failures: You can rely on Batch logs for further
- * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- * If there are multiple runnables failures, Batch only exposes the first
- * error caught for now.
+ * * Batch runnable execution failures; you can rely on Batch logs to further
+ * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ * there are multiple runnables failures, Batch only exposes the first error.
*
*
* int32 exit_code = 1;
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java
index 39385786d54a..88d4ee1f721d 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpec.java
@@ -250,10 +250,15 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -268,10 +273,15 @@ public boolean hasMaxRunDuration() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -288,10 +298,15 @@ public com.google.protobuf.Duration getMaxRunDuration() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2080,10 +2095,15 @@ public com.google.cloud.batch.v1.ComputeResourceOrBuilder getComputeResourceOrBu
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2097,10 +2117,15 @@ public boolean hasMaxRunDuration() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2120,10 +2145,15 @@ public com.google.protobuf.Duration getMaxRunDuration() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2145,10 +2175,15 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration value) {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2167,10 +2202,15 @@ public Builder setMaxRunDuration(com.google.protobuf.Duration.Builder builderFor
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2197,10 +2237,15 @@ public Builder mergeMaxRunDuration(com.google.protobuf.Duration value) {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2219,10 +2264,15 @@ public Builder clearMaxRunDuration() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2236,10 +2286,15 @@ public com.google.protobuf.Duration.Builder getMaxRunDurationBuilder() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -2257,10 +2312,15 @@ public com.google.protobuf.DurationOrBuilder getMaxRunDurationOrBuilder() {
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java
index 7b35f2ab6c2c..555f21daf2a1 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskSpecOrBuilder.java
@@ -159,10 +159,15 @@ public interface TaskSpecOrBuilder
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -174,10 +179,15 @@ public interface TaskSpecOrBuilder
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
@@ -189,10 +199,15 @@ public interface TaskSpecOrBuilder
*
*
*
- * Maximum duration the task should run.
- * The task will be killed and marked as FAILED if over this limit.
- * The valid value range for max_run_duration in seconds is [0,
- * 315576000000.999999999],
+ * Maximum duration the task should run before being automatically retried
+ * (if enabled) or automatically failed. Format the value of this field
+ * as a time limit in seconds followed by `s`—for example, `3600s`
+ * for 1 hour. The field accepts any value between 0 and the maximum listed
+ * for the `Duration` field type at
+ * https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ * the actual maximum run time for a job will be limited to the maximum run
+ * time for a job listed at
+ * https://cloud.google.com/batch/quotas#max-job-duration.
*
*
* .google.protobuf.Duration max_run_duration = 4;
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto
index 67b486d3e58e..b7d0729895a4 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/job.proto
@@ -419,9 +419,9 @@ message AllocationPolicy {
string instance_template = 2;
}
- // Set this field true if users want Batch to help fetch drivers from a
- // third party location and install them for GPUs specified in
- // policy.accelerators or instance_template on their behalf. Default is
+ // Set this field true if you want Batch to help fetch drivers from a third
+ // party location and install them for GPUs specified in
+ // `policy.accelerators` or `instance_template` on your behalf. Default is
// false.
//
// For Container-Optimized Image cases, Batch will install the
diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto
index 3b5f6d03fa94..f38d7c0c2478 100644
--- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto
+++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto
@@ -108,12 +108,11 @@ message TaskExecution {
// due to the following reasons, the exit code will be 50000.
//
// Otherwise, it can be from different sources:
- // - Batch known failures as
+ // * Batch known failures:
// https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
- // - Batch runnable execution failures: You can rely on Batch logs for further
- // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
- // If there are multiple runnables failures, Batch only exposes the first
- // error caught for now.
+ // * Batch runnable execution failures; you can rely on Batch logs to further
+ // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
+ // there are multiple runnables failures, Batch only exposes the first error.
int32 exit_code = 1;
}
@@ -341,10 +340,15 @@ message TaskSpec {
// ComputeResource requirements.
ComputeResource compute_resource = 3;
- // Maximum duration the task should run.
- // The task will be killed and marked as FAILED if over this limit.
- // The valid value range for max_run_duration in seconds is [0,
- // 315576000000.999999999],
+ // Maximum duration the task should run before being automatically retried
+ // (if enabled) or automatically failed. Format the value of this field
+ // as a time limit in seconds followed by `s`—for example, `3600s`
+ // for 1 hour. The field accepts any value between 0 and the maximum listed
+ // for the `Duration` field type at
+ // https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
+ // the actual maximum run time for a job will be limited to the maximum run
+ // time for a job listed at
+ // https://cloud.google.com/batch/quotas#max-job-duration.
google.protobuf.Duration max_run_duration = 4;
// Maximum number of retries on failures.
diff --git a/java-container/.repo-metadata.json b/java-container/.repo-metadata.json
index 75f37f17de23..6b45faa41e86 100644
--- a/java-container/.repo-metadata.json
+++ b/java-container/.repo-metadata.json
@@ -5,7 +5,7 @@
"api_description": "is an enterprise-grade platform for containerized applications, including stateful and stateless, AI and ML, Linux and Windows, complex and simple web apps, API, and backend services. Leverage industry-first features like four-way auto-scaling and no-stress management. Optimize GPU and TPU provisioning, use integrated developer tools, and get multi-cluster support from SREs.",
"client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-container/latest/overview",
"release_level": "stable",
- "transport": "grpc",
+ "transport": "both",
"language": "java",
"repo": "googleapis/google-cloud-java",
"repo_short": "java-container",
diff --git a/java-container/README.md b/java-container/README.md
index 182ee3a4542a..4936efdaaf5e 100644
--- a/java-container/README.md
+++ b/java-container/README.md
@@ -101,7 +101,7 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr
## Transport
-Kubernetes Engine uses gRPC for the transport layer.
+Kubernetes Engine uses both gRPC and HTTP/JSON for the transport layer.
## Supported Java Versions
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-container.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.47.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-container/2.48.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/java-container/google-cloud-container/pom.xml b/java-container/google-cloud-container/pom.xml
index 3614ff104e0f..3b1dbe8d85f4 100644
--- a/java-container/google-cloud-container/pom.xml
+++ b/java-container/google-cloud-container/pom.xml
@@ -60,6 +60,10 @@
com.google.api
gax-grpc
+
+ com.google.api
+ gax-httpjson
+
org.threeten
threetenbp
@@ -88,11 +92,23 @@
test
+
+ com.google.api
+ gax
+ testlib
+ test
+
com.google.api
gax-grpc
testlib
test
+
+ com.google.api
+ gax-httpjson
+ testlib
+ test
+
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java
index dc5c7205d70c..5c589a5fe7db 100644
--- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java
@@ -358,6 +358,7 @@
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
@@ -751,6 +752,20 @@
* ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
* }
*
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ClusterManagerSettings clusterManagerSettings =
+ * ClusterManagerSettings.newHttpJsonBuilder().build();
+ * ClusterManagerClient clusterManagerClient = ClusterManagerClient.create(clusterManagerSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -1406,10 +1421,12 @@ public final UnaryCallable updateClusterCallabl
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build())
+ * .addAllAccelerators(new ArrayList())
* .setMachineType("machineType-218117087")
* .setDiskType("diskType279771767")
* .setDiskSizeGb(-757478089)
* .setResourceManagerTags(ResourceManagerTags.newBuilder().build())
+ * .setContainerdConfig(ContainerdConfig.newBuilder().build())
* .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build())
* .build();
* Operation response = clusterManagerClient.updateNodePool(request);
@@ -1462,10 +1479,12 @@ public final Operation updateNodePool(UpdateNodePoolRequest request) {
* .setLoggingConfig(NodePoolLoggingConfig.newBuilder().build())
* .setResourceLabels(ResourceLabels.newBuilder().build())
* .setWindowsNodeConfig(WindowsNodeConfig.newBuilder().build())
+ * .addAllAccelerators(new ArrayList())
* .setMachineType("machineType-218117087")
* .setDiskType("diskType279771767")
* .setDiskSizeGb(-757478089)
* .setResourceManagerTags(ResourceManagerTags.newBuilder().build())
+ * .setContainerdConfig(ContainerdConfig.newBuilder().build())
* .setQueuedProvisioning(NodePool.QueuedProvisioning.newBuilder().build())
* .build();
* ApiFuture future =
@@ -2545,6 +2564,34 @@ public final UnaryCallable deleteClusterCallabl
return stub.deleteClusterCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all operations in a project in a specific zone or all zones.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
+ * String parent = "parent-995424086";
+ * ListOperationsResponse response = clusterManagerClient.listOperations(parent);
+ * }
+ * }
+ *
+ * @param parent The parent (project and location) where the operations will be listed. Specified
+ * in the format `projects/*/locations/*`. Location "-" matches all zones and all
+ * regions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListOperationsResponse listOperations(String parent) {
+ ListOperationsRequest request = ListOperationsRequest.newBuilder().setParent(parent).build();
+ return listOperations(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all operations in a project in a specific zone or all zones.
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java
index 322f5918be50..563850dba3d7 100644
--- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerSettings.java
@@ -19,9 +19,11 @@
import static com.google.cloud.container.v1.ClusterManagerClient.ListUsableSubnetworksPagedResponse;
import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -327,11 +329,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return ClusterManagerStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return ClusterManagerStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return ClusterManagerStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return ClusterManagerStubSettings.defaultTransportChannelProvider();
}
@@ -340,11 +349,16 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return ClusterManagerStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -382,6 +396,10 @@ private static Builder createDefault() {
return new Builder(ClusterManagerStubSettings.newBuilder());
}
+ private static Builder createHttpJsonDefault() {
+ return new Builder(ClusterManagerStubSettings.newHttpJsonBuilder());
+ }
+
public ClusterManagerStubSettings.Builder getStubSettingsBuilder() {
return ((ClusterManagerStubSettings.Builder) getStubSettings());
}
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json
index fc131da80f5a..a286c1fc5868 100644
--- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/gapic_metadata.json
@@ -56,7 +56,7 @@
"methods": ["listNodePools", "listNodePools", "listNodePools", "listNodePoolsCallable"]
},
"ListOperations": {
- "methods": ["listOperations", "listOperations", "listOperationsCallable"]
+ "methods": ["listOperations", "listOperations", "listOperations", "listOperationsCallable"]
},
"ListUsableSubnetworks": {
"methods": ["listUsableSubnetworks", "listUsableSubnetworksPagedCallable", "listUsableSubnetworksCallable"]
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java
index 0f4bb76c1b0f..03c7bdaf9f4c 100644
--- a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/ClusterManagerStubSettings.java
@@ -20,12 +20,16 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
+import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
@@ -442,6 +446,11 @@ public ClusterManagerStub createStub() throws IOException {
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcClusterManagerStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonClusterManagerStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -480,17 +489,24 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(ClusterManagerStubSettings.class))
@@ -498,11 +514,29 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(ClusterManagerStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ClusterManagerStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -833,6 +867,18 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listClustersSettings()
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java
new file mode 100644
index 000000000000..aa118d6b269c
--- /dev/null
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerCallableFactory.java
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.container.v1.stub;
+
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the ClusterManager service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class HttpJsonClusterManagerCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java
new file mode 100644
index 000000000000..a13851cf751a
--- /dev/null
+++ b/java-container/google-cloud-container/src/main/java/com/google/cloud/container/v1/stub/HttpJsonClusterManagerStub.java
@@ -0,0 +1,2621 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.container.v1.stub;
+
+import static com.google.cloud.container.v1.ClusterManagerClient.ListUsableSubnetworksPagedResponse;
+
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.RequestParamsBuilder;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.container.v1.CancelOperationRequest;
+import com.google.container.v1.CheckAutopilotCompatibilityRequest;
+import com.google.container.v1.CheckAutopilotCompatibilityResponse;
+import com.google.container.v1.Cluster;
+import com.google.container.v1.CompleteIPRotationRequest;
+import com.google.container.v1.CompleteNodePoolUpgradeRequest;
+import com.google.container.v1.CreateClusterRequest;
+import com.google.container.v1.CreateNodePoolRequest;
+import com.google.container.v1.DeleteClusterRequest;
+import com.google.container.v1.DeleteNodePoolRequest;
+import com.google.container.v1.GetClusterRequest;
+import com.google.container.v1.GetJSONWebKeysRequest;
+import com.google.container.v1.GetJSONWebKeysResponse;
+import com.google.container.v1.GetNodePoolRequest;
+import com.google.container.v1.GetOperationRequest;
+import com.google.container.v1.GetServerConfigRequest;
+import com.google.container.v1.ListClustersRequest;
+import com.google.container.v1.ListClustersResponse;
+import com.google.container.v1.ListNodePoolsRequest;
+import com.google.container.v1.ListNodePoolsResponse;
+import com.google.container.v1.ListOperationsRequest;
+import com.google.container.v1.ListOperationsResponse;
+import com.google.container.v1.ListUsableSubnetworksRequest;
+import com.google.container.v1.ListUsableSubnetworksResponse;
+import com.google.container.v1.NodePool;
+import com.google.container.v1.Operation;
+import com.google.container.v1.RollbackNodePoolUpgradeRequest;
+import com.google.container.v1.ServerConfig;
+import com.google.container.v1.SetAddonsConfigRequest;
+import com.google.container.v1.SetLabelsRequest;
+import com.google.container.v1.SetLegacyAbacRequest;
+import com.google.container.v1.SetLocationsRequest;
+import com.google.container.v1.SetLoggingServiceRequest;
+import com.google.container.v1.SetMaintenancePolicyRequest;
+import com.google.container.v1.SetMasterAuthRequest;
+import com.google.container.v1.SetMonitoringServiceRequest;
+import com.google.container.v1.SetNetworkPolicyRequest;
+import com.google.container.v1.SetNodePoolAutoscalingRequest;
+import com.google.container.v1.SetNodePoolManagementRequest;
+import com.google.container.v1.SetNodePoolSizeRequest;
+import com.google.container.v1.StartIPRotationRequest;
+import com.google.container.v1.UpdateClusterRequest;
+import com.google.container.v1.UpdateMasterRequest;
+import com.google.container.v1.UpdateNodePoolRequest;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the ClusterManager service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class HttpJsonClusterManagerStub extends ClusterManagerStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor
+ listClustersMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/ListClusters")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/clusters",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListClustersResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor getClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/GetCluster")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Cluster.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/CreateCluster")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/clusters",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/clusters")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearParent()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/UpdateCluster")
+ .setHttpMethod("PUT")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateNodePoolMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/UpdateNodePool")
+ .setHttpMethod("PUT")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearNodePoolId()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setNodePoolAutoscalingMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetNodePoolAutoscaling")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setAutoscaling",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearNodePoolId()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setLoggingServiceMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetLoggingService")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setLogging",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setMonitoringServiceMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetMonitoringService")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setMonitoring",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setAddonsConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetAddonsConfig")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setAddons",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setLocationsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetLocations")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setLocations",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateMasterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/UpdateMaster")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:updateMaster",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setMasterAuthMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetMasterAuth")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setMasterAuth",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteClusterMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/DeleteCluster")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ listOperationsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/ListOperations")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/operations",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/operations")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListOperationsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getOperationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/GetOperation")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/operations/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(
+ fields, "operationId", request.getOperationId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/operations/{operationId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ cancelOperationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/CancelOperation")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/operations/*}:cancel",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(
+ fields, "operationId", request.getOperationId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearName()
+ .clearOperationId()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Empty.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getServerConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/GetServerConfig")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*}/serverConfig",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths("/v1/projects/{projectId}/zones/{zone}/serverconfig")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ServerConfig.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getJSONWebKeysMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/GetJSONWebKeys")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/clusters/*}/jwks",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GetJSONWebKeysResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ listNodePoolsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/ListNodePools")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "parent", request.getParent());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListNodePoolsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getNodePoolMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/GetNodePool")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(NodePool.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createNodePoolMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/CreateNodePool")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/clusters/*}/nodePools",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "parent", request.getParent());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearParent()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteNodePoolMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/DeleteNodePool")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ completeNodePoolUpgradeMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/CompleteNodePoolUpgrade")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:completeUpgrade",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearName().build(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Empty.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ rollbackNodePoolUpgradeMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/RollbackNodePoolUpgrade")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:rollback",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearNodePoolId()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setNodePoolManagementMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetNodePoolManagement")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*/nodePools/*}:setManagement",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "nodePoolId", request.getNodePoolId());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearNodePoolId()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor setLabelsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetLabels")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setResourceLabels",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setLegacyAbacMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/SetLegacyAbac")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:setLegacyAbac",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "*",
+ request
+ .toBuilder()
+ .clearClusterId()
+ .clearName()
+ .clearProjectId()
+ .clearZone()
+ .build(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ startIPRotationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.container.v1.ClusterManager/StartIPRotation")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/clusters/*}:startIpRotation",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "clusterId", request.getClusterId());
+ serializer.putPathParam(fields, "name", request.getName());
+ serializer.putPathParam(fields, "projectId", request.getProjectId());
+ serializer.putPathParam(fields, "zone", request.getZone());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation")
+ .setQueryParamsExtractor(
+ request -> {
+ Map