@googleapis/tpu 2.7.0 → 3.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/v2.ts CHANGED
@@ -154,6 +154,10 @@ export namespace tpu_v2 {
154
154
  */
155
155
  type?: string | null;
156
156
  }
157
+ /**
158
+ * Further data for the accepted state.
159
+ */
160
+ export interface Schema$AcceptedData {}
157
161
  /**
158
162
  * An access config attached to the TPU worker.
159
163
  */
@@ -163,6 +167,10 @@ export namespace tpu_v2 {
163
167
  */
164
168
  externalIp?: string | null;
165
169
  }
170
+ /**
171
+ * Further data for the active state.
172
+ */
173
+ export interface Schema$ActiveData {}
166
174
  /**
167
175
  * A node-attached disk resource. Next ID: 8;
168
176
  */
@@ -176,10 +184,27 @@ export namespace tpu_v2 {
176
184
  */
177
185
  sourceDisk?: string | null;
178
186
  }
187
+ /**
188
+ * Further data for the creating state.
189
+ */
190
+ export interface Schema$CreatingData {}
191
+ /**
192
+ * Further data for the deleting state.
193
+ */
194
+ export interface Schema$DeletingData {}
179
195
  /**
180
196
  * 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); \}
181
197
  */
182
198
  export interface Schema$Empty {}
199
+ /**
200
+ * Further data for the failed state.
201
+ */
202
+ export interface Schema$FailedData {
203
+ /**
204
+ * Output only. The error that caused the queued resource to enter the FAILED state.
205
+ */
206
+ error?: Schema$Status;
207
+ }
183
208
  /**
184
209
  * Request for GenerateServiceIdentity.
185
210
  */
@@ -215,6 +240,15 @@ export namespace tpu_v2 {
215
240
  */
216
241
  guestAttributes?: Schema$GuestAttributes[];
217
242
  }
243
+ /**
244
+ * Guaranteed tier definition.
245
+ */
246
+ export interface Schema$Guaranteed {
247
+ /**
248
+ * Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
249
+ */
250
+ minDuration?: string | null;
251
+ }
218
252
  /**
219
253
  * A guest attributes.
220
254
  */
@@ -254,6 +288,19 @@ export namespace tpu_v2 {
254
288
  */
255
289
  items?: Schema$GuestAttributesEntry[];
256
290
  }
291
+ /**
292
+ * Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
293
+ */
294
+ export interface Schema$Interval {
295
+ /**
296
+ * Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
297
+ */
298
+ endTime?: string | null;
299
+ /**
300
+ * Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
301
+ */
302
+ startTime?: string | null;
303
+ }
257
304
  /**
258
305
  * Response for ListAcceleratorTypes.
259
306
  */
@@ -314,6 +361,23 @@ export namespace tpu_v2 {
314
361
  */
315
362
  operations?: Schema$Operation[];
316
363
  }
364
+ /**
365
+ * Response for ListQueuedResources.
366
+ */
367
+ export interface Schema$ListQueuedResourcesResponse {
368
+ /**
369
+ * The next page token or empty if none.
370
+ */
371
+ nextPageToken?: string | null;
372
+ /**
373
+ * The listed queued resources.
374
+ */
375
+ queuedResources?: Schema$QueuedResource[];
376
+ /**
377
+ * Locations that could not be reached.
378
+ */
379
+ unreachable?: string[] | null;
380
+ }
317
381
  /**
318
382
  * Response for ListRuntimeVersions.
319
383
  */
@@ -356,6 +420,19 @@ export namespace tpu_v2 {
356
420
  */
357
421
  name?: string | null;
358
422
  }
423
+ /**
424
+ * Parameters to specify for multislice QueuedResource requests. This message must be populated in case of multislice requests instead of node_id.
425
+ */
426
+ export interface Schema$MultisliceParams {
427
+ /**
428
+ * Required. Number of nodes with this spec. The system will attempt to provison "node_count" nodes as part of the request. This needs to be \> 1.
429
+ */
430
+ nodeCount?: number | null;
431
+ /**
432
+ * Optional. Prefix of node_ids in case of multislice request. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1", "np-2". If this field is not provided we use queued_resource_id as the node_id_prefix.
433
+ */
434
+ nodeIdPrefix?: string | null;
435
+ }
359
436
  /**
360
437
  * Network related configurations.
361
438
  */
