Class RapidMigrationAssessmentClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class RapidMigrationAssessmentClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: Rapid Migration Assessment service

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

    The surface of this class includes several types of Java methods for each of the API's methods:

    1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
    2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
    3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

    See the individual methods for example code.

    Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

    This class can be customized by passing in a custom instance of 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 Detail

      • 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
    • Method Detail

      • getOperationsClient

        public final com.google.longrunning.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 com.google.api.gax.httpjson.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createCollectorOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<CreateCollectorRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createAnnotationAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createAnnotationAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createAnnotationOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<CreateAnnotationRequest,​com.google.longrunning.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getAnnotationCallable

        public final com.google.api.gax.rpc.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

        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);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListCollectorsRequest.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listCollectors

        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);
           }
         }
         
        Parameters:
        parent - Required. Parent value for ListCollectorsRequest.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listCollectors

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listCollectorsPagedCallable

        public final com.google.api.gax.rpc.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);
           }
         }
         
      • listCollectorsCallable

        public final com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getCollectorCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateCollectorOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<UpdateCollectorRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.OperationFuture<Collector,​OperationMetadata> deleteCollectorAsync​(CollectorName name)
        Deletes a single Collector - changes state of collector to "Deleting".

        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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteCollectorAsync

        public final com.google.api.gax.longrunning.OperationFuture<Collector,​OperationMetadata> deleteCollectorAsync​(String name)
        Deletes a single Collector - changes state of collector to "Deleting".

        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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteCollectorAsync

        public final com.google.api.gax.longrunning.OperationFuture<Collector,​OperationMetadata> deleteCollectorAsync​(DeleteCollectorRequest request)
        Deletes a single Collector - changes state of collector to "Deleting".

        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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteCollectorOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteCollectorRequest,​Collector,​OperationMetadata> deleteCollectorOperationCallable()
        Deletes a single Collector - changes state of collector to "Deleting".

        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 com.google.api.gax.rpc.UnaryCallable<DeleteCollectorRequest,​com.google.longrunning.Operation> deleteCollectorCallable()
        Deletes a single Collector - changes state of collector to "Deleting".

        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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • resumeCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • resumeCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • resumeCollectorOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<ResumeCollectorRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • registerCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • registerCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • registerCollectorOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<RegisterCollectorRequest,​com.google.longrunning.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 com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • pauseCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • pauseCollectorAsync

        public final com.google.api.gax.longrunning.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • pauseCollectorOperationCallable

        public final com.google.api.gax.rpc.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 com.google.api.gax.rpc.UnaryCallable<PauseCollectorRequest,​com.google.longrunning.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

        public final RapidMigrationAssessmentClient.ListLocationsPagedResponse listLocations​(com.google.cloud.location.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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listLocationsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.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);
           }
         }
         
      • listLocationsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​com.google.cloud.location.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 com.google.cloud.location.Location getLocation​(com.google.cloud.location.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:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getLocationCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,​com.google.cloud.location.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();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource