import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * Storage Transfer Service and its protos. * Transfers data between between Google Cloud Storage buckets or from a data * source external to Google to a Cloud Storage bucket. * @class * @memberof v1 */ export declare class StorageTransferServiceClient { 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; }; pathTemplates: { [name: string]: gax.PathTemplate; }; operationsClient: gax.OperationsClient; storageTransferServiceStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of StorageTransferServiceClient. * * @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 StorageTransferServiceClient({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; getProjectId(callback: Callback): void; /** * Returns the Google service account that is used by Storage Transfer * Service to access buckets in the project where transfers * run or in other projects. Each Google service account is associated * with one Google Cloud project. Users * should add this service account to the Google Cloud Storage bucket * ACLs to grant access to Storage Transfer Service. This service * account is created and owned by Storage Transfer Service and can * only be used by Storage Transfer Service. * * @param {Object} request * The request object that will be sent. * @param {string} request.projectId * Required. The ID of the Google Cloud project that the Google service * account is associated with. * @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.storagetransfer.v1.GoogleServiceAccount|GoogleServiceAccount}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.get_google_service_account.js * region_tag:storagetransfer_v1_generated_StorageTransferService_GetGoogleServiceAccount_async */ getGoogleServiceAccount(request?: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.IGoogleServiceAccount, (protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest | undefined), {} | undefined ]>; getGoogleServiceAccount(request: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, options: CallOptions, callback: Callback): void; getGoogleServiceAccount(request: protos.google.storagetransfer.v1.IGetGoogleServiceAccountRequest, callback: Callback): void; /** * Creates a transfer job that runs periodically. * * @param {Object} request * The request object that will be sent. * @param {google.storagetransfer.v1.TransferJob} request.transferJob * Required. The job to create. * @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.storagetransfer.v1.TransferJob|TransferJob}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.create_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_async */ createTransferJob(request?: protos.google.storagetransfer.v1.ICreateTransferJobRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.ICreateTransferJobRequest | undefined, {} | undefined ]>; createTransferJob(request: protos.google.storagetransfer.v1.ICreateTransferJobRequest, options: CallOptions, callback: Callback): void; createTransferJob(request: protos.google.storagetransfer.v1.ICreateTransferJobRequest, callback: Callback): void; /** * Updates a transfer job. Updating a job's transfer spec does not affect * transfer operations that are running already. * * **Note:** The job's {@link protos.google.storagetransfer.v1.TransferJob.status|status} * field can be modified using this RPC (for example, to set a job's status to * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED}, * {@link protos.google.storagetransfer.v1.TransferJob.Status.DISABLED|DISABLED}, or * {@link protos.google.storagetransfer.v1.TransferJob.Status.ENABLED|ENABLED}). * * @param {Object} request * The request object that will be sent. * @param {string} request.jobName * Required. The name of job to update. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the * job. * @param {google.storagetransfer.v1.TransferJob} request.transferJob * Required. The job to update. `transferJob` is expected to specify one or * more of five fields: * {@link protos.google.storagetransfer.v1.TransferJob.description|description}, * {@link protos.google.storagetransfer.v1.TransferJob.transfer_spec|transfer_spec}, * {@link protos.google.storagetransfer.v1.TransferJob.notification_config|notification_config}, * {@link protos.google.storagetransfer.v1.TransferJob.logging_config|logging_config}, and * {@link protos.google.storagetransfer.v1.TransferJob.status|status}. An * `UpdateTransferJobRequest` that specifies other fields are rejected with * the error {@link protos.google.rpc.Code.INVALID_ARGUMENT|INVALID_ARGUMENT}. Updating a * job status to * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED} requires * `storagetransfer.jobs.delete` permission. * @param {google.protobuf.FieldMask} request.updateTransferJobFieldMask * The field mask of the fields in `transferJob` that are to be updated in * this request. Fields in `transferJob` that can be updated are: * {@link protos.google.storagetransfer.v1.TransferJob.description|description}, * {@link protos.google.storagetransfer.v1.TransferJob.transfer_spec|transfer_spec}, * {@link protos.google.storagetransfer.v1.TransferJob.notification_config|notification_config}, * {@link protos.google.storagetransfer.v1.TransferJob.logging_config|logging_config}, and * {@link protos.google.storagetransfer.v1.TransferJob.status|status}. To update the * `transfer_spec` of the job, a complete transfer specification must be * provided. An incomplete specification missing any required fields is * rejected with the error * {@link protos.google.rpc.Code.INVALID_ARGUMENT|INVALID_ARGUMENT}. * @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.storagetransfer.v1.TransferJob|TransferJob}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.update_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_UpdateTransferJob_async */ updateTransferJob(request?: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IUpdateTransferJobRequest | undefined, {} | undefined ]>; updateTransferJob(request: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, options: CallOptions, callback: Callback): void; updateTransferJob(request: protos.google.storagetransfer.v1.IUpdateTransferJobRequest, callback: Callback): void; /** * Gets a transfer job. * * @param {Object} request * The request object that will be sent. * @param {string} request.jobName * Required. The job to get. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the * job. * @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.storagetransfer.v1.TransferJob|TransferJob}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.get_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_GetTransferJob_async */ getTransferJob(request?: protos.google.storagetransfer.v1.IGetTransferJobRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.ITransferJob, protos.google.storagetransfer.v1.IGetTransferJobRequest | undefined, {} | undefined ]>; getTransferJob(request: protos.google.storagetransfer.v1.IGetTransferJobRequest, options: CallOptions, callback: Callback): void; getTransferJob(request: protos.google.storagetransfer.v1.IGetTransferJobRequest, callback: Callback): void; /** * Pauses a transfer operation. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the transfer operation. * @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 include:samples/generated/v1/storage_transfer_service.pause_transfer_operation.js * region_tag:storagetransfer_v1_generated_StorageTransferService_PauseTransferOperation_async */ pauseTransferOperation(request?: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, (protos.google.storagetransfer.v1.IPauseTransferOperationRequest | undefined), {} | undefined ]>; pauseTransferOperation(request: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, options: CallOptions, callback: Callback): void; pauseTransferOperation(request: protos.google.storagetransfer.v1.IPauseTransferOperationRequest, callback: Callback): void; /** * Resumes a transfer operation that is paused. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the transfer operation. * @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 include:samples/generated/v1/storage_transfer_service.resume_transfer_operation.js * region_tag:storagetransfer_v1_generated_StorageTransferService_ResumeTransferOperation_async */ resumeTransferOperation(request?: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, (protos.google.storagetransfer.v1.IResumeTransferOperationRequest | undefined), {} | undefined ]>; resumeTransferOperation(request: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, options: CallOptions, callback: Callback): void; resumeTransferOperation(request: protos.google.storagetransfer.v1.IResumeTransferOperationRequest, callback: Callback): void; /** * Deletes a transfer job. Deleting a transfer job sets its status to * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED}. * * @param {Object} request * The request object that will be sent. * @param {string} request.jobName * Required. The job to delete. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the * job. * @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 include:samples/generated/v1/storage_transfer_service.delete_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_DeleteTransferJob_async */ deleteTransferJob(request?: protos.google.storagetransfer.v1.IDeleteTransferJobRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteTransferJobRequest | undefined, {} | undefined ]>; deleteTransferJob(request: protos.google.storagetransfer.v1.IDeleteTransferJobRequest, options: CallOptions, callback: Callback): void; deleteTransferJob(request: protos.google.storagetransfer.v1.IDeleteTransferJobRequest, callback: Callback): void; /** * Creates an agent pool resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the * agent pool. * @param {google.storagetransfer.v1.AgentPool} request.agentPool * Required. The agent pool to create. * @param {string} request.agentPoolId * Required. The ID of the agent pool to create. * * The `agent_pool_id` must meet the following requirements: * * * Length of 128 characters or less. * * Not start with the string `goog`. * * Start with a lowercase ASCII character, followed by: * * Zero or more: lowercase Latin alphabet characters, numerals, * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). * * One or more numerals or lowercase ASCII characters. * * As expressed by the regular expression: * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. * @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.storagetransfer.v1.AgentPool|AgentPool}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.create_agent_pool.js * region_tag:storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_async */ createAgentPool(request?: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.ICreateAgentPoolRequest | undefined, {} | undefined ]>; createAgentPool(request: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, options: CallOptions, callback: Callback): void; createAgentPool(request: protos.google.storagetransfer.v1.ICreateAgentPoolRequest, callback: Callback): void; /** * Updates an existing agent pool resource. * * @param {Object} request * The request object that will be sent. * @param {google.storagetransfer.v1.AgentPool} request.agentPool * Required. The agent pool to update. `agent_pool` is expected to specify * following fields: * * * {@link protos.google.storagetransfer.v1.AgentPool.name|name} * * * {@link protos.google.storagetransfer.v1.AgentPool.display_name|display_name} * * * {@link protos.google.storagetransfer.v1.AgentPool.bandwidth_limit|bandwidth_limit} * An `UpdateAgentPoolRequest` with any other fields is rejected * with the error {@link protos.google.rpc.Code.INVALID_ARGUMENT|INVALID_ARGUMENT}. * @param {google.protobuf.FieldMask} request.updateMask * The [field mask] * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) * of the fields in `agentPool` to update in this request. * The following `agentPool` fields can be updated: * * * {@link protos.google.storagetransfer.v1.AgentPool.display_name|display_name} * * * {@link protos.google.storagetransfer.v1.AgentPool.bandwidth_limit|bandwidth_limit} * @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.storagetransfer.v1.AgentPool|AgentPool}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.update_agent_pool.js * region_tag:storagetransfer_v1_generated_StorageTransferService_UpdateAgentPool_async */ updateAgentPool(request?: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IUpdateAgentPoolRequest | undefined, {} | undefined ]>; updateAgentPool(request: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, options: CallOptions, callback: Callback): void; updateAgentPool(request: protos.google.storagetransfer.v1.IUpdateAgentPoolRequest, callback: Callback): void; /** * Gets an agent pool. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the agent pool to get. * @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.storagetransfer.v1.AgentPool|AgentPool}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.get_agent_pool.js * region_tag:storagetransfer_v1_generated_StorageTransferService_GetAgentPool_async */ getAgentPool(request?: protos.google.storagetransfer.v1.IGetAgentPoolRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.IAgentPool, protos.google.storagetransfer.v1.IGetAgentPoolRequest | undefined, {} | undefined ]>; getAgentPool(request: protos.google.storagetransfer.v1.IGetAgentPoolRequest, options: CallOptions, callback: Callback): void; getAgentPool(request: protos.google.storagetransfer.v1.IGetAgentPoolRequest, callback: Callback): void; /** * Deletes an agent pool. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the agent pool to delete. * @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 include:samples/generated/v1/storage_transfer_service.delete_agent_pool.js * region_tag:storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_async */ deleteAgentPool(request?: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.storagetransfer.v1.IDeleteAgentPoolRequest | undefined, {} | undefined ]>; deleteAgentPool(request: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, options: CallOptions, callback: Callback): void; deleteAgentPool(request: protos.google.storagetransfer.v1.IDeleteAgentPoolRequest, callback: Callback): void; /** * Starts a new operation for the specified transfer job. * A `TransferJob` has a maximum of one active `TransferOperation`. If this * method is called while a `TransferOperation` is active, an error is * returned. * * @param {Object} request * The request object that will be sent. * @param {string} request.jobName * Required. The name of the transfer job. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the transfer * job. * @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 * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.run_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_RunTransferJob_async */ runTransferJob(request?: protos.google.storagetransfer.v1.IRunTransferJobRequest, options?: CallOptions): Promise<[ LROperation, protos.google.longrunning.IOperation | undefined, {} | undefined ]>; runTransferJob(request: protos.google.storagetransfer.v1.IRunTransferJobRequest, options: CallOptions, callback: Callback, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; runTransferJob(request: protos.google.storagetransfer.v1.IRunTransferJobRequest, callback: Callback, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; /** * Check the status of the long running operation returned by `runTransferJob()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example include:samples/generated/v1/storage_transfer_service.run_transfer_job.js * region_tag:storagetransfer_v1_generated_StorageTransferService_RunTransferJob_async */ checkRunTransferJobProgress(name: string): Promise>; /** * Lists transfer jobs. * * @param {Object} request * The request object that will be sent. * @param {string} request.filter * Required. A list of query parameters specified as JSON text in the form of: * * ``` * { * "projectId":"my_project_id", * "jobNames":["jobid1","jobid2",...], * "jobStatuses":["status1","status2",...], * "dataBackend":"QUERY_REPLICATION_CONFIGS", * "sourceBucket":"source-bucket-name", * "sinkBucket":"sink-bucket-name", * } * ``` * * The JSON formatting in the example is for display only; provide the * query parameters without spaces or line breaks. * * * `projectId` is required. * * Since `jobNames` and `jobStatuses` support multiple values, their values * must be specified with array notation. `jobNames` and `jobStatuses` are * optional. Valid values are case-insensitive: * * {@link protos.google.storagetransfer.v1.TransferJob.Status.ENABLED|ENABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DISABLED|DISABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED} * * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of * cross-bucket replication jobs. * * Limit the results to jobs from a particular bucket with `sourceBucket` * and/or to a particular bucket with `sinkBucket`. * @param {number} request.pageSize * The list page size. The max allowed value is 256. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.TransferJob|TransferJob}. * 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 `listTransferJobsAsync()` * 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. */ listTransferJobs(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.ITransferJob[], protos.google.storagetransfer.v1.IListTransferJobsRequest | null, protos.google.storagetransfer.v1.IListTransferJobsResponse ]>; listTransferJobs(request: protos.google.storagetransfer.v1.IListTransferJobsRequest, options: CallOptions, callback: PaginationCallback): void; listTransferJobs(request: protos.google.storagetransfer.v1.IListTransferJobsRequest, callback: PaginationCallback): void; /** * Equivalent to `listTransferJobs`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.filter * Required. A list of query parameters specified as JSON text in the form of: * * ``` * { * "projectId":"my_project_id", * "jobNames":["jobid1","jobid2",...], * "jobStatuses":["status1","status2",...], * "dataBackend":"QUERY_REPLICATION_CONFIGS", * "sourceBucket":"source-bucket-name", * "sinkBucket":"sink-bucket-name", * } * ``` * * The JSON formatting in the example is for display only; provide the * query parameters without spaces or line breaks. * * * `projectId` is required. * * Since `jobNames` and `jobStatuses` support multiple values, their values * must be specified with array notation. `jobNames` and `jobStatuses` are * optional. Valid values are case-insensitive: * * {@link protos.google.storagetransfer.v1.TransferJob.Status.ENABLED|ENABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DISABLED|DISABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED} * * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of * cross-bucket replication jobs. * * Limit the results to jobs from a particular bucket with `sourceBucket` * and/or to a particular bucket with `sinkBucket`. * @param {number} request.pageSize * The list page size. The max allowed value is 256. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.TransferJob|TransferJob} 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 `listTransferJobsAsync()` * 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. */ listTransferJobsStream(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): Transform; /** * Equivalent to `listTransferJobs`, 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.filter * Required. A list of query parameters specified as JSON text in the form of: * * ``` * { * "projectId":"my_project_id", * "jobNames":["jobid1","jobid2",...], * "jobStatuses":["status1","status2",...], * "dataBackend":"QUERY_REPLICATION_CONFIGS", * "sourceBucket":"source-bucket-name", * "sinkBucket":"sink-bucket-name", * } * ``` * * The JSON formatting in the example is for display only; provide the * query parameters without spaces or line breaks. * * * `projectId` is required. * * Since `jobNames` and `jobStatuses` support multiple values, their values * must be specified with array notation. `jobNames` and `jobStatuses` are * optional. Valid values are case-insensitive: * * {@link protos.google.storagetransfer.v1.TransferJob.Status.ENABLED|ENABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DISABLED|DISABLED} * * {@link protos.google.storagetransfer.v1.TransferJob.Status.DELETED|DELETED} * * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of * cross-bucket replication jobs. * * Limit the results to jobs from a particular bucket with `sourceBucket` * and/or to a particular bucket with `sinkBucket`. * @param {number} request.pageSize * The list page size. The max allowed value is 256. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.TransferJob|TransferJob}. 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 include:samples/generated/v1/storage_transfer_service.list_transfer_jobs.js * region_tag:storagetransfer_v1_generated_StorageTransferService_ListTransferJobs_async */ listTransferJobsAsync(request?: protos.google.storagetransfer.v1.IListTransferJobsRequest, options?: CallOptions): AsyncIterable; /** * Lists agent pools. * * @param {Object} request * The request object that will be sent. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the job. * @param {string} request.filter * An optional list of query parameters specified as JSON text in the * form of: * * `{"agentPoolNames":["agentpool1","agentpool2",...]}` * * Since `agentPoolNames` support multiple values, its values must be * specified with array notation. When the filter is either empty or not * provided, the list returns all agent pools for the project. * @param {number} request.pageSize * The list page size. The max allowed value is `256`. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.AgentPool|AgentPool}. * 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 `listAgentPoolsAsync()` * 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. */ listAgentPools(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): Promise<[ protos.google.storagetransfer.v1.IAgentPool[], protos.google.storagetransfer.v1.IListAgentPoolsRequest | null, protos.google.storagetransfer.v1.IListAgentPoolsResponse ]>; listAgentPools(request: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options: CallOptions, callback: PaginationCallback): void; listAgentPools(request: protos.google.storagetransfer.v1.IListAgentPoolsRequest, callback: PaginationCallback): void; /** * Equivalent to `listAgentPools`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.projectId * Required. The ID of the Google Cloud project that owns the job. * @param {string} request.filter * An optional list of query parameters specified as JSON text in the * form of: * * `{"agentPoolNames":["agentpool1","agentpool2",...]}` * * Since `agentPoolNames` support multiple values, its values must be * specified with array notation. When the filter is either empty or not * provided, the list returns all agent pools for the project. * @param {number} request.pageSize * The list page size. The max allowed value is `256`. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.AgentPool|AgentPool} 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 `listAgentPoolsAsync()` * 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. */ listAgentPoolsStream(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): Transform; /** * Equivalent to `listAgentPools`, 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.projectId * Required. The ID of the Google Cloud project that owns the job. * @param {string} request.filter * An optional list of query parameters specified as JSON text in the * form of: * * `{"agentPoolNames":["agentpool1","agentpool2",...]}` * * Since `agentPoolNames` support multiple values, its values must be * specified with array notation. When the filter is either empty or not * provided, the list returns all agent pools for the project. * @param {number} request.pageSize * The list page size. The max allowed value is `256`. * @param {string} request.pageToken * The list page token. * @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.storagetransfer.v1.AgentPool|AgentPool}. 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 include:samples/generated/v1/storage_transfer_service.list_agent_pools.js * region_tag:storagetransfer_v1_generated_StorageTransferService_ListAgentPools_async */ listAgentPoolsAsync(request?: protos.google.storagetransfer.v1.IListAgentPoolsRequest, options?: CallOptions): AsyncIterable; /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See {@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} * for the details. * @param {function(?Error, ?Object)=} callback * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing * {@link google.longrunning.Operation | google.longrunning.Operation}. * @return {Promise} - The promise which resolves to an array. * The first element of the array is an object representing * {@link google.longrunning.Operation | google.longrunning.Operation}. * The promise has a method named "cancel" which cancels the ongoing API call. * * @example * ``` * const client = longrunning.operationsClient(); * const name = ''; * const [response] = await client.getOperation({name}); * // doThingsWith(response) * ``` */ getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): Promise<[protos.google.longrunning.Operation]>; /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. * * For-await-of syntax is used with the iterable to recursively get response element on-demand. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation collection. * @param {string} request.filter - The standard list filter. * @param {number=} request.pageSize - * The maximum number of resources contained in the underlying API * response. If page streaming is performed per-resource, this * parameter does not affect the return value. If page streaming is * performed per-page, this determines the maximum number of * resources in a page. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See {@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the * details. * @returns {Object} * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. * * @example * ``` * const client = longrunning.operationsClient(); * for await (const response of client.listOperationsAsync(request)); * // doThingsWith(response) * ``` */ listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable; /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not * guaranteed. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use * {@link Operations.GetOperation} or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, * the operation is not deleted; instead, it becomes an operation with * an {@link Operation.error} value with a {@link google.rpc.Status.code} of * 1, corresponding to `Code.CANCELLED`. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource to be cancelled. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See {@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the * details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API * call. * * @example * ``` * const client = longrunning.operationsClient(); * await client.cancelOperation({name: ''}); * ``` */ cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): Promise; /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param {Object} request - The request object that will be sent. * @param {string} request.name - The name of the operation resource to be deleted. * @param {Object=} options * Optional parameters. You can override the default settings for this call, * e.g, timeout, retries, paginations, etc. See {@link * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} * for the details. * @param {function(?Error)=} callback * The function which will be called with the result of the API call. * @return {Promise} - The promise which resolves when API call finishes. * The promise has a method named "cancel" which cancels the ongoing API * call. * * @example * ``` * const client = longrunning.operationsClient(); * await client.deleteOperation({name: ''}); * ``` */ deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback, callback?: Callback): Promise; /** * Return a fully-qualified agentPools resource name string. * * @param {string} project_id * @param {string} agent_pool_id * @returns {string} Resource name string. */ agentPoolsPath(projectId: string, agentPoolId: string): string; /** * Parse the project_id from AgentPools resource. * * @param {string} agentPoolsName * A fully-qualified path representing agentPools resource. * @returns {string} A string representing the project_id. */ matchProjectIdFromAgentPoolsName(agentPoolsName: string): string | number; /** * Parse the agent_pool_id from AgentPools resource. * * @param {string} agentPoolsName * A fully-qualified path representing agentPools resource. * @returns {string} A string representing the agent_pool_id. */ matchAgentPoolIdFromAgentPoolsName(agentPoolsName: string): string | number; /** * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise; }