@@ -499,6 +576,27 @@ export namespace tpu_v2 {
499
576
  */
500
577
  tags?: string[] | null;
501
578
  }
579
+ /**
580
+ * Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.
581
+ */
582
+ export interface Schema$NodeSpec {
583
+ /**
584
+ * Optional. Fields to specify in case of multislice request.
585
+ */
586
+ multisliceParams?: Schema$MultisliceParams;
587
+ /**
588
+ * Required. The node.
589
+ */
590
+ node?: Schema$Node;
591
+ /**
592
+ * Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multislice requests, multislice_params must be populated instead.
593
+ */
594
+ nodeId?: string | null;
595
+ /**
596
+ * Required. The parent resource name.
597
+ */
598
+ parent?: string | null;
599
+ }
502
600
  /**
503
601
  * This resource represents a long-running operation that is the result of a network API call.
504
602
  */
@@ -557,6 +655,121 @@ export namespace tpu_v2 {
557
655
  */
558
656
  verb?: string | null;
559
657
  }
658
+ /**
659
+ * Further data for the provisioning state.
660
+ */
661
+ export interface Schema$ProvisioningData {}
662
+ /**
663
+ * A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
664
+ */
665
+ export interface Schema$QueuedResource {
666
+ /**
667
+ * Output only. The time when the QueuedResource was created.
668
+ */
669
+ createTime?: string | null;
670
+ /**
671
+ * Optional. The Guaranteed tier
672
+ */
673
+ guaranteed?: Schema$Guaranteed;
674
+ /**
675
+ * Output only. Immutable. The name of the QueuedResource.
676
+ */
677
+ name?: string | null;
678
+ /**
679
+ * Optional. The queueing policy of the QueuedRequest.
680
+ */
681
+ queueingPolicy?: Schema$QueueingPolicy;
682
+ /**
683
+ * Optional. Name of the reservation in which the resource should be provisioned. Format: projects/{project\}/locations/{zone\}/reservations/{reservation\}
684
+ */
685
+ reservationName?: string | null;
686
+ /**
687
+ * Optional. The Spot tier.
688
+ */
689
+ spot?: Schema$Spot;
690
+ /**
691
+ * Output only. State of the QueuedResource request.
692
+ */
693
+ state?: Schema$QueuedResourceState;
694
+ /**
695
+ * Optional. Defines a TPU resource.
696
+ */
697
+ tpu?: Schema$Tpu;
698
+ }
699
+ /**
700
+ * QueuedResourceState defines the details of the QueuedResource request.
701
+ */
702
+ export interface Schema$QueuedResourceState {
703
+ /**
704
+ * Output only. Further data for the accepted state.
705
+ */
706
+ acceptedData?: Schema$AcceptedData;
707
+ /**
708
+ * Output only. Further data for the active state.
709
+ */
710
+ activeData?: Schema$ActiveData;
711
+ /**
712
+ * Output only. Further data for the creating state.
713
+ */
714
+ creatingData?: Schema$CreatingData;
715
+ /**
716
+ * Output only. Further data for the deleting state.
717
+ */
718
+ deletingData?: Schema$DeletingData;
719
+ /**
720
+ * Output only. Further data for the failed state.
721
+ */
722
+ failedData?: Schema$FailedData;
723
+ /**
724
+ * Output only. Further data for the provisioning state.
725
+ */
726
+ provisioningData?: Schema$ProvisioningData;
727
+ /**
728
+ * Output only. State of the QueuedResource request.
729
+ */
730
+ state?: string | null;
731
+ /**
732
+ * Output only. The initiator of the QueuedResources's current state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated by the user or the service.
733
+ */
734
+ stateInitiator?: string | null;
735
+ /**
736
+ * Output only. Further data for the suspended state.
737
+ */
738
+ suspendedData?: Schema$SuspendedData;
739
+ /**
740
+ * Output only. Further data for the suspending state.
741
+ */
742
+ suspendingData?: Schema$SuspendingData;
743
+ }
744
+ /**
745
+ * Defines the policy of the QueuedRequest.
746
+ */
747
+ export interface Schema$QueueingPolicy {
748
+ /**
749
+ * Optional. A relative time after which resources may be created.
750
+ */
751
+ validAfterDuration?: string | null;
752
+ /**
753
+ * Optional. An absolute time after which resources may be created.
754
+ */
755
+ validAfterTime?: string | null;
756
+ /**
757
+ * Optional. An absolute time interval within which resources may be created.
758
+ */
759
+ validInterval?: Schema$Interval;
760
+ /**
761
+ * Optional. A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
762
+ */
763
+ validUntilDuration?: string | null;
764
+ /**
765
+ * Optional. An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
766
+ */
767
+ validUntilTime?: string | null;
768
+ }
769
+ /**
770
+ * Request for ResetQueuedResource.
771
+ */
772
+ export interface Schema$ResetQueuedResourceRequest {}
560
773
  /**
561
774
  * A runtime version that a Node can be configured with.
562
775
  */
