Class DataTransferServiceClient (2.0.27)

public class DataTransferServiceClient implements BackgroundResource

Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. This service contains methods that are end user exposed. It backs up the frontend.

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:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
   DataSource response = dataTransferServiceClient.getDataSource(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().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

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

This class can be customized by passing in a custom instance of DataTransferServiceSettings to create(). For example:

To customize credentials:


 DataTransferServiceSettings dataTransferServiceSettings =
     DataTransferServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DataTransferServiceClient dataTransferServiceClient =
     DataTransferServiceClient.create(dataTransferServiceSettings);
 

To customize the endpoint:


 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.

Inheritance

java.lang.Object > DataTransferServiceClient

Implements

BackgroundResource

Constructors

DataTransferServiceClient(DataTransferServiceSettings settings)

protected DataTransferServiceClient(DataTransferServiceSettings settings)

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.

Parameter
NameDescription
settingsDataTransferServiceSettings

DataTransferServiceClient(DataTransferServiceStub stub)

protected DataTransferServiceClient(DataTransferServiceStub stub)
Parameter
NameDescription
stubDataTransferServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

checkValidCreds(CheckValidCredsRequest request)

public final CheckValidCredsResponse checkValidCreds(CheckValidCredsRequest request)

Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   CheckValidCredsRequest request =
       CheckValidCredsRequest.newBuilder()
           .setName(
               DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString())
           .build();
   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(request);
 }
 
Parameter
NameDescription
requestCheckValidCredsRequest

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

Returns
TypeDescription
CheckValidCredsResponse

checkValidCreds(DataSourceName name)

public final CheckValidCredsResponse checkValidCreds(DataSourceName name)

Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(name);
 }
 
Parameter
NameDescription
nameDataSourceName

Required. The data source in the form: projects/{project_id}/dataSources/{data_source_id} or projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}.

Returns
TypeDescription
CheckValidCredsResponse

checkValidCreds(String name)

public final CheckValidCredsResponse checkValidCreds(String name)

Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString();
   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(name);
 }
 
Parameter
NameDescription
nameString

Required. The data source in the form: projects/{project_id}/dataSources/{data_source_id} or projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}.

Returns
TypeDescription
CheckValidCredsResponse

checkValidCredsCallable()

public final UnaryCallable<CheckValidCredsRequest,CheckValidCredsResponse> checkValidCredsCallable()

Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the particular user, which is a pre-requisite before user can create a transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   CheckValidCredsRequest request =
       CheckValidCredsRequest.newBuilder()
           .setName(
               DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<CheckValidCredsRequest,CheckValidCredsResponse>

close()

public final void close()

create()

public static final DataTransferServiceClient create()

Constructs an instance of DataTransferServiceClient with default settings.

Returns
TypeDescription
DataTransferServiceClient
Exceptions
TypeDescription
IOException

create(DataTransferServiceSettings settings)

public static final DataTransferServiceClient create(DataTransferServiceSettings settings)

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.

Parameter
NameDescription
settingsDataTransferServiceSettings
Returns
TypeDescription
DataTransferServiceClient
Exceptions
TypeDescription
IOException

create(DataTransferServiceStub stub)

public static final DataTransferServiceClient create(DataTransferServiceStub stub)

Constructs an instance of DataTransferServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataTransferServiceSettings).

Parameter
NameDescription
stubDataTransferServiceStub
Returns
TypeDescription
DataTransferServiceClient

createTransferConfig(CreateTransferConfigRequest request)

public final TransferConfig createTransferConfig(CreateTransferConfigRequest request)

Creates a new data transfer configuration.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   CreateTransferConfigRequest request =
       CreateTransferConfigRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setTransferConfig(TransferConfig.newBuilder().build())
           .setAuthorizationCode("authorizationCode742596102")
           .setVersionInfo("versionInfo688769446")
           .setServiceAccountName("serviceAccountName2137368675")
           .build();
   TransferConfig response = dataTransferServiceClient.createTransferConfig(request);
 }
 
Parameter
NameDescription
requestCreateTransferConfigRequest

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

Returns
TypeDescription
TransferConfig

