diff --git a/packages/google-cloud-bigquery-reservation/linkinator.config.json b/packages/google-cloud-bigquery-reservation/linkinator.config.json
index 29a223b6db6..0121dfa684f 100644
--- a/packages/google-cloud-bigquery-reservation/linkinator.config.json
+++ b/packages/google-cloud-bigquery-reservation/linkinator.config.json
@@ -6,5 +6,5 @@
"img.shields.io"
],
"silent": true,
- "concurrency": 10
+ "concurrency": 5
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_assignment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_assignment.js
index c3eb6a86552..2526fac4dae 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_assignment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_assignment.js
@@ -27,7 +27,7 @@ function main(parent) {
/**
* Assignment resource to create.
*/
- // const assignment = ''
+ // const assignment = {}
/**
* The optional assignment ID. Assignment name will be generated automatically
* if this field is empty.
@@ -43,7 +43,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function createAssignment() {
+ async function callCreateAssignment() {
// Construct request
const request = {
parent,
@@ -54,7 +54,7 @@ function main(parent) {
console.log(response);
}
- createAssignment();
+ callCreateAssignment();
// [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_capacity_commitment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_capacity_commitment.js
index 32dd481bf5b..0b1989ace3c 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_capacity_commitment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_capacity_commitment.js
@@ -27,7 +27,7 @@ function main(parent) {
/**
* Content of the capacity commitment to create.
*/
- // const capacityCommitment = ''
+ // const capacityCommitment = {}
/**
* If true, fail the request if another project in the organization has a
* capacity commitment.
@@ -49,7 +49,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function createCapacityCommitment() {
+ async function callCreateCapacityCommitment() {
// Construct request
const request = {
parent,
@@ -60,7 +60,7 @@ function main(parent) {
console.log(response);
}
- createCapacityCommitment();
+ callCreateCapacityCommitment();
// [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_reservation.js
index f5c53986a6f..3db716a0867 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.create_reservation.js
@@ -32,7 +32,7 @@ function main(parent) {
/**
* Definition of the new reservation to create.
*/
- // const reservation = ''
+ // const reservation = {}
// Imports the Reservation library
const {ReservationServiceClient} =
@@ -41,7 +41,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function createReservation() {
+ async function callCreateReservation() {
// Construct request
const request = {
parent,
@@ -52,7 +52,7 @@ function main(parent) {
console.log(response);
}
- createReservation();
+ callCreateReservation();
// [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_assignment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_assignment.js
index 75733986f36..342c2f489b5 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_assignment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_assignment.js
@@ -32,7 +32,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function deleteAssignment() {
+ async function callDeleteAssignment() {
// Construct request
const request = {
name,
@@ -43,7 +43,7 @@ function main(name) {
console.log(response);
}
- deleteAssignment();
+ callDeleteAssignment();
// [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_capacity_commitment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_capacity_commitment.js
index 5e87bc4b988..64b988e2cd5 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_capacity_commitment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_capacity_commitment.js
@@ -38,7 +38,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function deleteCapacityCommitment() {
+ async function callDeleteCapacityCommitment() {
// Construct request
const request = {
name,
@@ -49,7 +49,7 @@ function main(name) {
console.log(response);
}
- deleteCapacityCommitment();
+ callDeleteCapacityCommitment();
// [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_reservation.js
index 04ceef5e546..f8a5c246a6b 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.delete_reservation.js
@@ -32,7 +32,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function deleteReservation() {
+ async function callDeleteReservation() {
// Construct request
const request = {
name,
@@ -43,7 +43,7 @@ function main(name) {
console.log(response);
}
- deleteReservation();
+ callDeleteReservation();
// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_bi_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_bi_reservation.js
index 0b641aca56d..cb9be2f398c 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_bi_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_bi_reservation.js
@@ -32,7 +32,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function getBiReservation() {
+ async function callGetBiReservation() {
// Construct request
const request = {
name,
@@ -43,7 +43,7 @@ function main(name) {
console.log(response);
}
- getBiReservation();
+ callGetBiReservation();
// [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_capacity_commitment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_capacity_commitment.js
index f34f1124c77..8600856255f 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_capacity_commitment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_capacity_commitment.js
@@ -32,7 +32,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function getCapacityCommitment() {
+ async function callGetCapacityCommitment() {
// Construct request
const request = {
name,
@@ -43,7 +43,7 @@ function main(name) {
console.log(response);
}
- getCapacityCommitment();
+ callGetCapacityCommitment();
// [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_reservation.js
index e9e27f06cef..61d27330c5e 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.get_reservation.js
@@ -32,7 +32,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function getReservation() {
+ async function callGetReservation() {
// Construct request
const request = {
name,
@@ -43,7 +43,7 @@ function main(name) {
console.log(response);
}
- getReservation();
+ callGetReservation();
// [END bigqueryreservation_v1_generated_ReservationService_GetReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_assignments.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_assignments.js
index 02e24ed8d5e..1d1bc835124 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_assignments.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_assignments.js
@@ -42,7 +42,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function listAssignments() {
+ async function callListAssignments() {
// Construct request
const request = {
parent,
@@ -55,7 +55,7 @@ function main(parent) {
}
}
- listAssignments();
+ callListAssignments();
// [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_capacity_commitments.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_capacity_commitments.js
index 04a371b0861..62277721f62 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_capacity_commitments.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_capacity_commitments.js
@@ -40,7 +40,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function listCapacityCommitments() {
+ async function callListCapacityCommitments() {
// Construct request
const request = {
parent,
@@ -55,7 +55,7 @@ function main(parent) {
}
}
- listCapacityCommitments();
+ callListCapacityCommitments();
// [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_reservations.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_reservations.js
index 1b255ad6a03..e1517b2df85 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_reservations.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.list_reservations.js
@@ -40,7 +40,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function listReservations() {
+ async function callListReservations() {
// Construct request
const request = {
parent,
@@ -53,7 +53,7 @@ function main(parent) {
}
}
- listReservations();
+ callListReservations();
// [END bigqueryreservation_v1_generated_ReservationService_ListReservations_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.merge_capacity_commitments.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.merge_capacity_commitments.js
index 9d15f02230c..e10eb8895f6 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.merge_capacity_commitments.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.merge_capacity_commitments.js
@@ -40,7 +40,7 @@ function main() {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function mergeCapacityCommitments() {
+ async function callMergeCapacityCommitments() {
// Construct request
const request = {};
@@ -49,7 +49,7 @@ function main() {
console.log(response);
}
- mergeCapacityCommitments();
+ callMergeCapacityCommitments();
// [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.move_assignment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.move_assignment.js
index d1db9490db7..d6b0b5bcc64 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.move_assignment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.move_assignment.js
@@ -38,7 +38,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function moveAssignment() {
+ async function callMoveAssignment() {
// Construct request
const request = {
name,
@@ -49,7 +49,7 @@ function main(name) {
console.log(response);
}
- moveAssignment();
+ callMoveAssignment();
// [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_all_assignments.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_all_assignments.js
index 3f7340b4265..ae5d20bdc8e 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_all_assignments.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_all_assignments.js
@@ -49,7 +49,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function searchAllAssignments() {
+ async function callSearchAllAssignments() {
// Construct request
const request = {
parent,
@@ -62,7 +62,7 @@ function main(parent) {
}
}
- searchAllAssignments();
+ callSearchAllAssignments();
// [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_assignments.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_assignments.js
index 6353e6be98a..a0ef03c6186 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_assignments.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.search_assignments.js
@@ -49,7 +49,7 @@ function main(parent) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function searchAssignments() {
+ async function callSearchAssignments() {
// Construct request
const request = {
parent,
@@ -62,7 +62,7 @@ function main(parent) {
}
}
- searchAssignments();
+ callSearchAssignments();
// [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.split_capacity_commitment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.split_capacity_commitment.js
index 8526addd8f4..13116ef25aa 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.split_capacity_commitment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.split_capacity_commitment.js
@@ -36,7 +36,7 @@ function main(name) {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function splitCapacityCommitment() {
+ async function callSplitCapacityCommitment() {
// Construct request
const request = {
name,
@@ -47,7 +47,7 @@ function main(name) {
console.log(response);
}
- splitCapacityCommitment();
+ callSplitCapacityCommitment();
// [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_bi_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_bi_reservation.js
index d22943ad5c1..4f9c3820e49 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_bi_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_bi_reservation.js
@@ -22,11 +22,11 @@ function main() {
/**
* A reservation to update.
*/
- // const biReservation = ''
+ // const biReservation = {}
/**
* A list of fields to be updated in this request.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Reservation library
const {ReservationServiceClient} =
@@ -35,7 +35,7 @@ function main() {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function updateBiReservation() {
+ async function callUpdateBiReservation() {
// Construct request
const request = {};
@@ -44,7 +44,7 @@ function main() {
console.log(response);
}
- updateBiReservation();
+ callUpdateBiReservation();
// [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_capacity_commitment.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_capacity_commitment.js
index 00fd5b391dc..25f357bc949 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_capacity_commitment.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_capacity_commitment.js
@@ -22,11 +22,11 @@ function main() {
/**
* Content of the capacity commitment to update.
*/
- // const capacityCommitment = ''
+ // const capacityCommitment = {}
/**
* Standard field mask for the set of fields to be updated.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Reservation library
const {ReservationServiceClient} =
@@ -35,7 +35,7 @@ function main() {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function updateCapacityCommitment() {
+ async function callUpdateCapacityCommitment() {
// Construct request
const request = {};
@@ -44,7 +44,7 @@ function main() {
console.log(response);
}
- updateCapacityCommitment();
+ callUpdateCapacityCommitment();
// [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_reservation.js b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_reservation.js
index 9847adecd50..851bcc013bf 100644
--- a/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_reservation.js
+++ b/packages/google-cloud-bigquery-reservation/samples/generated/v1/reservation_service.update_reservation.js
@@ -22,11 +22,11 @@ function main() {
/**
* Content of the reservation to update.
*/
- // const reservation = ''
+ // const reservation = {}
/**
* Standard field mask for the set of fields to be updated.
*/
- // const updateMask = ''
+ // const updateMask = {}
// Imports the Reservation library
const {ReservationServiceClient} =
@@ -35,7 +35,7 @@ function main() {
// Instantiates a client
const reservationClient = new ReservationServiceClient();
- async function updateReservation() {
+ async function callUpdateReservation() {
// Construct request
const request = {};
@@ -44,7 +44,7 @@ function main() {
console.log(response);
}
- updateReservation();
+ callUpdateReservation();
// [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_async]
}
diff --git a/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts b/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts
index 14cde1e22ce..d6c04b05f6c 100644
--- a/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts
+++ b/packages/google-cloud-bigquery-reservation/src/v1/reservation_service_client.ts
@@ -385,6 +385,29 @@ export class ReservationServiceClient {
// -------------------
// -- Service calls --
// -------------------
+ /**
+ * 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. This field must only contain lower case alphanumeric
+ * characters or dash. Max 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example
include:samples/generated/v1/reservation_service.create_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_CreateReservation_async
+ */
createReservation(
request?: protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest,
options?: CallOptions
@@ -419,29 +442,6 @@ export class ReservationServiceClient {
{} | null | 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. This field must only contain lower case alphanumeric
- * characters or dash. Max 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.createReservation(request);
- */
createReservation(
request?: protos.google.cloud.bigquery.reservation.v1.ICreateReservationRequest,
optionsOrCallback?:
@@ -488,6 +488,24 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.createReservation(request, options, callback);
}
+ /**
+ * 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.get_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_GetReservation_async
+ */
getReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest,
options?: CallOptions
@@ -522,24 +540,6 @@ export class ReservationServiceClient {
{} | 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getReservation(request);
- */
getReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IGetReservationRequest,
optionsOrCallback?:
@@ -586,6 +586,26 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.getReservation(request, options, callback);
}
+ /**
+ * 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 [Empty]{@link google.protobuf.Empty}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.delete_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteReservation_async
+ */
deleteReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest,
options?: CallOptions
@@ -620,26 +640,6 @@ export class ReservationServiceClient {
{} | 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 [Empty]{@link google.protobuf.Empty}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.deleteReservation(request);
- */
deleteReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteReservationRequest,
optionsOrCallback?:
@@ -686,6 +686,25 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.deleteReservation(request, options, callback);
}
+ /**
+ * 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.update_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateReservation_async
+ */
updateReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest,
options?: CallOptions
@@ -720,25 +739,6 @@ export class ReservationServiceClient {
{} | 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 [Reservation]{@link google.cloud.bigquery.reservation.v1.Reservation}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.updateReservation(request);
- */
updateReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateReservationRequest,
optionsOrCallback?:
@@ -785,6 +785,35 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.updateReservation(request, options, callback);
}
+ /**
+ * 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 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.create_capacity_commitment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_async
+ */
createCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest,
options?: CallOptions
@@ -819,35 +848,6 @@ export class ReservationServiceClient {
{} | 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 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.createCapacityCommitment(request);
- */
createCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.ICreateCapacityCommitmentRequest,
optionsOrCallback?:
@@ -898,6 +898,24 @@ export class ReservationServiceClient {
callback
);
}
+ /**
+ * 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.get_capacity_commitment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_async
+ */
getCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest,
options?: CallOptions
@@ -932,24 +950,6 @@ export class ReservationServiceClient {
{} | 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getCapacityCommitment(request);
- */
getCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IGetCapacityCommitmentRequest,
optionsOrCallback?:
@@ -996,6 +996,30 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.getCapacityCommitment(request, options, callback);
}
+ /**
+ * 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 [Empty]{@link google.protobuf.Empty}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.delete_capacity_commitment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_async
+ */
deleteCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest,
options?: CallOptions
@@ -1030,30 +1054,6 @@ export class ReservationServiceClient {
{} | 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 [Empty]{@link google.protobuf.Empty}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.deleteCapacityCommitment(request);
- */
deleteCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteCapacityCommitmentRequest,
optionsOrCallback?:
@@ -1104,6 +1104,31 @@ export class ReservationServiceClient {
callback
);
}
+ /**
+ * 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.update_capacity_commitment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_async
+ */
updateCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest,
options?: CallOptions
@@ -1138,31 +1163,6 @@ export class ReservationServiceClient {
{} | 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.updateCapacityCommitment(request);
- */
updateCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateCapacityCommitmentRequest,
optionsOrCallback?:
@@ -1213,6 +1213,33 @@ export class ReservationServiceClient {
callback
);
}
+ /**
+ * 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 would change the plan of the first one to `FLEX` and then delete it.
+ *
+ * @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 [SplitCapacityCommitmentResponse]{@link google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.split_capacity_commitment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_async
+ */
splitCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest,
options?: CallOptions
@@ -1247,33 +1274,6 @@ export class ReservationServiceClient {
{} | 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 would change the plan of the first one to `FLEX` and then delete it.
- *
- * @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 [SplitCapacityCommitmentResponse]{@link google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.splitCapacityCommitment(request);
- */
splitCapacityCommitment(
request?: protos.google.cloud.bigquery.reservation.v1.ISplitCapacityCommitmentRequest,
optionsOrCallback?:
@@ -1324,6 +1324,36 @@ export class ReservationServiceClient {
callback
);
}
+ /**
+ * 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.merge_capacity_commitments.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_async
+ */
mergeCapacityCommitments(
request?: protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest,
options?: CallOptions
@@ -1358,36 +1388,6 @@ export class ReservationServiceClient {
{} | 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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.mergeCapacityCommitments(request);
- */
mergeCapacityCommitments(
request?: protos.google.cloud.bigquery.reservation.v1.IMergeCapacityCommitmentsRequest,
optionsOrCallback?:
@@ -1438,40 +1438,6 @@ export class ReservationServiceClient {
callback
);
}
- 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;
/**
* Creates an assignment object which allows the given project to submit jobs
* of a certain type using slots from the specified reservation.
@@ -1528,9 +1494,43 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
- * @example
- * const [response] = await client.createAssignment(request);
+ * @example include:samples/generated/v1/reservation_service.create_assignment.js
+ * 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;
createAssignment(
request?: protos.google.cloud.bigquery.reservation.v1.ICreateAssignmentRequest,
optionsOrCallback?:
@@ -1577,6 +1577,38 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.createAssignment(request, options, callback);
}
+ /**
+ * 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: ``
+ * and ``
+ *
+ * In this example, deletion of the `` assignment won't
+ * affect the other assignment ``. 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 [Empty]{@link google.protobuf.Empty}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.delete_assignment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_async
+ */
deleteAssignment(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest,
options?: CallOptions
@@ -1611,38 +1643,6 @@ export class ReservationServiceClient {
{} | 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: ``
- * and ``
- *
- * In this example, deletion of the `` assignment won't
- * affect the other assignment ``. 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 [Empty]{@link google.protobuf.Empty}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.deleteAssignment(request);
- */
deleteAssignment(
request?: protos.google.cloud.bigquery.reservation.v1.IDeleteAssignmentRequest,
optionsOrCallback?:
@@ -1689,6 +1689,32 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.deleteAssignment(request, options, callback);
}
+ /**
+ * 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 {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 [Assignment]{@link google.cloud.bigquery.reservation.v1.Assignment}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.move_assignment.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_MoveAssignment_async
+ */
moveAssignment(
request?: protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest,
options?: CallOptions
@@ -1723,32 +1749,6 @@ export class ReservationServiceClient {
{} | 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 {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 [Assignment]{@link google.cloud.bigquery.reservation.v1.Assignment}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.moveAssignment(request);
- */
moveAssignment(
request?: protos.google.cloud.bigquery.reservation.v1.IMoveAssignmentRequest,
optionsOrCallback?:
@@ -1795,6 +1795,24 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.moveAssignment(request, options, callback);
}
+ /**
+ * 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 [BiReservation]{@link google.cloud.bigquery.reservation.v1.BiReservation}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.get_bi_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_GetBiReservation_async
+ */
getBiReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest,
options?: CallOptions
@@ -1829,24 +1847,6 @@ export class ReservationServiceClient {
{} | 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 [BiReservation]{@link google.cloud.bigquery.reservation.v1.BiReservation}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.getBiReservation(request);
- */
getBiReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IGetBiReservationRequest,
optionsOrCallback?:
@@ -1893,6 +1893,32 @@ export class ReservationServiceClient {
this.initialize();
return this.innerApiCalls.getBiReservation(request, options, callback);
}
+ /**
+ * 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 [BiReservation]{@link google.cloud.bigquery.reservation.v1.BiReservation}.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
+ * for more details and examples.
+ * @example include:samples/generated/v1/reservation_service.update_bi_reservation.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_async
+ */
updateBiReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest,
options?: CallOptions
@@ -1927,32 +1953,6 @@ export class ReservationServiceClient {
{} | 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 [BiReservation]{@link google.cloud.bigquery.reservation.v1.BiReservation}.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
- * for more details and examples.
- * @example
- * const [response] = await client.updateBiReservation(request);
- */
updateBiReservation(
request?: protos.google.cloud.bigquery.reservation.v1.IUpdateBiReservationRequest,
optionsOrCallback?:
@@ -2000,37 +2000,6 @@ export class ReservationServiceClient {
return this.innerApiCalls.updateBiReservation(request, options, callback);
}
- listReservations(
- request?: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.bigquery.reservation.v1.IReservation[],
- protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest | null,
- protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
- ]
- >;
- listReservations(
- request: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
- | protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IReservation
- >
- ): void;
- listReservations(
- request: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
- | protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IReservation
- >
- ): void;
/**
* Lists all the reservations for the project in the specified location.
*
@@ -2056,6 +2025,37 @@ export class ReservationServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listReservations(
+ request?: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.bigquery.reservation.v1.IReservation[],
+ protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest | null,
+ protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
+ ]
+ >;
+ listReservations(
+ request: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IReservation
+ >
+ ): void;
+ listReservations(
+ request: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.IListReservationsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IReservation
+ >
+ ): void;
listReservations(
request?: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
optionsOrCallback?:
@@ -2168,11 +2168,8 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listReservationsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v1/reservation_service.list_reservations.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_ListReservations_async
*/
listReservationsAsync(
request?: protos.google.cloud.bigquery.reservation.v1.IListReservationsRequest,
@@ -2186,7 +2183,6 @@ export class ReservationServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listReservations'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
@@ -2196,6 +2192,31 @@ export class ReservationServiceClient {
callSettings
) as AsyncIterable;
}
+ /**
+ * Lists all the capacity commitments for the admin project.
+ *
+ * @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 {number} request.pageSize
+ * The maximum number of items to return.
+ * @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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
+ * 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 `listCapacityCommitmentsAsync()`
+ * method described below for async iteration which you can stop as needed.
+ * Please see the
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
+ * for more details and examples.
+ */
listCapacityCommitments(
request?: protos.google.cloud.bigquery.reservation.v1.IListCapacityCommitmentsRequest,
options?: CallOptions
@@ -2227,31 +2248,6 @@ export class ReservationServiceClient {
protos.google.cloud.bigquery.reservation.v1.ICapacityCommitment
>
): void;
- /**
- * Lists all the capacity commitments for the admin project.
- *
- * @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 {number} request.pageSize
- * The maximum number of items to return.
- * @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 [CapacityCommitment]{@link google.cloud.bigquery.reservation.v1.CapacityCommitment}.
- * 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 `listCapacityCommitmentsAsync()`
- * method described below for async iteration which you can stop as needed.
- * Please see the
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
- * for more details and examples.
- */
listCapacityCommitments(
request?: protos.google.cloud.bigquery.reservation.v1.IListCapacityCommitmentsRequest,
optionsOrCallback?:
@@ -2368,11 +2364,8 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listCapacityCommitmentsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v1/reservation_service.list_capacity_commitments.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_async
*/
listCapacityCommitmentsAsync(
request?: protos.google.cloud.bigquery.reservation.v1.IListCapacityCommitmentsRequest,
@@ -2386,7 +2379,6 @@ export class ReservationServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listCapacityCommitments'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
@@ -2396,37 +2388,6 @@ export class ReservationServiceClient {
callSettings
) as AsyncIterable;
}
- listAssignments(
- request?: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.bigquery.reservation.v1.IAssignment[],
- protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest | null,
- protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
- ]
- >;
- listAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
- listAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
/**
* Lists assignments.
*
@@ -2477,6 +2438,37 @@ export class ReservationServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ listAssignments(
+ request?: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.bigquery.reservation.v1.IAssignment[],
+ protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest | null,
+ protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
+ ]
+ >;
+ listAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
+ listAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.IListAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
listAssignments(
request?: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
optionsOrCallback?:
@@ -2599,11 +2591,8 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.listAssignmentsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v1/reservation_service.list_assignments.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_ListAssignments_async
*/
listAssignmentsAsync(
request?: protos.google.cloud.bigquery.reservation.v1.IListAssignmentsRequest,
@@ -2617,7 +2606,6 @@ export class ReservationServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['listAssignments'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
@@ -2627,37 +2615,6 @@ export class ReservationServiceClient {
callSettings
) as AsyncIterable;
}
- searchAssignments(
- request?: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.bigquery.reservation.v1.IAssignment[],
- protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest | null,
- protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
- ]
- >;
- searchAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
- searchAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
/**
* Deprecated: Looks up assignments for a specified resource for a particular region.
* If the request is about a project:
@@ -2715,6 +2672,37 @@ export class ReservationServiceClient {
* for more details and examples.
* @deprecated SearchAssignments is deprecated and may be removed in a future version.
*/
+ searchAssignments(
+ request?: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.bigquery.reservation.v1.IAssignment[],
+ protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest | null,
+ protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
+ ]
+ >;
+ searchAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
+ searchAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
searchAssignments(
request?: protos.google.cloud.bigquery.reservation.v1.ISearchAssignmentsRequest,
optionsOrCallback?:
@@ -2856,11 +2844,8 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.searchAssignmentsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v1/reservation_service.search_assignments.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_SearchAssignments_async
* @deprecated SearchAssignments is deprecated and may be removed in a future version.
*/
searchAssignmentsAsync(
@@ -2875,7 +2860,6 @@ export class ReservationServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['searchAssignments'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();
@@ -2890,37 +2874,6 @@ export class ReservationServiceClient {
callSettings
) as AsyncIterable;
}
- searchAllAssignments(
- request?: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
- options?: CallOptions
- ): Promise<
- [
- protos.google.cloud.bigquery.reservation.v1.IAssignment[],
- protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest | null,
- protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
- ]
- >;
- searchAllAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
- options: CallOptions,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
- searchAllAssignments(
- request: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
- callback: PaginationCallback<
- protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
- | protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
- | null
- | undefined,
- protos.google.cloud.bigquery.reservation.v1.IAssignment
- >
- ): void;
/**
* Looks up assignments for a specified resource for a particular region.
* If the request is about a project:
@@ -2974,6 +2927,37 @@ export class ReservationServiceClient {
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
+ searchAllAssignments(
+ request?: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
+ options?: CallOptions
+ ): Promise<
+ [
+ protos.google.cloud.bigquery.reservation.v1.IAssignment[],
+ protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest | null,
+ protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
+ ]
+ >;
+ searchAllAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
+ options: CallOptions,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
+ searchAllAssignments(
+ request: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
+ callback: PaginationCallback<
+ protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
+ | protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsResponse
+ | null
+ | undefined,
+ protos.google.cloud.bigquery.reservation.v1.IAssignment
+ >
+ ): void;
searchAllAssignments(
request?: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
optionsOrCallback?:
@@ -3104,11 +3088,8 @@ export class ReservationServiceClient {
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
- * @example
- * const iterable = client.searchAllAssignmentsAsync(request);
- * for await (const response of iterable) {
- * // process response
- * }
+ * @example include:samples/generated/v1/reservation_service.search_all_assignments.js
+ * region_tag:bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_async
*/
searchAllAssignmentsAsync(
request?: protos.google.cloud.bigquery.reservation.v1.ISearchAllAssignmentsRequest,
@@ -3122,7 +3103,6 @@ export class ReservationServiceClient {
gax.routingHeader.fromParams({
parent: request.parent || '',
});
- options = options || {};
const defaultCallSettings = this._defaults['searchAllAssignments'];
const callSettings = defaultCallSettings.merge(options);
this.initialize();