Class DataAgentServiceClient

java.lang.Object
com.google.cloud.geminidataanalytics.v1beta.DataAgentServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

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

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
   DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
   DataAgent response = dataAgentServiceClient.getDataAgent(name);
 }
 

Note: close() needs to be called on the DataAgentServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListDataAgents

Lists DataAgents in a given project and location.

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

  • listDataAgents(ListDataAgentsRequest request)

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

  • listDataAgents(LocationName parent)

  • listDataAgents(String parent)

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

  • listDataAgentsPagedCallable()

  • listDataAgentsCallable()

ListAccessibleDataAgents

Lists DataAgents that are accessible to the caller in a given project and location.

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

  • listAccessibleDataAgents(ListAccessibleDataAgentsRequest request)

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

  • listAccessibleDataAgents(LocationName parent)

  • listAccessibleDataAgents(String parent)

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

  • listAccessibleDataAgentsPagedCallable()

  • listAccessibleDataAgentsCallable()

GetDataAgent

Gets details of a single DataAgent.

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

  • getDataAgent(GetDataAgentRequest request)

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

  • getDataAgent(DataAgentName name)

  • getDataAgent(String name)

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

  • getDataAgentCallable()

CreateDataAgent

Creates a new DataAgent in a given project and location.

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

  • createDataAgentAsync(CreateDataAgentRequest request)

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

  • createDataAgentAsync(LocationName parent, DataAgent dataAgent, String dataAgentId)

  • createDataAgentAsync(String parent, DataAgent dataAgent, String dataAgentId)

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

  • createDataAgentOperationCallable()

  • createDataAgentCallable()

CreateDataAgentSync

Creates a new DataAgent in a given project and location synchronously.

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

  • createDataAgentSync(CreateDataAgentRequest request)

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

  • createDataAgentSync(LocationName parent, DataAgent dataAgent, String dataAgentId)

  • createDataAgentSync(String parent, DataAgent dataAgent, String dataAgentId)

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

  • createDataAgentSyncCallable()

UpdateDataAgent

Updates the parameters of a single DataAgent.

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

  • updateDataAgentAsync(UpdateDataAgentRequest request)

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

  • updateDataAgentAsync(DataAgent dataAgent, FieldMask updateMask)

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

  • updateDataAgentOperationCallable()

  • updateDataAgentCallable()

UpdateDataAgentSync

Updates the parameters of a single DataAgent synchronously.

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

  • updateDataAgentSync(UpdateDataAgentRequest request)

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

  • updateDataAgentSync(DataAgent dataAgent, FieldMask updateMask)

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

  • updateDataAgentSyncCallable()

DeleteDataAgent

Deletes a single DataAgent.

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

  • deleteDataAgentAsync(DeleteDataAgentRequest request)

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

  • deleteDataAgentAsync(DataAgentName name)

  • deleteDataAgentAsync(String name)

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

  • deleteDataAgentOperationCallable()

  • deleteDataAgentCallable()

DeleteDataAgentSync

Deletes a single DataAgent synchronously.

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

  • deleteDataAgentSync(DeleteDataAgentRequest request)

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

  • deleteDataAgentSync(DataAgentName name)

  • deleteDataAgentSync(String name)

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

  • deleteDataAgentSyncCallable()

GetIamPolicy

Gets the IAM policy for DataAgent

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

  • getIamPolicy(GetIamPolicyRequest request)

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

  • getIamPolicy(ResourceName resource)

  • getIamPolicy(String resource)

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

  • getIamPolicyCallable()

SetIamPolicy

Sets the IAM policy for a DataAgent.

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

  • setIamPolicy(SetIamPolicyRequest request)

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

  • setIamPolicy(ResourceName resource)

  • setIamPolicy(String resource)

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

  • setIamPolicyCallable()

ListLocations

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

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

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

See the individual methods for example code.

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