createTransferConfig(LocationName parent, TransferConfig transferConfig)

public final TransferConfig createTransferConfig(LocationName parent, TransferConfig transferConfig)

Creates a new data transfer configuration.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   TransferConfig transferConfig = TransferConfig.newBuilder().build();
   TransferConfig response =
       dataTransferServiceClient.createTransferConfig(parent, transferConfig);
 }
 
Parameters
NameDescription
parentLocationName

Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.

transferConfigTransferConfig

Required. Data transfer configuration to create.

Returns
TypeDescription
TransferConfig

createTransferConfig(ProjectName parent, TransferConfig transferConfig)

public final TransferConfig createTransferConfig(ProjectName parent, TransferConfig transferConfig)

Creates a new data transfer configuration.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   TransferConfig transferConfig = TransferConfig.newBuilder().build();
   TransferConfig response =
       dataTransferServiceClient.createTransferConfig(parent, transferConfig);
 }
 
Parameters
NameDescription
parentProjectName

Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.

transferConfigTransferConfig

Required. Data transfer configuration to create.

Returns
TypeDescription
TransferConfig

createTransferConfig(String parent, TransferConfig transferConfig)

public final TransferConfig createTransferConfig(String parent, TransferConfig transferConfig)

Creates a new data transfer configuration.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   TransferConfig transferConfig = TransferConfig.newBuilder().build();
   TransferConfig response =
       dataTransferServiceClient.createTransferConfig(parent, transferConfig);
 }
 
Parameters
NameDescription
parentString

Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail.

transferConfigTransferConfig

Required. Data transfer configuration to create.

Returns
TypeDescription
TransferConfig

createTransferConfigCallable()

public final UnaryCallable<CreateTransferConfigRequest,TransferConfig> createTransferConfigCallable()

Creates a new data transfer configuration.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   CreateTransferConfigRequest request =
       CreateTransferConfigRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setTransferConfig(TransferConfig.newBuilder().build())
           .setAuthorizationCode("authorizationCode742596102")
           .setVersionInfo("versionInfo688769446")
           .setServiceAccountName("serviceAccountName2137368675")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<CreateTransferConfigRequest,TransferConfig>

deleteTransferConfig(DeleteTransferConfigRequest request)

public final void deleteTransferConfig(DeleteTransferConfigRequest request)

Deletes a data transfer configuration, including any associated transfer runs and logs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DeleteTransferConfigRequest request =
       DeleteTransferConfigRequest.newBuilder()
           .setName(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   dataTransferServiceClient.deleteTransferConfig(request);
 }
 
Parameter
NameDescription
requestDeleteTransferConfigRequest

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

deleteTransferConfig(TransferConfigName name)

public final void deleteTransferConfig(TransferConfigName name)

Deletes a data transfer configuration, including any associated transfer runs and logs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   TransferConfigName name =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
   dataTransferServiceClient.deleteTransferConfig(name);
 }
 
Parameter
NameDescription
nameTransferConfigName

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}

deleteTransferConfig(String name)

public final void deleteTransferConfig(String name)

Deletes a data transfer configuration, including any associated transfer runs and logs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
           .toString();
   dataTransferServiceClient.deleteTransferConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}

deleteTransferConfigCallable()

public final UnaryCallable<DeleteTransferConfigRequest,Empty> deleteTransferConfigCallable()

Deletes a data transfer configuration, including any associated transfer runs and logs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DeleteTransferConfigRequest request =
       DeleteTransferConfigRequest.newBuilder()
           .setName(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       dataTransferServiceClient.deleteTransferConfigCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteTransferConfigRequest,Empty>

deleteTransferRun(DeleteTransferRunRequest request)

public final void deleteTransferRun(DeleteTransferRunRequest request)

Deletes the specified transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DeleteTransferRunRequest request =
       DeleteTransferRunRequest.newBuilder()
           .setName(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .build();
   dataTransferServiceClient.deleteTransferRun(request);
 }
 
Parameter
NameDescription
requestDeleteTransferRunRequest

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

deleteTransferRun(RunName name)

public final void deleteTransferRun(RunName name)

Deletes the specified transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   RunName name =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
   dataTransferServiceClient.deleteTransferRun(name);
 }
 
