@google-cloud/spanner 7.9.1 → 7.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.SpannerDate = exports.PGNumeric = exports.Numeric = exports.Struct = exports.Int = exports.Float = exports.Float32 = exports.protos = exports.v1 = exports.MutationGroup = exports.Transaction = exports.Snapshot = exports.PartitionedDml = exports.Table = exports.SessionPool = exports.Session = exports.Backup = exports.Database = exports.InstanceConfig = exports.Instance = exports.Spanner = void 0;
18
+ exports.SpannerDate = exports.PGNumeric = exports.Numeric = exports.Struct = exports.Int = exports.Float = exports.Float32 = exports.protos = exports.v1 = exports.MutationSet = exports.MutationGroup = exports.Transaction = exports.Snapshot = exports.PartitionedDml = exports.Table = exports.SessionPool = exports.Session = exports.Backup = exports.Database = exports.InstanceConfig = exports.Instance = exports.Spanner = void 0;
19
19
  const service_1 = require("./common-grpc/service");
20
20
  const precise_date_1 = require("@google-cloud/precise-date");
21
21
  const projectify_1 = require("@google-cloud/projectify");
@@ -52,6 +52,7 @@ const table_1 = require("./table");
52
52
  Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return table_1.Table; } });
53
53
  const transaction_1 = require("./transaction");
54
54
  Object.defineProperty(exports, "MutationGroup", { enumerable: true, get: function () { return transaction_1.MutationGroup; } });
55
+ Object.defineProperty(exports, "MutationSet", { enumerable: true, get: function () { return transaction_1.MutationSet; } });
55
56
  Object.defineProperty(exports, "PartitionedDml", { enumerable: true, get: function () { return transaction_1.PartitionedDml; } });
56
57
  Object.defineProperty(exports, "Snapshot", { enumerable: true, get: function () { return transaction_1.Snapshot; } });
57
58
  Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return transaction_1.Transaction; } });
