UNPKG

@google-cloud/bigquery-data-transfer

Version:
696 lines (695 loc) 82.8 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * This API allows users to manage their data transfers into BigQuery. * @class * @memberof v1 */ export declare class DataTransferServiceClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; locationsClient: LocationsClient; pathTemplates: { [name: string]: gax.PathTemplate; }; dataTransferServiceStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of DataTransferServiceClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new DataTransferServiceClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * Retrieves a supported data source and returns its settings. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.DataSource|DataSource}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.get_data_source.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_async */ getDataSource(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | undefined, {} | undefined ]>; getDataSource(request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void; getDataSource(request: protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IDataSource, protos.google.cloud.bigquery.datatransfer.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void; /** * Creates a new data transfer configuration. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * 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. * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} request.transferConfig * Required. Data transfer configuration to create. * @param {string} request.authorizationCode * Deprecated: Authorization code was required when * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used * in any data sources. Use `version_info` instead. * * Optional OAuth2 authorization code to use with this transfer configuration. * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' * and new credentials are needed, as indicated by `CheckValidCreds`. In order * to obtain authorization_code, make a request to the following URL: * <pre class="prettyprint" suppresswarning="true"> * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var> * </pre> * * The <var>client_id</var> is the OAuth client_id of the data source as * returned by ListDataSources method. * * <var>data_source_scopes</var> are the scopes returned by ListDataSources * method. * * Note that this should not be set when `service_account_name` is used to * create the transfer config. * @param {string} request.versionInfo * Optional version info. This parameter replaces `authorization_code` which * is no longer used in any data sources. This is required only if * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials * are needed, as indicated by `CheckValidCreds`. In order to obtain version * info, make a request to the following URL: * <pre class="prettyprint" suppresswarning="true"> * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var> * </pre> * * The <var>client_id</var> is the OAuth client_id of the data source as * returned by ListDataSources method. * * <var>data_source_scopes</var> are the scopes returned by ListDataSources * method. * * Note that this should not be set when `service_account_name` is used to * create the transfer config. * @param {string} request.serviceAccountName * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. * * Note that not all data sources support service account credentials when * creating a transfer config. For the latest list of data sources, read about * [using service * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.TransferConfig|TransferConfig}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.create_transfer_config.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_async */ createTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | undefined, {} | undefined ]>; createTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>): void; createTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.ICreateTransferConfigRequest | null | undefined, {} | null | undefined>): void; /** * Updates a data transfer configuration. * All fields must be set, even if they are not updated. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.bigquery.datatransfer.v1.TransferConfig} request.transferConfig * Required. Data transfer configuration to create. * @param {string} request.authorizationCode * Deprecated: Authorization code was required when * `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used * in any data sources. Use `version_info` instead. * * Optional OAuth2 authorization code to use with this transfer configuration. * This is required only if `transferConfig.dataSourceId` is 'youtube_channel' * and new credentials are needed, as indicated by `CheckValidCreds`. In order * to obtain authorization_code, make a request to the following URL: * <pre class="prettyprint" suppresswarning="true"> * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var> * </pre> * * The <var>client_id</var> is the OAuth client_id of the data source as * returned by ListDataSources method. * * <var>data_source_scopes</var> are the scopes returned by ListDataSources * method. * * Note that this should not be set when `service_account_name` is used to * update the transfer config. * @param {google.protobuf.FieldMask} request.updateMask * Required. Required list of fields to be updated in this request. * @param {string} request.versionInfo * Optional version info. This parameter replaces `authorization_code` which * is no longer used in any data sources. This is required only if * `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials * are needed, as indicated by `CheckValidCreds`. In order to obtain version * info, make a request to the following URL: * <pre class="prettyprint" suppresswarning="true"> * https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=<var>client_id</var>&scope=<var>data_source_scopes</var> * </pre> * * The <var>client_id</var> is the OAuth client_id of the data source as * returned by ListDataSources method. * * <var>data_source_scopes</var> are the scopes returned by ListDataSources * method. * * Note that this should not be set when `service_account_name` is used to * update the transfer config. * @param {string} request.serviceAccountName * Optional service account email. If this field is set, the transfer config * will be created with this service account's credentials. It requires that * the requesting user calling this API has permissions to act as this service * account. * * Note that not all data sources support service account credentials when * creating a transfer config. For the latest list of data sources, read about * [using service * accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.TransferConfig|TransferConfig}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.update_transfer_config.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_async */ updateTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | undefined, {} | undefined ]>; updateTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>): void; updateTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IUpdateTransferConfigRequest | null | undefined, {} | null | undefined>): void; /** * Deletes a data transfer configuration, including any associated transfer * runs and logs. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.delete_transfer_config.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_async */ deleteTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | undefined, {} | undefined ]>; deleteTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>): void; deleteTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferConfigRequest | null | undefined, {} | null | undefined>): void; /** * Returns information about a data transfer config. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.TransferConfig|TransferConfig}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.get_transfer_config.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_async */ getTransferConfig(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | undefined, {} | undefined ]>; getTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>): void; getTransferConfig(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferConfigRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * @param {google.protobuf.Timestamp} request.startTime * Required. Start time of the range of transfer runs. For example, * `"2017-05-25T00:00:00+00:00"`. * @param {google.protobuf.Timestamp} request.endTime * Required. End time of the range of transfer runs. For example, * `"2017-05-30T00:00:00+00:00"`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse|ScheduleTransferRunsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.schedule_transfer_runs.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_async * @deprecated ScheduleTransferRuns is deprecated and may be removed in a future version. */ scheduleTransferRuns(request?: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | undefined, {} | undefined ]>; scheduleTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>): void; scheduleTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IScheduleTransferRunsRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * @param {google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange} request.requestedTimeRange * A time_range start and end timestamp for historical data files or reports * that are scheduled to be transferred by the scheduled transfer run. * requested_time_range must be a past time and cannot include future time * values. * @param {google.protobuf.Timestamp} request.requestedRunTime * A run_time timestamp for historical data files or reports * that are scheduled to be transferred by the scheduled transfer run. * requested_run_time must be a past time and cannot include future time * values. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse|StartManualTransferRunsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.start_manual_transfer_runs.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_async */ startManualTransferRuns(request?: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | undefined, {} | undefined ]>; startManualTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>): void; startManualTransferRuns(request: protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsResponse, protos.google.cloud.bigquery.datatransfer.v1.IStartManualTransferRunsRequest | null | undefined, {} | null | undefined>): void; /** * Returns information about the particular transfer run. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.TransferRun|TransferRun}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.get_transfer_run.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_async */ getTransferRun(request?: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | undefined, {} | undefined ]>; getTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | undefined>): void; getTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ITransferRun, protos.google.cloud.bigquery.datatransfer.v1.IGetTransferRunRequest | null | undefined, {} | null | undefined>): void; /** * Deletes the specified transfer run. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.delete_transfer_run.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_async */ deleteTransferRun(request?: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | undefined, {} | undefined ]>; deleteTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>): void; deleteTransferRun(request: protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IDeleteTransferRunRequest | null | undefined, {} | null | undefined>): void; /** * Returns true if valid credentials exist for the given data source and * requesting user. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * 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}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse|CheckValidCredsResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.check_valid_creds.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_async */ checkValidCreds(request?: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | undefined, {} | undefined ]>; checkValidCreds(request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | null | undefined, {} | null | undefined>): void; checkValidCreds(request: protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest, callback: Callback<protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsResponse, protos.google.cloud.bigquery.datatransfer.v1.ICheckValidCredsRequest | null | undefined, {} | null | undefined>): void; /** * Enroll data sources in a user project. This allows users to create transfer * configurations for these data sources. They will also appear in the * ListDataSources RPC and as such, will appear in the * [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents * can be found in the public guide for * [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and * [Data Transfer * Service](https://cloud.google.com/bigquery/docs/working-with-transfers). * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the project resource in the form: * `projects/{project_id}` * @param {string[]} request.dataSourceIds * Data sources that are enrolled. It is required to provide at least one * data source id. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.enroll_data_sources.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_async */ enrollDataSources(request?: protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest | undefined, {} | undefined ]>; enrollDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest | null | undefined, {} | null | undefined>): void; enrollDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IEnrollDataSourcesRequest | null | undefined, {} | null | undefined>): void; /** * Unenroll data sources in a user project. This allows users to remove * transfer configurations for these data sources. They will no longer appear * in the ListDataSources RPC and will also no longer appear in the [BigQuery * UI](https://console.cloud.google.com/bigquery). Data transfers * configurations of unenrolled data sources will not be scheduled. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the project resource in the form: * `projects/{project_id}` * @param {string[]} request.dataSourceIds * Data sources that are unenrolled. It is required to provide at least one * data source id. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.unenroll_data_sources.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_async */ unenrollDataSources(request?: protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest | undefined, {} | undefined ]>; unenrollDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest | null | undefined, {} | null | undefined>): void; unenrollDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.datatransfer.v1.IUnenrollDataSourcesRequest | null | undefined, {} | null | undefined>): void; /** * Lists supported data sources and returns their settings. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * 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}` * @param {string} request.pageToken * Pagination token, which can be used to request a specific page * of `ListDataSourcesRequest` list results. For multiple-page * results, `ListDataSourcesResponse` outputs * a `next_page` token, which can be used as the * `page_token` value to request the next page of list results. * @param {number} request.pageSize * Page size. The default page size is the maximum value of 1000 results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of {@link protos.google.cloud.bigquery.datatransfer.v1.DataSource|DataSource}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listDataSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDataSources(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.IDataSource[], protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse ]>; listDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>): void; listDataSources(request: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.IDataSource>): void; /** * Equivalent to `listDataSources`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * 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}` * @param {string} request.pageToken * Pagination token, which can be used to request a specific page * of `ListDataSourcesRequest` list results. For multiple-page * results, `ListDataSourcesResponse` outputs * a `next_page` token, which can be used as the * `page_token` value to request the next page of list results. * @param {number} request.pageSize * Page size. The default page size is the maximum value of 1000 results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing {@link protos.google.cloud.bigquery.datatransfer.v1.DataSource|DataSource} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listDataSourcesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listDataSourcesStream(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): Transform; /** * Equivalent to `listDataSources`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * 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}` * @param {string} request.pageToken * Pagination token, which can be used to request a specific page * of `ListDataSourcesRequest` list results. For multiple-page * results, `ListDataSourcesResponse` outputs * a `next_page` token, which can be used as the * `page_token` value to request the next page of list results. * @param {number} request.pageSize * Page size. The default page size is the maximum value of 1000 results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link protos.google.cloud.bigquery.datatransfer.v1.DataSource|DataSource}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/data_transfer_service.list_data_sources.js</caption> * region_tag:bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_async */ listDataSourcesAsync(request?: protos.google.cloud.bigquery.datatransfer.v1.IListDataSourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.datatransfer.v1.IDataSource>; /** * Returns information about all transfer configs owned by a project in the * specified location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The BigQuery project id for which transfer configs * should be returned: `projects/{project_id}` or * `projects/{project_id}/locations/{location_id}` * @param {string[]} request.dataSourceIds * When specified, only configurations of requested data sources are returned. * @param {string} request.pageToken * Pagination token, which can be used to request a specific page * of `ListTransfersRequest` list results. For multiple-page * results, `ListTransfersResponse` outputs * a `next_page` token, which can be used as the * `page_token` value to request the next page of list results. * @param {number} request.pageSize * Page size. The default page size is the maximum value of 1000 results. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of {@link protos.google.cloud.bigquery.datatransfer.v1.TransferConfig|TransferConfig}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listTransferConfigsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listTransferConfigs(request?: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options?: CallOptions): Promise<[ protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig[], protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest | null, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse ]>; listTransferConfigs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>): void; listTransferConfigs(request: protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsRequest, protos.google.cloud.bigquery.datatransfer.v1.IListTransferConfigsResponse | null | undefined, protos.google.cloud.bigquery.datatransfer.v1.ITransferConfig>): void; /** * Equivalent to `listTransferConfigs`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent