@google-cloud/cloudbuild
Version:
Cloud Build API client for Node.js
718 lines • 78.2 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, IamClient, IamProtos, LocationsClient, LocationProtos } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* Manages connections to source code repositories.
* @class
* @memberof v2
*/
export declare class RepositoryManagerClient {
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;
};
iamClient: IamClient;
locationsClient: LocationsClient;
pathTemplates: {
[name: string]: gax.PathTemplate;
};
operationsClient: gax.OperationsClient;
repositoryManagerStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of RepositoryManagerClient.
*
* @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 RepositoryManagerClient({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;
/**
* Gets details of a single connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the Connection to retrieve.
* Format: `projects/* /locations/* /connections/*`.
* @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.v2.Connection|Connection}.
* 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/v2/repository_manager.get_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_GetConnection_async
*/
getConnection(request?: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IConnection,
protos.google.devtools.cloudbuild.v2.IGetConnectionRequest | undefined,
{} | undefined
]>;
getConnection(request: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IGetConnectionRequest | null | undefined, {} | null | undefined>): void;
getConnection(request: protos.google.devtools.cloudbuild.v2.IGetConnectionRequest, callback: Callback<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IGetConnectionRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets details of a single repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the Repository to retrieve.
* Format: `projects/* /locations/* /connections/* /repositories/*`.
* @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.v2.Repository|Repository}.
* 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/v2/repository_manager.get_repository.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_GetRepository_async
*/
getRepository(request?: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IRepository,
protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest | undefined,
{} | undefined
]>;
getRepository(request: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v2.IRepository, protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
getRepository(request: protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest, callback: Callback<protos.google.devtools.cloudbuild.v2.IRepository, protos.google.devtools.cloudbuild.v2.IGetRepositoryRequest | null | undefined, {} | null | undefined>): void;
/**
* Fetches read/write token of a given repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.repository
* Required. The resource name of the repository in the format
* `projects/* /locations/* /connections/* /repositories/*`.
* @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.v2.FetchReadWriteTokenResponse|FetchReadWriteTokenResponse}.
* 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/v2/repository_manager.fetch_read_write_token.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_async
*/
fetchReadWriteToken(request?: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse,
protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest | undefined,
{} | undefined
]>;
fetchReadWriteToken(request: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest | null | undefined, {} | null | undefined>): void;
fetchReadWriteToken(request: protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenResponse, protos.google.devtools.cloudbuild.v2.IFetchReadWriteTokenRequest | null | undefined, {} | null | undefined>): void;
/**
* Fetches read token of a given repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.repository
* Required. The resource name of the repository in the format
* `projects/* /locations/* /connections/* /repositories/*`.
* @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.v2.FetchReadTokenResponse|FetchReadTokenResponse}.
* 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/v2/repository_manager.fetch_read_token.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_FetchReadToken_async
*/
fetchReadToken(request?: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse,
protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest | undefined,
{} | undefined
]>;
fetchReadToken(request: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest | null | undefined, {} | null | undefined>): void;
fetchReadToken(request: protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchReadTokenResponse, protos.google.devtools.cloudbuild.v2.IFetchReadTokenRequest | null | undefined, {} | null | undefined>): void;
/**
* Fetch the list of branches or tags for a given repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.repository
* Required. The resource name of the repository in the format
* `projects/* /locations/* /connections/* /repositories/*`.
* @param {google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType} request.refType
* Type of refs to fetch
* @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.v2.FetchGitRefsResponse|FetchGitRefsResponse}.
* 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/v2/repository_manager.fetch_git_refs.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_async
*/
fetchGitRefs(request?: protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IFetchGitRefsResponse,
protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest | undefined,
{} | undefined
]>;
fetchGitRefs(request: protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest, options: CallOptions, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchGitRefsResponse, protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest | null | undefined, {} | null | undefined>): void;
fetchGitRefs(request: protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest, callback: Callback<protos.google.devtools.cloudbuild.v2.IFetchGitRefsResponse, protos.google.devtools.cloudbuild.v2.IFetchGitRefsRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a Connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Project and location where the connection will be created.
* Format: `projects/* /locations/*`.
* @param {google.devtools.cloudbuild.v2.Connection} request.connection
* Required. The Connection to create.
* @param {string} request.connectionId
* Required. The ID to use for the Connection, which will become the final
* component of the Connection's resource name. Names must be unique
* per-project per-location. Allows alphanumeric characters and any of
* -._~%!$&'()*+,;=@.
* @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/v2/repository_manager.create_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_CreateConnection_async
*/
createConnection(request?: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createConnection(request: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createConnection(request: protos.google.devtools.cloudbuild.v2.ICreateConnectionRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createConnection()`.
* @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/v2/repository_manager.create_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_CreateConnection_async
*/
checkCreateConnectionProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v2.Connection, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Updates a single connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.devtools.cloudbuild.v2.Connection} request.connection
* Required. The Connection to update.
* @param {google.protobuf.FieldMask} request.updateMask
* The list of fields to be updated.
* @param {boolean} request.allowMissing
* If set to true, and the connection is not found a new connection
* will be created. In this situation `update_mask` is ignored.
* The creation will succeed only if the input connection has all the
* necessary information (e.g a github_config with both user_oauth_token and
* installation_id properties).
* @param {string} request.etag
* The current etag of the connection.
* If an etag is provided and does not match the current etag of the
* connection, update will be blocked and an ABORTED error will be returned.
* @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/v2/repository_manager.update_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async
*/
updateConnection(request?: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
updateConnection(request: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
updateConnection(request: protos.google.devtools.cloudbuild.v2.IUpdateConnectionRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IConnection, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `updateConnection()`.
* @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/v2/repository_manager.update_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_UpdateConnection_async
*/
checkUpdateConnectionProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v2.Connection, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Deletes a single connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the Connection to delete.
* Format: `projects/* /locations/* /connections/*`.
* @param {string} request.etag
* The current etag of the connection.
* If an etag is provided and does not match the current etag of the
* connection, deletion will be blocked and an ABORTED error will be returned.
* @param {boolean} request.validateOnly
* If set, validate the request, 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/v2/repository_manager.delete_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async
*/
deleteConnection(request?: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteConnection(request: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
deleteConnection(request: protos.google.devtools.cloudbuild.v2.IDeleteConnectionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `deleteConnection()`.
* @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/v2/repository_manager.delete_connection.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteConnection_async
*/
checkDeleteConnectionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Creates a Repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The connection to contain the repository. If the request is part
* of a BatchCreateRepositoriesRequest, this field should be empty or match
* the parent specified there.
* @param {google.devtools.cloudbuild.v2.Repository} request.repository
* Required. The repository to create.
* @param {string} request.repositoryId
* Required. The ID to use for the repository, which will become the final
* component of the repository's resource name. This ID should be unique in
* the connection. Allows alphanumeric characters and any of
* -._~%!$&'()*+,;=@.
* @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/v2/repository_manager.create_repository.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_CreateRepository_async
*/
createRepository(request?: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v2.IRepository, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
createRepository(request: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IRepository, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
createRepository(request: protos.google.devtools.cloudbuild.v2.ICreateRepositoryRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IRepository, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `createRepository()`.
* @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/v2/repository_manager.create_repository.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_CreateRepository_async
*/
checkCreateRepositoryProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v2.Repository, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Creates multiple repositories inside a connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The connection to contain all the repositories being created.
* Format: projects/* /locations/* /connections/*
* The parent field in the CreateRepositoryRequest messages
* must either be empty or match this field.
* @param {number[]} request.requests
* Required. The request messages specifying the repositories 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/v2/repository_manager.batch_create_repositories.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async
*/
batchCreateRepositories(request?: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, options?: CallOptions): Promise<[
LROperation<protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
batchCreateRepositories(request: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, options: CallOptions, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
batchCreateRepositories(request: protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesRequest, callback: Callback<LROperation<protos.google.devtools.cloudbuild.v2.IBatchCreateRepositoriesResponse, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `batchCreateRepositories()`.
* @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/v2/repository_manager.batch_create_repositories.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_async
*/
checkBatchCreateRepositoriesProgress(name: string): Promise<LROperation<protos.google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Deletes a single repository.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the Repository to delete.
* Format: `projects/* /locations/* /connections/* /repositories/*`.
* @param {string} request.etag
* The current etag of the repository.
* If an etag is provided and does not match the current etag of the
* repository, deletion will be blocked and an ABORTED error will be returned.
* @param {boolean} request.validateOnly
* If set, validate the request, 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/v2/repository_manager.delete_repository.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async
*/
deleteRepository(request?: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
deleteRepository(request: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
deleteRepository(request: protos.google.devtools.cloudbuild.v2.IDeleteRepositoryRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.devtools.cloudbuild.v2.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `deleteRepository()`.
* @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/v2/repository_manager.delete_repository.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_DeleteRepository_async
*/
checkDeleteRepositoryProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.devtools.cloudbuild.v2.OperationMetadata>>;
/**
* Lists Connections in a given project and location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of Connections.
* Format: `projects/* /locations/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @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.devtools.cloudbuild.v2.Connection|Connection}.
* 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 `listConnectionsAsync()`
* 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.
*/
listConnections(request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IConnection[],
protos.google.devtools.cloudbuild.v2.IListConnectionsRequest | null,
protos.google.devtools.cloudbuild.v2.IListConnectionsResponse
]>;
listConnections(request: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, protos.google.devtools.cloudbuild.v2.IListConnectionsResponse | null | undefined, protos.google.devtools.cloudbuild.v2.IConnection>): void;
listConnections(request: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, callback: PaginationCallback<protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, protos.google.devtools.cloudbuild.v2.IListConnectionsResponse | null | undefined, protos.google.devtools.cloudbuild.v2.IConnection>): void;
/**
* Equivalent to `listConnections`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of Connections.
* Format: `projects/* /locations/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @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.devtools.cloudbuild.v2.Connection|Connection} 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 `listConnectionsAsync()`
* 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.
*/
listConnectionsStream(request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listConnections`, 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 parent, which owns this collection of Connections.
* Format: `projects/* /locations/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @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.devtools.cloudbuild.v2.Connection|Connection}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/repository_manager.list_connections.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_ListConnections_async
*/
listConnectionsAsync(request?: protos.google.devtools.cloudbuild.v2.IListConnectionsRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.cloudbuild.v2.IConnection>;
/**
* Lists Repositories in a given connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of Repositories.
* Format: `projects/* /locations/* /connections/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @param {string} request.filter
* A filter expression that filters resources listed in the response.
* Expressions must follow API improvement proposal
* [AIP-160](https://google.aip.dev/160). e.g.
* `remote_uri:"https://github.com*"`.
* @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.devtools.cloudbuild.v2.Repository|Repository}.
* 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 `listRepositoriesAsync()`
* 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.
*/
listRepositories(request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IRepository[],
protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest | null,
protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse
]>;
listRepositories(request: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse | null | undefined, protos.google.devtools.cloudbuild.v2.IRepository>): void;
listRepositories(request: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, callback: PaginationCallback<protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, protos.google.devtools.cloudbuild.v2.IListRepositoriesResponse | null | undefined, protos.google.devtools.cloudbuild.v2.IRepository>): void;
/**
* Equivalent to `listRepositories`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of Repositories.
* Format: `projects/* /locations/* /connections/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @param {string} request.filter
* A filter expression that filters resources listed in the response.
* Expressions must follow API improvement proposal
* [AIP-160](https://google.aip.dev/160). e.g.
* `remote_uri:"https://github.com*"`.
* @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.devtools.cloudbuild.v2.Repository|Repository} 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 `listRepositoriesAsync()`
* 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.
*/
listRepositoriesStream(request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listRepositories`, 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 parent, which owns this collection of Repositories.
* Format: `projects/* /locations/* /connections/*`.
* @param {number} request.pageSize
* Number of results to return in the list.
* @param {string} request.pageToken
* Page start.
* @param {string} request.filter
* A filter expression that filters resources listed in the response.
* Expressions must follow API improvement proposal
* [AIP-160](https://google.aip.dev/160). e.g.
* `remote_uri:"https://github.com*"`.
* @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.devtools.cloudbuild.v2.Repository|Repository}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v2/repository_manager.list_repositories.js</caption>
* region_tag:cloudbuild_v2_generated_RepositoryManager_ListRepositories_async
*/
listRepositoriesAsync(request?: protos.google.devtools.cloudbuild.v2.IListRepositoriesRequest, options?: CallOptions): AsyncIterable<protos.google.devtools.cloudbuild.v2.IRepository>;
/**
* FetchLinkableRepositories get repositories from SCM that are
* accessible and could be added to the connection.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.connection
* Required. The name of the Connection.
* Format: `projects/* /locations/* /connections/*`.
* @param {number} request.pageSize
* Number of results to return in the list. Default to 20.
* @param {string} request.pageToken
* Page start.
* @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.devtools.cloudbuild.v2.Repository|Repository}.
* 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 `fetchLinkableRepositoriesAsync()`
* 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.
*/
fetchLinkableRepositories(request?: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, options?: CallOptions): Promise<[
protos.google.devtools.cloudbuild.v2.IRepository[],
protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest | null,
protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesResponse
]>;
fetchLinkableRepositories(request: protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, options: CallOptions, callback: PaginationCallback<protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositoriesRequest, protos.google.devtools.cloudbuild.v2.IFetchLinkableRepositor