Class DataScanServiceClient

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

    @Generated("by gapic-generator-java")
    public class DataScanServiceClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: DataScanService manages DataScan resources which can be configured to run various types of data scanning workload and generate enriched metadata (e.g. Data Profile, Data Quality) for the data source.

    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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
       DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
       DataScan response = dataScanServiceClient.getDataScan(name);
     }
     

    Note: close() needs to be called on the DataScanServiceClient 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 DataScanServiceSettings 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
     DataScanServiceSettings dataScanServiceSettings =
         DataScanServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     DataScanServiceClient dataScanServiceClient =
         DataScanServiceClient.create(dataScanServiceSettings);
     

    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
     DataScanServiceSettings dataScanServiceSettings =
         DataScanServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     DataScanServiceClient dataScanServiceClient =
         DataScanServiceClient.create(dataScanServiceSettings);
     

    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
     DataScanServiceSettings dataScanServiceSettings =
         DataScanServiceSettings.newHttpJsonBuilder().build();
     DataScanServiceClient dataScanServiceClient =
         DataScanServiceClient.create(dataScanServiceSettings);
     

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

    • Constructor Detail

      • DataScanServiceClient

        protected DataScanServiceClient​(DataScanServiceSettings settings)
                                 throws IOException
        Constructs an instance of DataScanServiceClient, 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

      • create

        public static final DataScanServiceClient create​(DataScanServiceStub stub)
        Constructs an instance of DataScanServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataScanServiceSettings).
      • 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.
      • createDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<DataScan,​OperationMetadata> createDataScanAsync​(LocationName parent,
                                                                                                                          DataScan dataScan,
                                                                                                                          String dataScanId)
        Creates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           DataScan dataScan = DataScan.newBuilder().build();
           String dataScanId = "dataScanId1260787906";
           DataScan response =
               dataScanServiceClient.createDataScanAsync(parent, dataScan, dataScanId).get();
         }
         
        Parameters:
        parent - Required. The resource name of the parent location: `projects/{project}/locations/{location_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        dataScan - Required. DataScan resource.
        dataScanId - Required. DataScan identifier.
        • Must contain only lowercase letters, numbers and hyphens.
        • Must start with a letter.
        • Must end with a number or a letter.
        • Must be between 1-63 characters.
        • Must be unique within the customer project / location.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<DataScan,​OperationMetadata> createDataScanAsync​(String parent,
                                                                                                                          DataScan dataScan,
                                                                                                                          String dataScanId)
        Creates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           DataScan dataScan = DataScan.newBuilder().build();
           String dataScanId = "dataScanId1260787906";
           DataScan response =
               dataScanServiceClient.createDataScanAsync(parent, dataScan, dataScanId).get();
         }
         
        Parameters:
        parent - Required. The resource name of the parent location: `projects/{project}/locations/{location_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        dataScan - Required. DataScan resource.
        dataScanId - Required. DataScan identifier.
        • Must contain only lowercase letters, numbers and hyphens.
        • Must start with a letter.
        • Must end with a number or a letter.
        • Must be between 1-63 characters.
        • Must be unique within the customer project / location.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<DataScan,​OperationMetadata> createDataScanAsync​(CreateDataScanRequest request)
        Creates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           CreateDataScanRequest request =
               CreateDataScanRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDataScan(DataScan.newBuilder().build())
                   .setDataScanId("dataScanId1260787906")
                   .setValidateOnly(true)
                   .build();
           DataScan response = dataScanServiceClient.createDataScanAsync(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
      • createDataScanOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateDataScanRequest,​DataScan,​OperationMetadata> createDataScanOperationCallable()
        Creates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           CreateDataScanRequest request =
               CreateDataScanRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDataScan(DataScan.newBuilder().build())
                   .setDataScanId("dataScanId1260787906")
                   .setValidateOnly(true)
                   .build();
           OperationFuture<DataScan, OperationMetadata> future =
               dataScanServiceClient.createDataScanOperationCallable().futureCall(request);
           // Do something.
           DataScan response = future.get();
         }
         
      • createDataScanCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateDataScanRequest,​com.google.longrunning.Operation> createDataScanCallable()
        Creates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           CreateDataScanRequest request =
               CreateDataScanRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDataScan(DataScan.newBuilder().build())
                   .setDataScanId("dataScanId1260787906")
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future =
               dataScanServiceClient.createDataScanCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • updateDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<DataScan,​OperationMetadata> updateDataScanAsync​(DataScan dataScan,
                                                                                                                          com.google.protobuf.FieldMask updateMask)
        Updates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScan dataScan = DataScan.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           DataScan response = dataScanServiceClient.updateDataScanAsync(dataScan, updateMask).get();
         }
         
        Parameters:
        dataScan - Required. DataScan resource to be updated.

        Only fields specified in `update_mask` are updated.

        updateMask - Required. Mask of fields to update.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<DataScan,​OperationMetadata> updateDataScanAsync​(UpdateDataScanRequest request)
        Updates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           UpdateDataScanRequest request =
               UpdateDataScanRequest.newBuilder()
                   .setDataScan(DataScan.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setValidateOnly(true)
                   .build();
           DataScan response = dataScanServiceClient.updateDataScanAsync(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
      • updateDataScanOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<UpdateDataScanRequest,​DataScan,​OperationMetadata> updateDataScanOperationCallable()
        Updates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           UpdateDataScanRequest request =
               UpdateDataScanRequest.newBuilder()
                   .setDataScan(DataScan.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setValidateOnly(true)
                   .build();
           OperationFuture<DataScan, OperationMetadata> future =
               dataScanServiceClient.updateDataScanOperationCallable().futureCall(request);
           // Do something.
           DataScan response = future.get();
         }
         
      • updateDataScanCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateDataScanRequest,​com.google.longrunning.Operation> updateDataScanCallable()
        Updates a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           UpdateDataScanRequest request =
               UpdateDataScanRequest.newBuilder()
                   .setDataScan(DataScan.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future =
               dataScanServiceClient.updateDataScanCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • deleteDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDataScanAsync​(DataScanName name)
        Deletes a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
           dataScanServiceClient.deleteDataScanAsync(name).get();
         }
         
        Parameters:
        name - Required. The resource name of the dataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDataScanAsync​(String name)
        Deletes a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
           dataScanServiceClient.deleteDataScanAsync(name).get();
         }
         
        Parameters:
        name - Required. The resource name of the dataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDataScanAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDataScanAsync​(DeleteDataScanRequest request)
        Deletes a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DeleteDataScanRequest request =
               DeleteDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           dataScanServiceClient.deleteDataScanAsync(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
      • deleteDataScanOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteDataScanRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteDataScanOperationCallable()
        Deletes a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DeleteDataScanRequest request =
               DeleteDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               dataScanServiceClient.deleteDataScanOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteDataScanCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteDataScanRequest,​com.google.longrunning.Operation> deleteDataScanCallable()
        Deletes a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DeleteDataScanRequest request =
               DeleteDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           ApiFuture<Operation> future =
               dataScanServiceClient.deleteDataScanCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • getDataScan

        public final DataScan getDataScan​(DataScanName name)
        Gets a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
           DataScan response = dataScanServiceClient.getDataScan(name);
         }
         
        Parameters:
        name - Required. The resource name of the dataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDataScan

        public final DataScan getDataScan​(String name)
        Gets a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
           DataScan response = dataScanServiceClient.getDataScan(name);
         }
         
        Parameters:
        name - Required. The resource name of the dataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDataScan

        public final DataScan getDataScan​(GetDataScanRequest request)
        Gets a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetDataScanRequest request =
               GetDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           DataScan response = dataScanServiceClient.getDataScan(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
      • getDataScanCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetDataScanRequest,​DataScan> getDataScanCallable()
        Gets a DataScan resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetDataScanRequest request =
               GetDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           ApiFuture<DataScan> future = dataScanServiceClient.getDataScanCallable().futureCall(request);
           // Do something.
           DataScan response = future.get();
         }
         
      • listDataScans

        public final DataScanServiceClient.ListDataScansPagedResponse listDataScans​(LocationName parent)
        Lists DataScans.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (DataScan element : dataScanServiceClient.listDataScans(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The resource name of the parent location: `projects/{project}/locations/{location_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDataScans

        public final DataScanServiceClient.ListDataScansPagedResponse listDataScans​(String parent)
        Lists DataScans.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (DataScan element : dataScanServiceClient.listDataScans(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The resource name of the parent location: `projects/{project}/locations/{location_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDataScans

        public final DataScanServiceClient.ListDataScansPagedResponse listDataScans​(ListDataScansRequest request)
        Lists DataScans.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScansRequest request =
               ListDataScansRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (DataScan element : dataScanServiceClient.listDataScans(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
      • listDataScansPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDataScansRequest,​DataScanServiceClient.ListDataScansPagedResponse> listDataScansPagedCallable()
        Lists DataScans.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScansRequest request =
               ListDataScansRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<DataScan> future =
               dataScanServiceClient.listDataScansPagedCallable().futureCall(request);
           // Do something.
           for (DataScan element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listDataScansCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDataScansRequest,​ListDataScansResponse> listDataScansCallable()
        Lists DataScans.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScansRequest request =
               ListDataScansRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListDataScansResponse response =
                 dataScanServiceClient.listDataScansCallable().call(request);
             for (DataScan element : response.getDataScansList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • runDataScan

        public final RunDataScanResponse runDataScan​(DataScanName name)
        Runs an on-demand execution of a DataScan

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
           RunDataScanResponse response = dataScanServiceClient.runDataScan(name);
         }
         
        Parameters:
        name - Required. The resource name of the DataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.

        Only **OnDemand** data scans are allowed.

        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • runDataScan

        public final RunDataScanResponse runDataScan​(String name)
        Runs an on-demand execution of a DataScan

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
           RunDataScanResponse response = dataScanServiceClient.runDataScan(name);
         }
         
        Parameters:
        name - Required. The resource name of the DataScan: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.

        Only **OnDemand** data scans are allowed.

        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • runDataScan

        public final RunDataScanResponse runDataScan​(RunDataScanRequest request)
        Runs an on-demand execution of a DataScan

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           RunDataScanRequest request =
               RunDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           RunDataScanResponse response = dataScanServiceClient.runDataScan(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
      • runDataScanCallable

        public final com.google.api.gax.rpc.UnaryCallable<RunDataScanRequest,​RunDataScanResponse> runDataScanCallable()
        Runs an on-demand execution of a DataScan

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           RunDataScanRequest request =
               RunDataScanRequest.newBuilder()
                   .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .build();
           ApiFuture<RunDataScanResponse> future =
               dataScanServiceClient.runDataScanCallable().futureCall(request);
           // Do something.
           RunDataScanResponse response = future.get();
         }
         
      • getDataScanJob

        public final DataScanJob getDataScanJob​(DataScanJobName name)
        Gets a DataScanJob resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScanJobName name = DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]");
           DataScanJob response = dataScanServiceClient.getDataScanJob(name);
         }
         
        Parameters:
        name - Required. The resource name of the DataScanJob: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDataScanJob

        public final DataScanJob getDataScanJob​(String name)
        Gets a DataScanJob resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String name = DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString();
           DataScanJob response = dataScanServiceClient.getDataScanJob(name);
         }
         
        Parameters:
        name - Required. The resource name of the DataScanJob: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDataScanJob

        public final DataScanJob getDataScanJob​(GetDataScanJobRequest request)
        Gets a DataScanJob resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetDataScanJobRequest request =
               GetDataScanJobRequest.newBuilder()
                   .setName(
                       DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString())
                   .build();
           DataScanJob response = dataScanServiceClient.getDataScanJob(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
      • getDataScanJobCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetDataScanJobRequest,​DataScanJob> getDataScanJobCallable()
        Gets a DataScanJob resource.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetDataScanJobRequest request =
               GetDataScanJobRequest.newBuilder()
                   .setName(
                       DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString())
                   .build();
           ApiFuture<DataScanJob> future =
               dataScanServiceClient.getDataScanJobCallable().futureCall(request);
           // Do something.
           DataScanJob response = future.get();
         }
         
      • listDataScanJobs

        public final DataScanServiceClient.ListDataScanJobsPagedResponse listDataScanJobs​(DataScanName parent)
        Lists DataScanJobs under the given DataScan.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           DataScanName parent = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
           for (DataScanJob element : dataScanServiceClient.listDataScanJobs(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The resource name of the parent environment: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDataScanJobs

        public final DataScanServiceClient.ListDataScanJobsPagedResponse listDataScanJobs​(String parent)
        Lists DataScanJobs under the given DataScan.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           String parent = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
           for (DataScanJob element : dataScanServiceClient.listDataScanJobs(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The resource name of the parent environment: `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` where `project` refers to a *project_id* or *project_number* and `location_id` refers to a GCP region.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDataScanJobs

        public final DataScanServiceClient.ListDataScanJobsPagedResponse listDataScanJobs​(ListDataScanJobsRequest request)
        Lists DataScanJobs under the given DataScan.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScanJobsRequest request =
               ListDataScanJobsRequest.newBuilder()
                   .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .build();
           for (DataScanJob element : dataScanServiceClient.listDataScanJobs(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
      • listDataScanJobsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDataScanJobsRequest,​DataScanServiceClient.ListDataScanJobsPagedResponse> listDataScanJobsPagedCallable()
        Lists DataScanJobs under the given DataScan.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScanJobsRequest request =
               ListDataScanJobsRequest.newBuilder()
                   .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .build();
           ApiFuture<DataScanJob> future =
               dataScanServiceClient.listDataScanJobsPagedCallable().futureCall(request);
           // Do something.
           for (DataScanJob element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listDataScanJobsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDataScanJobsRequest,​ListDataScanJobsResponse> listDataScanJobsCallable()
        Lists DataScanJobs under the given DataScan.

        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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListDataScanJobsRequest request =
               ListDataScanJobsRequest.newBuilder()
                   .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .build();
           while (true) {
             ListDataScanJobsResponse response =
                 dataScanServiceClient.listDataScanJobsCallable().call(request);
             for (DataScanJob element : response.getDataScanJobsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • listLocations

        public final DataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Location element : dataScanServiceClient.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,​DataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Location> future =
               dataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLocationsResponse response =
                 dataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           Location response = dataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Location> future = dataScanServiceClient.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