@maxim_mazurok/gapi.client.spanner-v1 0.0.20231023 → 0.0.20231101

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.
Files changed (3) hide show
  1. package/index.d.ts +262 -1
  2. package/package.json +1 -1
  3. package/tests.ts +128 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://spanner.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20231023
12
+ // Revision: 20231101
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -22,6 +22,42 @@ declare namespace gapi.client {
22
22
  function load(name: "spanner", version: "v1", callback: () => any): void;
23
23
 
24
24
  namespace spanner {
25
+ interface AutoscalingConfig {
26
+ /** Required. Autoscaling limits for an instance. */
27
+ autoscalingLimits?:
28
+ AutoscalingLimits;
29
+ /** Required. The autoscaling targets for an instance. */
30
+ autoscalingTargets?:
31
+ AutoscalingTargets;
32
+ }
33
+ interface AutoscalingLimits {
34
+ /** Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes. */
35
+ maxNodes?:
36
+ number;
37
+ /** Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units. */
38
+ maxProcessingUnits?:
39
+ number;
40
+ /** Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1. */
41
+ minNodes?:
42
+ number;
43
+ /** Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000. */
44
+ minProcessingUnits?:
45
+ number;
46
+ }
47
+ interface AutoscalingTargets {
48
+ /**
49
+ * Required. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to
50
+ * 100 (full utilization). The valid range is [10, 90] inclusive.
51
+ */
52
+ highPriorityCpuUtilizationPercent?:
53
+ number;
54
+ /**
55
+ * Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full
56
+ * utilization). The valid range is [10, 100] inclusive.
57
+ */
58
+ storageUtilizationPercent?:
59
+ number;
60
+ }
25
61
  interface Backup {
26
62
  /** Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`. */
27
63
  createTime?:
@@ -528,6 +564,17 @@ declare namespace gapi.client {
528
564
  shortMessage?:
529
565
  LocalizedString;
530
566
  }
567
+ interface DirectedReadOptions {
568
+ /** Exclude_replicas indicates that should be excluded from serving requests. Spanner will not route requests to the replicas in this list. */
569
+ excludeReplicas?:
570
+ ExcludeReplicas;
571
+ /**
572
+ * Include_replicas indicates the order of replicas (as they appear in this list) to process the request. If auto_failover_disabled is set to true and all replicas are exhausted
573
+ * without finding a healthy replica, Spanner will wait for a replica in the list to become available, requests may fail due to `DEADLINE_EXCEEDED` errors.
574
+ */
575
+ includeReplicas?:
576
+ IncludeReplicas;
577
+ }
531
578
  // tslint:disable-next-line:no-empty-interface
532
579
  interface Empty {
533
580
  }
@@ -547,6 +594,11 @@ declare namespace gapi.client {
547
594
  kmsKeyVersion?:
548
595
  string;
549
596
  }
597
+ interface ExcludeReplicas {
598
+ /** The directed read replica selector. */
599
+ replicaSelections?:
600
+ ReplicaSelection[];
601
+ }
550
602
  interface ExecuteBatchDmlRequest {
551
603
  /** Common options for this request. */
552
604
  requestOptions?:
@@ -589,6 +641,9 @@ declare namespace gapi.client {
589
641
  */
590
642
  dataBoostEnabled?:
591
643
  boolean;
644
+ /** Directed read options for this request. */
645
+ directedReadOptions?:
646
+ DirectedReadOptions;
592
647
  /**
593
648
  * Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example,
594
649
  * `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can
@@ -714,6 +769,14 @@ declare namespace gapi.client {
714
769
  requestedPolicyVersion?:
715
770
  number;
716
771
  }
772
+ interface IncludeReplicas {
773
+ /** If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is `false`. */
774
+ autoFailoverDisabled?:
775
+ boolean;
776
+ /** The directed read replica selector. */
777
+ replicaSelections?:
778
+ ReplicaSelection[];
779
+ }
717
780
  interface IndexAdvice {
718
781
  /** Optional. DDL statements to add new indexes that will improve the query. */
719
782
  ddl?:
@@ -736,6 +799,12 @@ declare namespace gapi.client {
736
799
  { [P in string]: KeyRangeInfos };
737
800
  }
738
801
  interface Instance {
802
+ /**
803
+ * Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields
804
+ * and reflect the current compute capacity allocated to the instance.
805
+ */
806
+ autoscalingConfig?:
807
+ AutoscalingConfig;
739
808
  /** Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs. */
740
809
  config?:
741
810
  string;
@@ -1458,6 +1527,9 @@ declare namespace gapi.client {
1458
1527
  */
1459
1528
  dataBoostEnabled?:
1460
1529
  boolean;
1530
+ /** Directed read options for this request. */
1531
+ directedReadOptions?:
1532
+ DirectedReadOptions;
1461
1533
  /**
1462
1534
  * If non-empty, the name of an index on table. This index is used instead of the table primary key when interpreting key_set and sorting result rows. See key_set for further
1463
1535
  * information.
@@ -1516,6 +1588,14 @@ declare namespace gapi.client {
1516
1588
  type?:
1517
1589
  string;
1518
1590
  }
1591
+ interface ReplicaSelection {
1592
+ /** The location or region of the serving requests, e.g. "us-east1". */
1593
+ location?:
1594
+ string;
1595
+ /** The type of replica. */
1596
+ type?:
1597
+ string;
1598
+ }
1519
1599
  interface RequestOptions {
1520
1600
  /** Priority for the request. */
1521
1601
  priority?:
@@ -2252,6 +2332,185 @@ declare namespace gapi.client {
2252
2332
  string;
2253
2333
  }): Request<ListOperationsResponse>;
2254
2334
  }
2335
+ interface OperationsResource {
2336
+ /**
2337
+ * 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
2338
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the
2339
+ * operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a
2340
+ * google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
2341
+ */
2342
+ cancel(request?: {
2343
+ /** V1 error format. */
2344
+ "$.xgafv"?:
2345
+ string;
2346
+ /** OAuth access token. */
2347
+ access_token?:
2348
+ string;
2349
+ /** Data format for response. */
2350
+ alt?:
2351
+ string;
2352
+ /** JSONP */
2353
+ callback?:
2354
+ string;
2355
+ /** Selector specifying which fields to include in a partial response. */
2356
+ fields?:
2357
+ string;
2358
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2359
+ key?:
2360
+ string;
2361
+ /** The name of the operation resource to be cancelled. */
2362
+ name:
2363
+ string;
2364
+ /** OAuth 2.0 token for the current user. */
2365
+ oauth_token?:
2366
+ string;
2367
+ /** Returns response with indentations and line breaks. */
2368
+ prettyPrint?:
2369
+ boolean;
2370
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2371
+ quotaUser?:
2372
+ string;
2373
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2374
+ upload_protocol?:
2375
+ string;
2376
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2377
+ uploadType?:
2378
+ string;
2379
+ }): Request<{}>;
2380
+ /**
2381
+ * 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
2382
+ * support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2383
+ */
2384
+ delete(request?: {
2385
+ /** V1 error format. */
2386
+ "$.xgafv"?:
2387
+ string;
2388
+ /** OAuth access token. */
2389
+ access_token?:
2390
+ string;
2391
+ /** Data format for response. */
2392
+ alt?:
2393
+ string;
2394
+ /** JSONP */
2395
+ callback?:
2396
+ string;
2397
+ /** Selector specifying which fields to include in a partial response. */
2398
+ fields?:
2399
+ string;
2400
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2401
+ key?:
2402
+ string;
2403
+ /** The name of the operation resource to be deleted. */
2404
+ name:
2405
+ string;
2406
+ /** OAuth 2.0 token for the current user. */
2407
+ oauth_token?:
2408
+ string;
2409
+ /** Returns response with indentations and line breaks. */
2410
+ prettyPrint?:
2411
+ boolean;
2412
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2413
+ quotaUser?:
2414
+ string;
2415
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2416
+ upload_protocol?:
2417
+ string;
2418
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2419
+ uploadType?:
2420
+ string;
2421
+ }): Request<{}>;
2422
+ /** 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. */
2423
+ get(request?: {
2424
+ /** V1 error format. */
2425
+ "$.xgafv"?:
2426
+ string;
2427
+ /** OAuth access token. */
2428
+ access_token?:
2429
+ string;
2430
+ /** Data format for response. */
2431
+ alt?:
2432
+ string;
2433
+ /** JSONP */
2434
+ callback?:
2435
+ string;
2436
+ /** Selector specifying which fields to include in a partial response. */
2437
+ fields?:
2438
+ string;
2439
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2440
+ key?:
2441
+ string;
2442
+ /** The name of the operation resource. */
2443
+ name:
2444
+ string;
2445
+ /** OAuth 2.0 token for the current user. */
2446
+ oauth_token?:
2447
+ string;
2448
+ /** Returns response with indentations and line breaks. */
2449
+ prettyPrint?:
2450
+ boolean;
2451
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2452
+ quotaUser?:
2453
+ string;
2454
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2455
+ upload_protocol?:
2456
+ string;
2457
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2458
+ uploadType?:
2459
+ string;
2460
+ }): Request<Operation>;
2461
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
2462
+ list(request?: {
2463
+ /** V1 error format. */
2464
+ "$.xgafv"?:
2465
+ string;
2466
+ /** OAuth access token. */
2467
+ access_token?:
2468
+ string;
2469
+ /** Data format for response. */
2470
+ alt?:
2471
+ string;
2472
+ /** JSONP */
2473
+ callback?:
2474
+ string;
2475
+ /** Selector specifying which fields to include in a partial response. */
2476
+ fields?:
2477
+ string;
2478
+ /** The standard list filter. */
2479
+ filter?:
2480
+ string;
2481
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2482
+ key?:
2483
+ string;
2484
+ /** The name of the operation's parent resource. */
2485
+ name:
2486
+ string;
2487
+ /** OAuth 2.0 token for the current user. */
2488
+ oauth_token?:
2489
+ string;
2490
+ /** The standard list page size. */
2491
+ pageSize?:
2492
+ number;
2493
+ /** The standard list page token. */
2494
+ pageToken?:
2495
+ string;
2496
+ /** Returns response with indentations and line breaks. */
2497
+ prettyPrint?:
2498
+ boolean;
2499
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2500
+ quotaUser?:
2501
+ string;
2502
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2503
+ upload_protocol?:
2504
+ string;
2505
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2506
+ uploadType?:
2507
+ string;
2508
+ }): Request<ListOperationsResponse>;
2509
+ }
2510
+ interface SsdCachesResource {
2511
+ operations:
2512
+ OperationsResource;
2513
+ }
2255
2514
  interface InstanceConfigsResource {
2256
2515
  /**
2257
2516
  * Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The
@@ -2571,6 +2830,8 @@ declare namespace gapi.client {
2571
2830
  body: UpdateInstanceConfigRequest): Request<Operation>;
2572
2831
  operations:
2573
2832
  OperationsResource;
2833
+ ssdCaches:
2834
+ SsdCachesResource;
2574
2835
  }
2575
2836
  interface BackupOperationsResource {
2576
2837
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.spanner-v1",
3
- "version": "0.0.20231023",
3
+ "version": "0.0.20231101",
4
4
  "description": "TypeScript typings for Cloud Spanner API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20231023
6
+ // Revision: 20231101
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -181,6 +181,33 @@ gapi.load('client', async () => {
181
181
  pageSize: 42,
182
182
  pageToken: "Test string",
183
183
  });
184
+ /**
185
+ * 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
186
+ * 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
187
+ * 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
188
+ * 1, corresponding to `Code.CANCELLED`.
189
+ */
190
+ await gapi.client.spanner.projects.instanceConfigs.ssdCaches.operations.cancel({
191
+ name: "Test string",
192
+ });
193
+ /**
194
+ * 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
195
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
196
+ */
197
+ await gapi.client.spanner.projects.instanceConfigs.ssdCaches.operations.delete({
198
+ name: "Test string",
199
+ });
200
+ /** 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. */
201
+ await gapi.client.spanner.projects.instanceConfigs.ssdCaches.operations.get({
202
+ name: "Test string",
203
+ });
204
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
205
+ await gapi.client.spanner.projects.instanceConfigs.ssdCaches.operations.list({
206
+ filter: "Test string",
207
+ name: "Test string",
208
+ pageSize: 42,
209
+ pageToken: "Test string",
210
+ });
184
211
  /**
185
212
  * 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
186
213
  * 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
@@ -194,6 +221,18 @@ gapi.load('client', async () => {
194
221
  parent: "Test string",
195
222
  }, {
196
223
  instance: {
224
+ autoscalingConfig: {
225
+ autoscalingLimits: {
226
+ maxNodes: 42,
227
+ maxProcessingUnits: 42,
228
+ minNodes: 42,
229
+ minProcessingUnits: 42,
230
+ },
231
+ autoscalingTargets: {
232
+ highPriorityCpuUtilizationPercent: 42,
233
+ storageUtilizationPercent: 42,
234
+ },
235
+ },
197
236
  config: "Test string",
198
237
  createTime: "Test string",
199
238
  displayName: "Test string",
@@ -264,6 +303,18 @@ gapi.load('client', async () => {
264
303
  }, {
265
304
  fieldMask: "Test string",
266
305
  instance: {
306
+ autoscalingConfig: {
307
+ autoscalingLimits: {
308
+ maxNodes: 42,
309
+ maxProcessingUnits: 42,
310
+ minNodes: 42,
311
+ minProcessingUnits: 42,
312
+ },
313
+ autoscalingTargets: {
314
+ highPriorityCpuUtilizationPercent: 42,
315
+ storageUtilizationPercent: 42,
316
+ },
317
+ },
267
318
  config: "Test string",
268
319
  createTime: "Test string",
269
320
  displayName: "Test string",
@@ -1090,6 +1141,25 @@ gapi.load('client', async () => {
1090
1141
  session: "Test string",
1091
1142
  }, {
1092
1143
  dataBoostEnabled: true,
1144
+ directedReadOptions: {
1145
+ excludeReplicas: {
1146
+ replicaSelections: [
1147
+ {
1148
+ location: "Test string",
1149
+ type: "Test string",
1150
+ }
1151
+ ],
1152
+ },
1153
+ includeReplicas: {
1154
+ autoFailoverDisabled: true,
1155
+ replicaSelections: [
1156
+ {
1157
+ location: "Test string",
1158
+ type: "Test string",
1159
+ }
1160
+ ],
1161
+ },
1162
+ },
1093
1163
  params: {
1094
1164
  A: 42
1095
1165
  },
@@ -1165,6 +1235,25 @@ gapi.load('client', async () => {
1165
1235
  session: "Test string",
1166
1236
  }, {
1167
1237
  dataBoostEnabled: true,
1238
+ directedReadOptions: {
1239
+ excludeReplicas: {
1240
+ replicaSelections: [
1241
+ {
1242
+ location: "Test string",
1243
+ type: "Test string",
1244
+ }
1245
+ ],
1246
+ },
1247
+ includeReplicas: {
1248
+ autoFailoverDisabled: true,
1249
+ replicaSelections: [
1250
+ {
1251
+ location: "Test string",
1252
+ type: "Test string",
1253
+ }
1254
+ ],
1255
+ },
1256
+ },
1168
1257
  params: {
1169
1258
  A: 42
1170
1259
  },
@@ -1399,6 +1488,25 @@ gapi.load('client', async () => {
1399
1488
  "Test string"
1400
1489
  ],
1401
1490
  dataBoostEnabled: true,
1491
+ directedReadOptions: {
1492
+ excludeReplicas: {
1493
+ replicaSelections: [
1494
+ {
1495
+ location: "Test string",
1496
+ type: "Test string",
1497
+ }
1498
+ ],
1499
+ },
1500
+ includeReplicas: {
1501
+ autoFailoverDisabled: true,
1502
+ replicaSelections: [
1503
+ {
1504
+ location: "Test string",
1505
+ type: "Test string",
1506
+ }
1507
+ ],
1508
+ },
1509
+ },
1402
1510
  index: "Test string",
1403
1511
  keySet: {
1404
1512
  all: true,
@@ -1488,6 +1596,25 @@ gapi.load('client', async () => {
1488
1596
  "Test string"
1489
1597
  ],
1490
1598
  dataBoostEnabled: true,
1599
+ directedReadOptions: {
1600
+ excludeReplicas: {
1601
+ replicaSelections: [
1602
+ {
1603
+ location: "Test string",
1604
+ type: "Test string",
1605
+ }
1606
+ ],
1607
+ },
1608
+ includeReplicas: {
1609
+ autoFailoverDisabled: true,
1610
+ replicaSelections: [
1611
+ {
1612
+ location: "Test string",
1613
+ type: "Test string",
1614
+ }
1615
+ ],
1616
+ },
1617
+ },
1491
1618
  index: "Test string",
1492
1619
  keySet: {
1493
1620
  all: true,