@google-cloud/cloudbuild
Version:
Cloud Build API client for Node.js
733 lines • 88.6 kB
TypeScript
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';
/**
* Creates and manages builds on Google Cloud Platform.
*
* The main concept used by this API is a `Build`, which describes the location
* of the source to build, how to build the source, and where to store the
* built artifacts, if any.
*
* A user can list previously-requested builds or get builds by their ID to
* determine the status of the build.
* @class
* @memberof v1
*/
export declare class CloudBuildClient {
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;
cloudBuildStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of CloudBuildClient.
*
* @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 CloudBuildClient({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;
/**
* Returns information about a previously requested build.
*
* The `Build` that is returned includes its status (such as `SUCCESS`,
* `FAILURE`, or `WORKING`), and timing information.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Build` to retrieve.
* Format: `projects/{project}/locations/{location}/builds/{build}`
* @param {string} request.projectId
* Required. ID of the project.
* @param {string} request.id
* Required. ID of the build.
* @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.devtools.cloudbuild.v1.Build|Build}.
* 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/cloud_build.get_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_GetBuild_async
*/
getBuild(request?: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IBuild,
protos.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined,
{} | undefined
]>;
getBuild(request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, {} | null | undefined>): void;
getBuild(request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, {} | null | undefined>): void;
/**
* Cancels a build in progress.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Build` to cancel.
* Format: `projects/{project}/locations/{location}/builds/{build}`
* @param {string} request.projectId
* Required. ID of the project.
* @param {string} request.id
* Required. ID of the build.
* @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.devtools.cloudbuild.v1.Build|Build}.
* 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/cloud_build.cancel_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CancelBuild_async
*/
cancelBuild(request?: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IBuild,
protos.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined,
{} | undefined
]>;
cancelBuild(request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.ICancelBuildRequest | null | undefined, {} | null | undefined>): void;
cancelBuild(request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.ICancelBuildRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a new `BuildTrigger`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* The parent resource where this trigger will be created.
* Format: `projects/{project}/locations/{location}`
* @param {string} request.projectId
* Required. ID of the project for which to configure automatic builds.
* @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger
* Required. `BuildTrigger` 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.devtools.cloudbuild.v1.BuildTrigger|BuildTrigger}.
* 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/cloud_build.create_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async
*/
createBuildTrigger(request?: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IBuildTrigger,
protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest | undefined,
{} | undefined
]>;
createBuildTrigger(request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
createBuildTrigger(request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
/**
* Returns information about a `BuildTrigger`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Trigger` to retrieve.
* Format: `projects/{project}/locations/{location}/triggers/{trigger}`
* @param {string} request.projectId
* Required. ID of the project that owns the trigger.
* @param {string} request.triggerId
* Required. Identifier (`id` or `name`) of the `BuildTrigger` 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.devtools.cloudbuild.v1.BuildTrigger|BuildTrigger}.
* 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/cloud_build.get_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async
*/
getBuildTrigger(request?: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IBuildTrigger,
protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest | undefined,
{} | undefined
]>;
getBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
getBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
/**
* Deletes a `BuildTrigger` by its project ID and trigger ID.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Trigger` to delete.
* Format: `projects/{project}/locations/{location}/triggers/{trigger}`
* @param {string} request.projectId
* Required. ID of the project that owns the trigger.
* @param {string} request.triggerId
* Required. ID of the `BuildTrigger` 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 <caption>include:samples/generated/v1/cloud_build.delete_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async
*/
deleteBuildTrigger(request?: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest | undefined,
{} | undefined
]>;
deleteBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
deleteBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates a `BuildTrigger` by its project ID and trigger ID.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.projectId
* Required. ID of the project that owns the trigger.
* @param {string} request.triggerId
* Required. ID of the `BuildTrigger` to update.
* @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger
* Required. `BuildTrigger` to update.
* @param {google.protobuf.FieldMask} request.updateMask
* Update mask for the resource. If this is set,
* the server will only update the fields specified in the field mask.
* Otherwise, a full update of the mutable resource fields will be performed.
* @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.devtools.cloudbuild.v1.BuildTrigger|BuildTrigger}.
* 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/cloud_build.update_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async
*/
updateBuildTrigger(request?: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IBuildTrigger,
protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest | undefined,
{} | undefined
]>;
updateBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
updateBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IBuildTrigger, protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest | null | undefined, {} | null | undefined>): void;
/**
* ReceiveTriggerWebhook [Experimental] is called when the API receives a
* webhook request targeted at a specific trigger.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `ReceiveTriggerWebhook` to retrieve.
* Format: `projects/{project}/locations/{location}/triggers/{trigger}`
* @param {google.api.HttpBody} request.body
* HTTP request body.
* @param {string} request.projectId
* Project in which the specified trigger lives
* @param {string} request.trigger
* Name of the trigger to run the payload against
* @param {string} request.secret
* Secret token used for authorization if an OAuth token isn't provided.
* @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.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse|ReceiveTriggerWebhookResponse}.
* 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/cloud_build.receive_trigger_webhook.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async
*/
receiveTriggerWebhook(request?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse,
protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest | undefined,
{} | undefined
]>;
receiveTriggerWebhook(request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest | null | undefined, {} | null | undefined>): void;
receiveTriggerWebhook(request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest | null | undefined, {} | null | undefined>): void;
/**
* Returns details of a `WorkerPool`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `WorkerPool` to retrieve.
* Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
* @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.devtools.cloudbuild.v1.WorkerPool|WorkerPool}.
* 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/cloud_build.get_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async
*/
getWorkerPool(request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IWorkerPool,
protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest | undefined,
{} | undefined
]>;
getWorkerPool(request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest | null | undefined, {} | null | undefined>): void;
getWorkerPool(request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest | null | undefined, {} | null | undefined>): void;
/**
* Returns the `DefaultServiceAccount` used by the project.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `DefaultServiceAccount` to retrieve.
* Format:
* `projects/{project}/locations/{location}/defaultServiceAccount`
* @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.devtools.cloudbuild.v1.DefaultServiceAccount|DefaultServiceAccount}.
* 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/cloud_build.get_default_service_account.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_async
*/
getDefaultServiceAccount(request?: protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v1.IDefaultServiceAccount,
protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest | undefined,
{} | undefined
]>;
getDefaultServiceAccount(request: protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v1.IDefaultServiceAccount, protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest | null | undefined, {} | null | undefined>): void;
getDefaultServiceAccount(request: protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest, callback: Callback<protos.google.devtools.cloudbuild.v1.IDefaultServiceAccount, protos.google.devtools.cloudbuild.v1.IGetDefaultServiceAccountRequest | null | undefined, {} | null | undefined>): void;
/**
* Starts a build with the specified configuration.
*
* This method returns a long-running `Operation`, which includes the build
* ID. Pass the build ID to `GetBuild` to determine the build status (such as
* `SUCCESS` or `FAILURE`).
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* The parent resource where this build will be created.
* Format: `projects/{project}/locations/{location}`
* @param {string} request.projectId
* Required. ID of the project.
* @param {google.devtools.cloudbuild.v1.Build} request.build
* Required. Build resource 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
* 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 <caption>include:samples/generated/v1/cloud_build.create_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuild_async
*/
createBuild(request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createBuild(request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createBuild(request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createBuild()`.
* @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 <caption>include:samples/generated/v1/cloud_build.create_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuild_async
*/
checkCreateBuildProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.Build, protos.google.devtools.cloudbuild.v1.BuildOperationMetadata>>;
/**
* Creates a new build based on the specified build.
*
* This method creates a new build using the original build request, which may
* or may not result in an identical build.
*
* For triggered builds:
*
* * Triggered builds resolve to a precise revision; therefore a retry of a
* triggered build will result in a build that uses the same revision.
*
* For non-triggered builds that specify `RepoSource`:
*
* * If the original build built from the tip of a branch, the retried build
* will build from the tip of that branch, which may not be the same revision
* as the original build.
* * If the original build specified a commit sha or revision ID, the retried
* build will use the identical source.
*
* For builds that specify `StorageSource`:
*
* * If the original build pulled source from Cloud Storage without
* specifying the generation of the object, the new build will use the current
* object, which may be different from the original build source.
* * If the original build pulled source from Cloud Storage and specified the
* generation of the object, the new build will attempt to use the same
* object, which may or may not be available depending on the bucket's
* lifecycle management settings.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Build` to retry.
* Format: `projects/{project}/locations/{location}/builds/{build}`
* @param {string} request.projectId
* Required. ID of the project.
* @param {string} request.id
* Required. Build ID of the original build.
* @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 <caption>include:samples/generated/v1/cloud_build.retry_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_RetryBuild_async
*/
retryBuild(request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
retryBuild(request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
retryBuild(request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `retryBuild()`.
* @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 <caption>include:samples/generated/v1/cloud_build.retry_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_RetryBuild_async
*/
checkRetryBuildProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.Build, protos.google.devtools.cloudbuild.v1.BuildOperationMetadata>>;
/**
* Approves or rejects a pending build.
*
* If approved, the returned long-running operation (LRO) will be analogous to
* the LRO returned from a CreateBuild call.
*
* If rejected, the returned LRO will be immediately done.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the target build.
* For example: "projects/{$project_id}/builds/{$build_id}"
* @param {google.devtools.cloudbuild.v1.ApprovalResult} request.approvalResult
* Approval decision and metadata.
* @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 <caption>include:samples/generated/v1/cloud_build.approve_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_ApproveBuild_async
*/
approveBuild(request?: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
approveBuild(request: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
approveBuild(request: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `approveBuild()`.
* @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 <caption>include:samples/generated/v1/cloud_build.approve_build.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_ApproveBuild_async
*/
checkApproveBuildProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.Build, protos.google.devtools.cloudbuild.v1.BuildOperationMetadata>>;
/**
* Runs a `BuildTrigger` at a particular source revision.
*
* To run a regional or global trigger, use the POST request
* that includes the location endpoint in the path (ex.
* v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The
* POST request that does not include the location endpoint in the path can
* only be used when running global triggers.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The name of the `Trigger` to run.
* Format: `projects/{project}/locations/{location}/triggers/{trigger}`
* @param {string} request.projectId
* Required. ID of the project.
* @param {string} request.triggerId
* Required. ID of the trigger.
* @param {google.devtools.cloudbuild.v1.RepoSource} request.source
* Source to build against this trigger.
* Branch and tag names cannot consist of regular expressions.
* @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 <caption>include:samples/generated/v1/cloud_build.run_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async
*/
runBuildTrigger(request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
runBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
runBuildTrigger(request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `runBuildTrigger()`.
* @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 <caption>include:samples/generated/v1/cloud_build.run_build_trigger.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async
*/
checkRunBuildTriggerProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.Build, protos.google.devtools.cloudbuild.v1.BuildOperationMetadata>>;
/**
* Creates a `WorkerPool`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource where this worker pool will be created.
* Format: `projects/{project}/locations/{location}`.
* @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool
* Required. `WorkerPool` resource to create.
* @param {string} request.workerPoolId
* Required. Immutable. The ID to use for the `WorkerPool`, which will become
* the final component of the resource name.
*
* This value should be 1-63 characters, and valid characters
* are /{@link protos.0-9|a-z}-/.
* @param {boolean} request.validateOnly
* If set, validate the request and preview the response, but do not actually
* post it.
* @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 <caption>include:samples/generated/v1/cloud_build.create_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async
*/
createWorkerPool(request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createWorkerPool(request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createWorkerPool(request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createWorkerPool()`.
* @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 <caption>include:samples/generated/v1/cloud_build.create_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async
*/
checkCreateWorkerPoolProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.WorkerPool, protos.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata>>;
/**
* Deletes a `WorkerPool`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the `WorkerPool` to delete.
* Format:
* `projects/{project}/locations/{location}/workerPools/{workerPool}`.
* @param {string} [request.etag]
* Optional. If provided, it must match the server's etag on the workerpool
* for the request to be processed.
* @param {boolean} request.allowMissing
* If set to true, and the `WorkerPool` is not found, the request will succeed
* but no action will be taken on the server.
* @param {boolean} request.validateOnly
* If set, validate the request and preview the response, but do not actually
* post it.
* @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 <caption>include:samples/generated/v1/cloud_build.delete_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async
*/
deleteWorkerPool(request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteWorkerPool(request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
deleteWorkerPool(request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `deleteWorkerPool()`.
* @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 <caption>include:samples/generated/v1/cloud_build.delete_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async
*/
checkDeleteWorkerPoolProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata>>;
/**
* Updates a `WorkerPool`.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool
* Required. The `WorkerPool` to update.
*
* The `name` field is used to identify the `WorkerPool` to update.
* Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
* @param {google.protobuf.FieldMask} [request.updateMask]
* Optional. A mask specifying which fields in `worker_pool` to update.
* @param {boolean} request.validateOnly
* If set, validate the request and preview the response, but do not actually
* post it.
* @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 <caption>include:samples/generated/v1/cloud_build.update_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async
*/
updateWorkerPool(request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
updateWorkerPool(request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
updateWorkerPool(request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v1.IWorkerPool, protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `updateWorkerPool()`.
* @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 <caption>include:samples/generated/v1/cloud_build.update_worker_pool.js</caption>
* region_tag:cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async
*/
checkUpdateWorkerPoolProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v1.WorkerPool, protos.google.devtools.cloudbuil