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'; /** * The Cloud Scheduler API allows external entities to reliably * schedule asynchronous jobs. * @class * @memberof v1beta1 */ export declare class CloudSchedulerClient { 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; }; cloudSchedulerStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of CloudSchedulerClient. * * @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 CloudSchedulerClient({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; /** * Gets a job. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The job name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.get_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_GetJob_async */ getJob(request?: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IGetJobRequest | undefined, {} | undefined ]>; getJob(request: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, options: CallOptions, callback: Callback): void; getJob(request: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, callback: Callback): void; /** * Creates a job. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * @param {google.cloud.scheduler.v1beta1.Job} request.job * Required. The job to add. The user can optionally specify a name for the * job in {@link protos.google.cloud.scheduler.v1beta1.Job.name|name}. * {@link protos.google.cloud.scheduler.v1beta1.Job.name|name} cannot be the same as an * existing job. If a name is not specified then the system will * generate a random unique name that will be returned * ({@link protos.google.cloud.scheduler.v1beta1.Job.name|name}) in the response. * @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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.create_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_CreateJob_async */ createJob(request?: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.ICreateJobRequest | undefined, {} | undefined ]>; createJob(request: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, options: CallOptions, callback: Callback): void; createJob(request: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, callback: Callback): void; /** * Updates a job. * * If successful, the updated {@link protos.google.cloud.scheduler.v1beta1.Job|Job} is * returned. If the job does not exist, `NOT_FOUND` is returned. * * If UpdateJob does not successfully return, it is possible for the * job to be in an * {@link protos.google.cloud.scheduler.v1beta1.Job.State.UPDATE_FAILED|Job.State.UPDATE_FAILED} * state. A job in this state may not be executed. If this happens, retry the * UpdateJob request until a successful response is received. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.scheduler.v1beta1.Job} request.job * Required. The new job properties. * {@link protos.google.cloud.scheduler.v1beta1.Job.name|name} must be specified. * * Output only fields cannot be modified using UpdateJob. * Any value specified for an output only field will be ignored. * @param {google.protobuf.FieldMask} request.updateMask * A mask used to specify which fields of the job are being updated. * @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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.update_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_UpdateJob_async */ updateJob(request?: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest | undefined, {} | undefined ]>; updateJob(request: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, options: CallOptions, callback: Callback): void; updateJob(request: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, callback: Callback): void; /** * Deletes a job. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The job name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. * @param {boolean} request.legacyAppEngineCron * This field is used to manage the legacy App Engine Cron jobs using the * Cloud Scheduler API. If the field is set to true, the job in the __cron * queue with the corresponding name will be deleted instead. * @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/v1beta1/cloud_scheduler.delete_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_DeleteJob_async */ deleteJob(request?: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest | undefined, {} | undefined ]>; deleteJob(request: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, options: CallOptions, callback: Callback): void; deleteJob(request: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, callback: Callback): void; /** * Pauses a job. * * If a job is paused then the system will stop executing the job * until it is re-enabled via * {@link protos.google.cloud.scheduler.v1beta1.CloudScheduler.ResumeJob|ResumeJob}. The * state of the job is stored in * {@link protos.google.cloud.scheduler.v1beta1.Job.state|state}; if paused it will be set * to {@link protos.google.cloud.scheduler.v1beta1.Job.State.PAUSED|Job.State.PAUSED}. A * job must be in * {@link protos.google.cloud.scheduler.v1beta1.Job.State.ENABLED|Job.State.ENABLED} to be * paused. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The job name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.pause_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_PauseJob_async */ pauseJob(request?: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IPauseJobRequest | undefined, {} | undefined ]>; pauseJob(request: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, options: CallOptions, callback: Callback): void; pauseJob(request: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, callback: Callback): void; /** * Resume a job. * * This method reenables a job after it has been * {@link protos.google.cloud.scheduler.v1beta1.Job.State.PAUSED|Job.State.PAUSED}. The * state of a job is stored in * {@link protos.google.cloud.scheduler.v1beta1.Job.state|Job.state}; after calling this * method it will be set to * {@link protos.google.cloud.scheduler.v1beta1.Job.State.ENABLED|Job.State.ENABLED}. A * job must be in * {@link protos.google.cloud.scheduler.v1beta1.Job.State.PAUSED|Job.State.PAUSED} to be * resumed. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The job name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.resume_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_ResumeJob_async */ resumeJob(request?: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IResumeJobRequest | undefined, {} | undefined ]>; resumeJob(request: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, options: CallOptions, callback: Callback): void; resumeJob(request: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, callback: Callback): void; /** * Forces a job to run now. * * When this method is called, Cloud Scheduler will dispatch the job, even * if the job is already running. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The job name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. * @param {boolean} request.legacyAppEngineCron * This field is used to manage the legacy App Engine Cron jobs using the * Cloud Scheduler API. If the field is set to true, the job in the __cron * queue with the corresponding name will be forced to run instead. * @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.scheduler.v1beta1.Job|Job}. * 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/v1beta1/cloud_scheduler.run_job.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_RunJob_async */ runJob(request?: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IRunJobRequest | undefined, {} | undefined ]>; runJob(request: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, options: CallOptions, callback: Callback): void; runJob(request: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, callback: Callback): void; /** * Lists jobs. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * @param {string} request.filter * `filter` can be used to specify a subset of jobs. * * If `filter` equals `target_config="HttpConfig"`, then the http * target jobs are retrieved. If `filter` equals * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are * retrieved. If `filter` equals `labels.foo=value1 * labels.foo=value2` then only jobs which are labeled with * foo=value1 AND foo=value2 will be returned. * @param {number} request.pageSize * Requested page size. * * The maximum page size is 500. If unspecified, the page size will * be the maximum. Fewer jobs than requested might be returned, * even if more jobs exist; use next_page_token to determine if more * jobs exist. * @param {string} request.pageToken * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token|next_page_token} * returned from the previous call to * {@link protos.google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs|ListJobs}. It is * an error to switch the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.filter|filter} or * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.order_by|order_by} while * iterating through pages. * @param {boolean} request.legacyAppEngineCron * This field is used to manage the legacy App Engine Cron jobs using the * Cloud Scheduler API. If the field is set to true, the jobs in the __cron * queue will be listed instead. * @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.scheduler.v1beta1.Job|Job}. * 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 `listJobsAsync()` * 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. */ listJobs(request?: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, options?: CallOptions): Promise<[ protos.google.cloud.scheduler.v1beta1.IJob[], protos.google.cloud.scheduler.v1beta1.IListJobsRequest | null, protos.google.cloud.scheduler.v1beta1.IListJobsResponse ]>; listJobs(request: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, options: CallOptions, callback: PaginationCallback): void; listJobs(request: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, callback: PaginationCallback): void; /** * Equivalent to `listJobs`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * @param {string} request.filter * `filter` can be used to specify a subset of jobs. * * If `filter` equals `target_config="HttpConfig"`, then the http * target jobs are retrieved. If `filter` equals * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are * retrieved. If `filter` equals `labels.foo=value1 * labels.foo=value2` then only jobs which are labeled with * foo=value1 AND foo=value2 will be returned. * @param {number} request.pageSize * Requested page size. * * The maximum page size is 500. If unspecified, the page size will * be the maximum. Fewer jobs than requested might be returned, * even if more jobs exist; use next_page_token to determine if more * jobs exist. * @param {string} request.pageToken * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token|next_page_token} * returned from the previous call to * {@link protos.google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs|ListJobs}. It is * an error to switch the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.filter|filter} or * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.order_by|order_by} while * iterating through pages. * @param {boolean} request.legacyAppEngineCron * This field is used to manage the legacy App Engine Cron jobs using the * Cloud Scheduler API. If the field is set to true, the jobs in the __cron * queue will be listed instead. * @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.scheduler.v1beta1.Job|Job} 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 `listJobsAsync()` * 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. */ listJobsStream(request?: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, options?: CallOptions): Transform; /** * Equivalent to `listJobs`, 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 location name. For example: * `projects/PROJECT_ID/locations/LOCATION_ID`. * @param {string} request.filter * `filter` can be used to specify a subset of jobs. * * If `filter` equals `target_config="HttpConfig"`, then the http * target jobs are retrieved. If `filter` equals * `target_config="PubSubConfig"`, then the Pub/Sub target jobs are * retrieved. If `filter` equals `labels.foo=value1 * labels.foo=value2` then only jobs which are labeled with * foo=value1 AND foo=value2 will be returned. * @param {number} request.pageSize * Requested page size. * * The maximum page size is 500. If unspecified, the page size will * be the maximum. Fewer jobs than requested might be returned, * even if more jobs exist; use next_page_token to determine if more * jobs exist. * @param {string} request.pageToken * A token identifying a page of results the server will return. To * request the first page results, page_token must be empty. To * request the next page of results, page_token must be the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsResponse.next_page_token|next_page_token} * returned from the previous call to * {@link protos.google.cloud.scheduler.v1beta1.CloudScheduler.ListJobs|ListJobs}. It is * an error to switch the value of * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.filter|filter} or * {@link protos.google.cloud.scheduler.v1beta1.ListJobsRequest.order_by|order_by} while * iterating through pages. * @param {boolean} request.legacyAppEngineCron * This field is used to manage the legacy App Engine Cron jobs using the * Cloud Scheduler API. If the field is set to true, the jobs in the __cron * queue will be listed instead. * @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.scheduler.v1beta1.Job|Job}. 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/v1beta1/cloud_scheduler.list_jobs.js * region_tag:cloudscheduler_v1beta1_generated_CloudScheduler_ListJobs_async */ listJobsAsync(request?: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, options?: CallOptions): AsyncIterable; /** * Gets information about a location. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Resource name for the location. * @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 google.cloud.location.Location | Location}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example * ``` * const [response] = await client.getLocation(request); * ``` */ getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback, callback?: Callback): Promise; /** * Lists information about the supported locations for this service. 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.name * The resource that owns the locations collection, if applicable. * @param {string} request.filter * The standard list filter. * @param {number} request.pageSize * The standard list page size. * @param {string} request.pageToken * The standard 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 google.cloud.location.Location | Location}. 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 * ``` * const iterable = client.listLocationsAsync(request); * for await (const response of iterable) { * // process response * } * ``` */ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable; /** * Return a fully-qualified job resource name string. * * @param {string} project * @param {string} location * @param {string} job * @returns {string} Resource name string. */ jobPath(project: string, location: string, job: string): string; /** * Parse the project from Job resource. * * @param {string} jobName * A fully-qualified path representing Job resource. * @returns {string} A string representing the project. */ matchProjectFromJobName(jobName: string): string | number; /** * Parse the location from Job resource. * * @param {string} jobName * A fully-qualified path representing Job resource. * @returns {string} A string representing the location. */ matchLocationFromJobName(jobName: string): string | number; /** * Parse the job from Job resource. * * @param {string} jobName * A fully-qualified path representing Job resource. * @returns {string} A string representing the job. */ matchJobFromJobName(jobName: string): string | number; /** * Return a fully-qualified location resource name string. * * @param {string} project * @param {string} location * @returns {string} Resource name string. */ locationPath(project: string, location: string): string; /** * Parse the project from Location resource. * * @param {string} locationName * A fully-qualified path representing Location resource. * @returns {string} A string representing the project. */ matchProjectFromLocationName(locationName: string): string | number; /** * Parse the location from Location resource. * * @param {string} locationName * A fully-qualified path representing Location resource. * @returns {string} A string representing the location. */ matchLocationFromLocationName(locationName: string): string | number; /** * Return a fully-qualified project resource name string. * * @param {string} project * @returns {string} Resource name string. */ projectPath(project: string): string; /** * Parse the project from Project resource. * * @param {string} projectName * A fully-qualified path representing Project resource. * @returns {string} A string representing the project. */ matchProjectFromProjectName(projectName: 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; }