Class DataAgentServiceClient (0.1.0)

GitHub RepositoryProduct ReferenceRPC Documentation

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

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

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

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.

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.

Inheritance

java.lang.Object > DataAgentServiceClient

Static Methods

create()

public static final DataAgentServiceClient create()

Constructs an instance of DataAgentServiceClient with default settings.

Returns
Type Description
DataAgentServiceClient
Exceptions
Type Description
IOException

create(DataAgentServiceSettings settings)

public static final DataAgentServiceClient create(DataAgentServiceSettings settings)

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.

Parameter
Name Description
settings DataAgentServiceSettings
Returns
Type Description
DataAgentServiceClient
Exceptions
Type Description
IOException

create(DataAgentServiceStub stub)

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

Parameter
Name Description
stub DataAgentServiceStub
Returns
Type Description
DataAgentServiceClient

Constructors

DataAgentServiceClient(DataAgentServiceSettings settings)

protected DataAgentServiceClient(DataAgentServiceSettings settings)

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.

Parameter
Name Description
settings DataAgentServiceSettings

DataAgentServiceClient(DataAgentServiceStub stub)

protected DataAgentServiceClient(DataAgentServiceStub stub)
Parameter
Name Description
stub DataAgentServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

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

close()

public final void close()

createDataAgentAsync(CreateDataAgentRequest request)

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

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

Returns
Type Description
OperationFuture<DataAgent,OperationMetadata>

createDataAgentAsync(LocationName parent, DataAgent dataAgent, String dataAgentId)

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

Required. Value for parent.

dataAgent DataAgent

Required. The resource being created.

dataAgentId String

Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: ^a-z?$. If not provided, the server will auto-generate a value for the id.

Returns
Type Description
OperationFuture<DataAgent,OperationMetadata>

createDataAgentAsync(String parent, DataAgent dataAgent, String dataAgentId)

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

Required. Value for parent.

dataAgent DataAgent

Required. The resource being created.

dataAgentId String

Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: ^a-z?$. If not provided, the server will auto-generate a value for the id.

Returns
Type Description
OperationFuture<DataAgent,OperationMetadata>

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

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

deleteDataAgentAsync(DataAgentName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name DataAgentName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteDataAgentAsync(DeleteDataAgentRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteDataAgentRequest

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

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteDataAgentAsync(String name)

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

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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

deleteDataAgentOperationCallable()

public final OperationCallable<DeleteDataAgentRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteDataAgentRequest,Empty,OperationMetadata>

getDataAgent(DataAgentName name)

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

Required. Name of the resource.

Returns
Type Description
DataAgent

getDataAgent(GetDataAgentRequest request)

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

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

Returns
Type Description
DataAgent

getDataAgent(String name)

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

Required. Name of the resource.

Returns
Type Description
DataAgent

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

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getIamPolicy(ResourceName resource)

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);
 }
 
Parameter
Name Description
resource com.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
com.google.iam.v1.Policy

getIamPolicy(GetIamPolicyRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

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

Returns
Type Description
com.google.iam.v1.Policy

getIamPolicy(String resource)

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

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

Returns
Type Description
com.google.iam.v1.Policy

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


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

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

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

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


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

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final DataAgentServiceSettings getSettings()
Returns
Type Description
DataAgentServiceSettings

getStub()

public DataAgentServiceStub getStub()
Returns
Type Description
DataAgentServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listAccessibleDataAgents(ListAccessibleDataAgentsRequest request)

public final DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse listAccessibleDataAgents(ListAccessibleDataAgentsRequest request)

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

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

Returns
Type Description
DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse

listAccessibleDataAgents(LocationName parent)

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

Required. Parent value for ListAccessibleDataAgentsRequest.

Returns
Type Description
DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse

listAccessibleDataAgents(String parent)

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

Required. Parent value for ListAccessibleDataAgentsRequest.

Returns
Type Description
DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAccessibleDataAgentsRequest,ListAccessibleDataAgentsResponse>

listAccessibleDataAgentsPagedCallable()

public final UnaryCallable<ListAccessibleDataAgentsRequest,DataAgentServiceClient.ListAccessibleDataAgentsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAccessibleDataAgentsRequest,ListAccessibleDataAgentsPagedResponse>

listDataAgents(ListDataAgentsRequest request)

public final DataAgentServiceClient.ListDataAgentsPagedResponse listDataAgents(ListDataAgentsRequest request)

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

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

Returns
Type Description
DataAgentServiceClient.ListDataAgentsPagedResponse

listDataAgents(LocationName parent)

public final DataAgentServiceClient.ListDataAgentsPagedResponse listDataAgents(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (DataAgent element : dataAgentServiceClient.listDataAgents(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent value for ListDataAgentsRequest.

Returns
Type Description
DataAgentServiceClient.ListDataAgentsPagedResponse

listDataAgents(String parent)

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

Required. Parent value for ListDataAgentsRequest.

Returns
Type Description
DataAgentServiceClient.ListDataAgentsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataAgentsRequest,ListDataAgentsResponse>

listDataAgentsPagedCallable()

public final UnaryCallable<ListDataAgentsRequest,DataAgentServiceClient.ListDataAgentsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataAgentsRequest,ListDataAgentsPagedResponse>

listLocations(ListLocationsRequest request)

public final DataAgentServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

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

Returns
Type Description
DataAgentServiceClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

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

setIamPolicy(ResourceName resource)

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);
 }
 
Parameter
Name Description
resource com.google.api.resourcenames.ResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
Type Description
com.google.iam.v1.Policy

setIamPolicy(SetIamPolicyRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

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

Returns
Type Description
com.google.iam.v1.Policy

setIamPolicy(String resource)

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

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

Returns
Type Description
com.google.iam.v1.Policy

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateDataAgentAsync(DataAgent dataAgent, FieldMask updateMask)

public final OperationFuture<DataAgent,OperationMetadata> updateDataAgentAsync(DataAgent dataAgent, 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
Name Description
dataAgent DataAgent

Required. The resource being updated.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<DataAgent,OperationMetadata>

updateDataAgentAsync(UpdateDataAgentRequest request)

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

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

Returns
Type Description
OperationFuture<DataAgent,OperationMetadata>

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

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