@@ -41,6 +41,7 @@ export interface TimestampBounds {
41
41
  export interface BatchWriteOptions {
42
42
  requestOptions?: Pick<IRequestOptions, 'priority' | 'transactionTag'>;
43
43
  gaxOptions?: CallOptions;
44
+ excludeTxnFromChangeStreams?: boolean;
44
45
  }
45
46
  export interface RequestOptions {
46
47
  json?: boolean;
@@ -1117,6 +1118,14 @@ export declare class Transaction extends Dml {
1117
1118
  batchUpdate(queries: Array<string | Statement>, callback: BatchUpdateCallback): void;
1118
1119
  batchUpdate(queries: Array<string | Statement>, options: BatchUpdateOptions | CallOptions, callback: BatchUpdateCallback): void;
1119
1120
  private static extractKnownMetadata;
1121
+ /**
1122
+ * This method updates the _queuedMutations property of the transaction.
1123
+ *
1124
+ * @public
1125
+ *
1126
+ * @param {spannerClient.spanner.v1.Mutation[]} [mutation]
1127
+ */
1128
+ setQueuedMutations(mutation: spannerClient.spanner.v1.Mutation[]): void;
1120
1129
  /**
1121
1130
  * @typedef {object} CommitOptions
1122
1131
  * @property {google.spanner.v1.IRequestOptions} requestOptions The request options to include
@@ -1501,6 +1510,88 @@ export declare class Transaction extends Dml {
1501
1510
  */
1502
1511
  excludeTxnFromChangeStreams(): void;
1503
1512
  }
1513
+ /**
1514
+ * MutationSet represent a set of changes to be applied atomically to a Cloud Spanner
1515
+ * database with a {@link Transaction}.
1516
+ * Mutations are used to insert, update, upsert(insert or update), replace, or
1517
+ * delete rows within tables.
1518
+ *
1519
+ * Mutations are added to a {@link Transaction} and are not executed until the
1520
+ * transaction is committed via {@link Transaction#commit}.
1521
+ *
1522
+ * If the transaction is rolled back or encounters an error, the mutations are
1523
+ * discarded.
1524
+ *
1525
+ * @example
1526
+ * ```
1527
+ * const {Spanner, Mutation} = require('@google-cloud/spanner');
1528
+ * const spanner = new Spanner();
1529
+ *
1530
+ * const instance = spanner.instance('my-instance');
1531
+ * const database = instance.database('my-database');
1532
+ *
1533
+ * const mutations = new MutationSet();
1534
+ * mutations.insert('Singers', {SingerId: '123', FirstName: 'David'});
1535
+ * mutations.update('Singers', {SingerId: '123', FirstName: 'Marc'});
1536
+ *
1537
+ * try {
1538
+ * database.writeAtLeastOnce(mutations, (err, res) => {
1539
+ * console.log("RESPONSE: ", res);
1540
+ * });
1541
+ * } catch(err) {
1542
+ * console.log("ERROR: ", err);
1543
+ * }
1544
+ * ```
1545
+ */
1546
+ export declare class MutationSet {
1547
+ /**
1548
+ * An array to store the mutations.
1549
+ */
1550
+ private _queuedMutations;
1551
+ /**
1552
+ * Creates a new Mutation object.
1553
+ */
1554
+ constructor();
1555
+ /**
1556
+ * Adds an insert operation to the mutation set.
1557
+ * @param {string} table. The name of the table to insert into.
1558
+ * @param {object|object[]} rows. A single row object or an array of row objects to insert.
1559
+ */
1560
+ insert(table: string, rows: object | object[]): void;
1561
+ /**
1562
+ * Adds an update operation to the mutation set.
1563
+ * @param {string} table. The name of the table to update.
1564
+ * @param {object|object[]} rows. A single row object or an array of row objects to update.
1565
+ * Each row object must contain the primary key values to indentify the row to update.
1566
+ */
1567
+ update(table: string, rows: object | object[]): void;
1568
+ /**
1569
+ * Adds an upsert operation to the mutation set.
1570
+ * An upsert will insert a new row if it does not exist or update an existing row if it does.
1571
+ * @param {string} table. The name of the table to upsert.
1572
+ * @param {object|object[]} rows. A single row object or an array of row objects to upsert.
1573
+ */
1574
+ upsert(table: string, rows: object | object[]): void;
1575
+ /**
1576
+ * Adds a replace operation to the mutation set.
1577
+ * A replace operation deletes the existing row (if it exists) and inserts the new row.
1578
+ * @param {string} table. The name of the table to replace.
1579
+ * @param {object|object[]} rows. A single row object or an array of row objects to replace.
1580
+ */
1581
+ replace(table: string, rows: object | object[]): void;
1582
+ /**
1583
+ * Adds a deleteRows operation to the mutation set.
1584
+ * This operation deletes rows from the specified table based on their primary keys.
1585
+ * @param {string} table. The name of the table to deleteRows from.
1586
+ * @param {key[]} key. An array of key objects, each represeting the primary key of a row to delete.
1587
+ */
1588
+ deleteRows(table: string, keys: Key[]): void;
1589
+ /**
1590
+ * Returns the internal representation of the queued mutations as a protobuf message.
1591
+ * @returns {spannerClient.spanner.v1.Mutation[]}. The protobuf message representing the mutations.
1592
+ */
1593
+ proto(): spannerClient.spanner.v1.Mutation[];
1594
+ }
1504
1595
  /**
1505
1596
  * A group of mutations to be committed together.
1506
1597
  * Related mutations should be placed in a group.
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.PartitionedDml = exports.MutationGroup = exports.Transaction = exports.Dml = exports.Snapshot = void 0;
18
+ exports.PartitionedDml = exports.MutationGroup = exports.MutationSet = exports.Transaction = exports.Dml = exports.Snapshot = void 0;
19
19
  const precise_date_1 = require("@google-cloud/precise-date");
20
20
  const promisify_1 = require("@google-cloud/promisify");
21
21
  const arrify = require("arrify");
@@ -1089,6 +1089,16 @@ class Transaction extends Dml {
1089
1089
  }
1090
1090
  return undefined;
1091
1091
  }
1092
+ /**
1093
+ * This method updates the _queuedMutations property of the transaction.
1094
+ *
1095
+ * @public
1096
+ *
1097
+ * @param {spannerClient.spanner.v1.Mutation[]} [mutation]
1098
+ */
1099
+ setQueuedMutations(mutation) {
1100
+ this._queuedMutations = mutation;
1101
+ }
1092
1102
  commit(optionsOrCallback, cb) {
1093
1103
  const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {};
1094
1104
  const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb;
@@ -1573,6 +1583,99 @@ function buildDeleteMutation(table, keys) {
1573
1583
  };
1574
1584
  return mutation;
1575
1585
  }
1586
+ /**
1587
+ * MutationSet represent a set of changes to be applied atomically to a Cloud Spanner
1588
+ * database with a {@link Transaction}.
1589
+ * Mutations are used to insert, update, upsert(insert or update), replace, or
1590
+ * delete rows within tables.
1591
+ *
1592
+ * Mutations are added to a {@link Transaction} and are not executed until the
1593
+ * transaction is committed via {@link Transaction#commit}.
1594
+ *
1595
+ * If the transaction is rolled back or encounters an error, the mutations are
1596
+ * discarded.
1597
+ *
1598
+ * @example
1599
+ * ```
1600
+ * const {Spanner, Mutation} = require('@google-cloud/spanner');
1601
+ * const spanner = new Spanner();
1602
+ *
1603
+ * const instance = spanner.instance('my-instance');
1604
+ * const database = instance.database('my-database');
1605
+ *
1606
+ * const mutations = new MutationSet();
1607
+ * mutations.insert('Singers', {SingerId: '123', FirstName: 'David'});
1608
+ * mutations.update('Singers', {SingerId: '123', FirstName: 'Marc'});
1609
+ *
1610
+ * try {
1611
+ * database.writeAtLeastOnce(mutations, (err, res) => {
1612
+ * console.log("RESPONSE: ", res);
1613
+ * });
1614
+ * } catch(err) {
1615
+ * console.log("ERROR: ", err);
1616
+ * }
1617
+ * ```
1618
+ */
1619
+ class MutationSet {
1620
+ /**
1621
+ * Creates a new Mutation object.
1622
+ */
1623
+ constructor() {
1624
+ this._queuedMutations = [];
1625
+ }
1626
+ /**
1627
+ * Adds an insert operation to the mutation set.
1628
+ * @param {string} table. The name of the table to insert into.
1629
+ * @param {object|object[]} rows. A single row object or an array of row objects to insert.
1630
+ */
1631
+ insert(table, rows) {
1632
+ this._queuedMutations.push(buildMutation('insert', table, rows));
1633
+ }
1634
+ /**
1635
+ * Adds an update operation to the mutation set.
1636
+ * @param {string} table. The name of the table to update.
1637
+ * @param {object|object[]} rows. A single row object or an array of row objects to update.
1638
+ * Each row object must contain the primary key values to indentify the row to update.
1639
+ */
1640
+ update(table, rows) {
1641
+ this._queuedMutations.push(buildMutation('update', table, rows));
1642
+ }
1643
+ /**
1644
+ * Adds an upsert operation to the mutation set.
1645
+ * An upsert will insert a new row if it does not exist or update an existing row if it does.
1646
+ * @param {string} table. The name of the table to upsert.
1647
+ * @param {object|object[]} rows. A single row object or an array of row objects to upsert.
1648
+ */
1649
+ upsert(table, rows) {
1650
+ this._queuedMutations.push(buildMutation('insertOrUpdate', table, rows));
1651
+ }
1652
+ /**
1653
+ * Adds a replace operation to the mutation set.
1654
+ * A replace operation deletes the existing row (if it exists) and inserts the new row.
1655
+ * @param {string} table. The name of the table to replace.
1656
+ * @param {object|object[]} rows. A single row object or an array of row objects to replace.
1657
+ */
1658
+ replace(table, rows) {
1659
+ this._queuedMutations.push(buildMutation('replace', table, rows));
1660
+ }
1661
+ /**
1662
+ * Adds a deleteRows operation to the mutation set.
1663
+ * This operation deletes rows from the specified table based on their primary keys.
1664
+ * @param {string} table. The name of the table to deleteRows from.
1665
+ * @param {key[]} key. An array of key objects, each represeting the primary key of a row to delete.
1666
+ */
1667
+ deleteRows(table, keys) {
1668
+ this._queuedMutations.push(buildDeleteMutation(table, keys));
1669
+ }
1670
+ /**
1671
+ * Returns the internal representation of the queued mutations as a protobuf message.
1672
+ * @returns {spannerClient.spanner.v1.Mutation[]}. The protobuf message representing the mutations.
1673
+ */
1674
+ proto() {
1675
+ return this._queuedMutations;
1676
+ }
1677
+ }
1678
+ exports.MutationSet = MutationSet;
1576
1679
  /**
1577
1680
  * A group of mutations to be committed together.
1578
1681
  * Related mutations should be placed in a group.
@@ -379,6 +379,108 @@ export declare class DatabaseAdminClient {
379
379
  ]>;
380
380
  deleteBackup(request: protos.google.spanner.admin.database.v1.IDeleteBackupRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupRequest | null | undefined, {} | null | undefined>): void;
381
381
  deleteBackup(request: protos.google.spanner.admin.database.v1.IDeleteBackupRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupRequest | null | undefined, {} | null | undefined>): void;
382
+ /**
383
+ * Creates a new backup schedule.
384
+ *
385
+ * @param {Object} request
386
+ * The request object that will be sent.
387
+ * @param {string} request.parent
388
+ * Required. The name of the database that this backup schedule applies to.
389
+ * @param {string} request.backupScheduleId
390
+ * Required. The Id to use for the backup schedule. The `backup_schedule_id`
391
+ * appended to `parent` forms the full backup schedule name of the form
392
+ * `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
393
+ * @param {google.spanner.admin.database.v1.BackupSchedule} request.backupSchedule
394
+ * Required. The backup schedule to create.
395
+ * @param {object} [options]
396
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
397
+ * @returns {Promise} - The promise which resolves to an array.
398
+ * The first element of the array is an object representing {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule}.
399
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
400
+ * for more details and examples.
401
+ */
402
+ createBackupSchedule(request?: protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest, options?: CallOptions): Promise<[
403
+ protos.google.spanner.admin.database.v1.IBackupSchedule,
404
+ (protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest | undefined),
405
+ {} | undefined
406
+ ]>;
407
+ createBackupSchedule(request: protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
408
+ createBackupSchedule(request: protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.ICreateBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
409
+ /**
410
+ * Gets backup schedule for the input schedule name.
411
+ *
412
+ * @param {Object} request
413
+ * The request object that will be sent.
414
+ * @param {string} request.name
415
+ * Required. The name of the schedule to retrieve.
416
+ * Values are of the form
417
+ * `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
418
+ * @param {object} [options]
419
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
420
+ * @returns {Promise} - The promise which resolves to an array.
421
+ * The first element of the array is an object representing {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule}.
422
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
423
+ * for more details and examples.
424
+ */
425
+ getBackupSchedule(request?: protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest, options?: CallOptions): Promise<[
426
+ protos.google.spanner.admin.database.v1.IBackupSchedule,
427
+ (protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest | undefined),
428
+ {} | undefined
429
+ ]>;
430
+ getBackupSchedule(request: protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
431
+ getBackupSchedule(request: protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.IGetBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
432
+ /**
433
+ * Updates a backup schedule.
434
+ *
435
+ * @param {Object} request
436
+ * The request object that will be sent.
437
+ * @param {google.spanner.admin.database.v1.BackupSchedule} request.backupSchedule
438
+ * Required. The backup schedule to update. `backup_schedule.name`, and the
439
+ * fields to be updated as specified by `update_mask` are required. Other
440
+ * fields are ignored.
441
+ * @param {google.protobuf.FieldMask} request.updateMask
442
+ * Required. A mask specifying which fields in the BackupSchedule resource
443
+ * should be updated. This mask is relative to the BackupSchedule resource,
444
+ * not to the request message. The field mask must always be
445
+ * specified; this prevents any future fields from being erased
446
+ * accidentally.
447
+ * @param {object} [options]
448
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
449
+ * @returns {Promise} - The promise which resolves to an array.
450
+ * The first element of the array is an object representing {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule}.
451
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
452
+ * for more details and examples.
453
+ */
454
+ updateBackupSchedule(request?: protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest, options?: CallOptions): Promise<[
455
+ protos.google.spanner.admin.database.v1.IBackupSchedule,
456
+ (protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest | undefined),
457
+ {} | undefined
458
+ ]>;
459
+ updateBackupSchedule(request: protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest, options: CallOptions, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
460
+ updateBackupSchedule(request: protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest, callback: Callback<protos.google.spanner.admin.database.v1.IBackupSchedule, protos.google.spanner.admin.database.v1.IUpdateBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
461
+ /**
462
+ * Deletes a backup schedule.
463
+ *
464
+ * @param {Object} request
465
+ * The request object that will be sent.
466
+ * @param {string} request.name
467
+ * Required. The name of the schedule to delete.
468
+ * Values are of the form
469
+ * `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
470
+ * @param {object} [options]
471
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
472
+ * @returns {Promise} - The promise which resolves to an array.
473
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
474
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
475
+ * for more details and examples.
476
+ */
477
+ deleteBackupSchedule(request?: protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest, options?: CallOptions): Promise<[
478
+ protos.google.protobuf.IEmpty,
479
+ (protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest | undefined),
480
+ {} | undefined
481
+ ]>;
482
+ deleteBackupSchedule(request: protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
483
+ deleteBackupSchedule(request: protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.spanner.admin.database.v1.IDeleteBackupScheduleRequest | null | undefined, {} | null | undefined>): void;
382
484
  /**
383
485
  * Creates a new Cloud Spanner database and starts to prepare it for serving.
384
486
  * The returned {@link protos.google.longrunning.Operation|long-running operation} will
@@ -1748,6 +1850,102 @@ export declare class DatabaseAdminClient {
1748
1850
  * for more details and examples.
1749
1851
  */
1750
1852
  listDatabaseRolesAsync(request?: protos.google.spanner.admin.database.v1.IListDatabaseRolesRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.admin.database.v1.IDatabaseRole>;
1853
+ /**
1854
+ * Lists all the backup schedules for the database.
1855
+ *
1856
+ * @param {Object} request
1857
+ * The request object that will be sent.
1858
+ * @param {string} request.parent
1859
+ * Required. Database is the parent resource whose backup schedules should be
1860
+ * listed. Values are of the form
1861
+ * projects/<project>/instances/<instance>/databases/<database>
1862
+ * @param {number} [request.pageSize]
1863
+ * Optional. Number of backup schedules to be returned in the response. If 0
1864
+ * or less, defaults to the server's maximum allowed page size.
1865
+ * @param {string} [request.pageToken]
1866
+ * Optional. If non-empty, `page_token` should contain a
1867
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse.next_page_token|next_page_token}
1868
+ * from a previous
1869
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse|ListBackupSchedulesResponse}
1870
+ * to the same `parent`.
1871
+ * @param {object} [options]
1872
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1873
+ * @returns {Promise} - The promise which resolves to an array.
1874
+ * The first element of the array is Array of {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule}.
1875
+ * The client library will perform auto-pagination by default: it will call the API as many
1876
+ * times as needed and will merge results from all the pages into this array.
1877
+ * Note that it can affect your quota.
1878
+ * We recommend using `listBackupSchedulesAsync()`
1879
+ * method described below for async iteration which you can stop as needed.
1880
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1881
+ * for more details and examples.
1882
+ */
1883
+ listBackupSchedules(request?: protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, options?: CallOptions): Promise<[
1884
+ protos.google.spanner.admin.database.v1.IBackupSchedule[],
1885
+ protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest | null,
1886
+ protos.google.spanner.admin.database.v1.IListBackupSchedulesResponse
1887
+ ]>;
1888
+ listBackupSchedules(request: protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, options: CallOptions, callback: PaginationCallback<protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, protos.google.spanner.admin.database.v1.IListBackupSchedulesResponse | null | undefined, protos.google.spanner.admin.database.v1.IBackupSchedule>): void;
1889
+ listBackupSchedules(request: protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, callback: PaginationCallback<protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, protos.google.spanner.admin.database.v1.IListBackupSchedulesResponse | null | undefined, protos.google.spanner.admin.database.v1.IBackupSchedule>): void;
1890
+ /**
1891
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1892
+ * @param {Object} request
1893
+ * The request object that will be sent.
1894
+ * @param {string} request.parent
1895
+ * Required. Database is the parent resource whose backup schedules should be
1896
+ * listed. Values are of the form
1897
+ * projects/<project>/instances/<instance>/databases/<database>
1898
+ * @param {number} [request.pageSize]
1899
+ * Optional. Number of backup schedules to be returned in the response. If 0
1900
+ * or less, defaults to the server's maximum allowed page size.
1901
+ * @param {string} [request.pageToken]
1902
+ * Optional. If non-empty, `page_token` should contain a
1903
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse.next_page_token|next_page_token}
1904
+ * from a previous
1905
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse|ListBackupSchedulesResponse}
1906
+ * to the same `parent`.
1907
+ * @param {object} [options]
1908
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1909
+ * @returns {Stream}
1910
+ * An object stream which emits an object representing {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule} on 'data' event.
1911
+ * The client library will perform auto-pagination by default: it will call the API as many
1912
+ * times as needed. Note that it can affect your quota.
1913
+ * We recommend using `listBackupSchedulesAsync()`
1914
+ * method described below for async iteration which you can stop as needed.
1915
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1916
+ * for more details and examples.
1917
+ */
1918
+ listBackupSchedulesStream(request?: protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, options?: CallOptions): Transform;
1919
+ /**
1920
+ * Equivalent to `listBackupSchedules`, but returns an iterable object.
1921
+ *
1922
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1923
+ * @param {Object} request
1924
+ * The request object that will be sent.
1925
+ * @param {string} request.parent
1926
+ * Required. Database is the parent resource whose backup schedules should be
1927
+ * listed. Values are of the form
1928
+ * projects/<project>/instances/<instance>/databases/<database>
1929
+ * @param {number} [request.pageSize]
1930
+ * Optional. Number of backup schedules to be returned in the response. If 0
1931
+ * or less, defaults to the server's maximum allowed page size.
1932
+ * @param {string} [request.pageToken]
1933
+ * Optional. If non-empty, `page_token` should contain a
1934
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse.next_page_token|next_page_token}
1935
+ * from a previous
1936
+ * {@link protos.google.spanner.admin.database.v1.ListBackupSchedulesResponse|ListBackupSchedulesResponse}
1937
+ * to the same `parent`.
1938
+ * @param {object} [options]
1939
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1940
+ * @returns {Object}
1941
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1942
+ * When you iterate the returned iterable, each element will be an object representing
1943
+ * {@link protos.google.spanner.admin.database.v1.BackupSchedule|BackupSchedule}. The API will be called under the hood as needed, once per the page,
1944
+ * so you can stop the iteration when you don't need more results.
1945
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1946
+ * for more details and examples.
1947
+ */
1948
+ listBackupSchedulesAsync(request?: protos.google.spanner.admin.database.v1.IListBackupSchedulesRequest, options?: CallOptions): AsyncIterable<protos.google.spanner.admin.database.v1.IBackupSchedule>;
1751
1949
  /**
1752
1950
  * Gets the latest state of a long-running operation. Clients can use this
1753
1951
  * method to poll the operation result at intervals as recommended by the API
@@ -1901,6 +2099,48 @@ export declare class DatabaseAdminClient {
1901
2099
  * @returns {string} A string representing the backup.
1902
2100
  */
1903
2101
  matchBackupFromBackupName(backupName: string): string | number;
2102
+ /**
2103
+ * Return a fully-qualified backupSchedule resource name string.
2104
+ *
2105
+ * @param {string} project
2106
+ * @param {string} instance
2107
+ * @param {string} database
2108
+ * @param {string} schedule
2109
+ * @returns {string} Resource name string.
2110
+ */
2111
+ backupSchedulePath(project: string, instance: string, database: string, schedule: string): string;
2112
+ /**
2113
+ * Parse the project from BackupSchedule resource.
2114
+ *
2115
+ * @param {string} backupScheduleName
2116
+ * A fully-qualified path representing BackupSchedule resource.
2117
+ * @returns {string} A string representing the project.
2118
+ */
2119
+ matchProjectFromBackupScheduleName(backupScheduleName: string): string | number;
2120
+ /**
2121
+ * Parse the instance from BackupSchedule resource.
2122
+ *
2123
+ * @param {string} backupScheduleName
2124
+ * A fully-qualified path representing BackupSchedule resource.
2125
+ * @returns {string} A string representing the instance.
2126
+ */
2127
+ matchInstanceFromBackupScheduleName(backupScheduleName: string): string | number;
2128
+ /**
2129
+ * Parse the database from BackupSchedule resource.
2130
+ *
2131
+ * @param {string} backupScheduleName
2132
+ * A fully-qualified path representing BackupSchedule resource.
2133
+ * @returns {string} A string representing the database.
2134
+ */
2135
+ matchDatabaseFromBackupScheduleName(backupScheduleName: string): string | number;
2136
+ /**
2137
+ * Parse the schedule from BackupSchedule resource.
2138
+ *
2139
+ * @param {string} backupScheduleName
2140
+ * A fully-qualified path representing BackupSchedule resource.
2141
+ * @returns {string} A string representing the schedule.
2142
+ */
2143
+ matchScheduleFromBackupScheduleName(backupScheduleName: string): string | number;
1904
2144
  /**
1905
2145
  * Return a fully-qualified cryptoKey resource name string.
1906
2146
  *