@@ -618,6 +831,10 @@ export namespace tpu_v2 {
618
831
  */
619
832
  enableSecureBoot?: boolean | null;
620
833
  }
834
+ /**
835
+ * Spot tier definition.
836
+ */
837
+ export interface Schema$Spot {}
621
838
  /**
622
839
  * Request for StartNode.
623
840
  */
@@ -643,6 +860,14 @@ export namespace tpu_v2 {
643
860
  * Request for StopNode.
644
861
  */
645
862
  export interface Schema$StopNodeRequest {}
863
+ /**
864
+ * Further data for the suspended state.
865
+ */
866
+ export interface Schema$SuspendedData {}
867
+ /**
868
+ * Further data for the suspending state.
869
+ */
870
+ export interface Schema$SuspendingData {}
646
871
  /**
647
872
  * A Symptom instance.
648
873
  */
@@ -664,6 +889,15 @@ export namespace tpu_v2 {
664
889
  */
665
890
  workerId?: string | null;
666
891
  }
892
+ /**
893
+ * Details of the TPU resource(s) being requested.
894
+ */
895
+ export interface Schema$Tpu {
896
+ /**
897
+ * Optional. The TPU node(s) being requested.
898
+ */
899
+ nodeSpec?: Schema$NodeSpec[];
900
+ }
667
901
 
668
902
  export class Resource$Projects {
669
903
  context: APIRequestContext;
@@ -679,6 +913,7 @@ export namespace tpu_v2 {
679
913
  acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
680
914
  nodes: Resource$Projects$Locations$Nodes;
681
915
  operations: Resource$Projects$Locations$Operations;
916
+ queuedResources: Resource$Projects$Locations$Queuedresources;
682
917
  runtimeVersions: Resource$Projects$Locations$Runtimeversions;
683
918
  constructor(context: APIRequestContext) {
684
919
  this.context = context;
@@ -689,6 +924,9 @@ export namespace tpu_v2 {
689
924
  this.operations = new Resource$Projects$Locations$Operations(
690
925
  this.context
691
926
  );
927
+ this.queuedResources = new Resource$Projects$Locations$Queuedresources(
928
+ this.context
929
+ );
692
930
  this.runtimeVersions = new Resource$Projects$Locations$Runtimeversions(
693
931
  this.context
694
932
  );
@@ -2414,6 +2652,518 @@ export namespace tpu_v2 {
2414
2652
  pageToken?: string;
2415
2653
  }
2416
2654
 
2655
+ export class Resource$Projects$Locations$Queuedresources {
2656
+ context: APIRequestContext;
2657
+ constructor(context: APIRequestContext) {
2658
+ this.context = context;
2659
+ }
2660
+
2661
+ /**
2662
+ * Creates a QueuedResource TPU instance.
2663
+ *
2664
+ * @param params - Parameters for request
2665
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2666
+ * @param callback - Optional callback that handles the response.
2667
+ * @returns A promise if used with async/await, or void if used with a callback.
2668
+ */
2669
+ create(
2670
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2671
+ options: StreamMethodOptions
2672
+ ): GaxiosPromise<Readable>;
2673
+ create(
2674
+ params?: Params$Resource$Projects$Locations$Queuedresources$Create,
2675
+ options?: MethodOptions
2676
+ ): GaxiosPromise<Schema$Operation>;
2677
+ create(
2678
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2679
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2680
+ callback: BodyResponseCallback<Readable>
2681
+ ): void;
2682
+ create(
2683
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2684
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2685
+ callback: BodyResponseCallback<Schema$Operation>
2686
+ ): void;
2687
+ create(
2688
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2689
+ callback: BodyResponseCallback<Schema$Operation>
2690
+ ): void;
2691
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
2692
+ create(
2693
+ paramsOrCallback?:
2694
+ | Params$Resource$Projects$Locations$Queuedresources$Create
2695
+ | BodyResponseCallback<Schema$Operation>
2696
+ | BodyResponseCallback<Readable>,
2697
+ optionsOrCallback?:
2698
+ | MethodOptions
2699
+ | StreamMethodOptions
2700
+ | BodyResponseCallback<Schema$Operation>
2701
+ | BodyResponseCallback<Readable>,
2702
+ callback?:
2703
+ | BodyResponseCallback<Schema$Operation>
2704
+ | BodyResponseCallback<Readable>
2705
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2706
+ let params = (paramsOrCallback ||
2707
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Create;
2708
+ let options = (optionsOrCallback || {}) as MethodOptions;
2709
+
2710
+ if (typeof paramsOrCallback === 'function') {
2711
+ callback = paramsOrCallback;
2712
+ params =
2713
+ {} as Params$Resource$Projects$Locations$Queuedresources$Create;
2714
+ options = {};
2715
+ }
2716
+
2717
+ if (typeof optionsOrCallback === 'function') {
2718
+ callback = optionsOrCallback;
2719
+ options = {};
2720
+ }
2721
+
2722
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2723
+ const parameters = {
2724
+ options: Object.assign(
2725
+ {
2726
+ url: (rootUrl + '/v2/{+parent}/queuedResources').replace(
2727
+ /([^:]\/)\/+/g,
2728
+ '$1'
2729
+ ),
2730
+ method: 'POST',
2731
+ },
2732
+ options
2733
+ ),
2734
+ params,
2735
+ requiredParams: ['parent'],
2736
+ pathParams: ['parent'],
2737
+ context: this.context,
2738
+ };
2739
+ if (callback) {
2740
+ createAPIRequest<Schema$Operation>(
2741
+ parameters,
2742
+ callback as BodyResponseCallback<unknown>
2743
+ );
2744
+ } else {
2745
+ return createAPIRequest<Schema$Operation>(parameters);
2746
+ }
2747
+ }
2748
+
2749
+ /**
2750
+ * Deletes a QueuedResource TPU instance.
2751
+ *
2752
+ * @param params - Parameters for request
2753
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2754
+ * @param callback - Optional callback that handles the response.
2755
+ * @returns A promise if used with async/await, or void if used with a callback.
2756
+ */
2757
+ delete(
2758
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2759
+ options: StreamMethodOptions
2760
+ ): GaxiosPromise<Readable>;
2761
+ delete(
2762
+ params?: Params$Resource$Projects$Locations$Queuedresources$Delete,
2763
+ options?: MethodOptions
2764
+ ): GaxiosPromise<Schema$Operation>;
2765
+ delete(
2766
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2767
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2768
+ callback: BodyResponseCallback<Readable>
2769
+ ): void;
2770
+ delete(
2771
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2772
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2773
+ callback: BodyResponseCallback<Schema$Operation>
2774
+ ): void;
2775
+ delete(
2776
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2777
+ callback: BodyResponseCallback<Schema$Operation>
2778
+ ): void;
2779
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
2780
+ delete(
2781
+ paramsOrCallback?:
2782
+ | Params$Resource$Projects$Locations$Queuedresources$Delete
2783
+ | BodyResponseCallback<Schema$Operation>
2784
+ | BodyResponseCallback<Readable>,
2785
+ optionsOrCallback?:
2786
+ | MethodOptions
2787
+ | StreamMethodOptions
2788
+ | BodyResponseCallback<Schema$Operation>
2789
+ | BodyResponseCallback<Readable>,
2790
+ callback?:
2791
+ | BodyResponseCallback<Schema$Operation>
2792
+ | BodyResponseCallback<Readable>
2793
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2794
+ let params = (paramsOrCallback ||
2795
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Delete;
2796
+ let options = (optionsOrCallback || {}) as MethodOptions;
2797
+
2798
+ if (typeof paramsOrCallback === 'function') {
2799
+ callback = paramsOrCallback;
2800
+ params =
2801
+ {} as Params$Resource$Projects$Locations$Queuedresources$Delete;
2802
+ options = {};
2803
+ }
2804
+
2805
+ if (typeof optionsOrCallback === 'function') {
2806
+ callback = optionsOrCallback;
2807
+ options = {};
2808
+ }
2809
+
2810
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2811
+ const parameters = {
2812
+ options: Object.assign(
2813
+ {
2814
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2815
+ method: 'DELETE',
2816
+ },
2817
+ options
2818
+ ),
2819
+ params,
2820
+ requiredParams: ['name'],
2821
+ pathParams: ['name'],
2822
+ context: this.context,
2823
+ };
2824
+ if (callback) {
2825
+ createAPIRequest<Schema$Operation>(
2826
+ parameters,
2827
+ callback as BodyResponseCallback<unknown>
2828
+ );
2829
+ } else {
2830
+ return createAPIRequest<Schema$Operation>(parameters);
2831
+ }
2832
+ }
2833
+
2834
+ /**
2835
+ * Gets details of a queued resource.
2836
+ *
2837
+ * @param params - Parameters for request
2838
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2839
+ * @param callback - Optional callback that handles the response.
2840
+ * @returns A promise if used with async/await, or void if used with a callback.
2841
+ */
2842
+ get(
2843
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2844
+ options: StreamMethodOptions
2845
+ ): GaxiosPromise<Readable>;
2846
+ get(
2847
+ params?: Params$Resource$Projects$Locations$Queuedresources$Get,
2848
+ options?: MethodOptions
2849
+ ): GaxiosPromise<Schema$QueuedResource>;
2850
+ get(
2851
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2852
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2853
+ callback: BodyResponseCallback<Readable>
2854
+ ): void;
2855
+ get(
2856
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2857
+ options: MethodOptions | BodyResponseCallback<Schema$QueuedResource>,
2858
+ callback: BodyResponseCallback<Schema$QueuedResource>
2859
+ ): void;
2860
+ get(
2861
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2862
+ callback: BodyResponseCallback<Schema$QueuedResource>
2863
+ ): void;
2864
+ get(callback: BodyResponseCallback<Schema$QueuedResource>): void;
2865
+ get(
2866
+ paramsOrCallback?:
2867
+ | Params$Resource$Projects$Locations$Queuedresources$Get
2868
+ | BodyResponseCallback<Schema$QueuedResource>
2869
+ | BodyResponseCallback<Readable>,
2870
+ optionsOrCallback?:
2871
+ | MethodOptions
2872
+ | StreamMethodOptions
2873
+ | BodyResponseCallback<Schema$QueuedResource>
2874
+ | BodyResponseCallback<Readable>,
2875
+ callback?:
2876
+ | BodyResponseCallback<Schema$QueuedResource>
2877
+ | BodyResponseCallback<Readable>
2878
+ ): void | GaxiosPromise<Schema$QueuedResource> | GaxiosPromise<Readable> {
2879
+ let params = (paramsOrCallback ||
2880
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Get;
2881
+ let options = (optionsOrCallback || {}) as MethodOptions;
2882
+
2883
+ if (typeof paramsOrCallback === 'function') {
2884
+ callback = paramsOrCallback;
2885
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$Get;
2886
+ options = {};
2887
+ }
2888
+
2889
+ if (typeof optionsOrCallback === 'function') {
2890
+ callback = optionsOrCallback;
2891
+ options = {};
2892
+ }
2893
+
2894
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2895
+ const parameters = {
2896
+ options: Object.assign(
2897
+ {
2898
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2899
+ method: 'GET',
2900
+ },
2901
+ options
2902
+ ),
2903
+ params,
2904
+ requiredParams: ['name'],
2905
+ pathParams: ['name'],
2906
+ context: this.context,
2907
+ };
2908
+ if (callback) {
2909
+ createAPIRequest<Schema$QueuedResource>(
2910
+ parameters,
2911
+ callback as BodyResponseCallback<unknown>
2912
+ );
2913
+ } else {
2914
+ return createAPIRequest<Schema$QueuedResource>(parameters);
2915
+ }
2916
+ }
2917
+
2918
+ /**
2919
+ * Lists queued resources.
2920
+ *
2921
+ * @param params - Parameters for request
2922
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2923
+ * @param callback - Optional callback that handles the response.
2924
+ * @returns A promise if used with async/await, or void if used with a callback.
2925
+ */
2926
+ list(
2927
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
2928
+ options: StreamMethodOptions
2929
+ ): GaxiosPromise<Readable>;
2930
+ list(
2931
+ params?: Params$Resource$Projects$Locations$Queuedresources$List,
2932
+ options?: MethodOptions
2933
+ ): GaxiosPromise<Schema$ListQueuedResourcesResponse>;
2934
+ list(
2935
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
2936
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2937
+ callback: BodyResponseCallback<Readable>
2938
+ ): void;
2939
+ list(
2940
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
2941
+ options:
2942
+ | MethodOptions
2943
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>,
2944
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2945
+ ): void;
2946
+ list(
2947
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
2948
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2949
+ ): void;
2950
+ list(
2951
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2952
+ ): void;
2953
+ list(
2954
+ paramsOrCallback?:
2955
+ | Params$Resource$Projects$Locations$Queuedresources$List
2956
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2957
+ | BodyResponseCallback<Readable>,
2958
+ optionsOrCallback?:
2959
+ | MethodOptions
2960
+ | StreamMethodOptions
2961
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2962
+ | BodyResponseCallback<Readable>,
2963
+ callback?:
2964
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
2965
+ | BodyResponseCallback<Readable>
2966
+ ):
2967
+ | void
2968
+ | GaxiosPromise<Schema$ListQueuedResourcesResponse>
2969
+ | GaxiosPromise<Readable> {
2970
+ let params = (paramsOrCallback ||
2971
+ {}) as Params$Resource$Projects$Locations$Queuedresources$List;
2972
+ let options = (optionsOrCallback || {}) as MethodOptions;
2973
+
2974
+ if (typeof paramsOrCallback === 'function') {
2975
+ callback = paramsOrCallback;
2976
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$List;
2977
+ options = {};
2978
+ }
2979
+
2980
+ if (typeof optionsOrCallback === 'function') {
2981
+ callback = optionsOrCallback;
2982
+ options = {};
2983
+ }
2984
+
2985
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2986
+ const parameters = {
2987
+ options: Object.assign(
2988
+ {
2989
+ url: (rootUrl + '/v2/{+parent}/queuedResources').replace(
2990
+ /([^:]\/)\/+/g,
2991
+ '$1'
2992
+ ),
2993
+ method: 'GET',
2994
+ },
2995
+ options
2996
+ ),
2997
+ params,
2998
+ requiredParams: ['parent'],
2999
+ pathParams: ['parent'],
3000
+ context: this.context,
3001
+ };
3002
+ if (callback) {
3003
+ createAPIRequest<Schema$ListQueuedResourcesResponse>(
3004
+ parameters,
3005
+ callback as BodyResponseCallback<unknown>
3006
+ );
3007
+ } else {
3008
+ return createAPIRequest<Schema$ListQueuedResourcesResponse>(parameters);
3009
+ }
3010
+ }
3011
+
3012
+ /**
3013
+ * Resets a QueuedResource TPU instance
3014
+ *
3015
+ * @param params - Parameters for request
3016
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3017
+ * @param callback - Optional callback that handles the response.
3018
+ * @returns A promise if used with async/await, or void if used with a callback.
3019
+ */
3020
+ reset(
3021
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3022
+ options: StreamMethodOptions
3023
+ ): GaxiosPromise<Readable>;
3024
+ reset(
3025
+ params?: Params$Resource$Projects$Locations$Queuedresources$Reset,
3026
+ options?: MethodOptions
3027
+ ): GaxiosPromise<Schema$Operation>;
3028
+ reset(
3029
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3030
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3031
+ callback: BodyResponseCallback<Readable>
3032
+ ): void;
3033
+ reset(
3034
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3035
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3036
+ callback: BodyResponseCallback<Schema$Operation>
3037
+ ): void;
3038
+ reset(
3039
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3040
+ callback: BodyResponseCallback<Schema$Operation>
3041
+ ): void;
3042
+ reset(callback: BodyResponseCallback<Schema$Operation>): void;
3043
+ reset(
3044
+ paramsOrCallback?:
3045
+ | Params$Resource$Projects$Locations$Queuedresources$Reset
3046
+ | BodyResponseCallback<Schema$Operation>
3047
+ | BodyResponseCallback<Readable>,
3048
+ optionsOrCallback?:
3049
+ | MethodOptions
3050
+ | StreamMethodOptions
3051
+ | BodyResponseCallback<Schema$Operation>
3052
+ | BodyResponseCallback<Readable>,
3053
+ callback?:
3054
+ | BodyResponseCallback<Schema$Operation>
3055
+ | BodyResponseCallback<Readable>
3056
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3057
+ let params = (paramsOrCallback ||
3058
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Reset;
3059
+ let options = (optionsOrCallback || {}) as MethodOptions;
3060
+
3061
+ if (typeof paramsOrCallback === 'function') {
3062
+ callback = paramsOrCallback;
3063
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$Reset;
3064
+ options = {};
3065
+ }
3066
+
3067
+ if (typeof optionsOrCallback === 'function') {
3068
+ callback = optionsOrCallback;
3069
+ options = {};
3070
+ }
3071
+
3072
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
3073
+ const parameters = {
3074
+ options: Object.assign(
3075
+ {
3076
+ url: (rootUrl + '/v2/{+name}:reset').replace(/([^:]\/)\/+/g, '$1'),
3077
+ method: 'POST',
3078
+ },
3079
+ options
3080
+ ),
3081
+ params,
3082
+ requiredParams: ['name'],
3083
+ pathParams: ['name'],
3084
+ context: this.context,
3085
+ };
3086
+ if (callback) {
3087
+ createAPIRequest<Schema$Operation>(
3088
+ parameters,
3089
+ callback as BodyResponseCallback<unknown>
3090
+ );
3091
+ } else {
3092
+ return createAPIRequest<Schema$Operation>(parameters);
3093
+ }
3094
+ }
3095
+ }
3096
+
3097
+ export interface Params$Resource$Projects$Locations$Queuedresources$Create
3098
+ extends StandardParameters {
3099
+ /**
3100
+ * Required. The parent resource name.
3101
+ */
3102
+ parent?: string;
3103
+ /**
3104
+ * Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
3105
+ */
3106
+ queuedResourceId?: string;
3107
+ /**
3108
+ * Optional. Idempotent request UUID.
3109
+ */
3110
+ requestId?: string;
3111
+
3112
+ /**
3113
+ * Request body metadata
3114
+ */
3115
+ requestBody?: Schema$QueuedResource;
3116
+ }
3117
+ export interface Params$Resource$Projects$Locations$Queuedresources$Delete
3118
+ extends StandardParameters {
3119
+ /**
3120
+ * Optional. If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.
3121
+ */
3122
+ force?: boolean;
3123
+ /**
3124
+ * Required. The resource name.
3125
+ */
3126
+ name?: string;
3127
+ /**
3128
+ * Optional. Idempotent request UUID.
3129
+ */
3130
+ requestId?: string;
3131
+ }
3132
+ export interface Params$Resource$Projects$Locations$Queuedresources$Get
3133
+ extends StandardParameters {
3134
+ /**
3135
+ * Required. The resource name.
3136
+ */
3137
+ name?: string;
3138
+ }
3139
+ export interface Params$Resource$Projects$Locations$Queuedresources$List
3140
+ extends StandardParameters {
3141
+ /**
3142
+ * Optional. The maximum number of items to return.
3143
+ */
3144
+ pageSize?: number;
3145
+ /**
3146
+ * Optional. The next_page_token value returned from a previous List request, if any.
3147
+ */
3148
+ pageToken?: string;
3149
+ /**
3150
+ * Required. The parent resource name.
3151
+ */
3152
+ parent?: string;
3153
+ }
3154
+ export interface Params$Resource$Projects$Locations$Queuedresources$Reset
3155
+ extends StandardParameters {
3156
+ /**
3157
+ * Required. The name of the queued resource.
3158
+ */
3159
+ name?: string;
3160
+
3161
+ /**
3162
+ * Request body metadata
3163
+ */
3164
+ requestBody?: Schema$ResetQueuedResourceRequest;
3165
+ }
3166
+
2417
3167
  export class Resource$Projects$Locations$Runtimeversions {
2418
3168
  context: APIRequestContext;
2419
3169
  constructor(context: APIRequestContext) {