Class DataTransferServiceClient

java.lang.Object
com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class DataTransferServiceClient extends Object implements BackgroundResource
Service Description: DataTransferService is the service for the Data Transfer API.

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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   MulticloudDataTransferConfigName name =
       MulticloudDataTransferConfigName.of(
           "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
   MulticloudDataTransferConfig response =
       dataTransferServiceClient.getMulticloudDataTransferConfig(name);
 }
 

Note: close() needs to be called on the DataTransferServiceClient 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

ListMulticloudDataTransferConfigs

Lists the `MulticloudDataTransferConfig` resources in a specified project and location.

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

  • listMulticloudDataTransferConfigs(ListMulticloudDataTransferConfigsRequest request)

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

  • listMulticloudDataTransferConfigs(LocationName parent)

  • listMulticloudDataTransferConfigs(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.

  • listMulticloudDataTransferConfigsPagedCallable()

  • listMulticloudDataTransferConfigsCallable()

GetMulticloudDataTransferConfig

Gets the details of a `MulticloudDataTransferConfig` resource.

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

  • getMulticloudDataTransferConfig(GetMulticloudDataTransferConfigRequest request)

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

  • getMulticloudDataTransferConfig(MulticloudDataTransferConfigName name)

  • getMulticloudDataTransferConfig(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.

  • getMulticloudDataTransferConfigCallable()

CreateMulticloudDataTransferConfig

Creates a `MulticloudDataTransferConfig` resource in a specified project and location.

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

  • createMulticloudDataTransferConfigAsync(CreateMulticloudDataTransferConfigRequest request)

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

  • createMulticloudDataTransferConfigAsync(LocationName parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId)

  • createMulticloudDataTransferConfigAsync(String parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId)

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

  • createMulticloudDataTransferConfigOperationCallable()

  • createMulticloudDataTransferConfigCallable()

UpdateMulticloudDataTransferConfig

Updates a `MulticloudDataTransferConfig` resource in a specified project and location.

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

  • updateMulticloudDataTransferConfigAsync(UpdateMulticloudDataTransferConfigRequest request)

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

  • updateMulticloudDataTransferConfigAsync(MulticloudDataTransferConfig multicloudDataTransferConfig, 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.

  • updateMulticloudDataTransferConfigOperationCallable()

  • updateMulticloudDataTransferConfigCallable()

DeleteMulticloudDataTransferConfig

Deletes a `MulticloudDataTransferConfig` resource.

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

  • deleteMulticloudDataTransferConfigAsync(DeleteMulticloudDataTransferConfigRequest request)

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

  • deleteMulticloudDataTransferConfigAsync(MulticloudDataTransferConfigName name)

  • deleteMulticloudDataTransferConfigAsync(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.

  • deleteMulticloudDataTransferConfigOperationCallable()

  • deleteMulticloudDataTransferConfigCallable()

ListDestinations

Lists the `Destination` resources in a specified project and location.

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

  • listDestinations(ListDestinationsRequest request)

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

  • listDestinations(MulticloudDataTransferConfigName parent)

  • listDestinations(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.

  • listDestinationsPagedCallable()

  • listDestinationsCallable()

GetDestination

Gets the details of a `Destination` resource.

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

  • getDestination(GetDestinationRequest request)

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

  • getDestination(DestinationName name)

  • getDestination(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.

  • getDestinationCallable()

CreateDestination

Creates a `Destination` resource in a specified project and location.

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

  • createDestinationAsync(CreateDestinationRequest request)

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

  • createDestinationAsync(MulticloudDataTransferConfigName parent, Destination destination, String destinationId)

  • createDestinationAsync(String parent, Destination destination, String destinationId)

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

  • createDestinationOperationCallable()

  • createDestinationCallable()

UpdateDestination

Updates a `Destination` resource in a specified project and location.

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

  • updateDestinationAsync(UpdateDestinationRequest request)

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

  • updateDestinationAsync(Destination destination, 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.

  • updateDestinationOperationCallable()

  • updateDestinationCallable()

DeleteDestination

Deletes a `Destination` resource.

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

  • deleteDestinationAsync(DeleteDestinationRequest request)

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

  • deleteDestinationAsync(DestinationName name)

  • deleteDestinationAsync(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.

  • deleteDestinationOperationCallable()

  • deleteDestinationCallable()

GetMulticloudDataTransferSupportedService

Gets the details of a service that is supported for Data Transfer Essentials.

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

  • getMulticloudDataTransferSupportedService(GetMulticloudDataTransferSupportedServiceRequest request)

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

  • getMulticloudDataTransferSupportedService(MulticloudDataTransferSupportedServiceName name)

  • getMulticloudDataTransferSupportedService(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.

  • getMulticloudDataTransferSupportedServiceCallable()

ListMulticloudDataTransferSupportedServices

Lists the services in the project for a region that are supported for Data Transfer Essentials.

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

  • listMulticloudDataTransferSupportedServices(ListMulticloudDataTransferSupportedServicesRequest request)

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

  • listMulticloudDataTransferSupportedServices(LocationName parent)

  • listMulticloudDataTransferSupportedServices(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.

  • listMulticloudDataTransferSupportedServicesPagedCallable()

  • listMulticloudDataTransferSupportedServicesCallable()

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

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

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

  • setIamPolicy(SetIamPolicyRequest request)

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

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

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

  • getIamPolicy(GetIamPolicyRequest request)

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

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

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

  • testIamPermissions(TestIamPermissionsRequest request)

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

  • testIamPermissionsCallable()

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 DataTransferServiceSettings 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
 DataTransferServiceSettings dataTransferServiceSettings =
     DataTransferServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DataTransferServiceClient dataTransferServiceClient =
     DataTransferServiceClient.create(dataTransferServiceSettings);
 

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
 DataTransferServiceSettings dataTransferServiceSettings =
     DataTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 DataTransferServiceClient dataTransferServiceClient =
     DataTransferServiceClient.create(dataTransferServiceSettings);
 

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

  • Constructor Details

    • DataTransferServiceClient

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

      protected DataTransferServiceClient(DataTransferServiceStub stub)
  • Method Details

    • create

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

      public static final DataTransferServiceClient create(DataTransferServiceSettings settings) throws IOException
      Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient create(DataTransferServiceStub stub)
      Constructs an instance of DataTransferServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataTransferServiceSettings).
    • getSettings

      public final DataTransferServiceSettings getSettings()
    • getStub

      public DataTransferServiceStub 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.
    • listMulticloudDataTransferConfigs

      public final DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(LocationName parent)
      Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (MulticloudDataTransferConfig element :
             dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listMulticloudDataTransferConfigs

      public final DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(String parent)
      Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (MulticloudDataTransferConfig element :
             dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listMulticloudDataTransferConfigs

      Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferConfigsRequest request =
             ListMulticloudDataTransferConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         for (MulticloudDataTransferConfig element :
             dataTransferServiceClient.listMulticloudDataTransferConfigs(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
    • listMulticloudDataTransferConfigsPagedCallable

      Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferConfigsRequest request =
             ListMulticloudDataTransferConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<MulticloudDataTransferConfig> future =
             dataTransferServiceClient
                 .listMulticloudDataTransferConfigsPagedCallable()
                 .futureCall(request);
         // Do something.
         for (MulticloudDataTransferConfig element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMulticloudDataTransferConfigsCallable

      Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferConfigsRequest request =
             ListMulticloudDataTransferConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListMulticloudDataTransferConfigsResponse response =
               dataTransferServiceClient.listMulticloudDataTransferConfigsCallable().call(request);
           for (MulticloudDataTransferConfig element :
               response.getMulticloudDataTransferConfigsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getMulticloudDataTransferConfig

      public final MulticloudDataTransferConfig getMulticloudDataTransferConfig(MulticloudDataTransferConfigName name)
      Gets the details of a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferConfigName name =
             MulticloudDataTransferConfigName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
         MulticloudDataTransferConfig response =
             dataTransferServiceClient.getMulticloudDataTransferConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `MulticloudDataTransferConfig` resource to get.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferConfig

      public final MulticloudDataTransferConfig getMulticloudDataTransferConfig(String name)
      Gets the details of a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String name =
             MulticloudDataTransferConfigName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                 .toString();
         MulticloudDataTransferConfig response =
             dataTransferServiceClient.getMulticloudDataTransferConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `MulticloudDataTransferConfig` resource to get.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferConfig

      public final MulticloudDataTransferConfig getMulticloudDataTransferConfig(GetMulticloudDataTransferConfigRequest request)
      Gets the details of a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetMulticloudDataTransferConfigRequest request =
             GetMulticloudDataTransferConfigRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .build();
         MulticloudDataTransferConfig response =
             dataTransferServiceClient.getMulticloudDataTransferConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferConfigCallable

      public final UnaryCallable<GetMulticloudDataTransferConfigRequest,MulticloudDataTransferConfig> getMulticloudDataTransferConfigCallable()
      Gets the details of a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetMulticloudDataTransferConfigRequest request =
             GetMulticloudDataTransferConfigRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<MulticloudDataTransferConfig> future =
             dataTransferServiceClient.getMulticloudDataTransferConfigCallable().futureCall(request);
         // Do something.
         MulticloudDataTransferConfig response = future.get();
       }
       
    • createMulticloudDataTransferConfigAsync

      public final OperationFuture<MulticloudDataTransferConfig,OperationMetadata> createMulticloudDataTransferConfigAsync(LocationName parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId)
      Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         MulticloudDataTransferConfig multicloudDataTransferConfig =
             MulticloudDataTransferConfig.newBuilder().build();
         String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
         MulticloudDataTransferConfig response =
             dataTransferServiceClient
                 .createMulticloudDataTransferConfigAsync(
                     parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
                 .get();
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      multicloudDataTransferConfig - Required. The `MulticloudDataTransferConfig` resource to create.
      multicloudDataTransferConfigId - Required. The ID to use for the `MulticloudDataTransferConfig` resource, which becomes the final component of the `MulticloudDataTransferConfig` resource name.
      Throws:
      ApiException - if the remote call fails
    • createMulticloudDataTransferConfigAsync

      public final OperationFuture<MulticloudDataTransferConfig,OperationMetadata> createMulticloudDataTransferConfigAsync(String parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId)
      Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         MulticloudDataTransferConfig multicloudDataTransferConfig =
             MulticloudDataTransferConfig.newBuilder().build();
         String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
         MulticloudDataTransferConfig response =
             dataTransferServiceClient
                 .createMulticloudDataTransferConfigAsync(
                     parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
                 .get();
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      multicloudDataTransferConfig - Required. The `MulticloudDataTransferConfig` resource to create.
      multicloudDataTransferConfigId - Required. The ID to use for the `MulticloudDataTransferConfig` resource, which becomes the final component of the `MulticloudDataTransferConfig` resource name.
      Throws:
      ApiException - if the remote call fails
    • createMulticloudDataTransferConfigAsync

      public final OperationFuture<MulticloudDataTransferConfig,OperationMetadata> createMulticloudDataTransferConfigAsync(CreateMulticloudDataTransferConfigRequest request)
      Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateMulticloudDataTransferConfigRequest request =
             CreateMulticloudDataTransferConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         MulticloudDataTransferConfig response =
             dataTransferServiceClient.createMulticloudDataTransferConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMulticloudDataTransferConfigOperationCallable

      public final OperationCallable<CreateMulticloudDataTransferConfigRequest,MulticloudDataTransferConfig,OperationMetadata> createMulticloudDataTransferConfigOperationCallable()
      Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateMulticloudDataTransferConfigRequest request =
             CreateMulticloudDataTransferConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<MulticloudDataTransferConfig, OperationMetadata> future =
             dataTransferServiceClient
                 .createMulticloudDataTransferConfigOperationCallable()
                 .futureCall(request);
         // Do something.
         MulticloudDataTransferConfig response = future.get();
       }
       
    • createMulticloudDataTransferConfigCallable

      public final UnaryCallable<CreateMulticloudDataTransferConfigRequest,Operation> createMulticloudDataTransferConfigCallable()
      Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateMulticloudDataTransferConfigRequest request =
             CreateMulticloudDataTransferConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient
                 .createMulticloudDataTransferConfigCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateMulticloudDataTransferConfigAsync

      public final OperationFuture<MulticloudDataTransferConfig,OperationMetadata> updateMulticloudDataTransferConfigAsync(MulticloudDataTransferConfig multicloudDataTransferConfig, com.google.protobuf.FieldMask updateMask)
      Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferConfig multicloudDataTransferConfig =
             MulticloudDataTransferConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         MulticloudDataTransferConfig response =
             dataTransferServiceClient
                 .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, updateMask)
                 .get();
       }
       
      Parameters:
      multicloudDataTransferConfig - Required. The `MulticloudDataTransferConfig` resource to update.
      updateMask - Optional. `FieldMask` is used to specify the fields in the `MulticloudDataTransferConfig` resource to be overwritten by the update. The fields specified in `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If you don't specify a mask, all fields are overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateMulticloudDataTransferConfigAsync

      public final OperationFuture<MulticloudDataTransferConfig,OperationMetadata> updateMulticloudDataTransferConfigAsync(UpdateMulticloudDataTransferConfigRequest request)
      Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateMulticloudDataTransferConfigRequest request =
             UpdateMulticloudDataTransferConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         MulticloudDataTransferConfig response =
             dataTransferServiceClient.updateMulticloudDataTransferConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMulticloudDataTransferConfigOperationCallable

      public final OperationCallable<UpdateMulticloudDataTransferConfigRequest,MulticloudDataTransferConfig,OperationMetadata> updateMulticloudDataTransferConfigOperationCallable()
      Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateMulticloudDataTransferConfigRequest request =
             UpdateMulticloudDataTransferConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<MulticloudDataTransferConfig, OperationMetadata> future =
             dataTransferServiceClient
                 .updateMulticloudDataTransferConfigOperationCallable()
                 .futureCall(request);
         // Do something.
         MulticloudDataTransferConfig response = future.get();
       }
       
    • updateMulticloudDataTransferConfigCallable

      public final UnaryCallable<UpdateMulticloudDataTransferConfigRequest,Operation> updateMulticloudDataTransferConfigCallable()
      Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateMulticloudDataTransferConfigRequest request =
             UpdateMulticloudDataTransferConfigRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient
                 .updateMulticloudDataTransferConfigCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMulticloudDataTransferConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMulticloudDataTransferConfigAsync(MulticloudDataTransferConfigName name)
      Deletes a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferConfigName name =
             MulticloudDataTransferConfigName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
         dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the `MulticloudDataTransferConfig` resource to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteMulticloudDataTransferConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMulticloudDataTransferConfigAsync(String name)
      Deletes a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String name =
             MulticloudDataTransferConfigName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                 .toString();
         dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the `MulticloudDataTransferConfig` resource to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteMulticloudDataTransferConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMulticloudDataTransferConfigAsync(DeleteMulticloudDataTransferConfigRequest request)
      Deletes a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteMulticloudDataTransferConfigRequest request =
             DeleteMulticloudDataTransferConfigRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMulticloudDataTransferConfigOperationCallable

      public final OperationCallable<DeleteMulticloudDataTransferConfigRequest,com.google.protobuf.Empty,OperationMetadata> deleteMulticloudDataTransferConfigOperationCallable()
      Deletes a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteMulticloudDataTransferConfigRequest request =
             DeleteMulticloudDataTransferConfigRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             dataTransferServiceClient
                 .deleteMulticloudDataTransferConfigOperationCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteMulticloudDataTransferConfigCallable

      public final UnaryCallable<DeleteMulticloudDataTransferConfigRequest,Operation> deleteMulticloudDataTransferConfigCallable()
      Deletes a `MulticloudDataTransferConfig` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteMulticloudDataTransferConfigRequest request =
             DeleteMulticloudDataTransferConfigRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient
                 .deleteMulticloudDataTransferConfigCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • listDestinations

      Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferConfigName parent =
             MulticloudDataTransferConfigName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
         for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listDestinations

      public final DataTransferServiceClient.ListDestinationsPagedResponse listDestinations(String parent)
      Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String parent =
             MulticloudDataTransferConfigName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                 .toString();
         for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listDestinations

      Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListDestinationsRequest request =
             ListDestinationsRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         for (Destination element : dataTransferServiceClient.listDestinations(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
    • listDestinationsPagedCallable

      Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListDestinationsRequest request =
             ListDestinationsRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<Destination> future =
             dataTransferServiceClient.listDestinationsPagedCallable().futureCall(request);
         // Do something.
         for (Destination element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDestinationsCallable

      public final UnaryCallable<ListDestinationsRequest,ListDestinationsResponse> listDestinationsCallable()
      Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListDestinationsRequest request =
             ListDestinationsRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListDestinationsResponse response =
               dataTransferServiceClient.listDestinationsCallable().call(request);
           for (Destination element : response.getDestinationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getDestination

      public final Destination getDestination(DestinationName name)
      Gets the details of a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DestinationName name =
             DestinationName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]");
         Destination response = dataTransferServiceClient.getDestination(name);
       }
       
      Parameters:
      name - Required. The name of the `Destination` resource to get.
      Throws:
      ApiException - if the remote call fails
    • getDestination

      public final Destination getDestination(String name)
      Gets the details of a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String name =
             DestinationName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]")
                 .toString();
         Destination response = dataTransferServiceClient.getDestination(name);
       }
       
      Parameters:
      name - Required. The name of the `Destination` resource to get.
      Throws:
      ApiException - if the remote call fails
    • getDestination

      public final Destination getDestination(GetDestinationRequest request)
      Gets the details of a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetDestinationRequest request =
             GetDestinationRequest.newBuilder()
                 .setName(
                     DestinationName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
                             "[DESTINATION]")
                         .toString())
                 .build();
         Destination response = dataTransferServiceClient.getDestination(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDestinationCallable

      public final UnaryCallable<GetDestinationRequest,Destination> getDestinationCallable()
      Gets the details of a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetDestinationRequest request =
             GetDestinationRequest.newBuilder()
                 .setName(
                     DestinationName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
                             "[DESTINATION]")
                         .toString())
                 .build();
         ApiFuture<Destination> future =
             dataTransferServiceClient.getDestinationCallable().futureCall(request);
         // Do something.
         Destination response = future.get();
       }
       
    • createDestinationAsync

      public final OperationFuture<Destination,OperationMetadata> createDestinationAsync(MulticloudDataTransferConfigName parent, Destination destination, String destinationId)
      Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferConfigName parent =
             MulticloudDataTransferConfigName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
         Destination destination = Destination.newBuilder().build();
         String destinationId = "destinationId306545097";
         Destination response =
             dataTransferServiceClient
                 .createDestinationAsync(parent, destination, destinationId)
                 .get();
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      destination - Required. The `Destination` resource to create.
      destinationId - Required. The ID to use for the `Destination` resource, which becomes the final component of the `Destination` resource name.
      Throws:
      ApiException - if the remote call fails
    • createDestinationAsync

      public final OperationFuture<Destination,OperationMetadata> createDestinationAsync(String parent, Destination destination, String destinationId)
      Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String parent =
             MulticloudDataTransferConfigName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                 .toString();
         Destination destination = Destination.newBuilder().build();
         String destinationId = "destinationId306545097";
         Destination response =
             dataTransferServiceClient
                 .createDestinationAsync(parent, destination, destinationId)
                 .get();
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      destination - Required. The `Destination` resource to create.
      destinationId - Required. The ID to use for the `Destination` resource, which becomes the final component of the `Destination` resource name.
      Throws:
      ApiException - if the remote call fails
    • createDestinationAsync

      public final OperationFuture<Destination,OperationMetadata> createDestinationAsync(CreateDestinationRequest request)
      Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateDestinationRequest request =
             CreateDestinationRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setDestinationId("destinationId306545097")
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Destination response = dataTransferServiceClient.createDestinationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createDestinationOperationCallable

      public final OperationCallable<CreateDestinationRequest,Destination,OperationMetadata> createDestinationOperationCallable()
      Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateDestinationRequest request =
             CreateDestinationRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setDestinationId("destinationId306545097")
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Destination, OperationMetadata> future =
             dataTransferServiceClient.createDestinationOperationCallable().futureCall(request);
         // Do something.
         Destination response = future.get();
       }
       
    • createDestinationCallable

      public final UnaryCallable<CreateDestinationRequest,Operation> createDestinationCallable()
      Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         CreateDestinationRequest request =
             CreateDestinationRequest.newBuilder()
                 .setParent(
                     MulticloudDataTransferConfigName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
                         .toString())
                 .setDestinationId("destinationId306545097")
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient.createDestinationCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateDestinationAsync

      public final OperationFuture<Destination,OperationMetadata> updateDestinationAsync(Destination destination, com.google.protobuf.FieldMask updateMask)
      Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         Destination destination = Destination.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Destination response =
             dataTransferServiceClient.updateDestinationAsync(destination, updateMask).get();
       }
       
      Parameters:
      destination - Required. The `Destination` resource to update.
      updateMask - Optional. `FieldMask is used to specify the fields to be overwritten in the `Destination` resource by the update. The fields specified in `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If you don't specify a mask, all fields are overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateDestinationAsync

      public final OperationFuture<Destination,OperationMetadata> updateDestinationAsync(UpdateDestinationRequest request)
      Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateDestinationRequest request =
             UpdateDestinationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Destination response = dataTransferServiceClient.updateDestinationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateDestinationOperationCallable

      public final OperationCallable<UpdateDestinationRequest,Destination,OperationMetadata> updateDestinationOperationCallable()
      Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateDestinationRequest request =
             UpdateDestinationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Destination, OperationMetadata> future =
             dataTransferServiceClient.updateDestinationOperationCallable().futureCall(request);
         // Do something.
         Destination response = future.get();
       }
       
    • updateDestinationCallable

      public final UnaryCallable<UpdateDestinationRequest,Operation> updateDestinationCallable()
      Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         UpdateDestinationRequest request =
             UpdateDestinationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setDestination(Destination.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient.updateDestinationCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteDestinationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDestinationAsync(DestinationName name)
      Deletes a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DestinationName name =
             DestinationName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]");
         dataTransferServiceClient.deleteDestinationAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the `Destination` resource to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteDestinationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDestinationAsync(String name)
      Deletes a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String name =
             DestinationName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]")
                 .toString();
         dataTransferServiceClient.deleteDestinationAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the `Destination` resource to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteDestinationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDestinationAsync(DeleteDestinationRequest request)
      Deletes a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteDestinationRequest request =
             DeleteDestinationRequest.newBuilder()
                 .setName(
                     DestinationName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
                             "[DESTINATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         dataTransferServiceClient.deleteDestinationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteDestinationOperationCallable

      public final OperationCallable<DeleteDestinationRequest,com.google.protobuf.Empty,OperationMetadata> deleteDestinationOperationCallable()
      Deletes a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteDestinationRequest request =
             DeleteDestinationRequest.newBuilder()
                 .setName(
                     DestinationName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
                             "[DESTINATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             dataTransferServiceClient.deleteDestinationOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteDestinationCallable

      public final UnaryCallable<DeleteDestinationRequest,Operation> deleteDestinationCallable()
      Deletes a `Destination` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         DeleteDestinationRequest request =
             DeleteDestinationRequest.newBuilder()
                 .setName(
                     DestinationName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
                             "[DESTINATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             dataTransferServiceClient.deleteDestinationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getMulticloudDataTransferSupportedService

      public final MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(MulticloudDataTransferSupportedServiceName name)
      Gets the details of a service that is supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         MulticloudDataTransferSupportedServiceName name =
             MulticloudDataTransferSupportedServiceName.of(
                 "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]");
         MulticloudDataTransferSupportedService response =
             dataTransferServiceClient.getMulticloudDataTransferSupportedService(name);
       }
       
      Parameters:
      name - Required. The name of the service.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferSupportedService

      public final MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(String name)
      Gets the details of a service that is supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String name =
             MulticloudDataTransferSupportedServiceName.of(
                     "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
                 .toString();
         MulticloudDataTransferSupportedService response =
             dataTransferServiceClient.getMulticloudDataTransferSupportedService(name);
       }
       
      Parameters:
      name - Required. The name of the service.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferSupportedService

      public final MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(GetMulticloudDataTransferSupportedServiceRequest request)
      Gets the details of a service that is supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetMulticloudDataTransferSupportedServiceRequest request =
             GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferSupportedServiceName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
                         .toString())
                 .build();
         MulticloudDataTransferSupportedService response =
             dataTransferServiceClient.getMulticloudDataTransferSupportedService(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMulticloudDataTransferSupportedServiceCallable

      public final UnaryCallable<GetMulticloudDataTransferSupportedServiceRequest,MulticloudDataTransferSupportedService> getMulticloudDataTransferSupportedServiceCallable()
      Gets the details of a service that is supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetMulticloudDataTransferSupportedServiceRequest request =
             GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
                 .setName(
                     MulticloudDataTransferSupportedServiceName.of(
                             "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
                         .toString())
                 .build();
         ApiFuture<MulticloudDataTransferSupportedService> future =
             dataTransferServiceClient
                 .getMulticloudDataTransferSupportedServiceCallable()
                 .futureCall(request);
         // Do something.
         MulticloudDataTransferSupportedService response = future.get();
       }
       
    • listMulticloudDataTransferSupportedServices

      public final DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse listMulticloudDataTransferSupportedServices(LocationName parent)
      Lists the services in the project for a region that are supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (MulticloudDataTransferSupportedService element :
             dataTransferServiceClient
                 .listMulticloudDataTransferSupportedServices(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listMulticloudDataTransferSupportedServices

      public final DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse listMulticloudDataTransferSupportedServices(String parent)
      Lists the services in the project for a region that are supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (MulticloudDataTransferSupportedService element :
             dataTransferServiceClient
                 .listMulticloudDataTransferSupportedServices(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent resource.
      Throws:
      ApiException - if the remote call fails
    • listMulticloudDataTransferSupportedServices

      Lists the services in the project for a region that are supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferSupportedServicesRequest request =
             ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (MulticloudDataTransferSupportedService element :
             dataTransferServiceClient
                 .listMulticloudDataTransferSupportedServices(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
    • listMulticloudDataTransferSupportedServicesPagedCallable

      Lists the services in the project for a region that are supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferSupportedServicesRequest request =
             ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<MulticloudDataTransferSupportedService> future =
             dataTransferServiceClient
                 .listMulticloudDataTransferSupportedServicesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (MulticloudDataTransferSupportedService element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMulticloudDataTransferSupportedServicesCallable

      Lists the services in the project for a region that are supported for Data Transfer Essentials.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListMulticloudDataTransferSupportedServicesRequest request =
             ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListMulticloudDataTransferSupportedServicesResponse response =
               dataTransferServiceClient
                   .listMulticloudDataTransferSupportedServicesCallable()
                   .call(request);
           for (MulticloudDataTransferSupportedService element :
               response.getMulticloudDataTransferSupportedServicesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             dataTransferServiceClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = dataTransferServiceClient.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 access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             dataTransferServiceClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = dataTransferServiceClient.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 access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             dataTransferServiceClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = dataTransferServiceClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             dataTransferServiceClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse 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