Parameter
NameDescription
nameRunName

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

deleteTransferRun(String name)

public final void deleteTransferRun(String name)

Deletes the specified transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
           .toString();
   dataTransferServiceClient.deleteTransferRun(name);
 }
 
Parameter
NameDescription
nameString

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

deleteTransferRunCallable()

public final UnaryCallable<DeleteTransferRunRequest,Empty> deleteTransferRunCallable()

Deletes the specified transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DeleteTransferRunRequest request =
       DeleteTransferRunRequest.newBuilder()
           .setName(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       dataTransferServiceClient.deleteTransferRunCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteTransferRunRequest,Empty>

getDataSource(DataSourceName name)

public final DataSource getDataSource(DataSourceName name)

Retrieves a supported data source and returns its settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
   DataSource response = dataTransferServiceClient.getDataSource(name);
 }
 
Parameter
NameDescription
nameDataSourceName

Required. The field will contain name of the resource requested, for example: projects/{project_id}/dataSources/{data_source_id} or projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}

Returns
TypeDescription
DataSource

getDataSource(GetDataSourceRequest request)

public final DataSource getDataSource(GetDataSourceRequest request)

Retrieves a supported data source and returns its settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetDataSourceRequest request =
       GetDataSourceRequest.newBuilder()
           .setName(
               DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString())
           .build();
   DataSource response = dataTransferServiceClient.getDataSource(request);
 }
 
Parameter
NameDescription
requestGetDataSourceRequest

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

Returns
TypeDescription
DataSource

getDataSource(String name)

public final DataSource getDataSource(String name)

Retrieves a supported data source and returns its settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString();
   DataSource response = dataTransferServiceClient.getDataSource(name);
 }
 
Parameter
NameDescription
nameString

Required. The field will contain name of the resource requested, for example: projects/{project_id}/dataSources/{data_source_id} or projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}

Returns
TypeDescription
DataSource

getDataSourceCallable()

public final UnaryCallable<GetDataSourceRequest,DataSource> getDataSourceCallable()

Retrieves a supported data source and returns its settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetDataSourceRequest request =
       GetDataSourceRequest.newBuilder()
           .setName(
               DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]").toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetDataSourceRequest,DataSource>

getSettings()

public final DataTransferServiceSettings getSettings()
Returns
TypeDescription
DataTransferServiceSettings

getStub()

public DataTransferServiceStub getStub()
Returns
TypeDescription
DataTransferServiceStub

getTransferConfig(GetTransferConfigRequest request)

public final TransferConfig getTransferConfig(GetTransferConfigRequest request)

Returns information about a data transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetTransferConfigRequest request =
       GetTransferConfigRequest.newBuilder()
           .setName(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   TransferConfig response = dataTransferServiceClient.getTransferConfig(request);
 }
 
Parameter
NameDescription
requestGetTransferConfigRequest

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

Returns
TypeDescription
TransferConfig

getTransferConfig(TransferConfigName name)

public final TransferConfig getTransferConfig(TransferConfigName name)

Returns information about a data transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   TransferConfigName name =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
   TransferConfig response = dataTransferServiceClient.getTransferConfig(name);
 }
 
Parameter
NameDescription
nameTransferConfigName

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}

Returns
TypeDescription
TransferConfig

getTransferConfig(String name)

public final TransferConfig getTransferConfig(String name)

Returns information about a data transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
           .toString();
   TransferConfig response = dataTransferServiceClient.getTransferConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}

Returns
TypeDescription
TransferConfig

getTransferConfigCallable()

public final UnaryCallable<GetTransferConfigRequest,TransferConfig> getTransferConfigCallable()

