Class DataTransferServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMulticloudDataTransferConfig |
Deletes a `MulticloudDataTransferConfig` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDestination |
Deletes a `Destination` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of DataTransferServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final DataTransferServiceClientcreate()Constructs an instance of DataTransferServiceClient with default settings.static final DataTransferServiceClientcreate(DataTransferServiceSettings settings) Constructs an instance of DataTransferServiceClient, using the given settings.static final DataTransferServiceClientConstructs an instance of DataTransferServiceClient, using the given stub for making calls.Creates a `Destination` resource in a specified project and location.createDestinationAsync(MulticloudDataTransferConfigName parent, Destination destination, String destinationId) Creates a `Destination` resource in a specified project and location.createDestinationAsync(String parent, Destination destination, String destinationId) Creates a `Destination` resource in a specified project and location.Creates a `Destination` resource in a specified project and location.Creates a `Destination` resource in a specified project and location.Creates a `MulticloudDataTransferConfig` resource in a specified project and location.createMulticloudDataTransferConfigAsync(LocationName parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId) Creates a `MulticloudDataTransferConfig` resource in a specified project and location.createMulticloudDataTransferConfigAsync(String parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId) Creates a `MulticloudDataTransferConfig` resource in a specified project and location.Creates a `MulticloudDataTransferConfig` resource in a specified project and location.final OperationCallable<CreateMulticloudDataTransferConfigRequest,MulticloudDataTransferConfig, OperationMetadata> Creates a `MulticloudDataTransferConfig` resource in a specified project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a `Destination` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a `Destination` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDestinationAsync(String name) Deletes a `Destination` resource.Deletes a `Destination` resource.final OperationCallable<DeleteDestinationRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a `Destination` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a `MulticloudDataTransferConfig` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a `MulticloudDataTransferConfig` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a `MulticloudDataTransferConfig` resource.Deletes a `MulticloudDataTransferConfig` resource.final OperationCallable<DeleteMulticloudDataTransferConfigRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a `MulticloudDataTransferConfig` resource.final DestinationGets the details of a `Destination` resource.final DestinationgetDestination(GetDestinationRequest request) Gets the details of a `Destination` resource.final DestinationgetDestination(String name) Gets the details of a `Destination` resource.Gets the details of a `Destination` resource.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.Gets the details of a `MulticloudDataTransferConfig` resource.Gets the details of a `MulticloudDataTransferConfig` resource.Gets the details of a `MulticloudDataTransferConfig` resource.Gets the details of a `MulticloudDataTransferConfig` resource.Gets the details of a service that is supported for Data Transfer Essentials.Gets the details of a service that is supported for Data Transfer Essentials.Gets the details of a service that is supported for Data Transfer Essentials.final UnaryCallable<GetMulticloudDataTransferSupportedServiceRequest,MulticloudDataTransferSupportedService> Gets the details of a service that is supported for Data Transfer Essentials.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.getStub()booleanbooleanlistDestinations(ListDestinationsRequest request) Lists the `Destination` resources in a specified project and location.Lists the `Destination` resources in a specified project and location.listDestinations(String parent) Lists the `Destination` resources in a specified project and location.Lists the `Destination` resources in a specified project and location.final UnaryCallable<ListDestinationsRequest,DataTransferServiceClient.ListDestinationsPagedResponse> Lists the `Destination` resources in a specified project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.This method can be called in two ways:Lists information about the supported locations for this service.This method can be called in two ways:Lists information about the supported locations for this service.This method can be called in two ways:Lists the `MulticloudDataTransferConfig` resources in a specified project and location.Lists the `MulticloudDataTransferConfig` resources in a specified project and location.Lists the `MulticloudDataTransferConfig` resources in a specified project and location.final UnaryCallable<ListMulticloudDataTransferConfigsRequest,ListMulticloudDataTransferConfigsResponse> Lists the `MulticloudDataTransferConfig` resources in a specified project and location.final UnaryCallable<ListMulticloudDataTransferConfigsRequest,DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse> Lists the `MulticloudDataTransferConfig` resources in a specified project and location.listMulticloudDataTransferSupportedServices(ListMulticloudDataTransferSupportedServicesRequest request) Lists the services in the project for a region that are supported for Data Transfer Essentials.Lists the services in the project for a region that are supported for Data Transfer Essentials.Lists the services in the project for a region that are supported for Data Transfer Essentials.final UnaryCallable<ListMulticloudDataTransferSupportedServicesRequest,ListMulticloudDataTransferSupportedServicesResponse> Lists the services in the project for a region that are supported for Data Transfer Essentials.final UnaryCallable<ListMulticloudDataTransferSupportedServicesRequest,DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse> Lists the services in the project for a region that are supported for Data Transfer Essentials.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateDestinationAsync(Destination destination, com.google.protobuf.FieldMask updateMask) Updates a `Destination` resource in a specified project and location.Updates a `Destination` resource in a specified project and location.Updates a `Destination` resource in a specified project and location.Updates a `Destination` resource in a specified project and location.updateMulticloudDataTransferConfigAsync(MulticloudDataTransferConfig multicloudDataTransferConfig, com.google.protobuf.FieldMask updateMask) Updates a `MulticloudDataTransferConfig` resource in a specified project and location.Updates a `MulticloudDataTransferConfig` resource in a specified project and location.Updates a `MulticloudDataTransferConfig` resource in a specified project and location.final OperationCallable<UpdateMulticloudDataTransferConfigRequest,MulticloudDataTransferConfig, OperationMetadata> Updates a `MulticloudDataTransferConfig` resource in a specified project and location.
-
Constructor Details
-
DataTransferServiceClient
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
-
-
Method Details
-
create
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
Constructs an instance of DataTransferServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataTransferServiceSettings). -
getSettings
-
getStub
-
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
public final DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(ListMulticloudDataTransferConfigsRequest request) 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
public final UnaryCallable<ListMulticloudDataTransferConfigsRequest,DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse> 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
public final UnaryCallable<ListMulticloudDataTransferConfigsRequest,ListMulticloudDataTransferConfigsResponse> 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
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, createMulticloudDataTransferConfigOperationCallable()OperationMetadata> 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, updateMulticloudDataTransferConfigOperationCallable()OperationMetadata> 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, deleteMulticloudDataTransferConfigOperationCallable()OperationMetadata> 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
public final DataTransferServiceClient.ListDestinationsPagedResponse listDestinations(MulticloudDataTransferConfigName 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()) { 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
public final DataTransferServiceClient.ListDestinationsPagedResponse listDestinations(ListDestinationsRequest request) 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
public final UnaryCallable<ListDestinationsRequest,DataTransferServiceClient.ListDestinationsPagedResponse> 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
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
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
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
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, createDestinationOperationCallable()OperationMetadata> 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
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, updateDestinationOperationCallable()OperationMetadata> 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
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, deleteDestinationOperationCallable()OperationMetadata> 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
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
public final DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse listMulticloudDataTransferSupportedServices(ListMulticloudDataTransferSupportedServicesRequest request) 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
public final UnaryCallable<ListMulticloudDataTransferSupportedServicesRequest,DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse> 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
public final UnaryCallable<ListMulticloudDataTransferSupportedServicesRequest,ListMulticloudDataTransferSupportedServicesResponse> 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
public final DataTransferServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) 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
public final UnaryCallable<ListLocationsRequest,DataTransferServiceClient.ListLocationsPagedResponse> 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
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
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
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
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
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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-