This class can be customized by passing in a custom instance of DataAgentServiceSettings 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
 DataAgentServiceSettings dataAgentServiceSettings =
     DataAgentServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DataAgentServiceClient dataAgentServiceClient =
     DataAgentServiceClient.create(dataAgentServiceSettings);
 

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
 DataAgentServiceSettings dataAgentServiceSettings =
     DataAgentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DataAgentServiceClient dataAgentServiceClient =
     DataAgentServiceClient.create(dataAgentServiceSettings);
 

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
 DataAgentServiceSettings dataAgentServiceSettings =
     DataAgentServiceSettings.newHttpJsonBuilder().build();
 DataAgentServiceClient dataAgentServiceClient =
     DataAgentServiceClient.create(dataAgentServiceSettings);
 

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

  • Constructor Details

    • DataAgentServiceClient

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

      protected DataAgentServiceClient(DataAgentServiceStub stub)
  • Method Details

    • create

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

      public static final DataAgentServiceClient create(DataAgentServiceSettings settings) throws IOException
      Constructs an instance of DataAgentServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

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

      public final DataAgentServiceSettings getSettings()
    • getStub

      public DataAgentServiceStub getStub()
    • getOperationsClient

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

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

      Lists DataAgents 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListDataAgentsRequest.
      Throws:
      ApiException - if the remote call fails
    • listDataAgents

      public final DataAgentServiceClient.ListDataAgentsPagedResponse listDataAgents(String parent)
      Lists DataAgents 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListDataAgentsRequest.
      Throws:
      ApiException - if the remote call fails
    • listDataAgents

      Lists DataAgents 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListDataAgentsRequest request =
             ListDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         for (DataAgent element : dataAgentServiceClient.listDataAgents(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDataAgentsPagedCallable

      Lists DataAgents 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListDataAgentsRequest request =
             ListDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         ApiFuture<DataAgent> future =
             dataAgentServiceClient.listDataAgentsPagedCallable().futureCall(request);
         // Do something.
         for (DataAgent element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDataAgentsCallable

      public final UnaryCallable<ListDataAgentsRequest,ListDataAgentsResponse> listDataAgentsCallable()
      Lists DataAgents 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListDataAgentsRequest request =
             ListDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         while (true) {
           ListDataAgentsResponse response =
               dataAgentServiceClient.listDataAgentsCallable().call(request);
           for (DataAgent element : response.getDataAgentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listAccessibleDataAgents

      public final DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents(LocationName parent)
      Lists DataAgents that are accessible to the caller 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (DataAgent element :
             dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAccessibleDataAgentsRequest.
      Throws:
      ApiException - if the remote call fails
    • listAccessibleDataAgents

      public final DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents(String parent)
      Lists DataAgents that are accessible to the caller 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (DataAgent element :
             dataAgentServiceClient.listAccessibleDataAgents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAccessibleDataAgentsRequest.
      Throws:
      ApiException - if the remote call fails
    • listAccessibleDataAgents

      Lists DataAgents that are accessible to the caller 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListAccessibleDataAgentsRequest request =
             ListAccessibleDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         for (DataAgent element :
             dataAgentServiceClient.listAccessibleDataAgents(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listAccessibleDataAgentsPagedCallable

      Lists DataAgents that are accessible to the caller 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListAccessibleDataAgentsRequest request =
             ListAccessibleDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         ApiFuture<DataAgent> future =
             dataAgentServiceClient.listAccessibleDataAgentsPagedCallable().futureCall(request);
         // Do something.
         for (DataAgent element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAccessibleDataAgentsCallable

      public final UnaryCallable<ListAccessibleDataAgentsRequest,ListAccessibleDataAgentsResponse> listAccessibleDataAgentsCallable()
      Lists DataAgents that are accessible to the caller 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListAccessibleDataAgentsRequest request =
             ListAccessibleDataAgentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setShowDeleted(true)
                 .build();
         while (true) {
           ListAccessibleDataAgentsResponse response =
               dataAgentServiceClient.listAccessibleDataAgentsCallable().call(request);
           for (DataAgent element : response.getDataAgentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getDataAgent

      public final DataAgent getDataAgent(DataAgentName name)
      Gets details of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
         DataAgent response = dataAgentServiceClient.getDataAgent(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getDataAgent

      public final DataAgent getDataAgent(String name)
      Gets details of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
         DataAgent response = dataAgentServiceClient.getDataAgent(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getDataAgent

      public final DataAgent getDataAgent(GetDataAgentRequest request)
      Gets details of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetDataAgentRequest request =
             GetDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .build();
         DataAgent response = dataAgentServiceClient.getDataAgent(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDataAgentCallable

      public final UnaryCallable<GetDataAgentRequest,DataAgent> getDataAgentCallable()
      Gets details of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetDataAgentRequest request =
             GetDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .build();
         ApiFuture<DataAgent> future =
             dataAgentServiceClient.getDataAgentCallable().futureCall(request);
         // Do something.
         DataAgent response = future.get();
       }
       
    • createDataAgentAsync

      public final OperationFuture<DataAgent,OperationMetadata> createDataAgentAsync(LocationName parent, DataAgent dataAgent, String dataAgentId)
      Creates a new DataAgent 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         DataAgent dataAgent = DataAgent.newBuilder().build();
         String dataAgentId = "dataAgentId1752773622";
         DataAgent response =
             dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      dataAgent - Required. The resource being created.
      dataAgentId - Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentAsync

      public final OperationFuture<DataAgent,OperationMetadata> createDataAgentAsync(String parent, DataAgent dataAgent, String dataAgentId)
      Creates a new DataAgent 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         DataAgent dataAgent = DataAgent.newBuilder().build();
         String dataAgentId = "dataAgentId1752773622";
         DataAgent response =
             dataAgentServiceClient.createDataAgentAsync(parent, dataAgent, dataAgentId).get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      dataAgent - Required. The resource being created.
      dataAgentId - Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentAsync

      public final OperationFuture<DataAgent,OperationMetadata> createDataAgentAsync(CreateDataAgentRequest request)
      Creates a new DataAgent 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         CreateDataAgentRequest request =
             CreateDataAgentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDataAgentId("dataAgentId1752773622")
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DataAgent response = dataAgentServiceClient.createDataAgentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentOperationCallable

      public final OperationCallable<CreateDataAgentRequest,DataAgent,OperationMetadata> createDataAgentOperationCallable()
      Creates a new DataAgent 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         CreateDataAgentRequest request =
             CreateDataAgentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDataAgentId("dataAgentId1752773622")
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DataAgent, OperationMetadata> future =
             dataAgentServiceClient.createDataAgentOperationCallable().futureCall(request);
         // Do something.
         DataAgent response = future.get();
       }
       
    • createDataAgentCallable

      public final UnaryCallable<CreateDataAgentRequest,Operation> createDataAgentCallable()
      Creates a new DataAgent 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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         CreateDataAgentRequest request =
             CreateDataAgentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDataAgentId("dataAgentId1752773622")
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataAgentServiceClient.createDataAgentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createDataAgentSync

      public final DataAgent createDataAgentSync(LocationName parent, DataAgent dataAgent, String dataAgentId)
      Creates a new DataAgent in a given project and location synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         DataAgent dataAgent = DataAgent.newBuilder().build();
         String dataAgentId = "dataAgentId1752773622";
         DataAgent response =
             dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId);
       }
       
      Parameters:
      parent - Required. Value for parent.
      dataAgent - Required. The resource being created.
      dataAgentId - Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentSync

      public final DataAgent createDataAgentSync(String parent, DataAgent dataAgent, String dataAgentId)
      Creates a new DataAgent in a given project and location synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         DataAgent dataAgent = DataAgent.newBuilder().build();
         String dataAgentId = "dataAgentId1752773622";
         DataAgent response =
             dataAgentServiceClient.createDataAgentSync(parent, dataAgent, dataAgentId);
       }
       
      Parameters:
      parent - Required. Value for parent.
      dataAgent - Required. The resource being created.
      dataAgentId - Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentSync

      public final DataAgent createDataAgentSync(CreateDataAgentRequest request)
      Creates a new DataAgent in a given project and location synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         CreateDataAgentRequest request =
             CreateDataAgentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDataAgentId("dataAgentId1752773622")
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DataAgent response = dataAgentServiceClient.createDataAgentSync(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDataAgentSyncCallable

      public final UnaryCallable<CreateDataAgentRequest,DataAgent> createDataAgentSyncCallable()
      Creates a new DataAgent in a given project and location synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         CreateDataAgentRequest request =
             CreateDataAgentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setDataAgentId("dataAgentId1752773622")
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<DataAgent> future =
             dataAgentServiceClient.createDataAgentSyncCallable().futureCall(request);
         // Do something.
         DataAgent response = future.get();
       }
       
    • updateDataAgentAsync

      public final OperationFuture<DataAgent,OperationMetadata> updateDataAgentAsync(DataAgent dataAgent, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DataAgent dataAgent = DataAgent.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         DataAgent response = dataAgentServiceClient.updateDataAgentAsync(dataAgent, updateMask).get();
       }
       
      Parameters:
      dataAgent - Required. The resource being updated.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the DataAgent 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 with non-default values present in the request will be overwritten. If a wildcard mask is provided, all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateDataAgentAsync

      public final OperationFuture<DataAgent,OperationMetadata> updateDataAgentAsync(UpdateDataAgentRequest request)
      Updates the parameters of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         UpdateDataAgentRequest request =
             UpdateDataAgentRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DataAgent response = dataAgentServiceClient.updateDataAgentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDataAgentOperationCallable

      public final OperationCallable<UpdateDataAgentRequest,DataAgent,OperationMetadata> updateDataAgentOperationCallable()
      Updates the parameters of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         UpdateDataAgentRequest request =
             UpdateDataAgentRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<DataAgent, OperationMetadata> future =
             dataAgentServiceClient.updateDataAgentOperationCallable().futureCall(request);
         // Do something.
         DataAgent response = future.get();
       }
       
    • updateDataAgentCallable

      public final UnaryCallable<UpdateDataAgentRequest,Operation> updateDataAgentCallable()
      Updates the parameters of a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         UpdateDataAgentRequest request =
             UpdateDataAgentRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataAgentServiceClient.updateDataAgentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateDataAgentSync

      public final DataAgent updateDataAgentSync(DataAgent dataAgent, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DataAgent dataAgent = DataAgent.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         DataAgent response = dataAgentServiceClient.updateDataAgentSync(dataAgent, updateMask);
       }
       
      Parameters:
      dataAgent - Required. The resource being updated.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the DataAgent 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 with non-default values present in the request will be overwritten. If a wildcard mask is provided, all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateDataAgentSync

      public final DataAgent updateDataAgentSync(UpdateDataAgentRequest request)
      Updates the parameters of a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         UpdateDataAgentRequest request =
             UpdateDataAgentRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         DataAgent response = dataAgentServiceClient.updateDataAgentSync(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDataAgentSyncCallable

      public final UnaryCallable<UpdateDataAgentRequest,DataAgent> updateDataAgentSyncCallable()
      Updates the parameters of a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         UpdateDataAgentRequest request =
             UpdateDataAgentRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDataAgent(DataAgent.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<DataAgent> future =
             dataAgentServiceClient.updateDataAgentSyncCallable().futureCall(request);
         // Do something.
         DataAgent response = future.get();
       }
       
    • deleteDataAgentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAgentAsync(DataAgentName name)
      Deletes a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
         dataAgentServiceClient.deleteDataAgentAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentAsync

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

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
         dataAgentServiceClient.deleteDataAgentAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAgentAsync(DeleteDataAgentRequest request)
      Deletes a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DeleteDataAgentRequest request =
             DeleteDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         dataAgentServiceClient.deleteDataAgentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentOperationCallable

      public final OperationCallable<DeleteDataAgentRequest,com.google.protobuf.Empty,OperationMetadata> deleteDataAgentOperationCallable()
      Deletes a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DeleteDataAgentRequest request =
             DeleteDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             dataAgentServiceClient.deleteDataAgentOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteDataAgentCallable

      public final UnaryCallable<DeleteDataAgentRequest,Operation> deleteDataAgentCallable()
      Deletes a single DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DeleteDataAgentRequest request =
             DeleteDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataAgentServiceClient.deleteDataAgentCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteDataAgentSync

      public final void deleteDataAgentSync(DataAgentName name)
      Deletes a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DataAgentName name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
         dataAgentServiceClient.deleteDataAgentSync(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentSync

      public final void deleteDataAgentSync(String name)
      Deletes a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String name = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString();
         dataAgentServiceClient.deleteDataAgentSync(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentSync

      public final void deleteDataAgentSync(DeleteDataAgentRequest request)
      Deletes a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DeleteDataAgentRequest request =
             DeleteDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         dataAgentServiceClient.deleteDataAgentSync(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDataAgentSyncCallable

      public final UnaryCallable<DeleteDataAgentRequest,com.google.protobuf.Empty> deleteDataAgentSyncCallable()
      Deletes a single DataAgent synchronously.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         DeleteDataAgentRequest request =
             DeleteDataAgentRequest.newBuilder()
                 .setName(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Empty> future =
             dataAgentServiceClient.deleteDataAgentSyncCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(ResourceName resource)
      Gets the IAM policy for DataAgent

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
         Policy response = dataAgentServiceClient.getIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicy

      public final Policy getIamPolicy(String resource)
      Gets the IAM policy for DataAgent

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String resource = ProjectName.of("[PROJECT]").toString();
         Policy response = dataAgentServiceClient.getIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the IAM policy for DataAgent

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = dataAgentServiceClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the IAM policy for DataAgent

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = dataAgentServiceClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(ResourceName resource)
      Sets the IAM policy for a DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ResourceName resource = DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]");
         Policy response = dataAgentServiceClient.setIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicy

      public final Policy setIamPolicy(String resource)
      Sets the IAM policy for a DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         String resource = ProjectName.of("[PROJECT]").toString();
         Policy response = dataAgentServiceClient.setIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the IAM policy for a DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = dataAgentServiceClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the IAM policy for a DataAgent.

      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 (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(DataAgentName.of("[PROJECT]", "[LOCATION]", "[DATA_AGENT]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = dataAgentServiceClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • listLocations

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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : dataAgentServiceClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             dataAgentServiceClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               dataAgentServiceClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = dataAgentServiceClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataAgentServiceClient dataAgentServiceClient = DataAgentServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future = dataAgentServiceClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • close

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

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

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

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

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

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