Class RapidMigrationAssessmentClient (0.30.0)

GitHub RepositoryProduct Reference

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

Inheritance

java.lang.Object > RapidMigrationAssessmentClient

Static Methods

create()

public static final RapidMigrationAssessmentClient create()

Constructs an instance of RapidMigrationAssessmentClient with default settings.

Returns
Type Description
RapidMigrationAssessmentClient
Exceptions
Type Description
IOException

create(RapidMigrationAssessmentSettings settings)

public static final RapidMigrationAssessmentClient create(RapidMigrationAssessmentSettings settings)

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.

Parameter
Name Description
settings RapidMigrationAssessmentSettings
Returns
Type Description
RapidMigrationAssessmentClient
Exceptions
Type Description
IOException

create(RapidMigrationAssessmentStub stub)

public static final RapidMigrationAssessmentClient create(RapidMigrationAssessmentStub stub)

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

Parameter
Name Description
stub RapidMigrationAssessmentStub
Returns
Type Description
RapidMigrationAssessmentClient

Constructors

RapidMigrationAssessmentClient(RapidMigrationAssessmentSettings settings)

protected RapidMigrationAssessmentClient(RapidMigrationAssessmentSettings settings)

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.

Parameter
Name Description
settings RapidMigrationAssessmentSettings

RapidMigrationAssessmentClient(RapidMigrationAssessmentStub stub)

protected RapidMigrationAssessmentClient(RapidMigrationAssessmentStub stub)
Parameter
Name Description
stub RapidMigrationAssessmentStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createAnnotationAsync(CreateAnnotationRequest request)

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();
 }
 
Parameter
Name Description
request CreateAnnotationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Annotation,OperationMetadata>

createAnnotationAsync(LocationName parent, Annotation annotation)

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
Name Description
parent LocationName

Required. Name of the parent (project+location).

annotation Annotation

Required. The resource being created.

Returns
Type Description
OperationFuture<Annotation,OperationMetadata>

createAnnotationAsync(String parent, Annotation annotation)

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
Name Description
parent String

Required. Name of the parent (project+location).

annotation Annotation

Required. The resource being created.

Returns
Type Description
OperationFuture<Annotation,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateAnnotationRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateAnnotationRequest,Annotation,OperationMetadata>

createCollectorAsync(CreateCollectorRequest request)

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();
 }
 
Parameter
Name Description
request CreateCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

createCollectorAsync(LocationName parent, Collector collector, String collectorId)

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
Name Description
parent LocationName

Required. Name of the parent (project+location).

collector Collector

Required. The resource being created.

collectorId String

Required. Id of the requesting object.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

createCollectorAsync(String parent, Collector collector, String collectorId)

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
Name Description
parent String

Required. Name of the parent (project+location).

collector Collector

Required. The resource being created.

collectorId String

Required. Id of the requesting object.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateCollectorRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateCollectorRequest,Collector,OperationMetadata>

deleteCollectorAsync(CollectorName name)

public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(CollectorName name)

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh 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();
 }
 
Parameter
Name Description
name CollectorName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

deleteCollectorAsync(DeleteCollectorRequest request)

public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(DeleteCollectorRequest request)

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh 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();
 }
 
Parameter
Name Description
request DeleteCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

deleteCollectorAsync(String name)

public final OperationFuture<Collector,OperationMetadata> deleteCollectorAsync(String name)

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh 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();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

deleteCollectorCallable()

public final UnaryCallable<DeleteCollectorRequest,Operation> deleteCollectorCallable()

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh 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();
 }
 
Returns
Type Description
UnaryCallable<DeleteCollectorRequest,Operation>

deleteCollectorOperationCallable()

public final OperationCallable<DeleteCollectorRequest,Collector,OperationMetadata> deleteCollectorOperationCallable()

Deletes a single Collector - changes state of collector to "Deleting". Background jobs does final deletion thorugh 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();
 }
 
Returns
Type Description
OperationCallable<DeleteCollectorRequest,Collector,OperationMetadata>

