@maxim_mazurok/gapi.client.spanner-v1 0.0.20220726

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.
package/tests.ts ADDED
@@ -0,0 +1,1332 @@
1
+ /* This is stub file for gapi.client.spanner-v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220726
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://spanner.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.spanner */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ /** Administer your Spanner databases */
21
+ 'https://www.googleapis.com/auth/spanner.admin',
22
+ /** View and manage the contents of your Spanner databases */
23
+ 'https://www.googleapis.com/auth/spanner.data',
24
+ ];
25
+ const immediate = false;
26
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
27
+ if (authResult && !authResult.error) {
28
+ /** handle successful authorization */
29
+ run();
30
+ } else {
31
+ /** handle authorization error */
32
+ }
33
+ });
34
+
35
+ async function run() {
36
+ /** Gets information about a particular instance configuration. */
37
+ await gapi.client.spanner.projects.instanceConfigs.get({
38
+ name: "Test string",
39
+ });
40
+ /** Lists the supported instance configurations for a given project. */
41
+ await gapi.client.spanner.projects.instanceConfigs.list({
42
+ pageSize: 42,
43
+ pageToken: "Test string",
44
+ parent: "Test string",
45
+ });
46
+ /**
47
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
48
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
49
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
50
+ * 1, corresponding to `Code.CANCELLED`.
51
+ */
52
+ await gapi.client.spanner.projects.instanceConfigs.operations.cancel({
53
+ name: "Test string",
54
+ });
55
+ /**
56
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
57
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
58
+ */
59
+ await gapi.client.spanner.projects.instanceConfigs.operations.delete({
60
+ name: "Test string",
61
+ });
62
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
63
+ await gapi.client.spanner.projects.instanceConfigs.operations.get({
64
+ name: "Test string",
65
+ });
66
+ /**
67
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
68
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
69
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
70
+ * ensure the name binding is the parent resource, without the operations collection id.
71
+ */
72
+ await gapi.client.spanner.projects.instanceConfigs.operations.list({
73
+ filter: "Test string",
74
+ name: "Test string",
75
+ pageSize: 42,
76
+ pageToken: "Test string",
77
+ });
78
+ /**
79
+ * Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is
80
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance is readable via the
81
+ * API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance
82
+ * immediately unreadable via the API. * The instance can be deleted. * All other attempts to modify the instance are rejected. Upon completion of the returned operation: * Billing for all
83
+ * successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can be created in the instance. * The instance's allocated resource levels are
84
+ * readable via the API. * The instance's state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the
85
+ * instance. The metadata field type is CreateInstanceMetadata. The response field type is Instance, if successful.
86
+ */
87
+ await gapi.client.spanner.projects.instances.create({
88
+ parent: "Test string",
89
+ }, {
90
+ instance: {
91
+ config: "Test string",
92
+ createTime: "Test string",
93
+ displayName: "Test string",
94
+ endpointUris: [
95
+ "Test string"
96
+ ],
97
+ freeInstanceMetadata: {
98
+ expireBehavior: "Test string",
99
+ expireTime: "Test string",
100
+ upgradeTime: "Test string",
101
+ },
102
+ instanceType: "Test string",
103
+ labels: {
104
+ A: "Test string"
105
+ },
106
+ name: "Test string",
107
+ nodeCount: 42,
108
+ processingUnits: 42,
109
+ state: "Test string",
110
+ updateTime: "Test string",
111
+ },
112
+ instanceId: "Test string",
113
+ });
114
+ /**
115
+ * Deletes an instance. Immediately upon completion of the request: * Billing ceases for all of the instance's reserved resources. Soon afterward: * The instance and *all of its databases*
116
+ * immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
117
+ */
118
+ await gapi.client.spanner.projects.instances.delete({
119
+ name: "Test string",
120
+ });
121
+ /** Gets information about a particular instance. */
122
+ await gapi.client.spanner.projects.instances.get({
123
+ fieldMask: "Test string",
124
+ name: "Test string",
125
+ });
126
+ /**
127
+ * Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. Authorization requires
128
+ * `spanner.instances.getIamPolicy` on resource.
129
+ */
130
+ await gapi.client.spanner.projects.instances.getIamPolicy({
131
+ resource: "Test string",
132
+ }, {
133
+ options: {
134
+ requestedPolicyVersion: 42,
135
+ },
136
+ });
137
+ /** Lists all instances in the given project. */
138
+ await gapi.client.spanner.projects.instances.list({
139
+ filter: "Test string",
140
+ instanceDeadline: "Test string",
141
+ pageSize: 42,
142
+ pageToken: "Test string",
143
+ parent: "Test string",
144
+ });
145
+ /**
146
+ * Updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the
147
+ * named instance does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance's allocation has been
148
+ * requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring
149
+ * resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other
150
+ * attempts to modify the instance are rejected. * Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing
151
+ * begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance's tables. *
152
+ * The instance's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance
153
+ * modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires `spanner.instances.update` permission on the
154
+ * resource name.
155
+ */
156
+ await gapi.client.spanner.projects.instances.patch({
157
+ name: "Test string",
158
+ }, {
159
+ fieldMask: "Test string",
160
+ instance: {
161
+ config: "Test string",
162
+ createTime: "Test string",
163
+ displayName: "Test string",
164
+ endpointUris: [
165
+ "Test string"
166
+ ],
167
+ freeInstanceMetadata: {
168
+ expireBehavior: "Test string",
169
+ expireTime: "Test string",
170
+ upgradeTime: "Test string",
171
+ },
172
+ instanceType: "Test string",
173
+ labels: {
174
+ A: "Test string"
175
+ },
176
+ name: "Test string",
177
+ nodeCount: 42,
178
+ processingUnits: 42,
179
+ state: "Test string",
180
+ updateTime: "Test string",
181
+ },
182
+ });
183
+ /** Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires `spanner.instances.setIamPolicy` on resource. */
184
+ await gapi.client.spanner.projects.instances.setIamPolicy({
185
+ resource: "Test string",
186
+ }, {
187
+ policy: {
188
+ bindings: [
189
+ {
190
+ condition: {
191
+ description: "Test string",
192
+ expression: "Test string",
193
+ location: "Test string",
194
+ title: "Test string",
195
+ },
196
+ members: [
197
+ "Test string"
198
+ ],
199
+ role: "Test string",
200
+ }
201
+ ],
202
+ etag: "Test string",
203
+ version: 42,
204
+ },
205
+ });
206
+ /**
207
+ * Returns permissions that the caller has on the specified instance resource. Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the
208
+ * user has `spanner.instances.list` permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.
209
+ */
210
+ await gapi.client.spanner.projects.instances.testIamPermissions({
211
+ resource: "Test string",
212
+ }, {
213
+ permissions: [
214
+ "Test string"
215
+ ],
216
+ });
217
+ /**
218
+ * Lists the backup long-running operations in the given instance. A backup operation has a name of the form `projects//instances//backups//operations/`. The long-running operation
219
+ * metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending
220
+ * operations. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation.
221
+ */
222
+ await gapi.client.spanner.projects.instances.backupOperations.list({
223
+ filter: "Test string",
224
+ pageSize: 42,
225
+ pageToken: "Test string",
226
+ parent: "Test string",
227
+ });
228
+ /**
229
+ * Starts copying a Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track
230
+ * copying of the backup. The operation is associated with the destination backup. The metadata field type is CopyBackupMetadata. The response field type is Backup, if successful.
231
+ * Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.
232
+ */
233
+ await gapi.client.spanner.projects.instances.backups.copy({
234
+ parent: "Test string",
235
+ }, {
236
+ backupId: "Test string",
237
+ encryptionConfig: {
238
+ encryptionType: "Test string",
239
+ kmsKeyName: "Test string",
240
+ },
241
+ expireTime: "Test string",
242
+ sourceBackup: "Test string",
243
+ });
244
+ /**
245
+ * Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to
246
+ * track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation
247
+ * and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.
248
+ */
249
+ await gapi.client.spanner.projects.instances.backups.create({
250
+ backupId: "Test string",
251
+ "encryptionConfig.encryptionType": "Test string",
252
+ "encryptionConfig.kmsKeyName": "Test string",
253
+ parent: "Test string",
254
+ }, {
255
+ createTime: "Test string",
256
+ database: "Test string",
257
+ databaseDialect: "Test string",
258
+ encryptionInfo: {
259
+ encryptionStatus: {
260
+ code: 42,
261
+ details: [
262
+ {
263
+ A: 42
264
+ }
265
+ ],
266
+ message: "Test string",
267
+ },
268
+ encryptionType: "Test string",
269
+ kmsKeyVersion: "Test string",
270
+ },
271
+ expireTime: "Test string",
272
+ maxExpireTime: "Test string",
273
+ name: "Test string",
274
+ referencingBackups: [
275
+ "Test string"
276
+ ],
277
+ referencingDatabases: [
278
+ "Test string"
279
+ ],
280
+ sizeBytes: "Test string",
281
+ state: "Test string",
282
+ versionTime: "Test string",
283
+ });
284
+ /** Deletes a pending or completed Backup. */
285
+ await gapi.client.spanner.projects.instances.backups.delete({
286
+ name: "Test string",
287
+ });
288
+ /** Gets metadata on a pending or completed Backup. */
289
+ await gapi.client.spanner.projects.instances.backups.get({
290
+ name: "Test string",
291
+ });
292
+ /**
293
+ * Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires
294
+ * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.
295
+ */
296
+ await gapi.client.spanner.projects.instances.backups.getIamPolicy({
297
+ resource: "Test string",
298
+ }, {
299
+ options: {
300
+ requestedPolicyVersion: 42,
301
+ },
302
+ });
303
+ /** Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`. */
304
+ await gapi.client.spanner.projects.instances.backups.list({
305
+ filter: "Test string",
306
+ pageSize: 42,
307
+ pageToken: "Test string",
308
+ parent: "Test string",
309
+ });
310
+ /** Updates a pending or completed Backup. */
311
+ await gapi.client.spanner.projects.instances.backups.patch({
312
+ name: "Test string",
313
+ updateMask: "Test string",
314
+ }, {
315
+ createTime: "Test string",
316
+ database: "Test string",
317
+ databaseDialect: "Test string",
318
+ encryptionInfo: {
319
+ encryptionStatus: {
320
+ code: 42,
321
+ details: [
322
+ {
323
+ A: 42
324
+ }
325
+ ],
326
+ message: "Test string",
327
+ },
328
+ encryptionType: "Test string",
329
+ kmsKeyVersion: "Test string",
330
+ },
331
+ expireTime: "Test string",
332
+ maxExpireTime: "Test string",
333
+ name: "Test string",
334
+ referencingBackups: [
335
+ "Test string"
336
+ ],
337
+ referencingDatabases: [
338
+ "Test string"
339
+ ],
340
+ sizeBytes: "Test string",
341
+ state: "Test string",
342
+ versionTime: "Test string",
343
+ });
344
+ /**
345
+ * Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For
346
+ * backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.
347
+ */
348
+ await gapi.client.spanner.projects.instances.backups.setIamPolicy({
349
+ resource: "Test string",
350
+ }, {
351
+ policy: {
352
+ bindings: [
353
+ {
354
+ condition: {
355
+ description: "Test string",
356
+ expression: "Test string",
357
+ location: "Test string",
358
+ title: "Test string",
359
+ },
360
+ members: [
361
+ "Test string"
362
+ ],
363
+ role: "Test string",
364
+ }
365
+ ],
366
+ etag: "Test string",
367
+ version: 42,
368
+ },
369
+ });
370
+ /**
371
+ * Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if
372
+ * the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not
373
+ * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.
374
+ */
375
+ await gapi.client.spanner.projects.instances.backups.testIamPermissions({
376
+ resource: "Test string",
377
+ }, {
378
+ permissions: [
379
+ "Test string"
380
+ ],
381
+ });
382
+ /**
383
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
384
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
385
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
386
+ * 1, corresponding to `Code.CANCELLED`.
387
+ */
388
+ await gapi.client.spanner.projects.instances.backups.operations.cancel({
389
+ name: "Test string",
390
+ });
391
+ /**
392
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
393
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
394
+ */
395
+ await gapi.client.spanner.projects.instances.backups.operations.delete({
396
+ name: "Test string",
397
+ });
398
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
399
+ await gapi.client.spanner.projects.instances.backups.operations.get({
400
+ name: "Test string",
401
+ });
402
+ /**
403
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
404
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
405
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
406
+ * ensure the name binding is the parent resource, without the operations collection id.
407
+ */
408
+ await gapi.client.spanner.projects.instances.backups.operations.list({
409
+ filter: "Test string",
410
+ name: "Test string",
411
+ pageSize: 42,
412
+ pageToken: "Test string",
413
+ });
414
+ /**
415
+ * Lists database longrunning-operations. A database operation has a name of the form `projects//instances//databases//operations/`. The long-running operation metadata field type
416
+ * `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.
417
+ */
418
+ await gapi.client.spanner.projects.instances.databaseOperations.list({
419
+ filter: "Test string",
420
+ pageSize: 42,
421
+ pageToken: "Test string",
422
+ parent: "Test string",
423
+ });
424
+ /**
425
+ * Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track
426
+ * preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.
427
+ */
428
+ await gapi.client.spanner.projects.instances.databases.create({
429
+ parent: "Test string",
430
+ }, {
431
+ createStatement: "Test string",
432
+ databaseDialect: "Test string",
433
+ encryptionConfig: {
434
+ kmsKeyName: "Test string",
435
+ },
436
+ extraStatements: [
437
+ "Test string"
438
+ ],
439
+ });
440
+ /**
441
+ * Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`. Note: Cloud Spanner might continue to accept requests
442
+ * for a few seconds after the database has been deleted.
443
+ */
444
+ await gapi.client.spanner.projects.instances.databases.dropDatabase({
445
+ database: "Test string",
446
+ });
447
+ /** Gets the state of a Cloud Spanner database. */
448
+ await gapi.client.spanner.projects.instances.databases.get({
449
+ name: "Test string",
450
+ });
451
+ /** Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API. */
452
+ await gapi.client.spanner.projects.instances.databases.getDdl({
453
+ database: "Test string",
454
+ });
455
+ /**
456
+ * Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires
457
+ * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.
458
+ */
459
+ await gapi.client.spanner.projects.instances.databases.getIamPolicy({
460
+ resource: "Test string",
461
+ }, {
462
+ options: {
463
+ requestedPolicyVersion: 42,
464
+ },
465
+ });
466
+ /** Request a specific scan with Database-specific data for Cloud Key Visualizer. */
467
+ await gapi.client.spanner.projects.instances.databases.getScans({
468
+ endTime: "Test string",
469
+ name: "Test string",
470
+ startTime: "Test string",
471
+ view: "Test string",
472
+ });
473
+ /** Lists Cloud Spanner databases. */
474
+ await gapi.client.spanner.projects.instances.databases.list({
475
+ pageSize: 42,
476
+ pageToken: "Test string",
477
+ parent: "Test string",
478
+ });
479
+ /**
480
+ * Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance
481
+ * containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the
482
+ * operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore
483
+ * and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated,
484
+ * without waiting for the optimize operation associated with the first restore to complete.
485
+ */
486
+ await gapi.client.spanner.projects.instances.databases.restore({
487
+ parent: "Test string",
488
+ }, {
489
+ backup: "Test string",
490
+ databaseId: "Test string",
491
+ encryptionConfig: {
492
+ encryptionType: "Test string",
493
+ kmsKeyName: "Test string",
494
+ },
495
+ });
496
+ /**
497
+ * Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For
498
+ * backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.
499
+ */
500
+ await gapi.client.spanner.projects.instances.databases.setIamPolicy({
501
+ resource: "Test string",
502
+ }, {
503
+ policy: {
504
+ bindings: [
505
+ {
506
+ condition: {
507
+ description: "Test string",
508
+ expression: "Test string",
509
+ location: "Test string",
510
+ title: "Test string",
511
+ },
512
+ members: [
513
+ "Test string"
514
+ ],
515
+ role: "Test string",
516
+ }
517
+ ],
518
+ etag: "Test string",
519
+ version: 42,
520
+ },
521
+ });
522
+ /**
523
+ * Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if
524
+ * the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not
525
+ * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.
526
+ */
527
+ await gapi.client.spanner.projects.instances.databases.testIamPermissions({
528
+ resource: "Test string",
529
+ }, {
530
+ permissions: [
531
+ "Test string"
532
+ ],
533
+ });
534
+ /**
535
+ * Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format
536
+ * `/operations/` and can be used to track execution of the schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.
537
+ */
538
+ await gapi.client.spanner.projects.instances.databases.updateDdl({
539
+ database: "Test string",
540
+ }, {
541
+ operationId: "Test string",
542
+ statements: [
543
+ "Test string"
544
+ ],
545
+ });
546
+ /** Lists Cloud Spanner database roles. */
547
+ await gapi.client.spanner.projects.instances.databases.databaseRoles.list({
548
+ pageSize: 42,
549
+ pageToken: "Test string",
550
+ parent: "Test string",
551
+ });
552
+ /**
553
+ * Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if
554
+ * the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not
555
+ * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.
556
+ */
557
+ await gapi.client.spanner.projects.instances.databases.databaseRoles.testIamPermissions({
558
+ resource: "Test string",
559
+ }, {
560
+ permissions: [
561
+ "Test string"
562
+ ],
563
+ });
564
+ /**
565
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
566
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
567
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
568
+ * 1, corresponding to `Code.CANCELLED`.
569
+ */
570
+ await gapi.client.spanner.projects.instances.databases.operations.cancel({
571
+ name: "Test string",
572
+ });
573
+ /**
574
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
575
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
576
+ */
577
+ await gapi.client.spanner.projects.instances.databases.operations.delete({
578
+ name: "Test string",
579
+ });
580
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
581
+ await gapi.client.spanner.projects.instances.databases.operations.get({
582
+ name: "Test string",
583
+ });
584
+ /**
585
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
586
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
587
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
588
+ * ensure the name binding is the parent resource, without the operations collection id.
589
+ */
590
+ await gapi.client.spanner.projects.instances.databases.operations.list({
591
+ filter: "Test string",
592
+ name: "Test string",
593
+ pageSize: 42,
594
+ pageToken: "Test string",
595
+ });
596
+ /** Creates multiple new sessions. This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 for best practices on session cache management. */
597
+ await gapi.client.spanner.projects.instances.databases.sessions.batchCreate({
598
+ database: "Test string",
599
+ }, {
600
+ sessionCount: 42,
601
+ sessionTemplate: {
602
+ approximateLastUseTime: "Test string",
603
+ createTime: "Test string",
604
+ creatorRole: "Test string",
605
+ labels: {
606
+ A: "Test string"
607
+ },
608
+ name: "Test string",
609
+ },
610
+ });
611
+ /** Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect. */
612
+ await gapi.client.spanner.projects.instances.databases.sessions.beginTransaction({
613
+ session: "Test string",
614
+ }, {
615
+ options: {
616
+ partitionedDml: {
617
+ },
618
+ readOnly: {
619
+ exactStaleness: "Test string",
620
+ maxStaleness: "Test string",
621
+ minReadTimestamp: "Test string",
622
+ readTimestamp: "Test string",
623
+ returnReadTimestamp: true,
624
+ strong: true,
625
+ },
626
+ readWrite: {
627
+ },
628
+ },
629
+ requestOptions: {
630
+ priority: "Test string",
631
+ requestTag: "Test string",
632
+ transactionTag: "Test string",
633
+ },
634
+ });
635
+ /**
636
+ * Commits a transaction. The request includes the mutations to be applied to rows in the database. `Commit` might return an `ABORTED` error. This can occur at any time; commonly, the
637
+ * cause is conflicts with concurrent transactions. However, it can also happen for a variety of other reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction
638
+ * from the beginning, re-using the same session. On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if the client job experiences a 1+ hour networking
639
+ * failure. At that point, Cloud Spanner has lost track of the transaction outcome and we recommend that you perform another read from the database to see the state of things as they are
640
+ * now.
641
+ */
642
+ await gapi.client.spanner.projects.instances.databases.sessions.commit({
643
+ session: "Test string",
644
+ }, {
645
+ mutations: [
646
+ {
647
+ delete: {
648
+ keySet: {
649
+ all: true,
650
+ keys: [
651
+ [
652
+ 42
653
+ ]
654
+ ],
655
+ ranges: [
656
+ {
657
+ endClosed: [
658
+ 42
659
+ ],
660
+ endOpen: [
661
+ 42
662
+ ],
663
+ startClosed: [
664
+ 42
665
+ ],
666
+ startOpen: [
667
+ 42
668
+ ],
669
+ }
670
+ ],
671
+ },
672
+ table: "Test string",
673
+ },
674
+ insert: {
675
+ columns: [
676
+ "Test string"
677
+ ],
678
+ table: "Test string",
679
+ values: [
680
+ [
681
+ 42
682
+ ]
683
+ ],
684
+ },
685
+ insertOrUpdate: {
686
+ columns: [
687
+ "Test string"
688
+ ],
689
+ table: "Test string",
690
+ values: [
691
+ [
692
+ 42
693
+ ]
694
+ ],
695
+ },
696
+ replace: {
697
+ columns: [
698
+ "Test string"
699
+ ],
700
+ table: "Test string",
701
+ values: [
702
+ [
703
+ 42
704
+ ]
705
+ ],
706
+ },
707
+ update: {
708
+ columns: [
709
+ "Test string"
710
+ ],
711
+ table: "Test string",
712
+ values: [
713
+ [
714
+ 42
715
+ ]
716
+ ],
717
+ },
718
+ }
719
+ ],
720
+ requestOptions: {
721
+ priority: "Test string",
722
+ requestTag: "Test string",
723
+ transactionTag: "Test string",
724
+ },
725
+ returnCommitStats: true,
726
+ singleUseTransaction: {
727
+ partitionedDml: {
728
+ },
729
+ readOnly: {
730
+ exactStaleness: "Test string",
731
+ maxStaleness: "Test string",
732
+ minReadTimestamp: "Test string",
733
+ readTimestamp: "Test string",
734
+ returnReadTimestamp: true,
735
+ strong: true,
736
+ },
737
+ readWrite: {
738
+ },
739
+ },
740
+ transactionId: "Test string",
741
+ });
742
+ /**
743
+ * Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive
744
+ * transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone
745
+ * reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and
746
+ * unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return
747
+ * `NOT_FOUND`. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., `"SELECT 1"`.
748
+ */
749
+ await gapi.client.spanner.projects.instances.databases.sessions.create({
750
+ database: "Test string",
751
+ }, {
752
+ session: {
753
+ approximateLastUseTime: "Test string",
754
+ createTime: "Test string",
755
+ creatorRole: "Test string",
756
+ labels: {
757
+ A: "Test string"
758
+ },
759
+ name: "Test string",
760
+ },
761
+ });
762
+ /** Ends a session, releasing server resources associated with it. This will asynchronously trigger cancellation of any operations that are running with this session. */
763
+ await gapi.client.spanner.projects.instances.databases.sessions.delete({
764
+ name: "Test string",
765
+ });
766
+ /**
767
+ * Executes a batch of SQL DML statements. This method allows many statements to be run with lower latency than submitting them sequentially with ExecuteSql. Statements are executed in
768
+ * sequential order. A request can succeed even if a statement fails. The ExecuteBatchDmlResponse.status field in the response provides information about the statement that failed. Clients
769
+ * must inspect this field to determine whether an error occurred. Execution stops after the first failed statement; the remaining statements are not executed.
770
+ */
771
+ await gapi.client.spanner.projects.instances.databases.sessions.executeBatchDml({
772
+ session: "Test string",
773
+ }, {
774
+ requestOptions: {
775
+ priority: "Test string",
776
+ requestTag: "Test string",
777
+ transactionTag: "Test string",
778
+ },
779
+ seqno: "Test string",
780
+ statements: [
781
+ {
782
+ params: {
783
+ A: 42
784
+ },
785
+ paramTypes: {
786
+ A: {
787
+ arrayElementType: undefined,
788
+ code: "Test string",
789
+ structType: {
790
+ fields: [
791
+ {
792
+ name: "Test string",
793
+ type: undefined,
794
+ }
795
+ ],
796
+ },
797
+ typeAnnotation: "Test string",
798
+ }
799
+ },
800
+ sql: "Test string",
801
+ }
802
+ ],
803
+ transaction: {
804
+ begin: {
805
+ partitionedDml: {
806
+ },
807
+ readOnly: {
808
+ exactStaleness: "Test string",
809
+ maxStaleness: "Test string",
810
+ minReadTimestamp: "Test string",
811
+ readTimestamp: "Test string",
812
+ returnReadTimestamp: true,
813
+ strong: true,
814
+ },
815
+ readWrite: {
816
+ },
817
+ },
818
+ id: "Test string",
819
+ singleUse: {
820
+ partitionedDml: {
821
+ },
822
+ readOnly: {
823
+ exactStaleness: "Test string",
824
+ maxStaleness: "Test string",
825
+ minReadTimestamp: "Test string",
826
+ readTimestamp: "Test string",
827
+ returnReadTimestamp: true,
828
+ strong: true,
829
+ },
830
+ readWrite: {
831
+ },
832
+ },
833
+ },
834
+ });
835
+ /**
836
+ * Executes an SQL statement, returning all results in a single reply. This method cannot be used to return a result set larger than 10 MiB; if the query yields more data than that, the
837
+ * query fails with a `FAILED_PRECONDITION` error. Operations inside read-write transactions might return `ABORTED`. If this occurs, the application should restart the transaction from the
838
+ * beginning. See Transaction for more details. Larger result sets can be fetched in streaming fashion by calling ExecuteStreamingSql instead.
839
+ */
840
+ await gapi.client.spanner.projects.instances.databases.sessions.executeSql({
841
+ session: "Test string",
842
+ }, {
843
+ params: {
844
+ A: 42
845
+ },
846
+ paramTypes: {
847
+ A: {
848
+ arrayElementType: undefined,
849
+ code: "Test string",
850
+ structType: {
851
+ fields: [
852
+ {
853
+ name: "Test string",
854
+ type: undefined,
855
+ }
856
+ ],
857
+ },
858
+ typeAnnotation: "Test string",
859
+ }
860
+ },
861
+ partitionToken: "Test string",
862
+ queryMode: "Test string",
863
+ queryOptions: {
864
+ optimizerStatisticsPackage: "Test string",
865
+ optimizerVersion: "Test string",
866
+ },
867
+ requestOptions: {
868
+ priority: "Test string",
869
+ requestTag: "Test string",
870
+ transactionTag: "Test string",
871
+ },
872
+ resumeToken: "Test string",
873
+ seqno: "Test string",
874
+ sql: "Test string",
875
+ transaction: {
876
+ begin: {
877
+ partitionedDml: {
878
+ },
879
+ readOnly: {
880
+ exactStaleness: "Test string",
881
+ maxStaleness: "Test string",
882
+ minReadTimestamp: "Test string",
883
+ readTimestamp: "Test string",
884
+ returnReadTimestamp: true,
885
+ strong: true,
886
+ },
887
+ readWrite: {
888
+ },
889
+ },
890
+ id: "Test string",
891
+ singleUse: {
892
+ partitionedDml: {
893
+ },
894
+ readOnly: {
895
+ exactStaleness: "Test string",
896
+ maxStaleness: "Test string",
897
+ minReadTimestamp: "Test string",
898
+ readTimestamp: "Test string",
899
+ returnReadTimestamp: true,
900
+ strong: true,
901
+ },
902
+ readWrite: {
903
+ },
904
+ },
905
+ },
906
+ });
907
+ /**
908
+ * Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql, there is no limit on the size of the returned result set. However, no individual row in the result set can
909
+ * exceed 100 MiB, and no column value can exceed 10 MiB.
910
+ */
911
+ await gapi.client.spanner.projects.instances.databases.sessions.executeStreamingSql({
912
+ session: "Test string",
913
+ }, {
914
+ params: {
915
+ A: 42
916
+ },
917
+ paramTypes: {
918
+ A: {
919
+ arrayElementType: undefined,
920
+ code: "Test string",
921
+ structType: {
922
+ fields: [
923
+ {
924
+ name: "Test string",
925
+ type: undefined,
926
+ }
927
+ ],
928
+ },
929
+ typeAnnotation: "Test string",
930
+ }
931
+ },
932
+ partitionToken: "Test string",
933
+ queryMode: "Test string",
934
+ queryOptions: {
935
+ optimizerStatisticsPackage: "Test string",
936
+ optimizerVersion: "Test string",
937
+ },
938
+ requestOptions: {
939
+ priority: "Test string",
940
+ requestTag: "Test string",
941
+ transactionTag: "Test string",
942
+ },
943
+ resumeToken: "Test string",
944
+ seqno: "Test string",
945
+ sql: "Test string",
946
+ transaction: {
947
+ begin: {
948
+ partitionedDml: {
949
+ },
950
+ readOnly: {
951
+ exactStaleness: "Test string",
952
+ maxStaleness: "Test string",
953
+ minReadTimestamp: "Test string",
954
+ readTimestamp: "Test string",
955
+ returnReadTimestamp: true,
956
+ strong: true,
957
+ },
958
+ readWrite: {
959
+ },
960
+ },
961
+ id: "Test string",
962
+ singleUse: {
963
+ partitionedDml: {
964
+ },
965
+ readOnly: {
966
+ exactStaleness: "Test string",
967
+ maxStaleness: "Test string",
968
+ minReadTimestamp: "Test string",
969
+ readTimestamp: "Test string",
970
+ returnReadTimestamp: true,
971
+ strong: true,
972
+ },
973
+ readWrite: {
974
+ },
975
+ },
976
+ },
977
+ });
978
+ /** Gets a session. Returns `NOT_FOUND` if the session does not exist. This is mainly useful for determining whether a session is still alive. */
979
+ await gapi.client.spanner.projects.instances.databases.sessions.get({
980
+ name: "Test string",
981
+ });
982
+ /** Lists all sessions in a given database. */
983
+ await gapi.client.spanner.projects.instances.databases.sessions.list({
984
+ database: "Test string",
985
+ filter: "Test string",
986
+ pageSize: 42,
987
+ pageToken: "Test string",
988
+ });
989
+ /**
990
+ * Creates a set of partition tokens that can be used to execute a query operation in parallel. Each of the returned partition tokens can be used by ExecuteStreamingSql to specify a subset
991
+ * of the query result to read. The same session and read-only transaction must be used by the PartitionQueryRequest used to create the partition tokens and the ExecuteSqlRequests that use
992
+ * the partition tokens. Partition tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of
993
+ * these happen, it is not possible to resume the query, and the whole operation must be restarted from the beginning.
994
+ */
995
+ await gapi.client.spanner.projects.instances.databases.sessions.partitionQuery({
996
+ session: "Test string",
997
+ }, {
998
+ params: {
999
+ A: 42
1000
+ },
1001
+ paramTypes: {
1002
+ A: {
1003
+ arrayElementType: undefined,
1004
+ code: "Test string",
1005
+ structType: {
1006
+ fields: [
1007
+ {
1008
+ name: "Test string",
1009
+ type: undefined,
1010
+ }
1011
+ ],
1012
+ },
1013
+ typeAnnotation: "Test string",
1014
+ }
1015
+ },
1016
+ partitionOptions: {
1017
+ maxPartitions: "Test string",
1018
+ partitionSizeBytes: "Test string",
1019
+ },
1020
+ sql: "Test string",
1021
+ transaction: {
1022
+ begin: {
1023
+ partitionedDml: {
1024
+ },
1025
+ readOnly: {
1026
+ exactStaleness: "Test string",
1027
+ maxStaleness: "Test string",
1028
+ minReadTimestamp: "Test string",
1029
+ readTimestamp: "Test string",
1030
+ returnReadTimestamp: true,
1031
+ strong: true,
1032
+ },
1033
+ readWrite: {
1034
+ },
1035
+ },
1036
+ id: "Test string",
1037
+ singleUse: {
1038
+ partitionedDml: {
1039
+ },
1040
+ readOnly: {
1041
+ exactStaleness: "Test string",
1042
+ maxStaleness: "Test string",
1043
+ minReadTimestamp: "Test string",
1044
+ readTimestamp: "Test string",
1045
+ returnReadTimestamp: true,
1046
+ strong: true,
1047
+ },
1048
+ readWrite: {
1049
+ },
1050
+ },
1051
+ },
1052
+ });
1053
+ /**
1054
+ * Creates a set of partition tokens that can be used to execute a read operation in parallel. Each of the returned partition tokens can be used by StreamingRead to specify a subset of the
1055
+ * read result to read. The same session and read-only transaction must be used by the PartitionReadRequest used to create the partition tokens and the ReadRequests that use the partition
1056
+ * tokens. There are no ordering guarantees on rows returned among the returned partition tokens, or even within each individual StreamingRead call issued with a partition_token. Partition
1057
+ * tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of these happen, it is not possible
1058
+ * to resume the read, and the whole operation must be restarted from the beginning.
1059
+ */
1060
+ await gapi.client.spanner.projects.instances.databases.sessions.partitionRead({
1061
+ session: "Test string",
1062
+ }, {
1063
+ columns: [
1064
+ "Test string"
1065
+ ],
1066
+ index: "Test string",
1067
+ keySet: {
1068
+ all: true,
1069
+ keys: [
1070
+ [
1071
+ 42
1072
+ ]
1073
+ ],
1074
+ ranges: [
1075
+ {
1076
+ endClosed: [
1077
+ 42
1078
+ ],
1079
+ endOpen: [
1080
+ 42
1081
+ ],
1082
+ startClosed: [
1083
+ 42
1084
+ ],
1085
+ startOpen: [
1086
+ 42
1087
+ ],
1088
+ }
1089
+ ],
1090
+ },
1091
+ partitionOptions: {
1092
+ maxPartitions: "Test string",
1093
+ partitionSizeBytes: "Test string",
1094
+ },
1095
+ table: "Test string",
1096
+ transaction: {
1097
+ begin: {
1098
+ partitionedDml: {
1099
+ },
1100
+ readOnly: {
1101
+ exactStaleness: "Test string",
1102
+ maxStaleness: "Test string",
1103
+ minReadTimestamp: "Test string",
1104
+ readTimestamp: "Test string",
1105
+ returnReadTimestamp: true,
1106
+ strong: true,
1107
+ },
1108
+ readWrite: {
1109
+ },
1110
+ },
1111
+ id: "Test string",
1112
+ singleUse: {
1113
+ partitionedDml: {
1114
+ },
1115
+ readOnly: {
1116
+ exactStaleness: "Test string",
1117
+ maxStaleness: "Test string",
1118
+ minReadTimestamp: "Test string",
1119
+ readTimestamp: "Test string",
1120
+ returnReadTimestamp: true,
1121
+ strong: true,
1122
+ },
1123
+ readWrite: {
1124
+ },
1125
+ },
1126
+ },
1127
+ });
1128
+ /**
1129
+ * Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ExecuteSql. This method cannot be used to return a result set larger than 10 MiB; if
1130
+ * the read matches more data than that, the read fails with a `FAILED_PRECONDITION` error. Reads inside read-write transactions might return `ABORTED`. If this occurs, the application
1131
+ * should restart the transaction from the beginning. See Transaction for more details. Larger result sets can be yielded in streaming fashion by calling StreamingRead instead.
1132
+ */
1133
+ await gapi.client.spanner.projects.instances.databases.sessions.read({
1134
+ session: "Test string",
1135
+ }, {
1136
+ columns: [
1137
+ "Test string"
1138
+ ],
1139
+ index: "Test string",
1140
+ keySet: {
1141
+ all: true,
1142
+ keys: [
1143
+ [
1144
+ 42
1145
+ ]
1146
+ ],
1147
+ ranges: [
1148
+ {
1149
+ endClosed: [
1150
+ 42
1151
+ ],
1152
+ endOpen: [
1153
+ 42
1154
+ ],
1155
+ startClosed: [
1156
+ 42
1157
+ ],
1158
+ startOpen: [
1159
+ 42
1160
+ ],
1161
+ }
1162
+ ],
1163
+ },
1164
+ limit: "Test string",
1165
+ partitionToken: "Test string",
1166
+ requestOptions: {
1167
+ priority: "Test string",
1168
+ requestTag: "Test string",
1169
+ transactionTag: "Test string",
1170
+ },
1171
+ resumeToken: "Test string",
1172
+ table: "Test string",
1173
+ transaction: {
1174
+ begin: {
1175
+ partitionedDml: {
1176
+ },
1177
+ readOnly: {
1178
+ exactStaleness: "Test string",
1179
+ maxStaleness: "Test string",
1180
+ minReadTimestamp: "Test string",
1181
+ readTimestamp: "Test string",
1182
+ returnReadTimestamp: true,
1183
+ strong: true,
1184
+ },
1185
+ readWrite: {
1186
+ },
1187
+ },
1188
+ id: "Test string",
1189
+ singleUse: {
1190
+ partitionedDml: {
1191
+ },
1192
+ readOnly: {
1193
+ exactStaleness: "Test string",
1194
+ maxStaleness: "Test string",
1195
+ minReadTimestamp: "Test string",
1196
+ readTimestamp: "Test string",
1197
+ returnReadTimestamp: true,
1198
+ strong: true,
1199
+ },
1200
+ readWrite: {
1201
+ },
1202
+ },
1203
+ },
1204
+ });
1205
+ /**
1206
+ * Rolls back a transaction, releasing any locks it holds. It is a good idea to call this for any transaction that includes one or more Read or ExecuteSql requests and ultimately decides
1207
+ * not to commit. `Rollback` returns `OK` if it successfully aborts the transaction, the transaction was already aborted, or the transaction is not found. `Rollback` never returns
1208
+ * `ABORTED`.
1209
+ */
1210
+ await gapi.client.spanner.projects.instances.databases.sessions.rollback({
1211
+ session: "Test string",
1212
+ }, {
1213
+ transactionId: "Test string",
1214
+ });
1215
+ /**
1216
+ * Like Read, except returns the result set as a stream. Unlike Read, there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100
1217
+ * MiB, and no column value can exceed 10 MiB.
1218
+ */
1219
+ await gapi.client.spanner.projects.instances.databases.sessions.streamingRead({
1220
+ session: "Test string",
1221
+ }, {
1222
+ columns: [
1223
+ "Test string"
1224
+ ],
1225
+ index: "Test string",
1226
+ keySet: {
1227
+ all: true,
1228
+ keys: [
1229
+ [
1230
+ 42
1231
+ ]
1232
+ ],
1233
+ ranges: [
1234
+ {
1235
+ endClosed: [
1236
+ 42
1237
+ ],
1238
+ endOpen: [
1239
+ 42
1240
+ ],
1241
+ startClosed: [
1242
+ 42
1243
+ ],
1244
+ startOpen: [
1245
+ 42
1246
+ ],
1247
+ }
1248
+ ],
1249
+ },
1250
+ limit: "Test string",
1251
+ partitionToken: "Test string",
1252
+ requestOptions: {
1253
+ priority: "Test string",
1254
+ requestTag: "Test string",
1255
+ transactionTag: "Test string",
1256
+ },
1257
+ resumeToken: "Test string",
1258
+ table: "Test string",
1259
+ transaction: {
1260
+ begin: {
1261
+ partitionedDml: {
1262
+ },
1263
+ readOnly: {
1264
+ exactStaleness: "Test string",
1265
+ maxStaleness: "Test string",
1266
+ minReadTimestamp: "Test string",
1267
+ readTimestamp: "Test string",
1268
+ returnReadTimestamp: true,
1269
+ strong: true,
1270
+ },
1271
+ readWrite: {
1272
+ },
1273
+ },
1274
+ id: "Test string",
1275
+ singleUse: {
1276
+ partitionedDml: {
1277
+ },
1278
+ readOnly: {
1279
+ exactStaleness: "Test string",
1280
+ maxStaleness: "Test string",
1281
+ minReadTimestamp: "Test string",
1282
+ readTimestamp: "Test string",
1283
+ returnReadTimestamp: true,
1284
+ strong: true,
1285
+ },
1286
+ readWrite: {
1287
+ },
1288
+ },
1289
+ },
1290
+ });
1291
+ /**
1292
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
1293
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
1294
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
1295
+ * 1, corresponding to `Code.CANCELLED`.
1296
+ */
1297
+ await gapi.client.spanner.projects.instances.operations.cancel({
1298
+ name: "Test string",
1299
+ });
1300
+ /**
1301
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
1302
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1303
+ */
1304
+ await gapi.client.spanner.projects.instances.operations.delete({
1305
+ name: "Test string",
1306
+ });
1307
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
1308
+ await gapi.client.spanner.projects.instances.operations.get({
1309
+ name: "Test string",
1310
+ });
1311
+ /**
1312
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
1313
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
1314
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
1315
+ * ensure the name binding is the parent resource, without the operations collection id.
1316
+ */
1317
+ await gapi.client.spanner.projects.instances.operations.list({
1318
+ filter: "Test string",
1319
+ name: "Test string",
1320
+ pageSize: 42,
1321
+ pageToken: "Test string",
1322
+ });
1323
+ /** Return available scans given a Database-specific resource name. */
1324
+ await gapi.client.spanner.scans.list({
1325
+ filter: "Test string",
1326
+ pageSize: 42,
1327
+ pageToken: "Test string",
1328
+ parent: "Test string",
1329
+ view: "Test string",
1330
+ });
1331
+ }
1332
+ });