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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * Cluster response = hypercomputeClusterClient.getCluster(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the HypercomputeClusterClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
ListClusters |
+ * Lists Clusters in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetCluster |
+ * Gets details of a single Cluster. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateCluster |
+ * Creates a new Cluster in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateCluster |
+ * Updates the parameters of a single Cluster. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteCluster |
+ * Deletes a single Cluster. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return 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 HypercomputeClusterSettings 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
+ * HypercomputeClusterSettings hypercomputeClusterSettings =
+ * HypercomputeClusterSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * HypercomputeClusterClient hypercomputeClusterClient =
+ * HypercomputeClusterClient.create(hypercomputeClusterSettings);
+ * }
+ *
+ * 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
+ * HypercomputeClusterSettings hypercomputeClusterSettings =
+ * HypercomputeClusterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HypercomputeClusterClient hypercomputeClusterClient =
+ * HypercomputeClusterClient.create(hypercomputeClusterSettings);
+ * }
+ *
+ * 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
+ * HypercomputeClusterSettings hypercomputeClusterSettings =
+ * HypercomputeClusterSettings.newHttpJsonBuilder().build();
+ * HypercomputeClusterClient hypercomputeClusterClient =
+ * HypercomputeClusterClient.create(hypercomputeClusterSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HypercomputeClusterClient implements BackgroundResource { + private final HypercomputeClusterSettings settings; + private final HypercomputeClusterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of HypercomputeClusterClient with default settings. */ + public static final HypercomputeClusterClient create() throws IOException { + return create(HypercomputeClusterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of HypercomputeClusterClient, 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 HypercomputeClusterClient create(HypercomputeClusterSettings settings) + throws IOException { + return new HypercomputeClusterClient(settings); + } + + /** + * Constructs an instance of HypercomputeClusterClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(HypercomputeClusterSettings). + */ + public static final HypercomputeClusterClient create(HypercomputeClusterStub stub) { + return new HypercomputeClusterClient(stub); + } + + /** + * Constructs an instance of HypercomputeClusterClient, 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 HypercomputeClusterClient(HypercomputeClusterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((HypercomputeClusterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected HypercomputeClusterClient(HypercomputeClusterStub 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 HypercomputeClusterSettings getSettings() { + return settings; + } + + public HypercomputeClusterStub 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. + /** + * Lists Clusters in a given project and 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Cluster element : hypercomputeClusterClient.listClusters(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent location of the clusters to list, in the format
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListClustersPagedResponse listClusters(LocationName parent) {
+ ListClustersRequest request =
+ ListClustersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Clusters in a given project and 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Cluster element : hypercomputeClusterClient.listClusters(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent location of the clusters to list, in the format
+ * `projects/{project}/locations/{location}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListClustersPagedResponse listClusters(String parent) {
+ ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build();
+ return listClusters(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Clusters in a given project and 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListClustersRequest request =
+ * ListClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Cluster element : hypercomputeClusterClient.listClusters(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 ListClustersPagedResponse listClusters(ListClustersRequest request) {
+ return listClustersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Clusters in a given project and 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListClustersRequest request =
+ * ListClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.listClustersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Cluster element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListClustersRequest request =
+ * ListClustersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListClustersResponse response =
+ * hypercomputeClusterClient.listClustersCallable().call(request);
+ * for (Cluster element : response.getClustersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * Cluster response = hypercomputeClusterClient.getCluster(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the cluster to retrieve, in the format
+ * `projects/{project}/locations/{location}/clusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Cluster getCluster(ClusterName name) {
+ GetClusterRequest request =
+ GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getCluster(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+ * Cluster response = hypercomputeClusterClient.getCluster(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the cluster to retrieve, in the format
+ * `projects/{project}/locations/{location}/clusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Cluster getCluster(String name) {
+ GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build();
+ return getCluster(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * GetClusterRequest request =
+ * GetClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .build();
+ * Cluster response = hypercomputeClusterClient.getCluster(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 Cluster getCluster(GetClusterRequest request) {
+ return getClusterCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * GetClusterRequest request =
+ * GetClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.getClusterCallable().futureCall(request);
+ * // Do something.
+ * Cluster response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Cluster cluster = Cluster.newBuilder().build();
+ * String clusterId = "clusterId561939637";
+ * Cluster response =
+ * hypercomputeClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Parent location in which the cluster should be created, in the format
+ * `projects/{project}/locations/{location}`.
+ * @param cluster Required. Cluster to create.
+ * @param clusterId Required. ID of the cluster to create. Must conform to
+ * [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, alphanumeric, and at
+ * most 63 characters).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Cluster cluster = Cluster.newBuilder().build();
+ * String clusterId = "clusterId561939637";
+ * Cluster response =
+ * hypercomputeClusterClient.createClusterAsync(parent, cluster, clusterId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Parent location in which the cluster should be created, in the format
+ * `projects/{project}/locations/{location}`.
+ * @param cluster Required. Cluster to create.
+ * @param clusterId Required. ID of the cluster to create. Must conform to
+ * [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034) (lower-case, alphanumeric, and at
+ * most 63 characters).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Cluster response = hypercomputeClusterClient.createClusterAsync(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 OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * hypercomputeClusterClient.createClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * Cluster response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.createClusterCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * Cluster cluster = Cluster.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Cluster response = hypercomputeClusterClient.updateClusterAsync(cluster, updateMask).get();
+ * }
+ * }
+ *
+ * @param cluster Required. Cluster to update.
+ * @param updateMask Optional. Mask specifying which fields in the cluster to update. All paths
+ * must be specified explicitly - wildcards are not supported. At least one path must be
+ * provided.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * UpdateClusterRequest request =
+ * UpdateClusterRequest.newBuilder()
+ * .setCluster(Cluster.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Cluster response = hypercomputeClusterClient.updateClusterAsync(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 OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * UpdateClusterRequest request =
+ * UpdateClusterRequest.newBuilder()
+ * .setCluster(Cluster.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * hypercomputeClusterClient.updateClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * Cluster response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * UpdateClusterRequest request =
+ * UpdateClusterRequest.newBuilder()
+ * .setCluster(Cluster.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.updateClusterCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * hypercomputeClusterClient.deleteClusterAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the cluster to delete, in the format
+ * `projects/{project}/locations/{location}/clusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+ * hypercomputeClusterClient.deleteClusterAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the cluster to delete, in the format
+ * `projects/{project}/locations/{location}/clusters/{cluster}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * DeleteClusterRequest request =
+ * DeleteClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * hypercomputeClusterClient.deleteClusterAsync(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 OperationFutureSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * DeleteClusterRequest request =
+ * DeleteClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * hypercomputeClusterClient.deleteClusterOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * DeleteClusterRequest request =
+ * DeleteClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.deleteClusterCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : hypercomputeClusterClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * hypercomputeClusterClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = hypercomputeClusterClient.getLocation(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 Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a 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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * hypercomputeClusterClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getCluster: + * + *
{@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
+ * HypercomputeClusterSettings.Builder hypercomputeClusterSettingsBuilder =
+ * HypercomputeClusterSettings.newBuilder();
+ * hypercomputeClusterSettingsBuilder
+ * .getClusterSettings()
+ * .setRetrySettings(
+ * hypercomputeClusterSettingsBuilder
+ * .getClusterSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * HypercomputeClusterSettings hypercomputeClusterSettings =
+ * hypercomputeClusterSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createCluster: + * + *
{@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
+ * HypercomputeClusterSettings.Builder hypercomputeClusterSettingsBuilder =
+ * HypercomputeClusterSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * hypercomputeClusterSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class HypercomputeClusterSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= HypercomputeClusterClient =======================
+ *
+ * Service Description: Service describing handlers for resources
+ *
+ * Sample for HypercomputeClusterClient:
+ *
+ * This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcHypercomputeClusterCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcHypercomputeClusterStub extends HypercomputeClusterStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class HttpJsonHypercomputeClusterCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class HttpJsonHypercomputeClusterStub extends HypercomputeClusterStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(Empty.getDescriptor())
+ .add(OperationMetadata.getDescriptor())
+ .add(Cluster.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor{@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 (HypercomputeClusterClient hypercomputeClusterClient = HypercomputeClusterClient.create()) {
+ * ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ * Cluster response = hypercomputeClusterClient.getCluster(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.hypercomputecluster.v1beta;
+
+import javax.annotation.Generated;
diff --git a/java-hypercomputecluster/google-cloud-hypercomputecluster/src/main/java/com/google/cloud/hypercomputecluster/v1beta/stub/GrpcHypercomputeClusterCallableFactory.java b/java-hypercomputecluster/google-cloud-hypercomputecluster/src/main/java/com/google/cloud/hypercomputecluster/v1beta/stub/GrpcHypercomputeClusterCallableFactory.java
new file mode 100644
index 000000000000..25a5b98c3806
--- /dev/null
+++ b/java-hypercomputecluster/google-cloud-hypercomputecluster/src/main/java/com/google/cloud/hypercomputecluster/v1beta/stub/GrpcHypercomputeClusterCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2025 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.hypercomputecluster.v1beta.stub;
+
+import com.google.api.core.BetaApi;
+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 HypercomputeCluster service API.
+ *
+ *