Returns information about a data transfer config.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetTransferConfigRequest request =
       GetTransferConfigRequest.newBuilder()
           .setName(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetTransferConfigRequest,TransferConfig>

getTransferRun(GetTransferRunRequest request)

public final TransferRun getTransferRun(GetTransferRunRequest request)

Returns information about the particular transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetTransferRunRequest request =
       GetTransferRunRequest.newBuilder()
           .setName(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .build();
   TransferRun response = dataTransferServiceClient.getTransferRun(request);
 }
 
Parameter
NameDescription
requestGetTransferRunRequest

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

Returns
TypeDescription
TransferRun

getTransferRun(RunName name)

public final TransferRun getTransferRun(RunName name)

Returns information about the particular transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   RunName name =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
   TransferRun response = dataTransferServiceClient.getTransferRun(name);
 }
 
Parameter
NameDescription
nameRunName

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

Returns
TypeDescription
TransferRun

getTransferRun(String name)

public final TransferRun getTransferRun(String name)

Returns information about the particular transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String name =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
           .toString();
   TransferRun response = dataTransferServiceClient.getTransferRun(name);
 }
 
Parameter
NameDescription
nameString

Required. The field will contain name of the resource requested, for example: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

Returns
TypeDescription
TransferRun

getTransferRunCallable()

public final UnaryCallable<GetTransferRunRequest,TransferRun> getTransferRunCallable()

