diff --git a/java-gke-multi-cloud/README.md b/java-gke-multi-cloud/README.md
index 02337d62110e..9b6a7d71487e 100644
--- a/java-gke-multi-cloud/README.md
+++ b/java-gke-multi-cloud/README.md
@@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file:
com.google.cloud
google-cloud-gke-multi-cloud
- 0.4.0
+ 0.6.0
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-gke-multi-cloud:0.4.0'
+implementation 'com.google.cloud:google-cloud-gke-multi-cloud:0.6.0'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-gke-multi-cloud" % "0.4.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-gke-multi-cloud" % "0.6.0"
```
## Authentication
@@ -165,16 +165,16 @@ Java is a registered trademark of Oracle and/or its affiliates.
[product-docs]: https://cloud.google.com/anthos
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-gke-multi-cloud/latest/overview
-[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java7.svg
-[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java7.html
-[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8.svg
-[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8.html
-[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-osx.svg
-[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-osx.html
-[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-win.svg
-[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java8-win.html
-[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java11.svg
-[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-gke-multi-cloud/java11.html
+[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
+[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
+[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
+[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
+[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
+[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
+[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
+[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
+[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
+[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-gke-multi-cloud.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gke-multi-cloud&core=gav
@@ -186,9 +186,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
-[contributing]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/CONTRIBUTING.md
-[code-of-conduct]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
-[license]: https://github.com/googleapis/java-gke-multi-cloud/blob/main/LICENSE
+[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
+[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
+[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=gkemulticloud.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersClient.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersClient.java
new file mode 100644
index 000000000000..ea0effb9805b
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersClient.java
@@ -0,0 +1,1685 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gkemulticloud.v1.stub.AttachedClustersStub;
+import com.google.cloud.gkemulticloud.v1.stub.AttachedClustersStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: The AttachedClusters API provides a single centrally managed service to
+ * register and manage Anthos attached clusters that run on customer's owned infrastructure.
+ *
+ *
This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ *
{@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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedClusterName name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
+ * AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the AttachedClustersClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ *
+ * - A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable API
+ * callable object, which can be used to initiate calls to the service.
+ *
+ *
+ * See the individual methods for example code.
+ *
+ *
Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ *
This class can be customized by passing in a custom instance of AttachedClustersSettings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@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
+ * AttachedClustersSettings attachedClustersSettings =
+ * AttachedClustersSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AttachedClustersClient attachedClustersClient =
+ * AttachedClustersClient.create(attachedClustersSettings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@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
+ * AttachedClustersSettings attachedClustersSettings =
+ * AttachedClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AttachedClustersClient attachedClustersClient =
+ * AttachedClustersClient.create(attachedClustersSettings);
+ * }
+ *
+ * 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
+ * AttachedClustersSettings attachedClustersSettings =
+ * AttachedClustersSettings.newHttpJsonBuilder().build();
+ * AttachedClustersClient attachedClustersClient =
+ * AttachedClustersClient.create(attachedClustersSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class AttachedClustersClient implements BackgroundResource {
+ private final AttachedClustersSettings settings;
+ private final AttachedClustersStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of AttachedClustersClient with default settings. */
+ public static final AttachedClustersClient create() throws IOException {
+ return create(AttachedClustersSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of AttachedClustersClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final AttachedClustersClient create(AttachedClustersSettings settings)
+ throws IOException {
+ return new AttachedClustersClient(settings);
+ }
+
+ /**
+ * Constructs an instance of AttachedClustersClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(AttachedClustersSettings).
+ */
+ public static final AttachedClustersClient create(AttachedClustersStub stub) {
+ return new AttachedClustersClient(stub);
+ }
+
+ /**
+ * Constructs an instance of AttachedClustersClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected AttachedClustersClient(AttachedClustersSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((AttachedClustersStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected AttachedClustersClient(AttachedClustersStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final AttachedClustersSettings getSettings() {
+ return settings;
+ }
+
+ public AttachedClustersStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a
+ * given GCP project and region.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
+ * String attachedClusterId = "attachedClusterId865943409";
+ * AttachedCluster response =
+ * attachedClustersClient
+ * .createAttachedClusterAsync(parent, attachedCluster, attachedClusterId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param attachedCluster Required. The specification of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create.
+ * @param attachedClusterId Required. A client provided ID the resource. Must be unique within the
+ * parent resource.
+ *
The provided ID will be part of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource name formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createAttachedClusterAsync(
+ LocationName parent, AttachedCluster attachedCluster, String attachedClusterId) {
+ CreateAttachedClusterRequest request =
+ CreateAttachedClusterRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAttachedCluster(attachedCluster)
+ .setAttachedClusterId(attachedClusterId)
+ .build();
+ return createAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a
+ * given GCP project and region.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
+ * String attachedClusterId = "attachedClusterId865943409";
+ * AttachedCluster response =
+ * attachedClustersClient
+ * .createAttachedClusterAsync(parent, attachedCluster, attachedClusterId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param attachedCluster Required. The specification of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to create.
+ * @param attachedClusterId Required. A client provided ID the resource. Must be unique within the
+ * parent resource.
+ *
The provided ID will be part of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource name formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createAttachedClusterAsync(
+ String parent, AttachedCluster attachedCluster, String attachedClusterId) {
+ CreateAttachedClusterRequest request =
+ CreateAttachedClusterRequest.newBuilder()
+ .setParent(parent)
+ .setAttachedCluster(attachedCluster)
+ .setAttachedClusterId(attachedClusterId)
+ .build();
+ return createAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a
+ * given GCP project and region.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * CreateAttachedClusterRequest request =
+ * CreateAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setAttachedClusterId("attachedClusterId865943409")
+ * .setValidateOnly(true)
+ * .build();
+ * AttachedCluster response = attachedClustersClient.createAttachedClusterAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createAttachedClusterAsync(
+ CreateAttachedClusterRequest request) {
+ return createAttachedClusterOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a
+ * given GCP project and region.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * CreateAttachedClusterRequest request =
+ * CreateAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setAttachedClusterId("attachedClusterId865943409")
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * attachedClustersClient.createAttachedClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * AttachedCluster response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createAttachedClusterOperationCallable() {
+ return stub.createAttachedClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource on a
+ * given GCP project and region.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * CreateAttachedClusterRequest request =
+ * CreateAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setAttachedClusterId("attachedClusterId865943409")
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.createAttachedClusterCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createAttachedClusterCallable() {
+ return stub.createAttachedClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * AttachedCluster response =
+ * attachedClustersClient.updateAttachedClusterAsync(attachedCluster, updateMask).get();
+ * }
+ * }
+ *
+ * @param attachedCluster Required. The
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource to update.
+ * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
+ * this field. The elements of the repeated paths field can only include these fields from
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster]:
+ * * `description`. * `annotations`. * `platform_version`. *
+ * `authorization.admin_users`. * `logging_config.component_config.enable_components`.
+ * * `monitoring_config.managed_prometheus_config.enabled`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateAttachedClusterAsync(
+ AttachedCluster attachedCluster, FieldMask updateMask) {
+ UpdateAttachedClusterRequest request =
+ UpdateAttachedClusterRequest.newBuilder()
+ .setAttachedCluster(attachedCluster)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * UpdateAttachedClusterRequest request =
+ * UpdateAttachedClusterRequest.newBuilder()
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * AttachedCluster response = attachedClustersClient.updateAttachedClusterAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateAttachedClusterAsync(
+ UpdateAttachedClusterRequest request) {
+ return updateAttachedClusterOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * UpdateAttachedClusterRequest request =
+ * UpdateAttachedClusterRequest.newBuilder()
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * attachedClustersClient.updateAttachedClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * AttachedCluster response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateAttachedClusterOperationCallable() {
+ return stub.updateAttachedClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster].
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * UpdateAttachedClusterRequest request =
+ * UpdateAttachedClusterRequest.newBuilder()
+ * .setAttachedCluster(AttachedCluster.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.updateAttachedClusterCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateAttachedClusterCallable() {
+ return stub.updateAttachedClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
+ * by importing an existing Fleet Membership resource.
+ *
+ * Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be
+ * imported through this method.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String fleetMembership = "fleetMembership-665479228";
+ * AttachedCluster response =
+ * attachedClustersClient.importAttachedClusterAsync(parent, fleetMembership).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param fleetMembership Required. The name of the fleet membership resource to import.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture importAttachedClusterAsync(
+ LocationName parent, String fleetMembership) {
+ ImportAttachedClusterRequest request =
+ ImportAttachedClusterRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setFleetMembership(fleetMembership)
+ .build();
+ return importAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
+ * by importing an existing Fleet Membership resource.
+ *
+ * Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be
+ * imported through this method.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * String fleetMembership = "fleetMembership-665479228";
+ * AttachedCluster response =
+ * attachedClustersClient.importAttachedClusterAsync(parent, fleetMembership).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param fleetMembership Required. The name of the fleet membership resource to import.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture importAttachedClusterAsync(
+ String parent, String fleetMembership) {
+ ImportAttachedClusterRequest request =
+ ImportAttachedClusterRequest.newBuilder()
+ .setParent(parent)
+ .setFleetMembership(fleetMembership)
+ .build();
+ return importAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
+ * by importing an existing Fleet Membership resource.
+ *
+ * Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be
+ * imported through this method.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ImportAttachedClusterRequest request =
+ * ImportAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setValidateOnly(true)
+ * .setFleetMembership("fleetMembership-665479228")
+ * .setPlatformVersion("platformVersion1848800485")
+ * .setDistribution("distribution-1580708220")
+ * .build();
+ * AttachedCluster response = attachedClustersClient.importAttachedClusterAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture importAttachedClusterAsync(
+ ImportAttachedClusterRequest request) {
+ return importAttachedClusterOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
+ * by importing an existing Fleet Membership resource.
+ *
+ * Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be
+ * imported through this method.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ImportAttachedClusterRequest request =
+ * ImportAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setValidateOnly(true)
+ * .setFleetMembership("fleetMembership-665479228")
+ * .setPlatformVersion("platformVersion1848800485")
+ * .setDistribution("distribution-1580708220")
+ * .build();
+ * OperationFuture future =
+ * attachedClustersClient.importAttachedClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * AttachedCluster response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ importAttachedClusterOperationCallable() {
+ return stub.importAttachedClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports creates a new [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource
+ * by importing an existing Fleet Membership resource.
+ *
+ * Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be
+ * imported through this method.
+ *
+ *
If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ImportAttachedClusterRequest request =
+ * ImportAttachedClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setValidateOnly(true)
+ * .setFleetMembership("fleetMembership-665479228")
+ * .setPlatformVersion("platformVersion1848800485")
+ * .setDistribution("distribution-1580708220")
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.importAttachedClusterCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ importAttachedClusterCallable() {
+ return stub.importAttachedClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedClusterName name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
+ * AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource to describe.
+ * `AttachedCluster` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedCluster getAttachedCluster(AttachedClusterName name) {
+ GetAttachedClusterRequest request =
+ GetAttachedClusterRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getAttachedCluster(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]").toString();
+ * AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource to describe.
+ * `AttachedCluster` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedCluster getAttachedCluster(String name) {
+ GetAttachedClusterRequest request =
+ GetAttachedClusterRequest.newBuilder().setName(name).build();
+ return getAttachedCluster(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GetAttachedClusterRequest request =
+ * GetAttachedClusterRequest.newBuilder()
+ * .setName(
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
+ * .toString())
+ * .build();
+ * AttachedCluster response = attachedClustersClient.getAttachedCluster(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedCluster getAttachedCluster(GetAttachedClusterRequest request) {
+ return getAttachedClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Describes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GetAttachedClusterRequest request =
+ * GetAttachedClusterRequest.newBuilder()
+ * .setName(
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.getAttachedClusterCallable().futureCall(request);
+ * // Do something.
+ * AttachedCluster response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getAttachedClusterCallable() {
+ return stub.getAttachedClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given
+ * Google Cloud project and region.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (AttachedCluster element :
+ * attachedClustersClient.listAttachedClusters(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent location which owns this collection of
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAttachedClustersPagedResponse listAttachedClusters(LocationName parent) {
+ ListAttachedClustersRequest request =
+ ListAttachedClustersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAttachedClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given
+ * Google Cloud project and region.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (AttachedCluster element :
+ * attachedClustersClient.listAttachedClusters(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent location which owns this collection of
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAttachedClustersPagedResponse listAttachedClusters(String parent) {
+ ListAttachedClustersRequest request =
+ ListAttachedClustersRequest.newBuilder().setParent(parent).build();
+ return listAttachedClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given
+ * Google Cloud project and region.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ListAttachedClustersRequest request =
+ * ListAttachedClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (AttachedCluster element :
+ * attachedClustersClient.listAttachedClusters(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAttachedClustersPagedResponse listAttachedClusters(
+ ListAttachedClustersRequest request) {
+ return listAttachedClustersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given
+ * Google Cloud project and region.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ListAttachedClustersRequest request =
+ * ListAttachedClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.listAttachedClustersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AttachedCluster element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAttachedClustersPagedCallable() {
+ return stub.listAttachedClustersPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resources on a given
+ * Google Cloud project and region.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * ListAttachedClustersRequest request =
+ * ListAttachedClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAttachedClustersResponse response =
+ * attachedClustersClient.listAttachedClustersCallable().call(request);
+ * for (AttachedCluster element : response.getAttachedClustersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAttachedClustersCallable() {
+ return stub.listAttachedClustersCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedClusterName name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
+ * attachedClustersClient.deleteAttachedClusterAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
+ * `AttachedCluster` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAttachedClusterAsync(
+ AttachedClusterName name) {
+ DeleteAttachedClusterRequest request =
+ DeleteAttachedClusterRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]").toString();
+ * attachedClustersClient.deleteAttachedClusterAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] to delete.
+ * `AttachedCluster` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on GCP resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAttachedClusterAsync(String name) {
+ DeleteAttachedClusterRequest request =
+ DeleteAttachedClusterRequest.newBuilder().setName(name).build();
+ return deleteAttachedClusterAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * DeleteAttachedClusterRequest request =
+ * DeleteAttachedClusterRequest.newBuilder()
+ * .setName(
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
+ * .toString())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .setIgnoreErrors(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * attachedClustersClient.deleteAttachedClusterAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAttachedClusterAsync(
+ DeleteAttachedClusterRequest request) {
+ return deleteAttachedClusterOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * DeleteAttachedClusterRequest request =
+ * DeleteAttachedClusterRequest.newBuilder()
+ * .setName(
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
+ * .toString())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .setIgnoreErrors(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * attachedClustersClient.deleteAttachedClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteAttachedClusterOperationCallable() {
+ return stub.deleteAttachedClusterOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a specific [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource.
+ *
+ * If successful, the response contains a newly created
+ * [Operation][google.longrunning.Operation] resource that can be described to track the status of
+ * the operation.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * DeleteAttachedClusterRequest request =
+ * DeleteAttachedClusterRequest.newBuilder()
+ * .setName(
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
+ * .toString())
+ * .setValidateOnly(true)
+ * .setAllowMissing(true)
+ * .setIgnoreErrors(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.deleteAttachedClusterCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteAttachedClusterCallable() {
+ return stub.deleteAttachedClusterCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns information, such as supported Kubernetes versions, on a given Google Cloud location.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedServerConfigName name = AttachedServerConfigName.of("[PROJECT]", "[LOCATION]");
+ * AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the
+ * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] resource to
+ * describe.
+ * `AttachedServerConfig` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedServerConfig`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedServerConfig getAttachedServerConfig(AttachedServerConfigName name) {
+ GetAttachedServerConfigRequest request =
+ GetAttachedServerConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getAttachedServerConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns information, such as supported Kubernetes versions, on a given Google Cloud location.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String name = AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
+ * AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the
+ * [AttachedServerConfig][google.cloud.gkemulticloud.v1.AttachedServerConfig] resource to
+ * describe.
+ * `AttachedServerConfig` names are formatted as
+ * `projects/<project-id>/locations/<region>/attachedServerConfig`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedServerConfig getAttachedServerConfig(String name) {
+ GetAttachedServerConfigRequest request =
+ GetAttachedServerConfigRequest.newBuilder().setName(name).build();
+ return getAttachedServerConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns information, such as supported Kubernetes versions, on a given Google Cloud location.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GetAttachedServerConfigRequest request =
+ * GetAttachedServerConfigRequest.newBuilder()
+ * .setName(AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AttachedServerConfig getAttachedServerConfig(
+ GetAttachedServerConfigRequest request) {
+ return getAttachedServerConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns information, such as supported Kubernetes versions, on a given Google Cloud location.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GetAttachedServerConfigRequest request =
+ * GetAttachedServerConfigRequest.newBuilder()
+ * .setName(AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient.getAttachedServerConfigCallable().futureCall(request);
+ * // Do something.
+ * AttachedServerConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getAttachedServerConfigCallable() {
+ return stub.getAttachedServerConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates the install manifest to be installed on the target cluster.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String attachedClusterId = "attachedClusterId865943409";
+ * GenerateAttachedClusterInstallManifestResponse response =
+ * attachedClustersClient.generateAttachedClusterInstallManifest(parent, attachedClusterId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param attachedClusterId Required. A client provided ID the resource. Must be unique within the
+ * parent resource.
+ *
The provided ID will be part of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource name formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
+ *
When generating an install manifest for importing an existing Membership resource, the
+ * attached_cluster_id field must be the Membership id.
+ *
Membership names are formatted as `resource name formatted as
+ * `projects/<project-id>/locations/<region>/memberships/<membership-id>`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateAttachedClusterInstallManifestResponse
+ generateAttachedClusterInstallManifest(LocationName parent, String attachedClusterId) {
+ GenerateAttachedClusterInstallManifestRequest request =
+ GenerateAttachedClusterInstallManifestRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAttachedClusterId(attachedClusterId)
+ .build();
+ return generateAttachedClusterInstallManifest(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates the install manifest to be installed on the target cluster.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * String attachedClusterId = "attachedClusterId865943409";
+ * GenerateAttachedClusterInstallManifestResponse response =
+ * attachedClustersClient.generateAttachedClusterInstallManifest(parent, attachedClusterId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent location where this
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource will be created.
+ * Location names are formatted as `projects/<project-id>/locations/<region>`.
+ *
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more
+ * details on Google Cloud resource names.
+ * @param attachedClusterId Required. A client provided ID the resource. Must be unique within the
+ * parent resource.
+ *
The provided ID will be part of the
+ * [AttachedCluster][google.cloud.gkemulticloud.v1.AttachedCluster] resource name formatted as
+ * `projects/<project-id>/locations/<region>/attachedClusters/<cluster-id>`.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
+ *
When generating an install manifest for importing an existing Membership resource, the
+ * attached_cluster_id field must be the Membership id.
+ *
Membership names are formatted as `resource name formatted as
+ * `projects/<project-id>/locations/<region>/memberships/<membership-id>`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateAttachedClusterInstallManifestResponse
+ generateAttachedClusterInstallManifest(String parent, String attachedClusterId) {
+ GenerateAttachedClusterInstallManifestRequest request =
+ GenerateAttachedClusterInstallManifestRequest.newBuilder()
+ .setParent(parent)
+ .setAttachedClusterId(attachedClusterId)
+ .build();
+ return generateAttachedClusterInstallManifest(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates the install manifest to be installed on the target cluster.
+ *
+ *
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GenerateAttachedClusterInstallManifestRequest request =
+ * GenerateAttachedClusterInstallManifestRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAttachedClusterId("attachedClusterId865943409")
+ * .setPlatformVersion("platformVersion1848800485")
+ * .build();
+ * GenerateAttachedClusterInstallManifestResponse response =
+ * attachedClustersClient.generateAttachedClusterInstallManifest(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateAttachedClusterInstallManifestResponse
+ generateAttachedClusterInstallManifest(
+ GenerateAttachedClusterInstallManifestRequest request) {
+ return generateAttachedClusterInstallManifestCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates the install manifest to be installed on the target cluster.
+ *
+ * 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * GenerateAttachedClusterInstallManifestRequest request =
+ * GenerateAttachedClusterInstallManifestRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAttachedClusterId("attachedClusterId865943409")
+ * .setPlatformVersion("platformVersion1848800485")
+ * .build();
+ * ApiFuture future =
+ * attachedClustersClient
+ * .generateAttachedClusterInstallManifestCallable()
+ * .futureCall(request);
+ * // Do something.
+ * GenerateAttachedClusterInstallManifestResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestCallable() {
+ return stub.generateAttachedClusterInstallManifestCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListAttachedClustersPagedResponse
+ extends AbstractPagedListResponse<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ AttachedCluster,
+ ListAttachedClustersPage,
+ ListAttachedClustersFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAttachedClustersPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAttachedClustersPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAttachedClustersPagedResponse(ListAttachedClustersPage page) {
+ super(page, ListAttachedClustersFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAttachedClustersPage
+ extends AbstractPage<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ AttachedCluster,
+ ListAttachedClustersPage> {
+
+ private ListAttachedClustersPage(
+ PageContext
+ context,
+ ListAttachedClustersResponse response) {
+ super(context, response);
+ }
+
+ private static ListAttachedClustersPage createEmptyPage() {
+ return new ListAttachedClustersPage(null, null);
+ }
+
+ @Override
+ protected ListAttachedClustersPage createPage(
+ PageContext
+ context,
+ ListAttachedClustersResponse response) {
+ return new ListAttachedClustersPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAttachedClustersFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ AttachedCluster,
+ ListAttachedClustersPage,
+ ListAttachedClustersFixedSizeCollection> {
+
+ private ListAttachedClustersFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAttachedClustersFixedSizeCollection createEmptyCollection() {
+ return new ListAttachedClustersFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAttachedClustersFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListAttachedClustersFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersSettings.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersSettings.java
new file mode 100644
index 000000000000..272dac5ddeb1
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AttachedClustersSettings.java
@@ -0,0 +1,368 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1;
+
+import static com.google.cloud.gkemulticloud.v1.AttachedClustersClient.ListAttachedClustersPagedResponse;
+
+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;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.gkemulticloud.v1.stub.AttachedClustersStubSettings;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link AttachedClustersClient}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (gkemulticloud.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the total timeout of getAttachedCluster to 30 seconds:
+ *
+ *
{@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
+ * AttachedClustersSettings.Builder attachedClustersSettingsBuilder =
+ * AttachedClustersSettings.newBuilder();
+ * attachedClustersSettingsBuilder
+ * .getAttachedClusterSettings()
+ * .setRetrySettings(
+ * attachedClustersSettingsBuilder
+ * .getAttachedClusterSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AttachedClustersSettings attachedClustersSettings = attachedClustersSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AttachedClustersSettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to createAttachedCluster. */
+ public UnaryCallSettings
+ createAttachedClusterSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).createAttachedClusterSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createAttachedCluster. */
+ public OperationCallSettings
+ createAttachedClusterOperationSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings())
+ .createAttachedClusterOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAttachedCluster. */
+ public UnaryCallSettings
+ updateAttachedClusterSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).updateAttachedClusterSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAttachedCluster. */
+ public OperationCallSettings
+ updateAttachedClusterOperationSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings())
+ .updateAttachedClusterOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to importAttachedCluster. */
+ public UnaryCallSettings
+ importAttachedClusterSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).importAttachedClusterSettings();
+ }
+
+ /** Returns the object with the settings used for calls to importAttachedCluster. */
+ public OperationCallSettings
+ importAttachedClusterOperationSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings())
+ .importAttachedClusterOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAttachedCluster. */
+ public UnaryCallSettings
+ getAttachedClusterSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).getAttachedClusterSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAttachedClusters. */
+ public PagedCallSettings<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).listAttachedClustersSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttachedCluster. */
+ public UnaryCallSettings
+ deleteAttachedClusterSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).deleteAttachedClusterSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttachedCluster. */
+ public OperationCallSettings
+ deleteAttachedClusterOperationSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings())
+ .deleteAttachedClusterOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAttachedServerConfig. */
+ public UnaryCallSettings
+ getAttachedServerConfigSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings()).getAttachedServerConfigSettings();
+ }
+
+ /**
+ * Returns the object with the settings used for calls to generateAttachedClusterInstallManifest.
+ */
+ public UnaryCallSettings<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings() {
+ return ((AttachedClustersStubSettings) getStubSettings())
+ .generateAttachedClusterInstallManifestSettings();
+ }
+
+ public static final AttachedClustersSettings create(AttachedClustersStubSettings stub)
+ throws IOException {
+ return new AttachedClustersSettings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return AttachedClustersStubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return AttachedClustersStubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return AttachedClustersStubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return AttachedClustersStubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return AttachedClustersStubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return AttachedClustersStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return AttachedClustersStubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return AttachedClustersStubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected AttachedClustersSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for AttachedClustersSettings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(AttachedClustersStubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(AttachedClustersSettings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(AttachedClustersStubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(AttachedClustersStubSettings.newBuilder());
+ }
+
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(AttachedClustersStubSettings.newHttpJsonBuilder());
+ }
+
+ public AttachedClustersStubSettings.Builder getStubSettingsBuilder() {
+ return ((AttachedClustersStubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to createAttachedCluster. */
+ public UnaryCallSettings.Builder
+ createAttachedClusterSettings() {
+ return getStubSettingsBuilder().createAttachedClusterSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createAttachedCluster. */
+ public OperationCallSettings.Builder<
+ CreateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ createAttachedClusterOperationSettings() {
+ return getStubSettingsBuilder().createAttachedClusterOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttachedCluster. */
+ public UnaryCallSettings.Builder
+ updateAttachedClusterSettings() {
+ return getStubSettingsBuilder().updateAttachedClusterSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttachedCluster. */
+ public OperationCallSettings.Builder<
+ UpdateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ updateAttachedClusterOperationSettings() {
+ return getStubSettingsBuilder().updateAttachedClusterOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to importAttachedCluster. */
+ public UnaryCallSettings.Builder
+ importAttachedClusterSettings() {
+ return getStubSettingsBuilder().importAttachedClusterSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to importAttachedCluster. */
+ public OperationCallSettings.Builder<
+ ImportAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ importAttachedClusterOperationSettings() {
+ return getStubSettingsBuilder().importAttachedClusterOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAttachedCluster. */
+ public UnaryCallSettings.Builder
+ getAttachedClusterSettings() {
+ return getStubSettingsBuilder().getAttachedClusterSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAttachedClusters. */
+ public PagedCallSettings.Builder<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings() {
+ return getStubSettingsBuilder().listAttachedClustersSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttachedCluster. */
+ public UnaryCallSettings.Builder
+ deleteAttachedClusterSettings() {
+ return getStubSettingsBuilder().deleteAttachedClusterSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttachedCluster. */
+ public OperationCallSettings.Builder
+ deleteAttachedClusterOperationSettings() {
+ return getStubSettingsBuilder().deleteAttachedClusterOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAttachedServerConfig. */
+ public UnaryCallSettings.Builder
+ getAttachedServerConfigSettings() {
+ return getStubSettingsBuilder().getAttachedServerConfigSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to
+ * generateAttachedClusterInstallManifest.
+ */
+ public UnaryCallSettings.Builder<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings() {
+ return getStubSettingsBuilder().generateAttachedClusterInstallManifestSettings();
+ }
+
+ @Override
+ public AttachedClustersSettings build() throws IOException {
+ return new AttachedClustersSettings(this);
+ }
+ }
+}
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java
index 01a448d9fa58..0e20fca91efc 100644
--- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AwsClustersClient.java
@@ -240,7 +240,7 @@ public final OperationsClient getHttpJsonOperationsClient() {
* The provided ID will be part of the
* [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAwsClusterAsync(
@@ -292,7 +292,7 @@ public final OperationFuture createAwsClusterAsyn
* The provided ID will be part of the
* [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAwsClusterAsync(
@@ -446,10 +446,12 @@ public final UnaryCallable createAwsClusterC
* `control_plane.config_encryption.kms_key_arn`. * `control_plane.instance_type`. *
* `control_plane.security_group_ids`. * `control_plane.proxy_config`. *
* `control_plane.proxy_config.secret_arn`. * `control_plane.proxy_config.secret_version`.
+ * * `control_plane.root_volume.size_gib`. * `control_plane.root_volume.volume_type`.
* * `control_plane.root_volume.iops`. * `control_plane.root_volume.kms_key_arn`.
- * * `control_plane.root_volume.volume_type`. * `control_plane.root_volume.size_gib`.
* * `control_plane.ssh_config`. * `control_plane.ssh_config.ec2_key_pair`. *
- * `control_plane.instance_placement.tenancy`. * `logging_config`.
+ * `control_plane.instance_placement.tenancy`. * `control_plane.iam_instance_profile`.
+ * * `logging_config.component_config.enable_components`. * `control_plane.tags`.
+ * * `monitoring_config.managed_prometheus_config.enabled`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAwsClusterAsync(
@@ -1144,7 +1146,7 @@ public final GenerateAwsAccessTokenResponse generateAwsAccessToken(
* The provided ID will be part of the
* [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAwsNodePoolAsync(
@@ -1197,7 +1199,7 @@ public final OperationFuture createAwsNodePoolAs
* The provided ID will be part of the
* [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAwsNodePoolAsync(
@@ -1352,7 +1354,11 @@ public final UnaryCallable createAwsNodePoo
* `config.root_volume.kms_key_arn`. * `config.root_volume.volume_type`. *
* `config.root_volume.size_gib`. * `config.proxy_config`. *
* `config.proxy_config.secret_arn`. * `config.proxy_config.secret_version`. *
- * `config.ssh_config`. * `config.ssh_config.ec2_key_pair`.
+ * `config.ssh_config`. * `config.ssh_config.ec2_key_pair`. *
+ * `config.instance_placement.tenancy`. * `config.iam_instance_profile`. *
+ * `config.labels`. * `config.tags`. * `config.autoscaling_metrics_collection`. *
+ * `config.autoscaling_metrics_collection.granularity`. *
+ * `config.autoscaling_metrics_collection.metrics`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAwsNodePoolAsync(
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java
index 088a7977482b..3dfe49733b2c 100644
--- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java
@@ -245,7 +245,7 @@ public final OperationsClient getHttpJsonOperationsClient() {
* The provided ID will be part of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClientAsync(
@@ -300,7 +300,7 @@ public final OperationFuture createAzureClientAs
* The provided ID will be part of the
* [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClientAsync(
@@ -961,7 +961,7 @@ public final UnaryCallable deleteAzureClien
* The provided ID will be part of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClusterAsync(
@@ -1013,7 +1013,7 @@ public final OperationFuture createAzureCluster
* The provided ID will be part of the
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureClusterAsync(
@@ -1162,9 +1162,13 @@ public final UnaryCallable createAzureClus
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field. The elements of the repeated paths field can only include these fields from
* [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
- * * `description`. * `annotations`. * `azureClient`. *
- * `control_plane.version`. * `control_plane.vm_size`. * `authorization.admin_users`.
- * * `control_plane.root_volume.size_gib`. * `logging_config`
+ *
* `description`. * `azureClient`. * `control_plane.version`. *
+ * `control_plane.vm_size`. * `annotations`. * `authorization.admin_users`. *
+ * `control_plane.root_volume.size_gib`. * `control_plane.proxy_config`. *
+ * `control_plane.proxy_config.resource_group_id`. *
+ * `control_plane.proxy_config.secret_id`. * `control_plane.ssh_config.authorized_key`.
+ * * `logging_config.component_config.enable_components` *
+ * `monitoring_config.managed_prometheus_config.enabled`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAzureClusterAsync(
@@ -1866,7 +1870,7 @@ public final GenerateAzureAccessTokenResponse generateAzureAccessToken(
* The provided ID will be part of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureNodePoolAsync(
@@ -1920,7 +1924,7 @@ public final OperationFuture createAzureNodePo
* The provided ID will be part of the
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as
* `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
- *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
+ *
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createAzureNodePoolAsync(
@@ -2073,7 +2077,7 @@ public final UnaryCallable createAzureNod
* this field. The elements of the repeated paths field can only include these fields from
* [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
* *. `annotations`. * `version`. * `autoscaling.min_node_count`. *
- * `autoscaling.max_node_count`. * `config.vm_size`.
+ * `autoscaling.max_node_count`. * `config.ssh_config.authorized_key`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateAzureNodePoolAsync(
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json
index 160928931656..75b5c7121211 100644
--- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/gapic_metadata.json
@@ -5,6 +5,39 @@
"protoPackage": "google.cloud.gkemulticloud.v1",
"libraryPackage": "com.google.cloud.gkemulticloud.v1",
"services": {
+ "AttachedClusters": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "AttachedClustersClient",
+ "rpcs": {
+ "CreateAttachedCluster": {
+ "methods": ["createAttachedClusterAsync", "createAttachedClusterAsync", "createAttachedClusterAsync", "createAttachedClusterOperationCallable", "createAttachedClusterCallable"]
+ },
+ "DeleteAttachedCluster": {
+ "methods": ["deleteAttachedClusterAsync", "deleteAttachedClusterAsync", "deleteAttachedClusterAsync", "deleteAttachedClusterOperationCallable", "deleteAttachedClusterCallable"]
+ },
+ "GenerateAttachedClusterInstallManifest": {
+ "methods": ["generateAttachedClusterInstallManifest", "generateAttachedClusterInstallManifest", "generateAttachedClusterInstallManifest", "generateAttachedClusterInstallManifestCallable"]
+ },
+ "GetAttachedCluster": {
+ "methods": ["getAttachedCluster", "getAttachedCluster", "getAttachedCluster", "getAttachedClusterCallable"]
+ },
+ "GetAttachedServerConfig": {
+ "methods": ["getAttachedServerConfig", "getAttachedServerConfig", "getAttachedServerConfig", "getAttachedServerConfigCallable"]
+ },
+ "ImportAttachedCluster": {
+ "methods": ["importAttachedClusterAsync", "importAttachedClusterAsync", "importAttachedClusterAsync", "importAttachedClusterOperationCallable", "importAttachedClusterCallable"]
+ },
+ "ListAttachedClusters": {
+ "methods": ["listAttachedClusters", "listAttachedClusters", "listAttachedClusters", "listAttachedClustersPagedCallable", "listAttachedClustersCallable"]
+ },
+ "UpdateAttachedCluster": {
+ "methods": ["updateAttachedClusterAsync", "updateAttachedClusterAsync", "updateAttachedClusterOperationCallable", "updateAttachedClusterCallable"]
+ }
+ }
+ }
+ }
+ },
"AwsClusters": {
"clients": {
"grpc": {
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java
index 8fadc7da29ea..80469a65c1a6 100644
--- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/package-info.java
@@ -19,6 +19,26 @@
*
* The interfaces provided are listed below, along with usage samples.
*
+ *
======================= AttachedClustersClient =======================
+ *
+ *
Service Description: The AttachedClusters API provides a single centrally managed service to
+ * register and manage Anthos attached clusters that run on customer's owned infrastructure.
+ *
+ *
Sample for AttachedClustersClient:
+ *
+ *
{@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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
+ * AttachedClusterName name =
+ * AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
+ * AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
+ * }
+ * }
+ *
* ======================= AwsClustersClient =======================
*
*
Service Description: The AwsClusters API provides a single centrally managed service to create
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStub.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStub.java
new file mode 100644
index 000000000000..04970604d3e2
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStub.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1.stub;
+
+import static com.google.cloud.gkemulticloud.v1.AttachedClustersClient.ListAttachedClustersPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gkemulticloud.v1.AttachedCluster;
+import com.google.cloud.gkemulticloud.v1.AttachedServerConfig;
+import com.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse;
+import com.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest;
+import com.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse;
+import com.google.cloud.gkemulticloud.v1.OperationMetadata;
+import com.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AttachedClusters service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class AttachedClustersStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable
+ createAttachedClusterOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: createAttachedClusterOperationCallable()");
+ }
+
+ public UnaryCallable createAttachedClusterCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAttachedClusterCallable()");
+ }
+
+ public OperationCallable
+ updateAttachedClusterOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: updateAttachedClusterOperationCallable()");
+ }
+
+ public UnaryCallable updateAttachedClusterCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAttachedClusterCallable()");
+ }
+
+ public OperationCallable
+ importAttachedClusterOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: importAttachedClusterOperationCallable()");
+ }
+
+ public UnaryCallable importAttachedClusterCallable() {
+ throw new UnsupportedOperationException("Not implemented: importAttachedClusterCallable()");
+ }
+
+ public UnaryCallable getAttachedClusterCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAttachedClusterCallable()");
+ }
+
+ public UnaryCallable
+ listAttachedClustersPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAttachedClustersPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAttachedClustersCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAttachedClustersCallable()");
+ }
+
+ public OperationCallable
+ deleteAttachedClusterOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: deleteAttachedClusterOperationCallable()");
+ }
+
+ public UnaryCallable deleteAttachedClusterCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAttachedClusterCallable()");
+ }
+
+ public UnaryCallable
+ getAttachedServerConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAttachedServerConfigCallable()");
+ }
+
+ public UnaryCallable<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: generateAttachedClusterInstallManifestCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStubSettings.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStubSettings.java
new file mode 100644
index 000000000000..401bbb6f6386
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/AttachedClustersStubSettings.java
@@ -0,0 +1,841 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1.stub;
+
+import static com.google.cloud.gkemulticloud.v1.AttachedClustersClient.ListAttachedClustersPagedResponse;
+
+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.grpc.ProtoOperationTransformers;
+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.longrunning.OperationSnapshot;
+import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.PagedListDescriptor;
+import com.google.api.gax.rpc.PagedListResponseFactory;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StubSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gkemulticloud.v1.AttachedCluster;
+import com.google.cloud.gkemulticloud.v1.AttachedServerConfig;
+import com.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse;
+import com.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest;
+import com.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse;
+import com.google.cloud.gkemulticloud.v1.OperationMetadata;
+import com.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+import org.threeten.bp.Duration;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link AttachedClustersStub}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (gkemulticloud.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the total timeout of getAttachedCluster to 30 seconds:
+ *
+ *
{@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
+ * AttachedClustersStubSettings.Builder attachedClustersSettingsBuilder =
+ * AttachedClustersStubSettings.newBuilder();
+ * attachedClustersSettingsBuilder
+ * .getAttachedClusterSettings()
+ * .setRetrySettings(
+ * attachedClustersSettingsBuilder
+ * .getAttachedClusterSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AttachedClustersStubSettings attachedClustersSettings = attachedClustersSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AttachedClustersStubSettings extends StubSettings {
+ /** The default scopes of the service. */
+ private static final ImmutableList DEFAULT_SERVICE_SCOPES =
+ ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+
+ private final UnaryCallSettings
+ createAttachedClusterSettings;
+ private final OperationCallSettings<
+ CreateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ createAttachedClusterOperationSettings;
+ private final UnaryCallSettings
+ updateAttachedClusterSettings;
+ private final OperationCallSettings<
+ UpdateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ updateAttachedClusterOperationSettings;
+ private final UnaryCallSettings
+ importAttachedClusterSettings;
+ private final OperationCallSettings<
+ ImportAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ importAttachedClusterOperationSettings;
+ private final UnaryCallSettings
+ getAttachedClusterSettings;
+ private final PagedCallSettings<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings;
+ private final UnaryCallSettings
+ deleteAttachedClusterSettings;
+ private final OperationCallSettings
+ deleteAttachedClusterOperationSettings;
+ private final UnaryCallSettings
+ getAttachedServerConfigSettings;
+ private final UnaryCallSettings<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings;
+
+ private static final PagedListDescriptor<
+ ListAttachedClustersRequest, ListAttachedClustersResponse, AttachedCluster>
+ LIST_ATTACHED_CLUSTERS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListAttachedClustersRequest, ListAttachedClustersResponse, AttachedCluster>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAttachedClustersRequest injectToken(
+ ListAttachedClustersRequest payload, String token) {
+ return ListAttachedClustersRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAttachedClustersRequest injectPageSize(
+ ListAttachedClustersRequest payload, int pageSize) {
+ return ListAttachedClustersRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAttachedClustersRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAttachedClustersResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListAttachedClustersResponse payload) {
+ return payload.getAttachedClustersList() == null
+ ? ImmutableList.of()
+ : payload.getAttachedClustersList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ LIST_ATTACHED_CLUSTERS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAttachedClustersRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListAttachedClustersRequest, ListAttachedClustersResponse, AttachedCluster>
+ pageContext =
+ PageContext.create(
+ callable, LIST_ATTACHED_CLUSTERS_PAGE_STR_DESC, request, context);
+ return ListAttachedClustersPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to createAttachedCluster. */
+ public UnaryCallSettings
+ createAttachedClusterSettings() {
+ return createAttachedClusterSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createAttachedCluster. */
+ public OperationCallSettings
+ createAttachedClusterOperationSettings() {
+ return createAttachedClusterOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAttachedCluster. */
+ public UnaryCallSettings
+ updateAttachedClusterSettings() {
+ return updateAttachedClusterSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAttachedCluster. */
+ public OperationCallSettings
+ updateAttachedClusterOperationSettings() {
+ return updateAttachedClusterOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to importAttachedCluster. */
+ public UnaryCallSettings
+ importAttachedClusterSettings() {
+ return importAttachedClusterSettings;
+ }
+
+ /** Returns the object with the settings used for calls to importAttachedCluster. */
+ public OperationCallSettings
+ importAttachedClusterOperationSettings() {
+ return importAttachedClusterOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAttachedCluster. */
+ public UnaryCallSettings
+ getAttachedClusterSettings() {
+ return getAttachedClusterSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAttachedClusters. */
+ public PagedCallSettings<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings() {
+ return listAttachedClustersSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttachedCluster. */
+ public UnaryCallSettings
+ deleteAttachedClusterSettings() {
+ return deleteAttachedClusterSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAttachedCluster. */
+ public OperationCallSettings
+ deleteAttachedClusterOperationSettings() {
+ return deleteAttachedClusterOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAttachedServerConfig. */
+ public UnaryCallSettings
+ getAttachedServerConfigSettings() {
+ return getAttachedServerConfigSettings;
+ }
+
+ /**
+ * Returns the object with the settings used for calls to generateAttachedClusterInstallManifest.
+ */
+ public UnaryCallSettings<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings() {
+ return generateAttachedClusterInstallManifestSettings;
+ }
+
+ public AttachedClustersStub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcAttachedClustersStub.create(this);
+ }
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonAttachedClustersStub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return InstantiatingExecutorProvider.newBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return "gkemulticloud.googleapis.com:443";
+ }
+
+ /** Returns the default mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "gkemulticloud.mtls.googleapis.com:443";
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return DEFAULT_SERVICE_SCOPES;
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return GoogleCredentialsProvider.newBuilder()
+ .setScopesToApply(DEFAULT_SERVICE_SCOPES)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** 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();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(AttachedClustersStubSettings.class))
+ .setTransportToken(
+ GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(AttachedClustersStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return AttachedClustersStubSettings.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);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected AttachedClustersStubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ createAttachedClusterSettings = settingsBuilder.createAttachedClusterSettings().build();
+ createAttachedClusterOperationSettings =
+ settingsBuilder.createAttachedClusterOperationSettings().build();
+ updateAttachedClusterSettings = settingsBuilder.updateAttachedClusterSettings().build();
+ updateAttachedClusterOperationSettings =
+ settingsBuilder.updateAttachedClusterOperationSettings().build();
+ importAttachedClusterSettings = settingsBuilder.importAttachedClusterSettings().build();
+ importAttachedClusterOperationSettings =
+ settingsBuilder.importAttachedClusterOperationSettings().build();
+ getAttachedClusterSettings = settingsBuilder.getAttachedClusterSettings().build();
+ listAttachedClustersSettings = settingsBuilder.listAttachedClustersSettings().build();
+ deleteAttachedClusterSettings = settingsBuilder.deleteAttachedClusterSettings().build();
+ deleteAttachedClusterOperationSettings =
+ settingsBuilder.deleteAttachedClusterOperationSettings().build();
+ getAttachedServerConfigSettings = settingsBuilder.getAttachedServerConfigSettings().build();
+ generateAttachedClusterInstallManifestSettings =
+ settingsBuilder.generateAttachedClusterInstallManifestSettings().build();
+ }
+
+ /** Builder for AttachedClustersStubSettings. */
+ public static class Builder extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ createAttachedClusterSettings;
+ private final OperationCallSettings.Builder<
+ CreateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ createAttachedClusterOperationSettings;
+ private final UnaryCallSettings.Builder
+ updateAttachedClusterSettings;
+ private final OperationCallSettings.Builder<
+ UpdateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ updateAttachedClusterOperationSettings;
+ private final UnaryCallSettings.Builder
+ importAttachedClusterSettings;
+ private final OperationCallSettings.Builder<
+ ImportAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ importAttachedClusterOperationSettings;
+ private final UnaryCallSettings.Builder
+ getAttachedClusterSettings;
+ private final PagedCallSettings.Builder<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings;
+ private final UnaryCallSettings.Builder
+ deleteAttachedClusterSettings;
+ private final OperationCallSettings.Builder<
+ DeleteAttachedClusterRequest, Empty, OperationMetadata>
+ deleteAttachedClusterOperationSettings;
+ private final UnaryCallSettings.Builder
+ getAttachedServerConfigSettings;
+ private final UnaryCallSettings.Builder<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put(
+ "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_0_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
+ RETRYABLE_CODE_DEFINITIONS = definitions.build();
+ }
+
+ private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder definitions = ImmutableMap.builder();
+ RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("no_retry_1_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(10000L))
+ .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_0_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ createAttachedClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createAttachedClusterOperationSettings = OperationCallSettings.newBuilder();
+ updateAttachedClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAttachedClusterOperationSettings = OperationCallSettings.newBuilder();
+ importAttachedClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ importAttachedClusterOperationSettings = OperationCallSettings.newBuilder();
+ getAttachedClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listAttachedClustersSettings =
+ PagedCallSettings.newBuilder(LIST_ATTACHED_CLUSTERS_PAGE_STR_FACT);
+ deleteAttachedClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteAttachedClusterOperationSettings = OperationCallSettings.newBuilder();
+ getAttachedServerConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ generateAttachedClusterInstallManifestSettings =
+ UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ createAttachedClusterSettings,
+ updateAttachedClusterSettings,
+ importAttachedClusterSettings,
+ getAttachedClusterSettings,
+ listAttachedClustersSettings,
+ deleteAttachedClusterSettings,
+ getAttachedServerConfigSettings,
+ generateAttachedClusterInstallManifestSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(AttachedClustersStubSettings settings) {
+ super(settings);
+
+ createAttachedClusterSettings = settings.createAttachedClusterSettings.toBuilder();
+ createAttachedClusterOperationSettings =
+ settings.createAttachedClusterOperationSettings.toBuilder();
+ updateAttachedClusterSettings = settings.updateAttachedClusterSettings.toBuilder();
+ updateAttachedClusterOperationSettings =
+ settings.updateAttachedClusterOperationSettings.toBuilder();
+ importAttachedClusterSettings = settings.importAttachedClusterSettings.toBuilder();
+ importAttachedClusterOperationSettings =
+ settings.importAttachedClusterOperationSettings.toBuilder();
+ getAttachedClusterSettings = settings.getAttachedClusterSettings.toBuilder();
+ listAttachedClustersSettings = settings.listAttachedClustersSettings.toBuilder();
+ deleteAttachedClusterSettings = settings.deleteAttachedClusterSettings.toBuilder();
+ deleteAttachedClusterOperationSettings =
+ settings.deleteAttachedClusterOperationSettings.toBuilder();
+ getAttachedServerConfigSettings = settings.getAttachedServerConfigSettings.toBuilder();
+ generateAttachedClusterInstallManifestSettings =
+ settings.generateAttachedClusterInstallManifestSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ createAttachedClusterSettings,
+ updateAttachedClusterSettings,
+ importAttachedClusterSettings,
+ getAttachedClusterSettings,
+ listAttachedClustersSettings,
+ deleteAttachedClusterSettings,
+ getAttachedServerConfigSettings,
+ generateAttachedClusterInstallManifestSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ 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.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .createAttachedClusterSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .updateAttachedClusterSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .importAttachedClusterSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .getAttachedClusterSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listAttachedClustersSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .deleteAttachedClusterSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .getAttachedServerConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .generateAttachedClusterInstallManifestSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .createAttachedClusterOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(AttachedCluster.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .updateAttachedClusterOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(AttachedCluster.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .importAttachedClusterOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(AttachedCluster.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .deleteAttachedClusterOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ return builder;
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to createAttachedCluster. */
+ public UnaryCallSettings.Builder
+ createAttachedClusterSettings() {
+ return createAttachedClusterSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createAttachedCluster. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder<
+ CreateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ createAttachedClusterOperationSettings() {
+ return createAttachedClusterOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttachedCluster. */
+ public UnaryCallSettings.Builder
+ updateAttachedClusterSettings() {
+ return updateAttachedClusterSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAttachedCluster. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder<
+ UpdateAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ updateAttachedClusterOperationSettings() {
+ return updateAttachedClusterOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to importAttachedCluster. */
+ public UnaryCallSettings.Builder
+ importAttachedClusterSettings() {
+ return importAttachedClusterSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to importAttachedCluster. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder<
+ ImportAttachedClusterRequest, AttachedCluster, OperationMetadata>
+ importAttachedClusterOperationSettings() {
+ return importAttachedClusterOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAttachedCluster. */
+ public UnaryCallSettings.Builder
+ getAttachedClusterSettings() {
+ return getAttachedClusterSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAttachedClusters. */
+ public PagedCallSettings.Builder<
+ ListAttachedClustersRequest,
+ ListAttachedClustersResponse,
+ ListAttachedClustersPagedResponse>
+ listAttachedClustersSettings() {
+ return listAttachedClustersSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttachedCluster. */
+ public UnaryCallSettings.Builder
+ deleteAttachedClusterSettings() {
+ return deleteAttachedClusterSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAttachedCluster. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder
+ deleteAttachedClusterOperationSettings() {
+ return deleteAttachedClusterOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAttachedServerConfig. */
+ public UnaryCallSettings.Builder
+ getAttachedServerConfigSettings() {
+ return getAttachedServerConfigSettings;
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to
+ * generateAttachedClusterInstallManifest.
+ */
+ public UnaryCallSettings.Builder<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestSettings() {
+ return generateAttachedClusterInstallManifestSettings;
+ }
+
+ @Override
+ public AttachedClustersStubSettings build() throws IOException {
+ return new AttachedClustersStubSettings(this);
+ }
+ }
+}
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersCallableFactory.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersCallableFactory.java
new file mode 100644
index 000000000000..e7c1ef22f11e
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+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.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the AttachedClusters service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAttachedClustersCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ GrpcCallSettings grpcCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ GrpcCallSettings grpcCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersStub.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersStub.java
new file mode 100644
index 000000000000..a071ca599c6e
--- /dev/null
+++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/GrpcAttachedClustersStub.java
@@ -0,0 +1,514 @@
+/*
+ * Copyright 2022 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.gkemulticloud.v1.stub;
+
+import static com.google.cloud.gkemulticloud.v1.AttachedClustersClient.ListAttachedClustersPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.gkemulticloud.v1.AttachedCluster;
+import com.google.cloud.gkemulticloud.v1.AttachedServerConfig;
+import com.google.cloud.gkemulticloud.v1.CreateAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.DeleteAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestRequest;
+import com.google.cloud.gkemulticloud.v1.GenerateAttachedClusterInstallManifestResponse;
+import com.google.cloud.gkemulticloud.v1.GetAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.GetAttachedServerConfigRequest;
+import com.google.cloud.gkemulticloud.v1.ImportAttachedClusterRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersRequest;
+import com.google.cloud.gkemulticloud.v1.ListAttachedClustersResponse;
+import com.google.cloud.gkemulticloud.v1.OperationMetadata;
+import com.google.cloud.gkemulticloud.v1.UpdateAttachedClusterRequest;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import com.google.protobuf.Empty;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the AttachedClusters service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAttachedClustersStub extends AttachedClustersStub {
+ private static final MethodDescriptor
+ createAttachedClusterMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/CreateAttachedCluster")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateAttachedClusterRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateAttachedClusterMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/UpdateAttachedCluster")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateAttachedClusterRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ importAttachedClusterMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/ImportAttachedCluster")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ImportAttachedClusterRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAttachedClusterMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedCluster")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAttachedClusterRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AttachedCluster.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listAttachedClustersMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/ListAttachedClusters")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAttachedClustersRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAttachedClustersResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteAttachedClusterMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/DeleteAttachedCluster")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteAttachedClusterRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAttachedServerConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/GetAttachedServerConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAttachedServerConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(AttachedServerConfig.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestMethodDescriptor =
+ MethodDescriptor
+ .
+ newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.gkemulticloud.v1.AttachedClusters/GenerateAttachedClusterInstallManifest")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(
+ GenerateAttachedClusterInstallManifestRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(
+ GenerateAttachedClusterInstallManifestResponse.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable
+ createAttachedClusterCallable;
+ private final OperationCallable
+ createAttachedClusterOperationCallable;
+ private final UnaryCallable
+ updateAttachedClusterCallable;
+ private final OperationCallable
+ updateAttachedClusterOperationCallable;
+ private final UnaryCallable
+ importAttachedClusterCallable;
+ private final OperationCallable
+ importAttachedClusterOperationCallable;
+ private final UnaryCallable
+ getAttachedClusterCallable;
+ private final UnaryCallable
+ listAttachedClustersCallable;
+ private final UnaryCallable
+ listAttachedClustersPagedCallable;
+ private final UnaryCallable
+ deleteAttachedClusterCallable;
+ private final OperationCallable
+ deleteAttachedClusterOperationCallable;
+ private final UnaryCallable
+ getAttachedServerConfigCallable;
+ private final UnaryCallable<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcAttachedClustersStub create(AttachedClustersStubSettings settings)
+ throws IOException {
+ return new GrpcAttachedClustersStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcAttachedClustersStub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcAttachedClustersStub(
+ AttachedClustersStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcAttachedClustersStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcAttachedClustersStub(
+ AttachedClustersStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcAttachedClustersStub, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected GrpcAttachedClustersStub(
+ AttachedClustersStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcAttachedClustersCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcAttachedClustersStub, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected GrpcAttachedClustersStub(
+ AttachedClustersStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings
+ createAttachedClusterTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createAttachedClusterMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateAttachedClusterTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateAttachedClusterMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put(
+ "attached_cluster.name",
+ String.valueOf(request.getAttachedCluster().getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ importAttachedClusterTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(importAttachedClusterMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ getAttachedClusterTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAttachedClusterMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ listAttachedClustersTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listAttachedClustersMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ deleteAttachedClusterTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAttachedClusterMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ getAttachedServerConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAttachedServerConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings<
+ GenerateAttachedClusterInstallManifestRequest,
+ GenerateAttachedClusterInstallManifestResponse>
+ generateAttachedClusterInstallManifestTransportSettings =
+ GrpcCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(generateAttachedClusterInstallManifestMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+
+ this.createAttachedClusterCallable =
+ callableFactory.createUnaryCallable(
+ createAttachedClusterTransportSettings,
+ settings.createAttachedClusterSettings(),
+ clientContext);
+ this.createAttachedClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ createAttachedClusterTransportSettings,
+ settings.createAttachedClusterOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.updateAttachedClusterCallable =
+ callableFactory.createUnaryCallable(
+ updateAttachedClusterTransportSettings,
+ settings.updateAttachedClusterSettings(),
+ clientContext);
+ this.updateAttachedClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ updateAttachedClusterTransportSettings,
+ settings.updateAttachedClusterOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.importAttachedClusterCallable =
+ callableFactory.createUnaryCallable(
+ importAttachedClusterTransportSettings,
+ settings.importAttachedClusterSettings(),
+ clientContext);
+ this.importAttachedClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ importAttachedClusterTransportSettings,
+ settings.importAttachedClusterOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.getAttachedClusterCallable =
+ callableFactory.createUnaryCallable(
+ getAttachedClusterTransportSettings,
+ settings.getAttachedClusterSettings(),
+ clientContext);
+ this.listAttachedClustersCallable =
+ callableFactory.createUnaryCallable(
+ listAttachedClustersTransportSettings,
+ settings.listAttachedClustersSettings(),
+ clientContext);
+ this.listAttachedClustersPagedCallable =
+ callableFactory.createPagedCallable(
+ listAttachedClustersTransportSettings,
+ settings.listAttachedClustersSettings(),
+ clientContext);
+ this.deleteAttachedClusterCallable =
+ callableFactory.createUnaryCallable(
+ deleteAttachedClusterTransportSettings,
+ settings.deleteAttachedClusterSettings(),
+ clientContext);
+ this.deleteAttachedClusterOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteAttachedClusterTransportSettings,
+ settings.deleteAttachedClusterOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.getAttachedServerConfigCallable =
+ callableFactory.createUnaryCallable(
+ getAttachedServerConfigTransportSettings,
+ settings.getAttachedServerConfigSettings(),
+ clientContext);
+ this.generateAttachedClusterInstallManifestCallable =
+ callableFactory.createUnaryCallable(
+ generateAttachedClusterInstallManifestTransportSettings,
+ settings.generateAttachedClusterInstallManifestSettings(),
+ clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable createAttachedClusterCallable() {
+ return createAttachedClusterCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createAttachedClusterOperationCallable() {
+ return createAttachedClusterOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable updateAttachedClusterCallable() {
+ return updateAttachedClusterCallable;
+ }
+
+ @Override
+ public OperationCallable
+ updateAttachedClusterOperationCallable() {
+ return updateAttachedClusterOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable importAttachedClusterCallable() {
+ return importAttachedClusterCallable;
+ }
+
+ @Override
+ public OperationCallable