getAnnotation(AnnotationName name)

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);
 }
 
Parameter
Name Description
name AnnotationName

Required. Name of the resource.

Returns
Type Description
Annotation

getAnnotation(GetAnnotationRequest request)

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);
 }
 
Parameter
Name Description
request GetAnnotationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Annotation

getAnnotation(String name)

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);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
Annotation

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();
 }
 
Returns
Type Description
UnaryCallable<GetAnnotationRequest,Annotation>

getCollector(CollectorName name)

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);
 }
 
Parameter
Name Description
name CollectorName

Required. Name of the resource.

Returns
Type Description
Collector

getCollector(GetCollectorRequest request)

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);
 }
 
Parameter
Name Description
request GetCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Collector

getCollector(String name)

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);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
Collector

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();
 }
 
Returns
Type Description
UnaryCallable<GetCollectorRequest,Collector>

getHttpJsonOperationsClient()

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.

Returns
Type Description
OperationsClient

getLocation(GetLocationRequest request)

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);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

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.

Returns
Type Description
OperationsClient

getSettings()

public final RapidMigrationAssessmentSettings getSettings()
Returns
Type Description
RapidMigrationAssessmentSettings

getStub()

public RapidMigrationAssessmentStub getStub()
Returns
Type Description
RapidMigrationAssessmentStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listCollectors(ListCollectorsRequest request)

public final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(ListCollectorsRequest request)

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);
   }
 }
 
Parameter
Name Description
request ListCollectorsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RapidMigrationAssessmentClient.ListCollectorsPagedResponse

listCollectors(LocationName parent)

public final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(LocationName parent)

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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent value for ListCollectorsRequest.

Returns
Type Description
RapidMigrationAssessmentClient.ListCollectorsPagedResponse

listCollectors(String parent)

public final RapidMigrationAssessmentClient.ListCollectorsPagedResponse listCollectors(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent value for ListCollectorsRequest.

Returns
Type Description
RapidMigrationAssessmentClient.ListCollectorsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListCollectorsRequest,ListCollectorsResponse>

listCollectorsPagedCallable()

public final UnaryCallable<ListCollectorsRequest,RapidMigrationAssessmentClient.ListCollectorsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListCollectorsRequest,ListCollectorsPagedResponse>

listLocations(ListLocationsRequest request)

public final RapidMigrationAssessmentClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

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);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RapidMigrationAssessmentClient.ListLocationsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,RapidMigrationAssessmentClient.ListLocationsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

pauseCollectorAsync(CollectorName name)

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();
 }
 
Parameter
Name Description
name CollectorName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

pauseCollectorAsync(PauseCollectorRequest request)

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();
 }
 
Parameter
Name Description
request PauseCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

pauseCollectorAsync(String name)

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();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<PauseCollectorRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<PauseCollectorRequest,Collector,OperationMetadata>

registerCollectorAsync(CollectorName name)

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();
 }
 
Parameter
Name Description
name CollectorName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

registerCollectorAsync(RegisterCollectorRequest request)

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();
 }
 
Parameter
Name Description
request RegisterCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

registerCollectorAsync(String name)

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();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<RegisterCollectorRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<RegisterCollectorRequest,Collector,OperationMetadata>

resumeCollectorAsync(CollectorName name)

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();
 }
 
Parameter
Name Description
name CollectorName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

resumeCollectorAsync(ResumeCollectorRequest request)

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();
 }
 
Parameter
Name Description
request ResumeCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

resumeCollectorAsync(String name)

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();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<ResumeCollectorRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<ResumeCollectorRequest,Collector,OperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateCollectorAsync(Collector collector, FieldMask updateMask)

public final OperationFuture<Collector,OperationMetadata> updateCollectorAsync(Collector collector, 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
Name Description
collector Collector

Required. The resource being updated.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

updateCollectorAsync(UpdateCollectorRequest request)

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();
 }
 
Parameter
Name Description
request UpdateCollectorRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Collector,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateCollectorRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateCollectorRequest,Collector,OperationMetadata>