@google-cloud/bigquery-reservation
Version:
BigQuery Reservation client for Node.js
703 lines • 90.2 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* This API allows users to manage their BigQuery reservations.
*
* A reservation provides computational resource guarantees, in the form of
* [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a
* unit of computational power in BigQuery, and serves as the basic unit of
* parallelism. In a scan of a multi-partitioned table, a single slot operates
* on a single partition of the table. A reservation resource exists as a child
* resource of the admin project and location, e.g.:
* `projects/myproject/locations/US/reservations/reservationName`.
*
* A capacity commitment is a way to purchase compute capacity for BigQuery jobs
* (in the form of slots) with some committed period of usage. A capacity
* commitment resource exists as a child resource of the admin project and
* location, e.g.:
* `projects/myproject/locations/US/capacityCommitments/id`.
* @class
* @memberof v1
*/
export declare class ReservationServiceClient {
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;
};
reservationServiceStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of ReservationServiceClient.
*
* @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 ReservationServiceClient({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;
/**
* Creates a new reservation resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Project, location. E.g.,
* `projects/myproject/locations/US`
* @param {string} request.reservationId
* The reservation ID. It must only contain lower case alphanumeric
* characters or dashes. It must start with a letter and must not end
* with a dash. Its maximum length is 64 characters.
* @param {google.cloud.bigquery.reservation.v1.Reservation} request.reservation
* Definition of the new reservation 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.cloud.bigquery.reservation.v1.Reservation|Reservation}.
* 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/reservation_service.create_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_CreateReservation_async
*/
createReservation(request?: protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IReservation,
protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest | undefined,
{} | undefined
]>;
createReservation(request: protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest | null | undefined, {} | null | undefined>): void;
createReservation(request: protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Returns information about the reservation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Resource name of the reservation to retrieve. E.g.,
* `projects/myproject/locations/US/reservations/team1-prod`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.Reservation|Reservation}.
* 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/reservation_service.get_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_GetReservation_async
*/
getReservation(request?: protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IReservation,
protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest | undefined,
{} | undefined
]>;
getReservation(request: protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest | null | undefined, {} | null | undefined>): void;
getReservation(request: protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Deletes a reservation.
* Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has
* assignments.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Resource name of the reservation to retrieve. E.g.,
* `projects/myproject/locations/US/reservations/team1-prod`
* @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/reservation_service.delete_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteReservation_async
*/
deleteReservation(request?: protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest | undefined,
{} | undefined
]>;
deleteReservation(request: protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest | null | undefined, {} | null | undefined>): void;
deleteReservation(request: protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates an existing reservation resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.bigquery.reservation.v1.Reservation} request.reservation
* Content of the reservation to update.
* @param {google.protobuf.FieldMask} request.updateMask
* Standard field mask for the set of fields to be 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.bigquery.reservation.v1.Reservation|Reservation}.
* 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/reservation_service.update_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateReservation_async
*/
updateReservation(request?: protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IReservation,
protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest | undefined,
{} | undefined
]>;
updateReservation(request: protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest | null | undefined, {} | null | undefined>): void;
updateReservation(request: protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Fail over a reservation to the secondary location. The operation should be
* done in the current secondary location, which will be promoted to the
* new primary location for the reservation.
* Attempting to failover a reservation in the current primary location will
* fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Resource name of the reservation to failover. E.g.,
* `projects/myproject/locations/US/reservations/team1-prod`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.Reservation|Reservation}.
* 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/reservation_service.failover_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_FailoverReservation_async
*/
failoverReservation(request?: protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IReservation,
protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest | undefined,
{} | undefined
]>;
failoverReservation(request: protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest | null | undefined, {} | null | undefined>): void;
failoverReservation(request: protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IReservation, protos.google.cloud.bigquery.reservation.v1.IFailoverReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a new capacity commitment resource.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Resource name of the parent reservation. E.g.,
* `projects/myproject/locations/US`
* @param {google.cloud.bigquery.reservation.v1.CapacityCommitment} request.capacityCommitment
* Content of the capacity commitment to create.
* @param {boolean} request.enforceSingleAdminProjectPerOrg
* If true, fail the request if another project in the organization has a
* capacity commitment.
* @param {string} request.capacityCommitmentId
* The optional capacity commitment ID. Capacity commitment name will be
* generated automatically if this field is empty.
* This field must only contain lower case alphanumeric characters or dashes.
* The first and last character cannot be a dash. Max length is 64 characters.
* NOTE: this ID won't be kept if the capacity commitment is split or merged.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.CapacityCommitment|CapacityCommitment}.
* 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/reservation_service.create_capacity_commitment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_async
*/
createCapacityCommitment(request?: protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment,
protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest | undefined,
{} | undefined
]>;
createCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
createCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Returns information about the capacity commitment.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Resource name of the capacity commitment to retrieve. E.g.,
* `projects/myproject/locations/US/capacityCommitments/123`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.CapacityCommitment|CapacityCommitment}.
* 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/reservation_service.get_capacity_commitment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_async
*/
getCapacityCommitment(request?: protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment,
protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest | undefined,
{} | undefined
]>;
getCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
getCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Deletes a capacity commitment. Attempting to delete capacity commitment
* before its commitment_end_time will fail with the error code
* `google.rpc.Code.FAILED_PRECONDITION`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Resource name of the capacity commitment to delete. E.g.,
* `projects/myproject/locations/US/capacityCommitments/123`
* @param {boolean} request.force
* Can be used to force delete commitments even if assignments exist. Deleting
* commitments with assignments may cause queries to fail if they no longer
* have access to slots.
* @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/reservation_service.delete_capacity_commitment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_async
*/
deleteCapacityCommitment(request?: protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest | undefined,
{} | undefined
]>;
deleteCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
deleteCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates an existing capacity commitment.
*
* Only `plan` and `renewal_plan` fields can be updated.
*
* Plan can only be changed to a plan of a longer commitment period.
* Attempting to change to a plan with shorter commitment period will fail
* with the error code `google.rpc.Code.FAILED_PRECONDITION`.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.bigquery.reservation.v1.CapacityCommitment} request.capacityCommitment
* Content of the capacity commitment to update.
* @param {google.protobuf.FieldMask} request.updateMask
* Standard field mask for the set of fields to be 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.bigquery.reservation.v1.CapacityCommitment|CapacityCommitment}.
* 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/reservation_service.update_capacity_commitment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_async
*/
updateCapacityCommitment(request?: protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment,
protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest | undefined,
{} | undefined
]>;
updateCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
updateCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Splits capacity commitment to two commitments of the same plan and
* `commitment_end_time`.
*
* A common use case is to enable downgrading commitments.
*
* For example, in order to downgrade from 10000 slots to 8000, you might
* split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
* you delete the first one after the commitment end time passes.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name e.g.,:
* `projects/myproject/locations/US/capacityCommitments/123`
* @param {number} request.slotCount
* Number of slots in the capacity commitment after the split.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse|SplitCapacityCommitmentResponse}.
* 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/reservation_service.split_capacity_commitment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_async
*/
splitCapacityCommitment(request?: protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentResponse,
protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest | undefined,
{} | undefined
]>;
splitCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentResponse, protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
splitCapacityCommitment(request: protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentResponse, protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Merges capacity commitments of the same plan into a single commitment.
*
* The resulting capacity commitment has the greater commitment_end_time
* out of the to-be-merged capacity commitments.
*
* Attempting to merge capacity commitments of different plan will fail
* with the error code `google.rpc.Code.FAILED_PRECONDITION`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Parent resource that identifies admin project and location e.g.,
* `projects/myproject/locations/us`
* @param {string[]} request.capacityCommitmentIds
* Ids of capacity commitments to merge.
* These capacity commitments must exist under admin project and location
* specified in the parent.
* ID is the last portion of capacity commitment name e.g., 'abc' for
* projects/myproject/locations/US/capacityCommitments/abc
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.CapacityCommitment|CapacityCommitment}.
* 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/reservation_service.merge_capacity_commitments.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_async
*/
mergeCapacityCommitments(request?: protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment,
protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest | undefined,
{} | undefined
]>;
mergeCapacityCommitments(request: protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest | null | undefined, {} | null | undefined>): void;
mergeCapacityCommitments(request: protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment, protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates an assignment object which allows the given project to submit jobs
* of a certain type using slots from the specified reservation.
*
* Currently a
* resource (project, folder, organization) can only have one assignment per
* each (job_type, location) combination, and that reservation will be used
* for all jobs of the matching type.
*
* Different assignments can be created on different levels of the
* projects, folders or organization hierarchy. During query execution,
* the assignment is looked up at the project, folder and organization levels
* in that order. The first assignment found is applied to the query.
*
* When creating assignments, it does not matter if other assignments exist at
* higher levels.
*
* Example:
*
* * The organization `organizationA` contains two projects, `project1`
* and `project2`.
* * Assignments for all three entities (`organizationA`, `project1`, and
* `project2`) could all be created and mapped to the same or different
* reservations.
*
* "None" assignments represent an absence of the assignment. Projects
* assigned to None use on-demand pricing. To create a "None" assignment, use
* "none" as a reservation_id in the parent. Example parent:
* `projects/myproject/locations/US/reservations/none`.
*
* Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
* 'bigquery.admin' permissions on the project using the reservation
* and the project that owns this reservation.
*
* Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
* does not match location of the reservation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource name of the assignment
* E.g. `projects/myproject/locations/US/reservations/team1-prod`
* @param {google.cloud.bigquery.reservation.v1.Assignment} request.assignment
* Assignment resource to create.
* @param {string} request.assignmentId
* The optional assignment ID. Assignment name will be generated automatically
* if this field is empty.
* This field must only contain lower case alphanumeric characters or dashes.
* Max length is 64 characters.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.Assignment|Assignment}.
* 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/reservation_service.create_assignment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_CreateAssignment_async
*/
createAssignment(request?: protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IAssignment,
protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest | undefined,
{} | undefined
]>;
createAssignment(request: protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest | null | undefined, {} | null | undefined>): void;
createAssignment(request: protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Deletes a assignment. No expansion will happen.
*
* Example:
*
* * Organization `organizationA` contains two projects, `project1` and
* `project2`.
* * Reservation `res1` exists and was created previously.
* * CreateAssignment was used previously to define the following
* associations between entities and reservations: `<organizationA, res1>`
* and `<project1, res1>`
*
* In this example, deletion of the `<organizationA, res1>` assignment won't
* affect the other assignment `<project1, res1>`. After said deletion,
* queries from `project1` will still use `res1` while queries from
* `project2` will switch to use on-demand mode.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the resource, e.g.
* `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
* @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/reservation_service.delete_assignment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_async
*/
deleteAssignment(request?: protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest | undefined,
{} | undefined
]>;
deleteAssignment(request: protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest | null | undefined, {} | null | undefined>): void;
deleteAssignment(request: protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Moves an assignment under a new reservation.
*
* This differs from removing an existing assignment and recreating a new one
* by providing a transactional change that ensures an assignee always has an
* associated reservation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the assignment,
* e.g.
* `projects/myproject/locations/US/reservations/team1-prod/assignments/123`
* @param {string} request.destinationId
* The new reservation ID, e.g.:
* `projects/myotherproject/locations/US/reservations/team2-prod`
* @param {string} request.assignmentId
* The optional assignment ID. A new assignment name is generated if this
* field is empty.
*
* This field can contain only lowercase alphanumeric characters or dashes.
* Max length is 64 characters.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.Assignment|Assignment}.
* 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/reservation_service.move_assignment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_MoveAssignment_async
*/
moveAssignment(request?: protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IAssignment,
protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest | undefined,
{} | undefined
]>;
moveAssignment(request: protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest | null | undefined, {} | null | undefined>): void;
moveAssignment(request: protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates an existing assignment.
*
* Only the `priority` field can be updated.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.bigquery.reservation.v1.Assignment} request.assignment
* Content of the assignment to update.
* @param {google.protobuf.FieldMask} request.updateMask
* Standard field mask for the set of fields to be 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.bigquery.reservation.v1.Assignment|Assignment}.
* 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/reservation_service.update_assignment.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_async
*/
updateAssignment(request?: protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IAssignment,
protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest | undefined,
{} | undefined
]>;
updateAssignment(request: protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest | null | undefined, {} | null | undefined>): void;
updateAssignment(request: protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IAssignment, protos.google.cloud.bigquery.reservation.v1.IUpdateAssignmentRequest | null | undefined, {} | null | undefined>): void;
/**
* Retrieves a BI reservation.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. Name of the requested reservation, for example:
* `projects/{project_id}/locations/{location_id}/biReservation`
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.BiReservation|BiReservation}.
* 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/reservation_service.get_bi_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_GetBiReservation_async
*/
getBiReservation(request?: protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IBiReservation,
protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest | undefined,
{} | undefined
]>;
getBiReservation(request: protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IBiReservation, protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest | null | undefined, {} | null | undefined>): void;
getBiReservation(request: protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IBiReservation, protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates a BI reservation.
*
* Only fields specified in the `field_mask` are updated.
*
* A singleton BI reservation always exists with default size 0.
* In order to reserve BI capacity it needs to be updated to an amount
* greater than 0. In order to release BI capacity reservation size
* must be set to 0.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.cloud.bigquery.reservation.v1.BiReservation} request.biReservation
* A reservation to update.
* @param {google.protobuf.FieldMask} request.updateMask
* A list of fields to be updated in this request.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.cloud.bigquery.reservation.v1.BiReservation|BiReservation}.
* 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/reservation_service.update_bi_reservation.js</caption>
* region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_async
*/
updateBiReservation(request?: protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.reservation.v1.IBiReservation,
protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest | undefined,
{} | undefined
]>;
updateBiReservation(request: protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IBiReservation, protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest | null | undefined, {} | null | undefined>): void;
updateBiReservation(request: protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest, callback: Callback<protos.google.cloud.bigquery.reservation.v1.IBiReservation, protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest | null | undefined, {} | null | undefined>): void;
/**
* Lists all the reservations for the project in the specified location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource name containing project and location, e.g.:
* `projects/myproject/locations/US`
* @param {number} request.pageSize
* The maximum number of items to return per page.
* @param {string} request.pageToken
* The next_page_token value returned from a previous List request, if any.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.cloud.bigquery.reservation.v1.Reservation|Reservation}.
* 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 `listReservationsAsync()`
* 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.
*/
listReservations(request?: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest, options?: CallOptions): Promise<[
protos.google.cloud.bigquery.