Returns information about the particular transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   GetTransferRunRequest request =
       GetTransferRunRequest.newBuilder()
           .setName(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<GetTransferRunRequest,TransferRun>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listDataSources(ListDataSourcesRequest request)

public final DataTransferServiceClient.ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest request)

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (DataSource element : dataTransferServiceClient.listDataSources(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListDataSourcesRequest

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

Returns
TypeDescription
DataTransferServiceClient.ListDataSourcesPagedResponse

listDataSources(LocationName parent)

public final DataTransferServiceClient.ListDataSourcesPagedResponse listDataSources(LocationName parent)

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (DataSource element : dataTransferServiceClient.listDataSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The BigQuery project id for which data sources should be returned. Must be in the form: projects/{project_id} or `projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListDataSourcesPagedResponse

listDataSources(ProjectName parent)

public final DataTransferServiceClient.ListDataSourcesPagedResponse listDataSources(ProjectName parent)

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (DataSource element : dataTransferServiceClient.listDataSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The BigQuery project id for which data sources should be returned. Must be in the form: projects/{project_id} or `projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListDataSourcesPagedResponse

listDataSources(String parent)

public final DataTransferServiceClient.ListDataSourcesPagedResponse listDataSources(String parent)

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   for (DataSource element : dataTransferServiceClient.listDataSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The BigQuery project id for which data sources should be returned. Must be in the form: projects/{project_id} or `projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListDataSourcesPagedResponse

listDataSourcesCallable()

public final UnaryCallable<ListDataSourcesRequest,ListDataSourcesResponse> listDataSourcesCallable()

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListDataSourcesResponse response =
         dataTransferServiceClient.listDataSourcesCallable().call(request);
     for (DataSource element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListDataSourcesRequest,ListDataSourcesResponse>

listDataSourcesPagedCallable()

public final UnaryCallable<ListDataSourcesRequest,DataTransferServiceClient.ListDataSourcesPagedResponse> listDataSourcesPagedCallable()

Lists supported data sources and returns their settings, which can be used for UI rendering.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<ListDataSourcesRequest,ListDataSourcesPagedResponse>

listTransferConfigs(ListTransferConfigsRequest request)

public final DataTransferServiceClient.ListTransferConfigsPagedResponse listTransferConfigs(ListTransferConfigsRequest request)

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferConfigsRequest request =
       ListTransferConfigsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .addAllDataSourceIds(new ArrayList<String>())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (TransferConfig element :
       dataTransferServiceClient.listTransferConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListTransferConfigsRequest

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

Returns
TypeDescription
DataTransferServiceClient.ListTransferConfigsPagedResponse

listTransferConfigs(LocationName parent)

public final DataTransferServiceClient.ListTransferConfigsPagedResponse listTransferConfigs(LocationName parent)

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (TransferConfig element :
       dataTransferServiceClient.listTransferConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The BigQuery project id for which data sources should be returned: projects/{project_id} or projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListTransferConfigsPagedResponse

listTransferConfigs(ProjectName parent)

public final DataTransferServiceClient.ListTransferConfigsPagedResponse listTransferConfigs(ProjectName parent)

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (TransferConfig element :
       dataTransferServiceClient.listTransferConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The BigQuery project id for which data sources should be returned: projects/{project_id} or projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListTransferConfigsPagedResponse

listTransferConfigs(String parent)

public final DataTransferServiceClient.ListTransferConfigsPagedResponse listTransferConfigs(String parent)

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   for (TransferConfig element :
       dataTransferServiceClient.listTransferConfigs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The BigQuery project id for which data sources should be returned: projects/{project_id} or projects/{project_id}/locations/{location_id}

Returns
TypeDescription
DataTransferServiceClient.ListTransferConfigsPagedResponse

listTransferConfigsCallable()

public final UnaryCallable<ListTransferConfigsRequest,ListTransferConfigsResponse> listTransferConfigsCallable()

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferConfigsRequest request =
       ListTransferConfigsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .addAllDataSourceIds(new ArrayList<String>())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListTransferConfigsResponse response =
         dataTransferServiceClient.listTransferConfigsCallable().call(request);
     for (TransferConfig element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListTransferConfigsRequest,ListTransferConfigsResponse>

listTransferConfigsPagedCallable()

public final UnaryCallable<ListTransferConfigsRequest,DataTransferServiceClient.ListTransferConfigsPagedResponse> listTransferConfigsPagedCallable()

Returns information about all transfer configs owned by a project in the specified location.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferConfigsRequest request =
       ListTransferConfigsRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .addAllDataSourceIds(new ArrayList<String>())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<ListTransferConfigsRequest,ListTransferConfigsPagedResponse>

listTransferLogs(ListTransferLogsRequest request)

public final DataTransferServiceClient.ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequest request)

Returns user facing log messages for the data transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferLogsRequest request =
       ListTransferLogsRequest.newBuilder()
           .setParent(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .addAllMessageTypes(new ArrayList
Parameter
NameDescription
requestListTransferLogsRequest

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

Returns
TypeDescription
DataTransferServiceClient.ListTransferLogsPagedResponse

listTransferLogs(RunName parent)

public final DataTransferServiceClient.ListTransferLogsPagedResponse listTransferLogs(RunName parent)

Returns user facing log messages for the data transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   RunName parent =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
   for (TransferMessage element :
       dataTransferServiceClient.listTransferLogs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentRunName

Required. Transfer run name in the form: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

Returns
TypeDescription
DataTransferServiceClient.ListTransferLogsPagedResponse

listTransferLogs(String parent)

public final DataTransferServiceClient.ListTransferLogsPagedResponse listTransferLogs(String parent)

Returns user facing log messages for the data transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent =
       RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
           .toString();
   for (TransferMessage element :
       dataTransferServiceClient.listTransferLogs(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Transfer run name in the form: projects/{project_id}/transferConfigs/{config_id}/runs/{run_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}

Returns
TypeDescription
DataTransferServiceClient.ListTransferLogsPagedResponse

listTransferLogsCallable()

public final UnaryCallable<ListTransferLogsRequest,ListTransferLogsResponse> listTransferLogsCallable()

Returns user facing log messages for the data transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferLogsRequest request =
       ListTransferLogsRequest.newBuilder()
           .setParent(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .addAllMessageTypes(new ArrayList
Returns
TypeDescription
UnaryCallable<ListTransferLogsRequest,ListTransferLogsResponse>

listTransferLogsPagedCallable()

public final UnaryCallable<ListTransferLogsRequest,DataTransferServiceClient.ListTransferLogsPagedResponse> listTransferLogsPagedCallable()

Returns user facing log messages for the data transfer run.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferLogsRequest request =
       ListTransferLogsRequest.newBuilder()
           .setParent(
               RunName.ofProjectTransferConfigRunName("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]")
                   .toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .addAllMessageTypes(new ArrayList
Returns
TypeDescription
UnaryCallable<ListTransferLogsRequest,ListTransferLogsPagedResponse>

listTransferRuns(ListTransferRunsRequest request)

public final DataTransferServiceClient.ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequest request)

Returns information about running and completed jobs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferRunsRequest request =
       ListTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .addAllStates(new ArrayList
Parameter
NameDescription
requestListTransferRunsRequest

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

Returns
TypeDescription
DataTransferServiceClient.ListTransferRunsPagedResponse

listTransferRuns(TransferConfigName parent)

public final DataTransferServiceClient.ListTransferRunsPagedResponse listTransferRuns(TransferConfigName parent)

Returns information about running and completed jobs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   TransferConfigName parent =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
   for (TransferRun element : dataTransferServiceClient.listTransferRuns(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentTransferConfigName

Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer configuration resource name is: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}.

Returns
TypeDescription
DataTransferServiceClient.ListTransferRunsPagedResponse

listTransferRuns(String parent)

public final DataTransferServiceClient.ListTransferRunsPagedResponse listTransferRuns(String parent)

Returns information about running and completed jobs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
           .toString();
   for (TransferRun element : dataTransferServiceClient.listTransferRuns(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer configuration resource name is: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}.

Returns
TypeDescription
DataTransferServiceClient.ListTransferRunsPagedResponse

listTransferRunsCallable()

public final UnaryCallable<ListTransferRunsRequest,ListTransferRunsResponse> listTransferRunsCallable()

Returns information about running and completed jobs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferRunsRequest request =
       ListTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .addAllStates(new ArrayList
Returns
TypeDescription
UnaryCallable<ListTransferRunsRequest,ListTransferRunsResponse>

listTransferRunsPagedCallable()

public final UnaryCallable<ListTransferRunsRequest,DataTransferServiceClient.ListTransferRunsPagedResponse> listTransferRunsPagedCallable()

Returns information about running and completed jobs.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ListTransferRunsRequest request =
       ListTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .addAllStates(new ArrayList
Returns
TypeDescription
UnaryCallable<ListTransferRunsRequest,ListTransferRunsPagedResponse>

scheduleTransferRuns(ScheduleTransferRunsRequest request) (deprecated)

public final ScheduleTransferRunsResponse scheduleTransferRuns(ScheduleTransferRunsRequest request)

(deprecated) This method is deprecated and will be removed in the next major version update.

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ScheduleTransferRunsRequest request =
       ScheduleTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .setStartTime(Timestamp.newBuilder().build())
           .setEndTime(Timestamp.newBuilder().build())
           .build();
   ScheduleTransferRunsResponse response =
       dataTransferServiceClient.scheduleTransferRuns(request);
 }
 
Parameter
NameDescription
requestScheduleTransferRunsRequest

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

Returns
TypeDescription
ScheduleTransferRunsResponse

scheduleTransferRuns(TransferConfigName parent, Timestamp startTime, Timestamp endTime) (deprecated)

public final ScheduleTransferRunsResponse scheduleTransferRuns(TransferConfigName parent, Timestamp startTime, Timestamp endTime)

(deprecated) This method is deprecated and will be removed in the next major version update.

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   TransferConfigName parent =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
   Timestamp startTime = Timestamp.newBuilder().build();
   Timestamp endTime = Timestamp.newBuilder().build();
   ScheduleTransferRunsResponse response =
       dataTransferServiceClient.scheduleTransferRuns(parent, startTime, endTime);
 }
 
Parameters
NameDescription
parentTransferConfigName

Required. Transfer configuration name in the form: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}.

startTimeTimestamp

Required. Start time of the range of transfer runs. For example, "2017-05-25T00:00:00+00:00".

endTimeTimestamp

Required. End time of the range of transfer runs. For example, "2017-05-30T00:00:00+00:00".

Returns
TypeDescription
ScheduleTransferRunsResponse

scheduleTransferRuns(String parent, Timestamp startTime, Timestamp endTime) (deprecated)

public final ScheduleTransferRunsResponse scheduleTransferRuns(String parent, Timestamp startTime, Timestamp endTime)

(deprecated) This method is deprecated and will be removed in the next major version update.

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   String parent =
       TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
           .toString();
   Timestamp startTime = Timestamp.newBuilder().build();
   Timestamp endTime = Timestamp.newBuilder().build();
   ScheduleTransferRunsResponse response =
       dataTransferServiceClient.scheduleTransferRuns(parent, startTime, endTime);
 }
 
Parameters
NameDescription
parentString

Required. Transfer configuration name in the form: projects/{project_id}/transferConfigs/{config_id} or projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}.

startTimeTimestamp

Required. Start time of the range of transfer runs. For example, "2017-05-25T00:00:00+00:00".

endTimeTimestamp

Required. End time of the range of transfer runs. For example, "2017-05-30T00:00:00+00:00".

Returns
TypeDescription
ScheduleTransferRunsResponse

scheduleTransferRunsCallable() (deprecated)

public final UnaryCallable<ScheduleTransferRunsRequest,ScheduleTransferRunsResponse> scheduleTransferRunsCallable()

(deprecated) This method is deprecated and will be removed in the next major version update.

Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   ScheduleTransferRunsRequest request =
       ScheduleTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .setStartTime(Timestamp.newBuilder().build())
           .setEndTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<ScheduleTransferRunsRequest,ScheduleTransferRunsResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

startManualTransferRuns(StartManualTransferRunsRequest request)

public final StartManualTransferRunsResponse startManualTransferRuns(StartManualTransferRunsRequest request)

Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   StartManualTransferRunsRequest request =
       StartManualTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   StartManualTransferRunsResponse response =
       dataTransferServiceClient.startManualTransferRuns(request);
 }
 
Parameter
NameDescription
requestStartManualTransferRunsRequest

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

Returns
TypeDescription
StartManualTransferRunsResponse

startManualTransferRunsCallable()

public final UnaryCallable<StartManualTransferRunsRequest,StartManualTransferRunsResponse> startManualTransferRunsCallable()

Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   StartManualTransferRunsRequest request =
       StartManualTransferRunsRequest.newBuilder()
           .setParent(
               TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]")
                   .toString())
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<StartManualTransferRunsRequest,StartManualTransferRunsResponse>

updateTransferConfig(TransferConfig transferConfig, FieldMask updateMask)

public final TransferConfig updateTransferConfig(TransferConfig transferConfig, FieldMask updateMask)

Updates a data transfer configuration. All fields must be set, even if they are not updated.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   TransferConfig transferConfig = TransferConfig.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   TransferConfig response =
       dataTransferServiceClient.updateTransferConfig(transferConfig, updateMask);
 }
 
Parameters
NameDescription
transferConfigTransferConfig

Required. Data transfer configuration to create.

updateMaskFieldMask

Required. Required list of fields to be updated in this request.

Returns
TypeDescription
TransferConfig

updateTransferConfig(UpdateTransferConfigRequest request)

public final TransferConfig updateTransferConfig(UpdateTransferConfigRequest request)

Updates a data transfer configuration. All fields must be set, even if they are not updated.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   UpdateTransferConfigRequest request =
       UpdateTransferConfigRequest.newBuilder()
           .setTransferConfig(TransferConfig.newBuilder().build())
           .setAuthorizationCode("authorizationCode742596102")
           .setUpdateMask(FieldMask.newBuilder().build())
           .setVersionInfo("versionInfo688769446")
           .setServiceAccountName("serviceAccountName2137368675")
           .build();
   TransferConfig response = dataTransferServiceClient.updateTransferConfig(request);
 }
 
Parameter
NameDescription
requestUpdateTransferConfigRequest

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

Returns
TypeDescription
TransferConfig

updateTransferConfigCallable()

public final UnaryCallable<UpdateTransferConfigRequest,TransferConfig> updateTransferConfigCallable()

Updates a data transfer configuration. All fields must be set, even if they are not updated.

Sample code:


 try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
   UpdateTransferConfigRequest request =
       UpdateTransferConfigRequest.newBuilder()
           .setTransferConfig(TransferConfig.newBuilder().build())
           .setAuthorizationCode("authorizationCode742596102")
           .setUpdateMask(FieldMask.newBuilder().build())
           .setVersionInfo("versionInfo688769446")
           .setServiceAccountName("serviceAccountName2137368675")
           .build();
   ApiFuture
Returns
TypeDescription
UnaryCallable<UpdateTransferConfigRequest,TransferConfig>