Class HypercomputeClusterClient

java.lang.Object
com.google.cloud.hypercomputecluster.v1.HypercomputeClusterClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class HypercomputeClusterClient extends Object implements BackgroundResource
Service Description: Service describing handlers for resources

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:


 // 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().

Methods
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.

  • listClusters(ListClustersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listClusters(LocationName parent)

  • listClusters(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listClustersPagedCallable()

  • listClustersCallable()

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.

  • getCluster(GetClusterRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCluster(ClusterName name)

  • getCluster(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getClusterCallable()

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.

  • createClusterAsync(CreateClusterRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId)

  • createClusterAsync(String parent, Cluster cluster, String clusterId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createClusterOperationCallable()

  • createClusterCallable()

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.

  • updateClusterAsync(UpdateClusterRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateClusterAsync(Cluster cluster, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateClusterOperationCallable()

  • updateClusterCallable()

DeleteCluster

Deletes a single Cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteClusterAsync(DeleteClusterRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteClusterAsync(ClusterName name)

  • deleteClusterAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteClusterOperationCallable()

  • deleteClusterCallable()

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways:

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

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:


 // 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:


 // 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:


 // 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.

  • Constructor Details

    • HypercomputeClusterClient

      protected HypercomputeClusterClient(HypercomputeClusterSettings settings) throws IOException
      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.
      Throws:
      IOException
    • HypercomputeClusterClient

      protected HypercomputeClusterClient(HypercomputeClusterStub stub)
  • Method Details

    • create

      public static final HypercomputeClusterClient create() throws IOException
      Constructs an instance of HypercomputeClusterClient with default settings.
      Throws:
      IOException
    • create

      public static final HypercomputeClusterClient create(HypercomputeClusterSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      public static final HypercomputeClusterClient create(HypercomputeClusterStub stub)
      Constructs an instance of HypercomputeClusterClient, using the given stub for making calls. This is for advanced usage - prefer using create(HypercomputeClusterSettings).
    • getSettings

      public final HypercomputeClusterSettings getSettings()
    • getStub

      public HypercomputeClusterStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listClusters

      Lists Clusters in a given project and location.

      Sample 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);
         }
       }
       
      Parameters:
      parent - Required. Parent location of the clusters to list, in the format `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listClusters

      public final HypercomputeClusterClient.ListClustersPagedResponse listClusters(String parent)
      Lists Clusters in a given project and location.

      Sample 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);
         }
       }
       
      Parameters:
      parent - Required. Parent location of the clusters to list, in the format `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listClusters

      Lists Clusters in a given project and location.

      Sample 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listClustersPagedCallable

      Lists Clusters in a given project and location.

      Sample 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<Cluster> future =
             hypercomputeClusterClient.listClustersPagedCallable().futureCall(request);
         // Do something.
         for (Cluster element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listClustersCallable

      public final UnaryCallable<ListClustersRequest,ListClustersResponse> listClustersCallable()
      Lists Clusters in a given project and location.

      Sample 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;
           }
         }
       }
       
    • getCluster

      public final Cluster getCluster(ClusterName name)
      Gets details of a single Cluster.

      Sample 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);
       }
       
      Parameters:
      name - Required. Name of the cluster to retrieve, in the format `projects/{project}/locations/{location}/clusters/{cluster}`.
      Throws:
      ApiException - if the remote call fails
    • getCluster

      public final Cluster getCluster(String name)
      Gets details of a single Cluster.

      Sample 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);
       }
       
      Parameters:
      name - Required. Name of the cluster to retrieve, in the format `projects/{project}/locations/{location}/clusters/{cluster}`.
      Throws:
      ApiException - if the remote call fails
    • getCluster

      public final Cluster getCluster(GetClusterRequest request)
      Gets details of a single Cluster.

      Sample 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getClusterCallable

      public final UnaryCallable<GetClusterRequest,Cluster> getClusterCallable()
      Gets details of a single Cluster.

      Sample 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<Cluster> future =
             hypercomputeClusterClient.getClusterCallable().futureCall(request);
         // Do something.
         Cluster response = future.get();
       }
       
    • createClusterAsync

      public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(LocationName parent, Cluster cluster, String clusterId)
      Creates a new Cluster in a given project and location.

      Sample 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();
       }
       
      Parameters:
      parent - Required. Parent location in which the cluster should be created, in the format `projects/{project}/locations/{location}`.
      cluster - Required. Cluster to create.
      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:
      ApiException - if the remote call fails
    • createClusterAsync

      public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(String parent, Cluster cluster, String clusterId)
      Creates a new Cluster in a given project and location.

      Sample 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();
       }
       
      Parameters:
      parent - Required. Parent location in which the cluster should be created, in the format `projects/{project}/locations/{location}`.
      cluster - Required. Cluster to create.
      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:
      ApiException - if the remote call fails
    • createClusterAsync

      public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(CreateClusterRequest request)
      Creates a new Cluster in a given project and location.

      Sample 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createClusterOperationCallable

      public final OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> createClusterOperationCallable()
      Creates a new Cluster in a given project and location.

      Sample 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<Cluster, OperationMetadata> future =
             hypercomputeClusterClient.createClusterOperationCallable().futureCall(request);
         // Do something.
         Cluster response = future.get();
       }
       
    • createClusterCallable

      public final UnaryCallable<CreateClusterRequest,Operation> createClusterCallable()
      Creates a new Cluster in a given project and location.

      Sample 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<Operation> future =
             hypercomputeClusterClient.createClusterCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateClusterAsync

      public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(Cluster cluster, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single Cluster.

      Sample 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();
       }
       
      Parameters:
      cluster - Required. Cluster to update.
      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:
      ApiException - if the remote call fails
    • updateClusterAsync

      public final OperationFuture<Cluster,OperationMetadata> updateClusterAsync(UpdateClusterRequest request)
      Updates the parameters of a single Cluster.

      Sample 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateClusterOperationCallable

      public final OperationCallable<UpdateClusterRequest,Cluster,OperationMetadata> updateClusterOperationCallable()
      Updates the parameters of a single Cluster.

      Sample 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<Cluster, OperationMetadata> future =
             hypercomputeClusterClient.updateClusterOperationCallable().futureCall(request);
         // Do something.
         Cluster response = future.get();
       }
       
    • updateClusterCallable

      public final UnaryCallable<UpdateClusterRequest,Operation> updateClusterCallable()
      Updates the parameters of a single Cluster.

      Sample 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<Operation> future =
             hypercomputeClusterClient.updateClusterCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(ClusterName name)
      Deletes a single Cluster.

      Sample 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();
       }
       
      Parameters:
      name - Required. Name of the cluster to delete, in the format `projects/{project}/locations/{location}/clusters/{cluster}`.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(String name)
      Deletes a single Cluster.

      Sample 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();
       }
       
      Parameters:
      name - Required. Name of the cluster to delete, in the format `projects/{project}/locations/{location}/clusters/{cluster}`.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request)
      Deletes a single Cluster.

      Sample 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterOperationCallable

      public final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty,OperationMetadata> deleteClusterOperationCallable()
      Deletes a single Cluster.

      Sample 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<Empty, OperationMetadata> future =
             hypercomputeClusterClient.deleteClusterOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteClusterCallable

      public final UnaryCallable<DeleteClusterRequest,Operation> deleteClusterCallable()
      Deletes a single Cluster.

      Sample 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<Operation> future =
             hypercomputeClusterClient.deleteClusterCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      Sample 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      Sample 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<Location> future =
             hypercomputeClusterClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      Sample 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;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample 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<Location> future =
             hypercomputeClusterClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException