Class RapidMigrationAssessmentClient

java.lang.Object
com.google.cloud.rapidmigrationassessment.v1.RapidMigrationAssessmentClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class RapidMigrationAssessmentClient 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
     RapidMigrationAssessmentClient.create()) {
   AnnotationName name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]");
   Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
 }
 

Note: close() needs to be called on the RapidMigrationAssessmentClient 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

CreateCollector

Create a Collector to manage the on-prem appliance which collects information about Customer assets.

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

  • createCollectorAsync(CreateCollectorRequest request)

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

  • createCollectorAsync(LocationName parent, Collector collector, String collectorId)

  • createCollectorAsync(String parent, Collector collector, String collectorId)

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

  • createCollectorOperationCallable()

  • createCollectorCallable()

CreateAnnotation

Creates an Annotation

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

  • createAnnotationAsync(CreateAnnotationRequest request)

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

  • createAnnotationAsync(LocationName parent, Annotation annotation)

  • createAnnotationAsync(String parent, Annotation annotation)

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

  • createAnnotationOperationCallable()

  • createAnnotationCallable()

GetAnnotation

Gets details of a single Annotation.

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

  • getAnnotation(GetAnnotationRequest request)

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

  • getAnnotation(AnnotationName name)

  • getAnnotation(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.

  • getAnnotationCallable()

ListCollectors

Lists Collectors in a given project and location.

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

  • listCollectors(ListCollectorsRequest request)

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

  • listCollectors(LocationName parent)

  • listCollectors(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.

  • listCollectorsPagedCallable()

  • listCollectorsCallable()

GetCollector

Gets details of a single Collector.

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

  • getCollector(GetCollectorRequest request)

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

  • getCollector(CollectorName name)

  • getCollector(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.

  • getCollectorCallable()

UpdateCollector

Updates the parameters of a single Collector.

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

  • updateCollectorAsync(UpdateCollectorRequest request)

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

  • updateCollectorAsync(Collector collector, 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.

  • updateCollectorOperationCallable()

  • updateCollectorCallable()

DeleteCollector

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

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

  • deleteCollectorAsync(DeleteCollectorRequest request)

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

  • deleteCollectorAsync(CollectorName name)

  • deleteCollectorAsync(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.

  • deleteCollectorOperationCallable()

  • deleteCollectorCallable()

ResumeCollector

Resumes the given collector.

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

  • resumeCollectorAsync(ResumeCollectorRequest request)

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

  • resumeCollectorAsync(CollectorName name)

  • resumeCollectorAsync(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.

  • resumeCollectorOperationCallable()

  • resumeCollectorCallable()

RegisterCollector

Registers the given collector.

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

  • registerCollectorAsync(RegisterCollectorRequest request)

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

  • registerCollectorAsync(CollectorName name)

  • registerCollectorAsync(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.

  • registerCollectorOperationCallable()

  • registerCollectorCallable()

PauseCollector

Pauses the given collector.

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

  • pauseCollectorAsync(PauseCollectorRequest request)

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

  • pauseCollectorAsync(CollectorName name)

  • pauseCollectorAsync(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.

  • pauseCollectorOperationCallable()

  • pauseCollectorCallable()

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.

  • 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 RapidMigrationAssessmentSettings 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
 RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
     RapidMigrationAssessmentSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
     RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
 

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
 RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
     RapidMigrationAssessmentSettings.newBuilder().setEndpoint(myEndpoint).build();
 RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
     RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
 

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
 RapidMigrationAssessmentSettings rapidMigrationAssessmentSettings =
     RapidMigrationAssessmentSettings.newHttpJsonBuilder().build();
 RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
     RapidMigrationAssessmentClient.create(rapidMigrationAssessmentSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • RapidMigrationAssessmentClient

      protected RapidMigrationAssessmentClient(RapidMigrationAssessmentSettings settings) throws IOException
      Constructs an instance of RapidMigrationAssessmentClient, 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
    • RapidMigrationAssessmentClient

      protected RapidMigrationAssessmentClient(RapidMigrationAssessmentStub stub)
  • Method Details

    • create

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

      public static final RapidMigrationAssessmentClient create(RapidMigrationAssessmentSettings settings) throws IOException
      Constructs an instance of RapidMigrationAssessmentClient, 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

      Constructs an instance of RapidMigrationAssessmentClient, using the given stub for making calls. This is for advanced usage - prefer using create(RapidMigrationAssessmentSettings).
    • getSettings

      public final RapidMigrationAssessmentSettings getSettings()
    • getStub

      public RapidMigrationAssessmentStub 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.
    • createCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> createCollectorAsync(LocationName parent, Collector collector, String collectorId)
      Create a Collector to manage the on-prem appliance which collects information about Customer assets.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Collector collector = Collector.newBuilder().build();
         String collectorId = "collectorId1854072456";
         Collector response =
             rapidMigrationAssessmentClient.createCollectorAsync(parent, collector, collectorId).get();
       }
       
      Parameters:
      parent - Required. Name of the parent (project+location).
      collector - Required. The resource being created.
      collectorId - Required. Id of the requesting object.
      Throws:
      ApiException - if the remote call fails
    • createCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> createCollectorAsync(String parent, Collector collector, String collectorId)
      Create a Collector to manage the on-prem appliance which collects information about Customer assets.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Collector collector = Collector.newBuilder().build();
         String collectorId = "collectorId1854072456";
         Collector response =
             rapidMigrationAssessmentClient.createCollectorAsync(parent, collector, collectorId).get();
       }
       
      Parameters:
      parent - Required. Name of the parent (project+location).
      collector - Required. The resource being created.
      collectorId - Required. Id of the requesting object.
      Throws:
      ApiException - if the remote call fails
    • createCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> createCollectorAsync(CreateCollectorRequest request)
      Create a Collector to manage the on-prem appliance which collects information about Customer assets.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateCollectorRequest request =
             CreateCollectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCollectorId("collectorId1854072456")
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.createCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCollectorOperationCallable

      public final OperationCallable<CreateCollectorRequest,Collector,OperationMetadata> createCollectorOperationCallable()
      Create a Collector to manage the on-prem appliance which collects information about Customer assets.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateCollectorRequest request =
             CreateCollectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCollectorId("collectorId1854072456")
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.createCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • createCollectorCallable

      public final UnaryCallable<CreateCollectorRequest,Operation> createCollectorCallable()
      Create a Collector to manage the on-prem appliance which collects information about Customer assets.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateCollectorRequest request =
             CreateCollectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCollectorId("collectorId1854072456")
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.createCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createAnnotationAsync

      public final OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(LocationName parent, Annotation annotation)
      Creates an Annotation

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Annotation annotation = Annotation.newBuilder().build();
         Annotation response =
             rapidMigrationAssessmentClient.createAnnotationAsync(parent, annotation).get();
       }
       
      Parameters:
      parent - Required. Name of the parent (project+location).
      annotation - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createAnnotationAsync

      public final OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(String parent, Annotation annotation)
      Creates an Annotation

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Annotation annotation = Annotation.newBuilder().build();
         Annotation response =
             rapidMigrationAssessmentClient.createAnnotationAsync(parent, annotation).get();
       }
       
      Parameters:
      parent - Required. Name of the parent (project+location).
      annotation - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createAnnotationAsync

      public final OperationFuture<Annotation,OperationMetadata> createAnnotationAsync(CreateAnnotationRequest request)
      Creates an Annotation

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateAnnotationRequest request =
             CreateAnnotationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAnnotation(Annotation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Annotation response = rapidMigrationAssessmentClient.createAnnotationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createAnnotationOperationCallable

      public final OperationCallable<CreateAnnotationRequest,Annotation,OperationMetadata> createAnnotationOperationCallable()
      Creates an Annotation

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateAnnotationRequest request =
             CreateAnnotationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAnnotation(Annotation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Annotation, OperationMetadata> future =
             rapidMigrationAssessmentClient.createAnnotationOperationCallable().futureCall(request);
         // Do something.
         Annotation response = future.get();
       }
       
    • createAnnotationCallable

      public final UnaryCallable<CreateAnnotationRequest,Operation> createAnnotationCallable()
      Creates an Annotation

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CreateAnnotationRequest request =
             CreateAnnotationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAnnotation(Annotation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.createAnnotationCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getAnnotation

      public final Annotation getAnnotation(AnnotationName name)
      Gets details of a single Annotation.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         AnnotationName name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]");
         Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getAnnotation

      public final Annotation getAnnotation(String name)
      Gets details of a single Annotation.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString();
         Annotation response = rapidMigrationAssessmentClient.getAnnotation(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getAnnotation

      public final Annotation getAnnotation(GetAnnotationRequest request)
      Gets details of a single Annotation.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetAnnotationRequest request =
             GetAnnotationRequest.newBuilder()
                 .setName(AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString())
                 .build();
         Annotation response = rapidMigrationAssessmentClient.getAnnotation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getAnnotationCallable

      public final UnaryCallable<GetAnnotationRequest,Annotation> getAnnotationCallable()
      Gets details of a single Annotation.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetAnnotationRequest request =
             GetAnnotationRequest.newBuilder()
                 .setName(AnnotationName.of("[PROJECT]", "[LOCATION]", "[ANNOTATION]").toString())
                 .build();
         ApiFuture<Annotation> future =
             rapidMigrationAssessmentClient.getAnnotationCallable().futureCall(request);
         // Do something.
         Annotation response = future.get();
       }
       
    • listCollectors

      Lists Collectors 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Collector element : rapidMigrationAssessmentClient.listCollectors(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListCollectorsRequest.
      Throws:
      ApiException - if the remote call fails
    • listCollectors

      Lists Collectors 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Collector element : rapidMigrationAssessmentClient.listCollectors(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListCollectorsRequest.
      Throws:
      ApiException - if the remote call fails
    • listCollectors

      Lists Collectors 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListCollectorsRequest request =
             ListCollectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Collector element :
             rapidMigrationAssessmentClient.listCollectors(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
    • listCollectorsPagedCallable

      Lists Collectors 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListCollectorsRequest request =
             ListCollectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Collector> future =
             rapidMigrationAssessmentClient.listCollectorsPagedCallable().futureCall(request);
         // Do something.
         for (Collector element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCollectorsCallable

      public final UnaryCallable<ListCollectorsRequest,ListCollectorsResponse> listCollectorsCallable()
      Lists Collectors 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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListCollectorsRequest request =
             ListCollectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListCollectorsResponse response =
               rapidMigrationAssessmentClient.listCollectorsCallable().call(request);
           for (Collector element : response.getCollectorsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getCollector

      public final Collector getCollector(CollectorName name)
      Gets details of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
         Collector response = rapidMigrationAssessmentClient.getCollector(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getCollector

      public final Collector getCollector(String name)
      Gets details of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
         Collector response = rapidMigrationAssessmentClient.getCollector(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getCollector

      public final Collector getCollector(GetCollectorRequest request)
      Gets details of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetCollectorRequest request =
             GetCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .build();
         Collector response = rapidMigrationAssessmentClient.getCollector(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCollectorCallable

      public final UnaryCallable<GetCollectorRequest,Collector> getCollectorCallable()
      Gets details of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetCollectorRequest request =
             GetCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .build();
         ApiFuture<Collector> future =
             rapidMigrationAssessmentClient.getCollectorCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • updateCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> updateCollectorAsync(Collector collector, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         Collector collector = Collector.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Collector response =
             rapidMigrationAssessmentClient.updateCollectorAsync(collector, updateMask).get();
       }
       
      Parameters:
      collector - Required. The resource being updated.
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the Collector resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> updateCollectorAsync(UpdateCollectorRequest request)
      Updates the parameters of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         UpdateCollectorRequest request =
             UpdateCollectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.updateCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCollectorOperationCallable

      public final OperationCallable<UpdateCollectorRequest,Collector,OperationMetadata> updateCollectorOperationCallable()
      Updates the parameters of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         UpdateCollectorRequest request =
             UpdateCollectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.updateCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • updateCollectorCallable

      public final UnaryCallable<UpdateCollectorRequest,Operation> updateCollectorCallable()
      Updates the parameters of a single Collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         UpdateCollectorRequest request =
             UpdateCollectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setCollector(Collector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.updateCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(CollectorName name)
      Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
         Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(String name)
      Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
         Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(DeleteCollectorRequest request)
      Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         DeleteCollectorRequest request =
             DeleteCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.deleteCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCollectorOperationCallable

      public final OperationCallable<DeleteCollectorRequest,Collector,OperationMetadata> deleteCollectorOperationCallable()
      Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         DeleteCollectorRequest request =
             DeleteCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.deleteCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • deleteCollectorCallable

      public final UnaryCallable<DeleteCollectorRequest,Operation> deleteCollectorCallable()
      Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion through producer API.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         DeleteCollectorRequest request =
             DeleteCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.deleteCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • resumeCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(CollectorName name)
      Resumes the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
         Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • resumeCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(String name)
      Resumes the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
         Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • resumeCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> resumeCollectorAsync(ResumeCollectorRequest request)
      Resumes the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ResumeCollectorRequest request =
             ResumeCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.resumeCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • resumeCollectorOperationCallable

      public final OperationCallable<ResumeCollectorRequest,Collector,OperationMetadata> resumeCollectorOperationCallable()
      Resumes the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ResumeCollectorRequest request =
             ResumeCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.resumeCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • resumeCollectorCallable

      public final UnaryCallable<ResumeCollectorRequest,Operation> resumeCollectorCallable()
      Resumes the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ResumeCollectorRequest request =
             ResumeCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.resumeCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • registerCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> registerCollectorAsync(CollectorName name)
      Registers the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
         Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • registerCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> registerCollectorAsync(String name)
      Registers the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
         Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • registerCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> registerCollectorAsync(RegisterCollectorRequest request)
      Registers the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         RegisterCollectorRequest request =
             RegisterCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.registerCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • registerCollectorOperationCallable

      public final OperationCallable<RegisterCollectorRequest,Collector,OperationMetadata> registerCollectorOperationCallable()
      Registers the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         RegisterCollectorRequest request =
             RegisterCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.registerCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • registerCollectorCallable

      public final UnaryCallable<RegisterCollectorRequest,Operation> registerCollectorCallable()
      Registers the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         RegisterCollectorRequest request =
             RegisterCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.registerCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • pauseCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(CollectorName name)
      Pauses the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         CollectorName name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]");
         Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • pauseCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(String name)
      Pauses the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         String name = CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString();
         Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • pauseCollectorAsync

      public final OperationFuture<Collector,OperationMetadata> pauseCollectorAsync(PauseCollectorRequest request)
      Pauses the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         PauseCollectorRequest request =
             PauseCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         Collector response = rapidMigrationAssessmentClient.pauseCollectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • pauseCollectorOperationCallable

      public final OperationCallable<PauseCollectorRequest,Collector,OperationMetadata> pauseCollectorOperationCallable()
      Pauses the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         PauseCollectorRequest request =
             PauseCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Collector, OperationMetadata> future =
             rapidMigrationAssessmentClient.pauseCollectorOperationCallable().futureCall(request);
         // Do something.
         Collector response = future.get();
       }
       
    • pauseCollectorCallable

      public final UnaryCallable<PauseCollectorRequest,Operation> pauseCollectorCallable()
      Pauses the given collector.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         PauseCollectorRequest request =
             PauseCollectorRequest.newBuilder()
                 .setName(CollectorName.of("[PROJECT]", "[LOCATION]", "[COLLECTOR]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             rapidMigrationAssessmentClient.pauseCollectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : rapidMigrationAssessmentClient.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.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             rapidMigrationAssessmentClient.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.

      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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               rapidMigrationAssessmentClient.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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = rapidMigrationAssessmentClient.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 (RapidMigrationAssessmentClient rapidMigrationAssessmentClient =
           RapidMigrationAssessmentClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             rapidMigrationAssessmentClient.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