@googleapis/spanner 2.0.0 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/spanner-v3.0.0...spanner-v4.0.0) (2023-11-30)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * This release has breaking changes.
9
+ * This release has breaking changes.
10
+
11
+ ### Features
12
+
13
+ * run the generator ([#3355](https://github.com/googleapis/google-api-nodejs-client/issues/3355)) ([5504c86](https://github.com/googleapis/google-api-nodejs-client/commit/5504c86fd61740886047320e2ed70f02a164acd7))
14
+ * run the generator ([#3371](https://github.com/googleapis/google-api-nodejs-client/issues/3371)) ([d3fd980](https://github.com/googleapis/google-api-nodejs-client/commit/d3fd980907c318048c7ee471c38033cf529a3c04))
15
+ * **spanner:** update the API ([19c8a5e](https://github.com/googleapis/google-api-nodejs-client/commit/19c8a5e40f233682de4a75d7f802e0fd7d80f8ef))
16
+ * **spanner:** update the API ([3d046d5](https://github.com/googleapis/google-api-nodejs-client/commit/3d046d5e6193f876b4ade162c3581e43f057031f))
17
+
18
+ ## [3.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/spanner-v2.0.0...spanner-v3.0.0) (2023-11-27)
19
+
20
+
21
+ ### ⚠ BREAKING CHANGES
22
+
23
+ * This release has breaking changes.
24
+
25
+ ### Features
26
+
27
+ * run the generator ([#3371](https://github.com/googleapis/google-api-nodejs-client/issues/3371)) ([d3fd980](https://github.com/googleapis/google-api-nodejs-client/commit/d3fd980907c318048c7ee471c38033cf529a3c04))
28
+ * **spanner:** update the API ([19c8a5e](https://github.com/googleapis/google-api-nodejs-client/commit/19c8a5e40f233682de4a75d7f802e0fd7d80f8ef))
29
+
3
30
  ## [2.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/spanner-v1.1.1...spanner-v2.0.0) (2023-10-11)
4
31
 
5
32
 
package/build/v1.d.ts CHANGED
@@ -72,6 +72,53 @@ export declare namespace spanner_v1 {
72
72
  scans: Resource$Scans;
73
73
  constructor(options: GlobalOptions, google?: GoogleConfigurable);
74
74
  }
75
+ /**
76
+ * Autoscaling config for an instance.
77
+ */
78
+ export interface Schema$AutoscalingConfig {
79
+ /**
80
+ * Required. Autoscaling limits for an instance.
81
+ */
82
+ autoscalingLimits?: Schema$AutoscalingLimits;
83
+ /**
84
+ * Required. The autoscaling targets for an instance.
85
+ */
86
+ autoscalingTargets?: Schema$AutoscalingTargets;
87
+ }
88
+ /**
89
+ * The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.
90
+ */
91
+ export interface Schema$AutoscalingLimits {
92
+ /**
93
+ * Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.
94
+ */
95
+ maxNodes?: number | null;
96
+ /**
97
+ * 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.
98
+ */
99
+ maxProcessingUnits?: number | null;
100
+ /**
101
+ * Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.
102
+ */
103
+ minNodes?: number | null;
104
+ /**
105
+ * Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.
106
+ */
107
+ minProcessingUnits?: number | null;
108
+ }
109
+ /**
110
+ * The autoscaling targets for an instance.
111
+ */
112
+ export interface Schema$AutoscalingTargets {
113
+ /**
114
+ * 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 100 (full utilization). The valid range is [10, 90] inclusive.
115
+ */
116
+ highPriorityCpuUtilizationPercent?: number | null;
117
+ /**
118
+ * 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 utilization). The valid range is [10, 100] inclusive.
119
+ */
120
+ storageUtilizationPercent?: number | null;
121
+ }
75
122
  /**
76
123
  * A backup of a Cloud Spanner database.
77
124
  */
@@ -630,6 +677,19 @@ export declare namespace spanner_v1 {
630
677
  */
631
678
  shortMessage?: Schema$LocalizedString;
632
679
  }
680
+ /**
681
+ * The DirectedReadOptions can be used to indicate which replicas or regions should be used for non-transactional reads or queries. DirectedReadOptions may only be specified for a read-only transaction, otherwise the API will return an `INVALID_ARGUMENT` error.
682
+ */
683
+ export interface Schema$DirectedReadOptions {
684
+ /**
685
+ * Exclude_replicas indicates that should be excluded from serving requests. Spanner will not route requests to the replicas in this list.
686
+ */
687
+ excludeReplicas?: Schema$ExcludeReplicas;
688
+ /**
689
+ * 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 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.
690
+ */
691
+ includeReplicas?: Schema$IncludeReplicas;
692
+ }
633
693
  /**
634
694
  * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
635
695
  */
@@ -661,6 +721,15 @@ export declare namespace spanner_v1 {
661
721
  */
662
722
  kmsKeyVersion?: string | null;
663
723
  }
724
+ /**
725
+ * An ExcludeReplicas contains a repeated set of ReplicaSelection that should be excluded from serving requests.
726
+ */
727
+ export interface Schema$ExcludeReplicas {
728
+ /**
729
+ * The directed read replica selector.
730
+ */
731
+ replicaSelections?: Schema$ReplicaSelection[];
732
+ }
664
733
  /**
665
734
  * The request for ExecuteBatchDml.
666
735
  */
@@ -703,6 +772,10 @@ export declare namespace spanner_v1 {
703
772
  * If this is for a partitioned query and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
704
773
  */
705
774
  dataBoostEnabled?: boolean | null;
775
+ /**
776
+ * Directed read options for this request.
777
+ */
778
+ directedReadOptions?: Schema$DirectedReadOptions;
706
779
  /**
707
780
  * 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, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id \> @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL statement with unbound parameters.
708
781
  */
@@ -830,6 +903,32 @@ export declare namespace spanner_v1 {
830
903
  */
831
904
  requestedPolicyVersion?: number | null;
832
905
  }
906
+ /**
907
+ * An IncludeReplicas contains a repeated set of ReplicaSelection which indicates the order in which replicas should be considered.
908
+ */
909
+ export interface Schema$IncludeReplicas {
910
+ /**
911
+ * 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`.
912
+ */
913
+ autoFailoverDisabled?: boolean | null;
914
+ /**
915
+ * The directed read replica selector.
916
+ */
917
+ replicaSelections?: Schema$ReplicaSelection[];
918
+ }
919
+ /**
920
+ * Recommendation to add new indexes to run queries more efficiently.
921
+ */
922
+ export interface Schema$IndexAdvice {
923
+ /**
924
+ * Optional. DDL statements to add new indexes that will improve the query.
925
+ */
926
+ ddl?: string[] | null;
927
+ /**
928
+ * Optional. Estimated latency improvement factor. For example if the query currently takes 500 ms to run and the estimated latency with new indexes is 100 ms this field will be 5.
929
+ */
930
+ improvementFactor?: number | null;
931
+ }
833
932
  /**
834
933
  * A message representing a (sparse) collection of hot keys for specific key buckets.
835
934
  */
@@ -856,6 +955,10 @@ export declare namespace spanner_v1 {
856
955
  * An isolated set of Cloud Spanner resources on which databases can be hosted.
857
956
  */
858
957
  export interface Schema$Instance {
958
+ /**
959
+ * 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 and reflect the current compute capacity allocated to the instance.
960
+ */
961
+ autoscalingConfig?: Schema$AutoscalingConfig;
859
962
  /**
860
963
  * Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.
861
964
  */
@@ -1607,6 +1710,15 @@ export declare namespace spanner_v1 {
1607
1710
  */
1608
1711
  word?: string | null;
1609
1712
  }
1713
+ /**
1714
+ * Output of query advisor analysis.
1715
+ */
1716
+ export interface Schema$QueryAdvisorResult {
1717
+ /**
1718
+ * Optional. Index Recommendation for a query. This is an optional field and the recommendation will only be available when the recommendation guarantees significant improvement in query performance.
1719
+ */
1720
+ indexAdvice?: Schema$IndexAdvice[];
1721
+ }
1610
1722
  /**
1611
1723
  * Query optimizer configuration.
1612
1724
  */
@@ -1628,6 +1740,10 @@ export declare namespace spanner_v1 {
1628
1740
  * The nodes in the query plan. Plan nodes are returned in pre-order starting with the plan root. Each PlanNode's `id` corresponds to its index in `plan_nodes`.
1629
1741
  */
1630
1742
  planNodes?: Schema$PlanNode[];
1743
+ /**
1744
+ * Optional. The advices/recommendations for a query. Currently this field will be serving index recommendations for a query.
1745
+ */
1746
+ queryAdvice?: Schema$QueryAdvisorResult;
1631
1747
  }
1632
1748
  /**
1633
1749
  * Message type to initiate a read-only transaction.
@@ -1670,6 +1786,10 @@ export declare namespace spanner_v1 {
1670
1786
  * If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
1671
1787
  */
1672
1788
  dataBoostEnabled?: boolean | null;
1789
+ /**
1790
+ * Directed read options for this request.
1791
+ */
1792
+ directedReadOptions?: Schema$DirectedReadOptions;
1673
1793
  /**
1674
1794
  * 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 information.
1675
1795
  */
@@ -1726,6 +1846,19 @@ export declare namespace spanner_v1 {
1726
1846
  */
1727
1847
  type?: string | null;
1728
1848
  }
1849
+ /**
1850
+ * The directed read replica selector. Callers must provide one or more of the following fields for replica selection: * `location` - The location must be one of the regions within the multi-region configuration of your database. * `type` - The type of the replica. Some examples of using replica_selectors are: * `location:us-east1` --\> The "us-east1" replica(s) of any available type will be used to process the request. * `type:READ_ONLY` --\> The "READ_ONLY" type replica(s) in nearest . available location will be used to process the request. * `location:us-east1 type:READ_ONLY` --\> The "READ_ONLY" type replica(s) in location "us-east1" will be used to process the request.
1851
+ */
1852
+ export interface Schema$ReplicaSelection {
1853
+ /**
1854
+ * The location or region of the serving requests, e.g. "us-east1".
1855
+ */
1856
+ location?: string | null;
1857
+ /**
1858
+ * The type of replica.
1859
+ */
1860
+ type?: string | null;
1861
+ }
1729
1862
  /**
1730
1863
  * Common request options for various APIs.
1731
1864
  */
@@ -2364,6 +2497,7 @@ export declare namespace spanner_v1 {
2364
2497
  export class Resource$Projects$Instanceconfigs {
2365
2498
  context: APIRequestContext;
2366
2499
  operations: Resource$Projects$Instanceconfigs$Operations;
2500
+ ssdCaches: Resource$Projects$Instanceconfigs$Ssdcaches;
2367
2501
  constructor(context: APIRequestContext);
2368
2502
  /**
2369
2503
  * 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 instance config name is assigned by the caller. If the named instance config already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is `CREATING`. While the operation is pending: * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance config are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its 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 instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.
@@ -2586,6 +2720,107 @@ export declare namespace spanner_v1 {
2586
2720
  */
2587
2721
  pageToken?: string;
2588
2722
  }
2723
+ export class Resource$Projects$Instanceconfigs$Ssdcaches {
2724
+ context: APIRequestContext;
2725
+ operations: Resource$Projects$Instanceconfigs$Ssdcaches$Operations;
2726
+ constructor(context: APIRequestContext);
2727
+ }
2728
+ export class Resource$Projects$Instanceconfigs$Ssdcaches$Operations {
2729
+ context: APIRequestContext;
2730
+ constructor(context: APIRequestContext);
2731
+ /**
2732
+ * 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 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 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 1, corresponding to `Code.CANCELLED`.
2733
+ *
2734
+ * @param params - Parameters for request
2735
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2736
+ * @param callback - Optional callback that handles the response.
2737
+ * @returns A promise if used with async/await, or void if used with a callback.
2738
+ */
2739
+ cancel(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
2740
+ cancel(params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
2741
+ cancel(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2742
+ cancel(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
2743
+ cancel(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
2744
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
2745
+ /**
2746
+ * 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 this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
2747
+ *
2748
+ * @param params - Parameters for request
2749
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2750
+ * @param callback - Optional callback that handles the response.
2751
+ * @returns A promise if used with async/await, or void if used with a callback.
2752
+ */
2753
+ delete(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
2754
+ delete(params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
2755
+ delete(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2756
+ delete(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
2757
+ delete(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
2758
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
2759
+ /**
2760
+ * 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.
2761
+ *
2762
+ * @param params - Parameters for request
2763
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2764
+ * @param callback - Optional callback that handles the response.
2765
+ * @returns A promise if used with async/await, or void if used with a callback.
2766
+ */
2767
+ get(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
2768
+ get(params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
2769
+ get(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2770
+ get(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
2771
+ get(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
2772
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
2773
+ /**
2774
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2775
+ *
2776
+ * @param params - Parameters for request
2777
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2778
+ * @param callback - Optional callback that handles the response.
2779
+ * @returns A promise if used with async/await, or void if used with a callback.
2780
+ */
2781
+ list(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2782
+ list(params?: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
2783
+ list(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2784
+ list(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
2785
+ list(params: Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
2786
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
2787
+ }
2788
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Cancel extends StandardParameters {
2789
+ /**
2790
+ * The name of the operation resource to be cancelled.
2791
+ */
2792
+ name?: string;
2793
+ }
2794
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Delete extends StandardParameters {
2795
+ /**
2796
+ * The name of the operation resource to be deleted.
2797
+ */
2798
+ name?: string;
2799
+ }
2800
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$Get extends StandardParameters {
2801
+ /**
2802
+ * The name of the operation resource.
2803
+ */
2804
+ name?: string;
2805
+ }
2806
+ export interface Params$Resource$Projects$Instanceconfigs$Ssdcaches$Operations$List extends StandardParameters {
2807
+ /**
2808
+ * The standard list filter.
2809
+ */
2810
+ filter?: string;
2811
+ /**
2812
+ * The name of the operation's parent resource.
2813
+ */
2814
+ name?: string;
2815
+ /**
2816
+ * The standard list page size.
2817
+ */
2818
+ pageSize?: number;
2819
+ /**
2820
+ * The standard list page token.
2821
+ */
2822
+ pageToken?: string;
2823
+ }
2589
2824
  export class Resource$Projects$Instances {
2590
2825
  context: APIRequestContext;
2591
2826
  backupOperations: Resource$Projects$Instances$Backupoperations;
package/build/v1.js CHANGED
@@ -94,6 +94,7 @@ var spanner_v1;
94
94
  constructor(context) {
95
95
  this.context = context;
96
96
  this.operations = new Resource$Projects$Instanceconfigs$Operations(this.context);
97
+ this.ssdCaches = new Resource$Projects$Instanceconfigs$Ssdcaches(this.context);
97
98
  }
98
99
  create(paramsOrCallback, optionsOrCallback, callback) {
99
100
  let params = (paramsOrCallback ||
@@ -384,6 +385,148 @@ var spanner_v1;
384
385
  }
385
386
  }
386
387
  spanner_v1.Resource$Projects$Instanceconfigs$Operations = Resource$Projects$Instanceconfigs$Operations;
388
+ class Resource$Projects$Instanceconfigs$Ssdcaches {
389
+ constructor(context) {
390
+ this.context = context;
391
+ this.operations =
392
+ new Resource$Projects$Instanceconfigs$Ssdcaches$Operations(this.context);
393
+ }
394
+ }
395
+ spanner_v1.Resource$Projects$Instanceconfigs$Ssdcaches = Resource$Projects$Instanceconfigs$Ssdcaches;
396
+ class Resource$Projects$Instanceconfigs$Ssdcaches$Operations {
397
+ constructor(context) {
398
+ this.context = context;
399
+ }
400
+ cancel(paramsOrCallback, optionsOrCallback, callback) {
401
+ let params = (paramsOrCallback ||
402
+ {});
403
+ let options = (optionsOrCallback || {});
404
+ if (typeof paramsOrCallback === 'function') {
405
+ callback = paramsOrCallback;
406
+ params =
407
+ {};
408
+ options = {};
409
+ }
410
+ if (typeof optionsOrCallback === 'function') {
411
+ callback = optionsOrCallback;
412
+ options = {};
413
+ }
414
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
415
+ const parameters = {
416
+ options: Object.assign({
417
+ url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
418
+ method: 'POST',
419
+ }, options),
420
+ params,
421
+ requiredParams: ['name'],
422
+ pathParams: ['name'],
423
+ context: this.context,
424
+ };
425
+ if (callback) {
426
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
427
+ }
428
+ else {
429
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
430
+ }
431
+ }
432
+ delete(paramsOrCallback, optionsOrCallback, callback) {
433
+ let params = (paramsOrCallback ||
434
+ {});
435
+ let options = (optionsOrCallback || {});
436
+ if (typeof paramsOrCallback === 'function') {
437
+ callback = paramsOrCallback;
438
+ params =
439
+ {};
440
+ options = {};
441
+ }
442
+ if (typeof optionsOrCallback === 'function') {
443
+ callback = optionsOrCallback;
444
+ options = {};
445
+ }
446
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
447
+ const parameters = {
448
+ options: Object.assign({
449
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
450
+ method: 'DELETE',
451
+ }, options),
452
+ params,
453
+ requiredParams: ['name'],
454
+ pathParams: ['name'],
455
+ context: this.context,
456
+ };
457
+ if (callback) {
458
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
459
+ }
460
+ else {
461
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
462
+ }
463
+ }
464
+ get(paramsOrCallback, optionsOrCallback, callback) {
465
+ let params = (paramsOrCallback ||
466
+ {});
467
+ let options = (optionsOrCallback || {});
468
+ if (typeof paramsOrCallback === 'function') {
469
+ callback = paramsOrCallback;
470
+ params =
471
+ {};
472
+ options = {};
473
+ }
474
+ if (typeof optionsOrCallback === 'function') {
475
+ callback = optionsOrCallback;
476
+ options = {};
477
+ }
478
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
479
+ const parameters = {
480
+ options: Object.assign({
481
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
482
+ method: 'GET',
483
+ }, options),
484
+ params,
485
+ requiredParams: ['name'],
486
+ pathParams: ['name'],
487
+ context: this.context,
488
+ };
489
+ if (callback) {
490
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
491
+ }
492
+ else {
493
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
494
+ }
495
+ }
496
+ list(paramsOrCallback, optionsOrCallback, callback) {
497
+ let params = (paramsOrCallback ||
498
+ {});
499
+ let options = (optionsOrCallback || {});
500
+ if (typeof paramsOrCallback === 'function') {
501
+ callback = paramsOrCallback;
502
+ params =
503
+ {};
504
+ options = {};
505
+ }
506
+ if (typeof optionsOrCallback === 'function') {
507
+ callback = optionsOrCallback;
508
+ options = {};
509
+ }
510
+ const rootUrl = options.rootUrl || 'https://spanner.googleapis.com/';
511
+ const parameters = {
512
+ options: Object.assign({
513
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
514
+ method: 'GET',
515
+ }, options),
516
+ params,
517
+ requiredParams: ['name'],
518
+ pathParams: ['name'],
519
+ context: this.context,
520
+ };
521
+ if (callback) {
522
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
523
+ }
524
+ else {
525
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
526
+ }
527
+ }
528
+ }
529
+ spanner_v1.Resource$Projects$Instanceconfigs$Ssdcaches$Operations = Resource$Projects$Instanceconfigs$Ssdcaches$Operations;
387
530
  class Resource$Projects$Instances {
388
531
  constructor(context) {
389
532
  this.context = context;