@googleapis/tpu 1.1.0 → 2.1.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/v2alpha1.ts CHANGED
@@ -124,19 +124,40 @@ export namespace tpu_v2alpha1 {
124
124
  }
125
125
  }
126
126
 
127
+ /**
128
+ * A TPU accelerator configuration.
129
+ */
130
+ export interface Schema$AcceleratorConfig {
131
+ /**
132
+ * Required. Topology of TPU in chips.
133
+ */
134
+ topology?: string | null;
135
+ /**
136
+ * Required. Type of TPU.
137
+ */
138
+ type?: string | null;
139
+ }
127
140
  /**
128
141
  * A accelerator type that a Node can be configured with.
129
142
  */
130
143
  export interface Schema$AcceleratorType {
144
+ /**
145
+ * The accelerator config.
146
+ */
147
+ acceleratorConfigs?: Schema$AcceleratorConfig[];
131
148
  /**
132
149
  * The resource name.
133
150
  */
134
151
  name?: string | null;
135
152
  /**
136
- * the accelerator type.
153
+ * The accelerator type.
137
154
  */
138
155
  type?: string | null;
139
156
  }
157
+ /**
158
+ * Further data for the accepted state.
159
+ */
160
+ export interface Schema$AcceptedData {}
140
161
  /**
141
162
  * An access config attached to the TPU worker.
142
163
  */
@@ -146,6 +167,10 @@ export namespace tpu_v2alpha1 {
146
167
  */
147
168
  externalIp?: string | null;
148
169
  }
170
+ /**
171
+ * Further data for the active state.
172
+ */
173
+ export interface Schema$ActiveData {}
149
174
  /**
150
175
  * A node-attached disk resource. Next ID: 8;
151
176
  */
@@ -159,10 +184,31 @@ export namespace tpu_v2alpha1 {
159
184
  */
160
185
  sourceDisk?: string | null;
161
186
  }
187
+ /**
188
+ * BestEffort tier definition.
189
+ */
190
+ export interface Schema$BestEffort {}
191
+ /**
192
+ * Further data for the creating state.
193
+ */
194
+ export interface Schema$CreatingData {}
195
+ /**
196
+ * Further data for the deleting state.
197
+ */
198
+ export interface Schema$DeletingData {}
162
199
  /**
163
200
  * 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); \}
164
201
  */
165
202
  export interface Schema$Empty {}
203
+ /**
204
+ * Further data for the failed state.
205
+ */
206
+ export interface Schema$FailedData {
207
+ /**
208
+ * The error that caused the queued resource to enter the FAILED state.
209
+ */
210
+ error?: Schema$Status;
211
+ }
166
212
  /**
167
213
  * Request for GenerateServiceIdentity.
168
214
  */
@@ -198,6 +244,19 @@ export namespace tpu_v2alpha1 {
198
244
  */
199
245
  guestAttributes?: Schema$GuestAttributes[];
200
246
  }
247
+ /**
248
+ * Guaranteed tier definition.
249
+ */
250
+ export interface Schema$Guaranteed {
251
+ /**
252
+ * 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.
253
+ */
254
+ minDuration?: string | null;
255
+ /**
256
+ * Optional. Specifies the request should be scheduled on reserved capacity.
257
+ */
258
+ reserved?: boolean | null;
259
+ }
201
260
  /**
202
261
  * A guest attributes.
203
262
  */
@@ -237,6 +296,19 @@ export namespace tpu_v2alpha1 {
237
296
  */
238
297
  items?: Schema$GuestAttributesEntry[];
239
298
  }
299
+ /**
300
+ * 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.
301
+ */
302
+ export interface Schema$Interval {
303
+ /**
304
+ * Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
305
+ */
306
+ endTime?: string | null;
307
+ /**
308
+ * Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
309
+ */
310
+ startTime?: string | null;
311
+ }
240
312
  /**
241
313
  * Response for ListAcceleratorTypes.
242
314
  */
@@ -297,6 +369,23 @@ export namespace tpu_v2alpha1 {
297
369
  */
298
370
  operations?: Schema$Operation[];
299
371
  }
372
+ /**
373
+ * Response for ListQueuedResources.
374
+ */
375
+ export interface Schema$ListQueuedResourcesResponse {
376
+ /**
377
+ * The next page token or empty if none.
378
+ */
379
+ nextPageToken?: string | null;
380
+ /**
381
+ * The listed queued resources.
382
+ */
383
+ queuedResources?: Schema$QueuedResource[];
384
+ /**
385
+ * Locations that could not be reached.
386
+ */
387
+ unreachable?: string[] | null;
388
+ }
300
389
  /**
301
390
  * Response for ListRuntimeVersions.
302
391
  */
@@ -315,7 +404,7 @@ export namespace tpu_v2alpha1 {
315
404
  unreachable?: string[] | null;
316
405
  }
317
406
  /**
318
- * A resource that represents Google Cloud Platform location.
407
+ * A resource that represents a Google Cloud location.
319
408
  */
320
409
  export interface Schema$Location {
321
410
  /**
@@ -339,6 +428,19 @@ export namespace tpu_v2alpha1 {
339
428
  */
340
429
  name?: string | null;
341
430
  }
431
+ /**
432
+ * Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It's an error to specify both node_id and multi_node_params.
433
+ */
434
+ export interface Schema$MultiNodeParams {
435
+ /**
436
+ * 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.
437
+ */
438
+ nodeCount?: number | null;
439
+ /**
440
+ * Prefix of node_ids in case of multi-node 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.
441
+ */
442
+ nodeIdPrefix?: string | null;
443
+ }
342
444
  /**
343
445
  * Network related configurations.
344
446
  */
@@ -381,6 +483,10 @@ export namespace tpu_v2alpha1 {
381
483
  * A TPU instance.
382
484
  */
383
485
  export interface Schema$Node {
486
+ /**
487
+ * The AccleratorConfig for the TPU Node.
488
+ */
489
+ acceleratorConfig?: Schema$AcceleratorConfig;
384
490
  /**
385
491
  * The type of hardware accelerators associated with this node.
386
492
  */
@@ -425,6 +531,10 @@ export namespace tpu_v2alpha1 {
425
531
  * Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
426
532
  */
427
533
  metadata?: {[key: string]: string} | null;
534
+ /**
535
+ * Output only. Whether the Node belongs to a Multislice group.
536
+ */
537
+ multisliceNode?: boolean | null;
428
538
  /**
429
539
  * Output only. Immutable. The name of the TPU.
430
540
  */
@@ -437,6 +547,10 @@ export namespace tpu_v2alpha1 {
437
547
  * Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.
438
548
  */
439
549
  networkEndpoints?: Schema$NetworkEndpoint[];
550
+ /**
551
+ * Output only. The qualified name of the QueuedResource that requested this Node.
552
+ */
553
+ queuedResource?: string | null;
440
554
  /**
441
555
  * Required. The runtime version running in the Node.
442
556
  */
@@ -449,6 +563,10 @@ export namespace tpu_v2alpha1 {
449
563
  * The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used.
450
564
  */
451
565
  serviceAccount?: Schema$ServiceAccount;
566
+ /**
567
+ * Shielded Instance options.
568
+ */
569
+ shieldedInstanceConfig?: Schema$ShieldedInstanceConfig;
452
570
  /**
453
571
  * Output only. The current state for the TPU Node.
454
572
  */
@@ -462,6 +580,27 @@ export namespace tpu_v2alpha1 {
462
580
  */
463
581
  tags?: string[] | null;
464
582
  }
583
+ /**
584
+ * 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.
585
+ */
586
+ export interface Schema$NodeSpec {
587
+ /**
588
+ * Optional. Fields to specify in case of multi-node request.
589
+ */
590
+ multiNodeParams?: Schema$MultiNodeParams;
591
+ /**
592
+ * Required. The node.
593
+ */
594
+ node?: Schema$Node;
595
+ /**
596
+ * 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 multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.
597
+ */
598
+ nodeId?: string | null;
599
+ /**
600
+ * Required. The parent resource name.
601
+ */
602
+ parent?: string | null;
603
+ }
465
604
  /**
466
605
  * This resource represents a long-running operation that is the result of a network API call.
467
606
  */
@@ -483,7 +622,7 @@ export namespace tpu_v2alpha1 {
483
622
  */
484
623
  name?: string | null;
485
624
  /**
486
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
625
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
487
626
  */
488
627
  response?: {[key: string]: any} | null;
489
628
  }
@@ -520,6 +659,121 @@ export namespace tpu_v2alpha1 {
520
659
  */
521
660
  verb?: string | null;
522
661
  }
662
+ /**
663
+ * Further data for the provisioning state.
664
+ */
665
+ export interface Schema$ProvisioningData {}
666
+ /**
667
+ * A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
668
+ */
669
+ export interface Schema$QueuedResource {
670
+ /**
671
+ * The BestEffort tier.
672
+ */
673
+ bestEffort?: Schema$BestEffort;
674
+ /**
675
+ * The Guaranteed tier.
676
+ */
677
+ guaranteed?: Schema$Guaranteed;
678
+ /**
679
+ * Output only. Immutable. The name of the QueuedResource.
680
+ */
681
+ name?: string | null;
682
+ /**
683
+ * The queueing policy of the QueuedRequest.
684
+ */
685
+ queueingPolicy?: Schema$QueueingPolicy;
686
+ /**
687
+ * Name of the reservation in which the resource should be provisioned. Format: projects/{project\}/locations/{zone\}/reservations/{reservation\}
688
+ */
689
+ reservationName?: string | null;
690
+ /**
691
+ * Optional. The Spot tier.
692
+ */
693
+ spot?: Schema$Spot;
694
+ /**
695
+ * Output only. State of the QueuedResource request.
696
+ */
697
+ state?: Schema$QueuedResourceState;
698
+ /**
699
+ * Defines a TPU resource.
700
+ */
701
+ tpu?: Schema$Tpu;
702
+ }
703
+ /**
704
+ * QueuedResourceState defines the details of the QueuedResource request.
705
+ */
706
+ export interface Schema$QueuedResourceState {
707
+ /**
708
+ * Further data for the accepted state.
709
+ */
710
+ acceptedData?: Schema$AcceptedData;
711
+ /**
712
+ * Further data for the active state.
713
+ */
714
+ activeData?: Schema$ActiveData;
715
+ /**
716
+ * Further data for the creating state.
717
+ */
718
+ creatingData?: Schema$CreatingData;
719
+ /**
720
+ * Further data for the deleting state.
721
+ */
722
+ deletingData?: Schema$DeletingData;
723
+ /**
724
+ * Further data for the failed state.
725
+ */
726
+ failedData?: Schema$FailedData;
727
+ /**
728
+ * Further data for the provisioning state.
729
+ */
730
+ provisioningData?: Schema$ProvisioningData;
731
+ /**
732
+ * State of the QueuedResource request.
733
+ */
734
+ state?: string | null;
735
+ /**
736
+ * Output only. The initiator of the QueuedResources's current state.
737
+ */
738
+ stateInitiator?: string | null;
739
+ /**
740
+ * Further data for the suspended state.
741
+ */
742
+ suspendedData?: Schema$SuspendedData;
743
+ /**
744
+ * Further data for the suspending state.
745
+ */
746
+ suspendingData?: Schema$SuspendingData;
747
+ }
748
+ /**
749
+ * Defines the policy of the QueuedRequest.
750
+ */
751
+ export interface Schema$QueueingPolicy {
752
+ /**
753
+ * A relative time after which resources may be created.
754
+ */
755
+ validAfterDuration?: string | null;
756
+ /**
757
+ * An absolute time at which resources may be created.
758
+ */
759
+ validAfterTime?: string | null;
760
+ /**
761
+ * An absolute time interval within which resources may be created.
762
+ */
763
+ validInterval?: Schema$Interval;
764
+ /**
765
+ * A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
766
+ */
767
+ validUntilDuration?: string | null;
768
+ /**
769
+ * An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.
770
+ */
771
+ validUntilTime?: string | null;
772
+ }
773
+ /**
774
+ * Request for ResetQueuedResource.
775
+ */
776
+ export interface Schema$ResetQueuedResourceRequest {}
523
777
  /**
524
778
  * A runtime version that a Node can be configured with.
525
779
  */
@@ -568,6 +822,15 @@ export namespace tpu_v2alpha1 {
568
822
  */
569
823
  email?: string | null;
570
824
  }
825
+ /**
826
+ * A set of Shielded Instance options.
827
+ */
828
+ export interface Schema$ShieldedInstanceConfig {
829
+ /**
830
+ * Defines whether the instance has Secure Boot enabled.
831
+ */
832
+ enableSecureBoot?: boolean | null;
833
+ }
571
834
  /**
572
835
  * Request for SimulateMaintenanceEvent.
573
836
  */
@@ -577,6 +840,10 @@ export namespace tpu_v2alpha1 {
577
840
  */
578
841
  workerIds?: string[] | null;
579
842
  }
843
+ /**
844
+ * Spot tier definition.
845
+ */
846
+ export interface Schema$Spot {}
580
847
  /**
581
848
  * Request for StartNode.
582
849
  */
@@ -602,6 +869,14 @@ export namespace tpu_v2alpha1 {
602
869
  * Request for StopNode.
603
870
  */
604
871
  export interface Schema$StopNodeRequest {}
872
+ /**
873
+ * Further data for the suspended state.
874
+ */
875
+ export interface Schema$SuspendedData {}
876
+ /**
877
+ * Further data for the suspending state.
878
+ */
879
+ export interface Schema$SuspendingData {}
605
880
  /**
606
881
  * A Symptom instance.
607
882
  */
@@ -623,6 +898,15 @@ export namespace tpu_v2alpha1 {
623
898
  */
624
899
  workerId?: string | null;
625
900
  }
901
+ /**
902
+ * Details of the TPU resource(s) being requested.
903
+ */
904
+ export interface Schema$Tpu {
905
+ /**
906
+ * The TPU node(s) being requested.
907
+ */
908
+ nodeSpec?: Schema$NodeSpec[];
909
+ }
626
910
 
627
911
  export class Resource$Projects {
628
912
  context: APIRequestContext;
@@ -638,6 +922,7 @@ export namespace tpu_v2alpha1 {
638
922
  acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
639
923
  nodes: Resource$Projects$Locations$Nodes;
640
924
  operations: Resource$Projects$Locations$Operations;
925
+ queuedResources: Resource$Projects$Locations$Queuedresources;
641
926
  runtimeVersions: Resource$Projects$Locations$Runtimeversions;
642
927
  constructor(context: APIRequestContext) {
643
928
  this.context = context;
@@ -648,6 +933,9 @@ export namespace tpu_v2alpha1 {
648
933
  this.operations = new Resource$Projects$Locations$Operations(
649
934
  this.context
650
935
  );
936
+ this.queuedResources = new Resource$Projects$Locations$Queuedresources(
937
+ this.context
938
+ );
651
939
  this.runtimeVersions = new Resource$Projects$Locations$Runtimeversions(
652
940
  this.context
653
941
  );
@@ -655,54 +943,6 @@ export namespace tpu_v2alpha1 {
655
943
 
656
944
  /**
657
945
  * Generates the Cloud TPU service identity for the project.
658
- * @example
659
- * ```js
660
- * // Before running the sample:
661
- * // - Enable the API at:
662
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
663
- * // - Login into gcloud by running:
664
- * // `$ gcloud auth application-default login`
665
- * // - Install the npm module by running:
666
- * // `$ npm install googleapis`
667
- *
668
- * const {google} = require('googleapis');
669
- * const tpu = google.tpu('v2alpha1');
670
- *
671
- * async function main() {
672
- * const auth = new google.auth.GoogleAuth({
673
- * // Scopes can be specified either as an array or as a single, space-delimited string.
674
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
675
- * });
676
- *
677
- * // Acquire an auth client, and bind it to all future calls
678
- * const authClient = await auth.getClient();
679
- * google.options({auth: authClient});
680
- *
681
- * // Do the magic
682
- * const res = await tpu.projects.locations.generateServiceIdentity({
683
- * // Required. The parent resource name.
684
- * parent: 'projects/my-project/locations/my-location',
685
- *
686
- * // Request body metadata
687
- * requestBody: {
688
- * // request body parameters
689
- * // {}
690
- * },
691
- * });
692
- * console.log(res.data);
693
- *
694
- * // Example response
695
- * // {
696
- * // "identity": {}
697
- * // }
698
- * }
699
- *
700
- * main().catch(e => {
701
- * console.error(e);
702
- * throw e;
703
- * });
704
- *
705
- * ```
706
946
  *
707
947
  * @param params - Parameters for request
708
948
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -799,52 +1039,6 @@ export namespace tpu_v2alpha1 {
799
1039
 
800
1040
  /**
801
1041
  * Gets information about a location.
802
- * @example
803
- * ```js
804
- * // Before running the sample:
805
- * // - Enable the API at:
806
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
807
- * // - Login into gcloud by running:
808
- * // `$ gcloud auth application-default login`
809
- * // - Install the npm module by running:
810
- * // `$ npm install googleapis`
811
- *
812
- * const {google} = require('googleapis');
813
- * const tpu = google.tpu('v2alpha1');
814
- *
815
- * async function main() {
816
- * const auth = new google.auth.GoogleAuth({
817
- * // Scopes can be specified either as an array or as a single, space-delimited string.
818
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
819
- * });
820
- *
821
- * // Acquire an auth client, and bind it to all future calls
822
- * const authClient = await auth.getClient();
823
- * google.options({auth: authClient});
824
- *
825
- * // Do the magic
826
- * const res = await tpu.projects.locations.get({
827
- * // Resource name for the location.
828
- * name: 'projects/my-project/locations/my-location',
829
- * });
830
- * console.log(res.data);
831
- *
832
- * // Example response
833
- * // {
834
- * // "displayName": "my_displayName",
835
- * // "labels": {},
836
- * // "locationId": "my_locationId",
837
- * // "metadata": {},
838
- * // "name": "my_name"
839
- * // }
840
- * }
841
- *
842
- * main().catch(e => {
843
- * console.error(e);
844
- * throw e;
845
- * });
846
- *
847
- * ```
848
1042
  *
849
1043
  * @param params - Parameters for request
850
1044
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -929,55 +1123,6 @@ export namespace tpu_v2alpha1 {
929
1123
 
930
1124
  /**
931
1125
  * Lists information about the supported locations for this service.
932
- * @example
933
- * ```js
934
- * // Before running the sample:
935
- * // - Enable the API at:
936
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
937
- * // - Login into gcloud by running:
938
- * // `$ gcloud auth application-default login`
939
- * // - Install the npm module by running:
940
- * // `$ npm install googleapis`
941
- *
942
- * const {google} = require('googleapis');
943
- * const tpu = google.tpu('v2alpha1');
944
- *
945
- * async function main() {
946
- * const auth = new google.auth.GoogleAuth({
947
- * // Scopes can be specified either as an array or as a single, space-delimited string.
948
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
949
- * });
950
- *
951
- * // Acquire an auth client, and bind it to all future calls
952
- * const authClient = await auth.getClient();
953
- * google.options({auth: authClient});
954
- *
955
- * // Do the magic
956
- * const res = await tpu.projects.locations.list({
957
- * // A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
958
- * filter: 'placeholder-value',
959
- * // The resource that owns the locations collection, if applicable.
960
- * name: 'projects/my-project',
961
- * // The maximum number of results to return. If not set, the service selects a default.
962
- * pageSize: 'placeholder-value',
963
- * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
964
- * pageToken: 'placeholder-value',
965
- * });
966
- * console.log(res.data);
967
- *
968
- * // Example response
969
- * // {
970
- * // "locations": [],
971
- * // "nextPageToken": "my_nextPageToken"
972
- * // }
973
- * }
974
- *
975
- * main().catch(e => {
976
- * console.error(e);
977
- * throw e;
978
- * });
979
- *
980
- * ```
981
1126
  *
982
1127
  * @param params - Parameters for request
983
1128
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1116,49 +1261,6 @@ export namespace tpu_v2alpha1 {
1116
1261
 
1117
1262
  /**
1118
1263
  * Gets AcceleratorType.
1119
- * @example
1120
- * ```js
1121
- * // Before running the sample:
1122
- * // - Enable the API at:
1123
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1124
- * // - Login into gcloud by running:
1125
- * // `$ gcloud auth application-default login`
1126
- * // - Install the npm module by running:
1127
- * // `$ npm install googleapis`
1128
- *
1129
- * const {google} = require('googleapis');
1130
- * const tpu = google.tpu('v2alpha1');
1131
- *
1132
- * async function main() {
1133
- * const auth = new google.auth.GoogleAuth({
1134
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1135
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1136
- * });
1137
- *
1138
- * // Acquire an auth client, and bind it to all future calls
1139
- * const authClient = await auth.getClient();
1140
- * google.options({auth: authClient});
1141
- *
1142
- * // Do the magic
1143
- * const res = await tpu.projects.locations.acceleratorTypes.get({
1144
- * // Required. The resource name.
1145
- * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
1146
- * });
1147
- * console.log(res.data);
1148
- *
1149
- * // Example response
1150
- * // {
1151
- * // "name": "my_name",
1152
- * // "type": "my_type"
1153
- * // }
1154
- * }
1155
- *
1156
- * main().catch(e => {
1157
- * console.error(e);
1158
- * throw e;
1159
- * });
1160
- *
1161
- * ```
1162
1264
  *
1163
1265
  * @param params - Parameters for request
1164
1266
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1243,58 +1345,6 @@ export namespace tpu_v2alpha1 {
1243
1345
 
1244
1346
  /**
1245
1347
  * Lists accelerator types supported by this API.
1246
- * @example
1247
- * ```js
1248
- * // Before running the sample:
1249
- * // - Enable the API at:
1250
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1251
- * // - Login into gcloud by running:
1252
- * // `$ gcloud auth application-default login`
1253
- * // - Install the npm module by running:
1254
- * // `$ npm install googleapis`
1255
- *
1256
- * const {google} = require('googleapis');
1257
- * const tpu = google.tpu('v2alpha1');
1258
- *
1259
- * async function main() {
1260
- * const auth = new google.auth.GoogleAuth({
1261
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1262
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1263
- * });
1264
- *
1265
- * // Acquire an auth client, and bind it to all future calls
1266
- * const authClient = await auth.getClient();
1267
- * google.options({auth: authClient});
1268
- *
1269
- * // Do the magic
1270
- * const res = await tpu.projects.locations.acceleratorTypes.list({
1271
- * // List filter.
1272
- * filter: 'placeholder-value',
1273
- * // Sort results.
1274
- * orderBy: 'placeholder-value',
1275
- * // The maximum number of items to return.
1276
- * pageSize: 'placeholder-value',
1277
- * // The next_page_token value returned from a previous List request, if any.
1278
- * pageToken: 'placeholder-value',
1279
- * // Required. The parent resource name.
1280
- * parent: 'projects/my-project/locations/my-location',
1281
- * });
1282
- * console.log(res.data);
1283
- *
1284
- * // Example response
1285
- * // {
1286
- * // "acceleratorTypes": [],
1287
- * // "nextPageToken": "my_nextPageToken",
1288
- * // "unreachable": []
1289
- * // }
1290
- * }
1291
- *
1292
- * main().catch(e => {
1293
- * console.error(e);
1294
- * throw e;
1295
- * });
1296
- *
1297
- * ```
1298
1348
  *
1299
1349
  * @param params - Parameters for request
1300
1350
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1429,83 +1479,6 @@ export namespace tpu_v2alpha1 {
1429
1479
 
1430
1480
  /**
1431
1481
  * Creates a node.
1432
- * @example
1433
- * ```js
1434
- * // Before running the sample:
1435
- * // - Enable the API at:
1436
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1437
- * // - Login into gcloud by running:
1438
- * // `$ gcloud auth application-default login`
1439
- * // - Install the npm module by running:
1440
- * // `$ npm install googleapis`
1441
- *
1442
- * const {google} = require('googleapis');
1443
- * const tpu = google.tpu('v2alpha1');
1444
- *
1445
- * async function main() {
1446
- * const auth = new google.auth.GoogleAuth({
1447
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1448
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1449
- * });
1450
- *
1451
- * // Acquire an auth client, and bind it to all future calls
1452
- * const authClient = await auth.getClient();
1453
- * google.options({auth: authClient});
1454
- *
1455
- * // Do the magic
1456
- * const res = await tpu.projects.locations.nodes.create({
1457
- * // The unqualified resource name.
1458
- * nodeId: 'placeholder-value',
1459
- * // Required. The parent resource name.
1460
- * parent: 'projects/my-project/locations/my-location',
1461
- * // Idempotent request UUID.
1462
- * requestId: 'placeholder-value',
1463
- *
1464
- * // Request body metadata
1465
- * requestBody: {
1466
- * // request body parameters
1467
- * // {
1468
- * // "acceleratorType": "my_acceleratorType",
1469
- * // "apiVersion": "my_apiVersion",
1470
- * // "cidrBlock": "my_cidrBlock",
1471
- * // "createTime": "my_createTime",
1472
- * // "dataDisks": [],
1473
- * // "description": "my_description",
1474
- * // "health": "my_health",
1475
- * // "healthDescription": "my_healthDescription",
1476
- * // "id": "my_id",
1477
- * // "labels": {},
1478
- * // "metadata": {},
1479
- * // "name": "my_name",
1480
- * // "networkConfig": {},
1481
- * // "networkEndpoints": [],
1482
- * // "runtimeVersion": "my_runtimeVersion",
1483
- * // "schedulingConfig": {},
1484
- * // "serviceAccount": {},
1485
- * // "state": "my_state",
1486
- * // "symptoms": [],
1487
- * // "tags": []
1488
- * // }
1489
- * },
1490
- * });
1491
- * console.log(res.data);
1492
- *
1493
- * // Example response
1494
- * // {
1495
- * // "done": false,
1496
- * // "error": {},
1497
- * // "metadata": {},
1498
- * // "name": "my_name",
1499
- * // "response": {}
1500
- * // }
1501
- * }
1502
- *
1503
- * main().catch(e => {
1504
- * console.error(e);
1505
- * throw e;
1506
- * });
1507
- *
1508
- * ```
1509
1482
  *
1510
1483
  * @param params - Parameters for request
1511
1484
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1593,54 +1566,6 @@ export namespace tpu_v2alpha1 {
1593
1566
 
1594
1567
  /**
1595
1568
  * Deletes a node.
1596
- * @example
1597
- * ```js
1598
- * // Before running the sample:
1599
- * // - Enable the API at:
1600
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1601
- * // - Login into gcloud by running:
1602
- * // `$ gcloud auth application-default login`
1603
- * // - Install the npm module by running:
1604
- * // `$ npm install googleapis`
1605
- *
1606
- * const {google} = require('googleapis');
1607
- * const tpu = google.tpu('v2alpha1');
1608
- *
1609
- * async function main() {
1610
- * const auth = new google.auth.GoogleAuth({
1611
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1612
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1613
- * });
1614
- *
1615
- * // Acquire an auth client, and bind it to all future calls
1616
- * const authClient = await auth.getClient();
1617
- * google.options({auth: authClient});
1618
- *
1619
- * // Do the magic
1620
- * const res = await tpu.projects.locations.nodes.delete({
1621
- * // Required. The resource name.
1622
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1623
- * // Idempotent request UUID.
1624
- * requestId: 'placeholder-value',
1625
- * });
1626
- * console.log(res.data);
1627
- *
1628
- * // Example response
1629
- * // {
1630
- * // "done": false,
1631
- * // "error": {},
1632
- * // "metadata": {},
1633
- * // "name": "my_name",
1634
- * // "response": {}
1635
- * // }
1636
- * }
1637
- *
1638
- * main().catch(e => {
1639
- * console.error(e);
1640
- * throw e;
1641
- * });
1642
- *
1643
- * ```
1644
1569
  *
1645
1570
  * @param params - Parameters for request
1646
1571
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1725,67 +1650,6 @@ export namespace tpu_v2alpha1 {
1725
1650
 
1726
1651
  /**
1727
1652
  * Gets the details of a node.
1728
- * @example
1729
- * ```js
1730
- * // Before running the sample:
1731
- * // - Enable the API at:
1732
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1733
- * // - Login into gcloud by running:
1734
- * // `$ gcloud auth application-default login`
1735
- * // - Install the npm module by running:
1736
- * // `$ npm install googleapis`
1737
- *
1738
- * const {google} = require('googleapis');
1739
- * const tpu = google.tpu('v2alpha1');
1740
- *
1741
- * async function main() {
1742
- * const auth = new google.auth.GoogleAuth({
1743
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1744
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1745
- * });
1746
- *
1747
- * // Acquire an auth client, and bind it to all future calls
1748
- * const authClient = await auth.getClient();
1749
- * google.options({auth: authClient});
1750
- *
1751
- * // Do the magic
1752
- * const res = await tpu.projects.locations.nodes.get({
1753
- * // Required. The resource name.
1754
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1755
- * });
1756
- * console.log(res.data);
1757
- *
1758
- * // Example response
1759
- * // {
1760
- * // "acceleratorType": "my_acceleratorType",
1761
- * // "apiVersion": "my_apiVersion",
1762
- * // "cidrBlock": "my_cidrBlock",
1763
- * // "createTime": "my_createTime",
1764
- * // "dataDisks": [],
1765
- * // "description": "my_description",
1766
- * // "health": "my_health",
1767
- * // "healthDescription": "my_healthDescription",
1768
- * // "id": "my_id",
1769
- * // "labels": {},
1770
- * // "metadata": {},
1771
- * // "name": "my_name",
1772
- * // "networkConfig": {},
1773
- * // "networkEndpoints": [],
1774
- * // "runtimeVersion": "my_runtimeVersion",
1775
- * // "schedulingConfig": {},
1776
- * // "serviceAccount": {},
1777
- * // "state": "my_state",
1778
- * // "symptoms": [],
1779
- * // "tags": []
1780
- * // }
1781
- * }
1782
- *
1783
- * main().catch(e => {
1784
- * console.error(e);
1785
- * throw e;
1786
- * });
1787
- *
1788
- * ```
1789
1653
  *
1790
1654
  * @param params - Parameters for request
1791
1655
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1870,57 +1734,6 @@ export namespace tpu_v2alpha1 {
1870
1734
 
1871
1735
  /**
1872
1736
  * Retrieves the guest attributes for the node.
1873
- * @example
1874
- * ```js
1875
- * // Before running the sample:
1876
- * // - Enable the API at:
1877
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1878
- * // - Login into gcloud by running:
1879
- * // `$ gcloud auth application-default login`
1880
- * // - Install the npm module by running:
1881
- * // `$ npm install googleapis`
1882
- *
1883
- * const {google} = require('googleapis');
1884
- * const tpu = google.tpu('v2alpha1');
1885
- *
1886
- * async function main() {
1887
- * const auth = new google.auth.GoogleAuth({
1888
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1889
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1890
- * });
1891
- *
1892
- * // Acquire an auth client, and bind it to all future calls
1893
- * const authClient = await auth.getClient();
1894
- * google.options({auth: authClient});
1895
- *
1896
- * // Do the magic
1897
- * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1898
- * // Required. The resource name.
1899
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1900
- *
1901
- * // Request body metadata
1902
- * requestBody: {
1903
- * // request body parameters
1904
- * // {
1905
- * // "queryPath": "my_queryPath",
1906
- * // "workerIds": []
1907
- * // }
1908
- * },
1909
- * });
1910
- * console.log(res.data);
1911
- *
1912
- * // Example response
1913
- * // {
1914
- * // "guestAttributes": []
1915
- * // }
1916
- * }
1917
- *
1918
- * main().catch(e => {
1919
- * console.error(e);
1920
- * throw e;
1921
- * });
1922
- *
1923
- * ```
1924
1737
  *
1925
1738
  * @param params - Parameters for request
1926
1739
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2016,54 +1829,6 @@ export namespace tpu_v2alpha1 {
2016
1829
 
2017
1830
  /**
2018
1831
  * Lists nodes.
2019
- * @example
2020
- * ```js
2021
- * // Before running the sample:
2022
- * // - Enable the API at:
2023
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2024
- * // - Login into gcloud by running:
2025
- * // `$ gcloud auth application-default login`
2026
- * // - Install the npm module by running:
2027
- * // `$ npm install googleapis`
2028
- *
2029
- * const {google} = require('googleapis');
2030
- * const tpu = google.tpu('v2alpha1');
2031
- *
2032
- * async function main() {
2033
- * const auth = new google.auth.GoogleAuth({
2034
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2035
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2036
- * });
2037
- *
2038
- * // Acquire an auth client, and bind it to all future calls
2039
- * const authClient = await auth.getClient();
2040
- * google.options({auth: authClient});
2041
- *
2042
- * // Do the magic
2043
- * const res = await tpu.projects.locations.nodes.list({
2044
- * // The maximum number of items to return.
2045
- * pageSize: 'placeholder-value',
2046
- * // The next_page_token value returned from a previous List request, if any.
2047
- * pageToken: 'placeholder-value',
2048
- * // Required. The parent resource name.
2049
- * parent: 'projects/my-project/locations/my-location',
2050
- * });
2051
- * console.log(res.data);
2052
- *
2053
- * // Example response
2054
- * // {
2055
- * // "nextPageToken": "my_nextPageToken",
2056
- * // "nodes": [],
2057
- * // "unreachable": []
2058
- * // }
2059
- * }
2060
- *
2061
- * main().catch(e => {
2062
- * console.error(e);
2063
- * throw e;
2064
- * });
2065
- *
2066
- * ```
2067
1832
  *
2068
1833
  * @param params - Parameters for request
2069
1834
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2154,81 +1919,6 @@ export namespace tpu_v2alpha1 {
2154
1919
 
2155
1920
  /**
2156
1921
  * Updates the configurations of a node.
2157
- * @example
2158
- * ```js
2159
- * // Before running the sample:
2160
- * // - Enable the API at:
2161
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2162
- * // - Login into gcloud by running:
2163
- * // `$ gcloud auth application-default login`
2164
- * // - Install the npm module by running:
2165
- * // `$ npm install googleapis`
2166
- *
2167
- * const {google} = require('googleapis');
2168
- * const tpu = google.tpu('v2alpha1');
2169
- *
2170
- * async function main() {
2171
- * const auth = new google.auth.GoogleAuth({
2172
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2173
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2174
- * });
2175
- *
2176
- * // Acquire an auth client, and bind it to all future calls
2177
- * const authClient = await auth.getClient();
2178
- * google.options({auth: authClient});
2179
- *
2180
- * // Do the magic
2181
- * const res = await tpu.projects.locations.nodes.patch({
2182
- * // Output only. Immutable. The name of the TPU.
2183
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2184
- * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
2185
- * updateMask: 'placeholder-value',
2186
- *
2187
- * // Request body metadata
2188
- * requestBody: {
2189
- * // request body parameters
2190
- * // {
2191
- * // "acceleratorType": "my_acceleratorType",
2192
- * // "apiVersion": "my_apiVersion",
2193
- * // "cidrBlock": "my_cidrBlock",
2194
- * // "createTime": "my_createTime",
2195
- * // "dataDisks": [],
2196
- * // "description": "my_description",
2197
- * // "health": "my_health",
2198
- * // "healthDescription": "my_healthDescription",
2199
- * // "id": "my_id",
2200
- * // "labels": {},
2201
- * // "metadata": {},
2202
- * // "name": "my_name",
2203
- * // "networkConfig": {},
2204
- * // "networkEndpoints": [],
2205
- * // "runtimeVersion": "my_runtimeVersion",
2206
- * // "schedulingConfig": {},
2207
- * // "serviceAccount": {},
2208
- * // "state": "my_state",
2209
- * // "symptoms": [],
2210
- * // "tags": []
2211
- * // }
2212
- * },
2213
- * });
2214
- * console.log(res.data);
2215
- *
2216
- * // Example response
2217
- * // {
2218
- * // "done": false,
2219
- * // "error": {},
2220
- * // "metadata": {},
2221
- * // "name": "my_name",
2222
- * // "response": {}
2223
- * // }
2224
- * }
2225
- *
2226
- * main().catch(e => {
2227
- * console.error(e);
2228
- * throw e;
2229
- * });
2230
- *
2231
- * ```
2232
1922
  *
2233
1923
  * @param params - Parameters for request
2234
1924
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2313,60 +2003,6 @@ export namespace tpu_v2alpha1 {
2313
2003
 
2314
2004
  /**
2315
2005
  * Simulates a maintenance event.
2316
- * @example
2317
- * ```js
2318
- * // Before running the sample:
2319
- * // - Enable the API at:
2320
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2321
- * // - Login into gcloud by running:
2322
- * // `$ gcloud auth application-default login`
2323
- * // - Install the npm module by running:
2324
- * // `$ npm install googleapis`
2325
- *
2326
- * const {google} = require('googleapis');
2327
- * const tpu = google.tpu('v2alpha1');
2328
- *
2329
- * async function main() {
2330
- * const auth = new google.auth.GoogleAuth({
2331
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2332
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2333
- * });
2334
- *
2335
- * // Acquire an auth client, and bind it to all future calls
2336
- * const authClient = await auth.getClient();
2337
- * google.options({auth: authClient});
2338
- *
2339
- * // Do the magic
2340
- * const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
2341
- * // Required. The resource name.
2342
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2343
- *
2344
- * // Request body metadata
2345
- * requestBody: {
2346
- * // request body parameters
2347
- * // {
2348
- * // "workerIds": []
2349
- * // }
2350
- * },
2351
- * });
2352
- * console.log(res.data);
2353
- *
2354
- * // Example response
2355
- * // {
2356
- * // "done": false,
2357
- * // "error": {},
2358
- * // "metadata": {},
2359
- * // "name": "my_name",
2360
- * // "response": {}
2361
- * // }
2362
- * }
2363
- *
2364
- * main().catch(e => {
2365
- * console.error(e);
2366
- * throw e;
2367
- * });
2368
- *
2369
- * ```
2370
2006
  *
2371
2007
  * @param params - Parameters for request
2372
2008
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2456,58 +2092,6 @@ export namespace tpu_v2alpha1 {
2456
2092
 
2457
2093
  /**
2458
2094
  * Starts a node.
2459
- * @example
2460
- * ```js
2461
- * // Before running the sample:
2462
- * // - Enable the API at:
2463
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2464
- * // - Login into gcloud by running:
2465
- * // `$ gcloud auth application-default login`
2466
- * // - Install the npm module by running:
2467
- * // `$ npm install googleapis`
2468
- *
2469
- * const {google} = require('googleapis');
2470
- * const tpu = google.tpu('v2alpha1');
2471
- *
2472
- * async function main() {
2473
- * const auth = new google.auth.GoogleAuth({
2474
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2475
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2476
- * });
2477
- *
2478
- * // Acquire an auth client, and bind it to all future calls
2479
- * const authClient = await auth.getClient();
2480
- * google.options({auth: authClient});
2481
- *
2482
- * // Do the magic
2483
- * const res = await tpu.projects.locations.nodes.start({
2484
- * // The resource name.
2485
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2486
- *
2487
- * // Request body metadata
2488
- * requestBody: {
2489
- * // request body parameters
2490
- * // {}
2491
- * },
2492
- * });
2493
- * console.log(res.data);
2494
- *
2495
- * // Example response
2496
- * // {
2497
- * // "done": false,
2498
- * // "error": {},
2499
- * // "metadata": {},
2500
- * // "name": "my_name",
2501
- * // "response": {}
2502
- * // }
2503
- * }
2504
- *
2505
- * main().catch(e => {
2506
- * console.error(e);
2507
- * throw e;
2508
- * });
2509
- *
2510
- * ```
2511
2095
  *
2512
2096
  * @param params - Parameters for request
2513
2097
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2595,58 +2179,6 @@ export namespace tpu_v2alpha1 {
2595
2179
 
2596
2180
  /**
2597
2181
  * Stops a node. This operation is only available with single TPU nodes.
2598
- * @example
2599
- * ```js
2600
- * // Before running the sample:
2601
- * // - Enable the API at:
2602
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2603
- * // - Login into gcloud by running:
2604
- * // `$ gcloud auth application-default login`
2605
- * // - Install the npm module by running:
2606
- * // `$ npm install googleapis`
2607
- *
2608
- * const {google} = require('googleapis');
2609
- * const tpu = google.tpu('v2alpha1');
2610
- *
2611
- * async function main() {
2612
- * const auth = new google.auth.GoogleAuth({
2613
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2614
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2615
- * });
2616
- *
2617
- * // Acquire an auth client, and bind it to all future calls
2618
- * const authClient = await auth.getClient();
2619
- * google.options({auth: authClient});
2620
- *
2621
- * // Do the magic
2622
- * const res = await tpu.projects.locations.nodes.stop({
2623
- * // The resource name.
2624
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2625
- *
2626
- * // Request body metadata
2627
- * requestBody: {
2628
- * // request body parameters
2629
- * // {}
2630
- * },
2631
- * });
2632
- * console.log(res.data);
2633
- *
2634
- * // Example response
2635
- * // {
2636
- * // "done": false,
2637
- * // "error": {},
2638
- * // "metadata": {},
2639
- * // "name": "my_name",
2640
- * // "response": {}
2641
- * // }
2642
- * }
2643
- *
2644
- * main().catch(e => {
2645
- * console.error(e);
2646
- * throw e;
2647
- * });
2648
- *
2649
- * ```
2650
2182
  *
2651
2183
  * @param params - Parameters for request
2652
2184
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2829,7 +2361,7 @@ export namespace tpu_v2alpha1 {
2829
2361
  export interface Params$Resource$Projects$Locations$Nodes$Start
2830
2362
  extends StandardParameters {
2831
2363
  /**
2832
- * The resource name.
2364
+ * Required. The resource name.
2833
2365
  */
2834
2366
  name?: string;
2835
2367
 
@@ -2841,7 +2373,7 @@ export namespace tpu_v2alpha1 {
2841
2373
  export interface Params$Resource$Projects$Locations$Nodes$Stop
2842
2374
  extends StandardParameters {
2843
2375
  /**
2844
- * The resource name.
2376
+ * Required. The resource name.
2845
2377
  */
2846
2378
  name?: string;
2847
2379
 
@@ -2859,46 +2391,6 @@ export namespace tpu_v2alpha1 {
2859
2391
 
2860
2392
  /**
2861
2393
  * 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`.
2862
- * @example
2863
- * ```js
2864
- * // Before running the sample:
2865
- * // - Enable the API at:
2866
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2867
- * // - Login into gcloud by running:
2868
- * // `$ gcloud auth application-default login`
2869
- * // - Install the npm module by running:
2870
- * // `$ npm install googleapis`
2871
- *
2872
- * const {google} = require('googleapis');
2873
- * const tpu = google.tpu('v2alpha1');
2874
- *
2875
- * async function main() {
2876
- * const auth = new google.auth.GoogleAuth({
2877
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2878
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2879
- * });
2880
- *
2881
- * // Acquire an auth client, and bind it to all future calls
2882
- * const authClient = await auth.getClient();
2883
- * google.options({auth: authClient});
2884
- *
2885
- * // Do the magic
2886
- * const res = await tpu.projects.locations.operations.cancel({
2887
- * // The name of the operation resource to be cancelled.
2888
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
2889
- * });
2890
- * console.log(res.data);
2891
- *
2892
- * // Example response
2893
- * // {}
2894
- * }
2895
- *
2896
- * main().catch(e => {
2897
- * console.error(e);
2898
- * throw e;
2899
- * });
2900
- *
2901
- * ```
2902
2394
  *
2903
2395
  * @param params - Parameters for request
2904
2396
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2986,46 +2478,6 @@ export namespace tpu_v2alpha1 {
2986
2478
 
2987
2479
  /**
2988
2480
  * 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`.
2989
- * @example
2990
- * ```js
2991
- * // Before running the sample:
2992
- * // - Enable the API at:
2993
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2994
- * // - Login into gcloud by running:
2995
- * // `$ gcloud auth application-default login`
2996
- * // - Install the npm module by running:
2997
- * // `$ npm install googleapis`
2998
- *
2999
- * const {google} = require('googleapis');
3000
- * const tpu = google.tpu('v2alpha1');
3001
- *
3002
- * async function main() {
3003
- * const auth = new google.auth.GoogleAuth({
3004
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3005
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3006
- * });
3007
- *
3008
- * // Acquire an auth client, and bind it to all future calls
3009
- * const authClient = await auth.getClient();
3010
- * google.options({auth: authClient});
3011
- *
3012
- * // Do the magic
3013
- * const res = await tpu.projects.locations.operations.delete({
3014
- * // The name of the operation resource to be deleted.
3015
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
3016
- * });
3017
- * console.log(res.data);
3018
- *
3019
- * // Example response
3020
- * // {}
3021
- * }
3022
- *
3023
- * main().catch(e => {
3024
- * console.error(e);
3025
- * throw e;
3026
- * });
3027
- *
3028
- * ```
3029
2481
  *
3030
2482
  * @param params - Parameters for request
3031
2483
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3110,52 +2562,6 @@ export namespace tpu_v2alpha1 {
3110
2562
 
3111
2563
  /**
3112
2564
  * 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.
3113
- * @example
3114
- * ```js
3115
- * // Before running the sample:
3116
- * // - Enable the API at:
3117
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3118
- * // - Login into gcloud by running:
3119
- * // `$ gcloud auth application-default login`
3120
- * // - Install the npm module by running:
3121
- * // `$ npm install googleapis`
3122
- *
3123
- * const {google} = require('googleapis');
3124
- * const tpu = google.tpu('v2alpha1');
3125
- *
3126
- * async function main() {
3127
- * const auth = new google.auth.GoogleAuth({
3128
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3129
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3130
- * });
3131
- *
3132
- * // Acquire an auth client, and bind it to all future calls
3133
- * const authClient = await auth.getClient();
3134
- * google.options({auth: authClient});
3135
- *
3136
- * // Do the magic
3137
- * const res = await tpu.projects.locations.operations.get({
3138
- * // The name of the operation resource.
3139
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
3140
- * });
3141
- * console.log(res.data);
3142
- *
3143
- * // Example response
3144
- * // {
3145
- * // "done": false,
3146
- * // "error": {},
3147
- * // "metadata": {},
3148
- * // "name": "my_name",
3149
- * // "response": {}
3150
- * // }
3151
- * }
3152
- *
3153
- * main().catch(e => {
3154
- * console.error(e);
3155
- * throw e;
3156
- * });
3157
- *
3158
- * ```
3159
2565
  *
3160
2566
  * @param params - Parameters for request
3161
2567
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3239,56 +2645,7 @@ export namespace tpu_v2alpha1 {
3239
2645
  }
3240
2646
 
3241
2647
  /**
3242
- * 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 override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
3243
- * @example
3244
- * ```js
3245
- * // Before running the sample:
3246
- * // - Enable the API at:
3247
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3248
- * // - Login into gcloud by running:
3249
- * // `$ gcloud auth application-default login`
3250
- * // - Install the npm module by running:
3251
- * // `$ npm install googleapis`
3252
- *
3253
- * const {google} = require('googleapis');
3254
- * const tpu = google.tpu('v2alpha1');
3255
- *
3256
- * async function main() {
3257
- * const auth = new google.auth.GoogleAuth({
3258
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3259
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3260
- * });
3261
- *
3262
- * // Acquire an auth client, and bind it to all future calls
3263
- * const authClient = await auth.getClient();
3264
- * google.options({auth: authClient});
3265
- *
3266
- * // Do the magic
3267
- * const res = await tpu.projects.locations.operations.list({
3268
- * // The standard list filter.
3269
- * filter: 'placeholder-value',
3270
- * // The name of the operation's parent resource.
3271
- * name: 'projects/my-project/locations/my-location',
3272
- * // The standard list page size.
3273
- * pageSize: 'placeholder-value',
3274
- * // The standard list page token.
3275
- * pageToken: 'placeholder-value',
3276
- * });
3277
- * console.log(res.data);
3278
- *
3279
- * // Example response
3280
- * // {
3281
- * // "nextPageToken": "my_nextPageToken",
3282
- * // "operations": []
3283
- * // }
3284
- * }
3285
- *
3286
- * main().catch(e => {
3287
- * console.error(e);
3288
- * throw e;
3289
- * });
3290
- *
3291
- * ```
2648
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
3292
2649
  *
3293
2650
  * @param params - Parameters for request
3294
2651
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3421,57 +2778,529 @@ export namespace tpu_v2alpha1 {
3421
2778
  pageToken?: string;
3422
2779
  }
3423
2780
 
3424
- export class Resource$Projects$Locations$Runtimeversions {
2781
+ export class Resource$Projects$Locations$Queuedresources {
3425
2782
  context: APIRequestContext;
3426
2783
  constructor(context: APIRequestContext) {
3427
2784
  this.context = context;
3428
2785
  }
3429
2786
 
3430
2787
  /**
3431
- * Gets a runtime version.
3432
- * @example
3433
- * ```js
3434
- * // Before running the sample:
3435
- * // - Enable the API at:
3436
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3437
- * // - Login into gcloud by running:
3438
- * // `$ gcloud auth application-default login`
3439
- * // - Install the npm module by running:
3440
- * // `$ npm install googleapis`
3441
- *
3442
- * const {google} = require('googleapis');
3443
- * const tpu = google.tpu('v2alpha1');
2788
+ * Creates a QueuedResource TPU instance.
3444
2789
  *
3445
- * async function main() {
3446
- * const auth = new google.auth.GoogleAuth({
3447
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3448
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3449
- * });
3450
- *
3451
- * // Acquire an auth client, and bind it to all future calls
3452
- * const authClient = await auth.getClient();
3453
- * google.options({auth: authClient});
2790
+ * @param params - Parameters for request
2791
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2792
+ * @param callback - Optional callback that handles the response.
2793
+ * @returns A promise if used with async/await, or void if used with a callback.
2794
+ */
2795
+ create(
2796
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2797
+ options: StreamMethodOptions
2798
+ ): GaxiosPromise<Readable>;
2799
+ create(
2800
+ params?: Params$Resource$Projects$Locations$Queuedresources$Create,
2801
+ options?: MethodOptions
2802
+ ): GaxiosPromise<Schema$Operation>;
2803
+ create(
2804
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2805
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2806
+ callback: BodyResponseCallback<Readable>
2807
+ ): void;
2808
+ create(
2809
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2810
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2811
+ callback: BodyResponseCallback<Schema$Operation>
2812
+ ): void;
2813
+ create(
2814
+ params: Params$Resource$Projects$Locations$Queuedresources$Create,
2815
+ callback: BodyResponseCallback<Schema$Operation>
2816
+ ): void;
2817
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
2818
+ create(
2819
+ paramsOrCallback?:
2820
+ | Params$Resource$Projects$Locations$Queuedresources$Create
2821
+ | BodyResponseCallback<Schema$Operation>
2822
+ | BodyResponseCallback<Readable>,
2823
+ optionsOrCallback?:
2824
+ | MethodOptions
2825
+ | StreamMethodOptions
2826
+ | BodyResponseCallback<Schema$Operation>
2827
+ | BodyResponseCallback<Readable>,
2828
+ callback?:
2829
+ | BodyResponseCallback<Schema$Operation>
2830
+ | BodyResponseCallback<Readable>
2831
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2832
+ let params = (paramsOrCallback ||
2833
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Create;
2834
+ let options = (optionsOrCallback || {}) as MethodOptions;
2835
+
2836
+ if (typeof paramsOrCallback === 'function') {
2837
+ callback = paramsOrCallback;
2838
+ params =
2839
+ {} as Params$Resource$Projects$Locations$Queuedresources$Create;
2840
+ options = {};
2841
+ }
2842
+
2843
+ if (typeof optionsOrCallback === 'function') {
2844
+ callback = optionsOrCallback;
2845
+ options = {};
2846
+ }
2847
+
2848
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2849
+ const parameters = {
2850
+ options: Object.assign(
2851
+ {
2852
+ url: (rootUrl + '/v2alpha1/{+parent}/queuedResources').replace(
2853
+ /([^:]\/)\/+/g,
2854
+ '$1'
2855
+ ),
2856
+ method: 'POST',
2857
+ },
2858
+ options
2859
+ ),
2860
+ params,
2861
+ requiredParams: ['parent'],
2862
+ pathParams: ['parent'],
2863
+ context: this.context,
2864
+ };
2865
+ if (callback) {
2866
+ createAPIRequest<Schema$Operation>(
2867
+ parameters,
2868
+ callback as BodyResponseCallback<unknown>
2869
+ );
2870
+ } else {
2871
+ return createAPIRequest<Schema$Operation>(parameters);
2872
+ }
2873
+ }
2874
+
2875
+ /**
2876
+ * Deletes a QueuedResource TPU instance.
3454
2877
  *
3455
- * // Do the magic
3456
- * const res = await tpu.projects.locations.runtimeVersions.get({
3457
- * // Required. The resource name.
3458
- * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
3459
- * });
3460
- * console.log(res.data);
2878
+ * @param params - Parameters for request
2879
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2880
+ * @param callback - Optional callback that handles the response.
2881
+ * @returns A promise if used with async/await, or void if used with a callback.
2882
+ */
2883
+ delete(
2884
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2885
+ options: StreamMethodOptions
2886
+ ): GaxiosPromise<Readable>;
2887
+ delete(
2888
+ params?: Params$Resource$Projects$Locations$Queuedresources$Delete,
2889
+ options?: MethodOptions
2890
+ ): GaxiosPromise<Schema$Operation>;
2891
+ delete(
2892
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2893
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2894
+ callback: BodyResponseCallback<Readable>
2895
+ ): void;
2896
+ delete(
2897
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2898
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2899
+ callback: BodyResponseCallback<Schema$Operation>
2900
+ ): void;
2901
+ delete(
2902
+ params: Params$Resource$Projects$Locations$Queuedresources$Delete,
2903
+ callback: BodyResponseCallback<Schema$Operation>
2904
+ ): void;
2905
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
2906
+ delete(
2907
+ paramsOrCallback?:
2908
+ | Params$Resource$Projects$Locations$Queuedresources$Delete
2909
+ | BodyResponseCallback<Schema$Operation>
2910
+ | BodyResponseCallback<Readable>,
2911
+ optionsOrCallback?:
2912
+ | MethodOptions
2913
+ | StreamMethodOptions
2914
+ | BodyResponseCallback<Schema$Operation>
2915
+ | BodyResponseCallback<Readable>,
2916
+ callback?:
2917
+ | BodyResponseCallback<Schema$Operation>
2918
+ | BodyResponseCallback<Readable>
2919
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2920
+ let params = (paramsOrCallback ||
2921
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Delete;
2922
+ let options = (optionsOrCallback || {}) as MethodOptions;
2923
+
2924
+ if (typeof paramsOrCallback === 'function') {
2925
+ callback = paramsOrCallback;
2926
+ params =
2927
+ {} as Params$Resource$Projects$Locations$Queuedresources$Delete;
2928
+ options = {};
2929
+ }
2930
+
2931
+ if (typeof optionsOrCallback === 'function') {
2932
+ callback = optionsOrCallback;
2933
+ options = {};
2934
+ }
2935
+
2936
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2937
+ const parameters = {
2938
+ options: Object.assign(
2939
+ {
2940
+ url: (rootUrl + '/v2alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2941
+ method: 'DELETE',
2942
+ },
2943
+ options
2944
+ ),
2945
+ params,
2946
+ requiredParams: ['name'],
2947
+ pathParams: ['name'],
2948
+ context: this.context,
2949
+ };
2950
+ if (callback) {
2951
+ createAPIRequest<Schema$Operation>(
2952
+ parameters,
2953
+ callback as BodyResponseCallback<unknown>
2954
+ );
2955
+ } else {
2956
+ return createAPIRequest<Schema$Operation>(parameters);
2957
+ }
2958
+ }
2959
+
2960
+ /**
2961
+ * Gets details of a queued resource.
3461
2962
  *
3462
- * // Example response
3463
- * // {
3464
- * // "name": "my_name",
3465
- * // "version": "my_version"
3466
- * // }
3467
- * }
2963
+ * @param params - Parameters for request
2964
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2965
+ * @param callback - Optional callback that handles the response.
2966
+ * @returns A promise if used with async/await, or void if used with a callback.
2967
+ */
2968
+ get(
2969
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2970
+ options: StreamMethodOptions
2971
+ ): GaxiosPromise<Readable>;
2972
+ get(
2973
+ params?: Params$Resource$Projects$Locations$Queuedresources$Get,
2974
+ options?: MethodOptions
2975
+ ): GaxiosPromise<Schema$QueuedResource>;
2976
+ get(
2977
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2978
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2979
+ callback: BodyResponseCallback<Readable>
2980
+ ): void;
2981
+ get(
2982
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2983
+ options: MethodOptions | BodyResponseCallback<Schema$QueuedResource>,
2984
+ callback: BodyResponseCallback<Schema$QueuedResource>
2985
+ ): void;
2986
+ get(
2987
+ params: Params$Resource$Projects$Locations$Queuedresources$Get,
2988
+ callback: BodyResponseCallback<Schema$QueuedResource>
2989
+ ): void;
2990
+ get(callback: BodyResponseCallback<Schema$QueuedResource>): void;
2991
+ get(
2992
+ paramsOrCallback?:
2993
+ | Params$Resource$Projects$Locations$Queuedresources$Get
2994
+ | BodyResponseCallback<Schema$QueuedResource>
2995
+ | BodyResponseCallback<Readable>,
2996
+ optionsOrCallback?:
2997
+ | MethodOptions
2998
+ | StreamMethodOptions
2999
+ | BodyResponseCallback<Schema$QueuedResource>
3000
+ | BodyResponseCallback<Readable>,
3001
+ callback?:
3002
+ | BodyResponseCallback<Schema$QueuedResource>
3003
+ | BodyResponseCallback<Readable>
3004
+ ): void | GaxiosPromise<Schema$QueuedResource> | GaxiosPromise<Readable> {
3005
+ let params = (paramsOrCallback ||
3006
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Get;
3007
+ let options = (optionsOrCallback || {}) as MethodOptions;
3008
+
3009
+ if (typeof paramsOrCallback === 'function') {
3010
+ callback = paramsOrCallback;
3011
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$Get;
3012
+ options = {};
3013
+ }
3014
+
3015
+ if (typeof optionsOrCallback === 'function') {
3016
+ callback = optionsOrCallback;
3017
+ options = {};
3018
+ }
3019
+
3020
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
3021
+ const parameters = {
3022
+ options: Object.assign(
3023
+ {
3024
+ url: (rootUrl + '/v2alpha1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
3025
+ method: 'GET',
3026
+ },
3027
+ options
3028
+ ),
3029
+ params,
3030
+ requiredParams: ['name'],
3031
+ pathParams: ['name'],
3032
+ context: this.context,
3033
+ };
3034
+ if (callback) {
3035
+ createAPIRequest<Schema$QueuedResource>(
3036
+ parameters,
3037
+ callback as BodyResponseCallback<unknown>
3038
+ );
3039
+ } else {
3040
+ return createAPIRequest<Schema$QueuedResource>(parameters);
3041
+ }
3042
+ }
3043
+
3044
+ /**
3045
+ * Lists queued resources.
3468
3046
  *
3469
- * main().catch(e => {
3470
- * console.error(e);
3471
- * throw e;
3472
- * });
3047
+ * @param params - Parameters for request
3048
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3049
+ * @param callback - Optional callback that handles the response.
3050
+ * @returns A promise if used with async/await, or void if used with a callback.
3051
+ */
3052
+ list(
3053
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
3054
+ options: StreamMethodOptions
3055
+ ): GaxiosPromise<Readable>;
3056
+ list(
3057
+ params?: Params$Resource$Projects$Locations$Queuedresources$List,
3058
+ options?: MethodOptions
3059
+ ): GaxiosPromise<Schema$ListQueuedResourcesResponse>;
3060
+ list(
3061
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
3062
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3063
+ callback: BodyResponseCallback<Readable>
3064
+ ): void;
3065
+ list(
3066
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
3067
+ options:
3068
+ | MethodOptions
3069
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>,
3070
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3071
+ ): void;
3072
+ list(
3073
+ params: Params$Resource$Projects$Locations$Queuedresources$List,
3074
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3075
+ ): void;
3076
+ list(
3077
+ callback: BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3078
+ ): void;
3079
+ list(
3080
+ paramsOrCallback?:
3081
+ | Params$Resource$Projects$Locations$Queuedresources$List
3082
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3083
+ | BodyResponseCallback<Readable>,
3084
+ optionsOrCallback?:
3085
+ | MethodOptions
3086
+ | StreamMethodOptions
3087
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3088
+ | BodyResponseCallback<Readable>,
3089
+ callback?:
3090
+ | BodyResponseCallback<Schema$ListQueuedResourcesResponse>
3091
+ | BodyResponseCallback<Readable>
3092
+ ):
3093
+ | void
3094
+ | GaxiosPromise<Schema$ListQueuedResourcesResponse>
3095
+ | GaxiosPromise<Readable> {
3096
+ let params = (paramsOrCallback ||
3097
+ {}) as Params$Resource$Projects$Locations$Queuedresources$List;
3098
+ let options = (optionsOrCallback || {}) as MethodOptions;
3099
+
3100
+ if (typeof paramsOrCallback === 'function') {
3101
+ callback = paramsOrCallback;
3102
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$List;
3103
+ options = {};
3104
+ }
3105
+
3106
+ if (typeof optionsOrCallback === 'function') {
3107
+ callback = optionsOrCallback;
3108
+ options = {};
3109
+ }
3110
+
3111
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
3112
+ const parameters = {
3113
+ options: Object.assign(
3114
+ {
3115
+ url: (rootUrl + '/v2alpha1/{+parent}/queuedResources').replace(
3116
+ /([^:]\/)\/+/g,
3117
+ '$1'
3118
+ ),
3119
+ method: 'GET',
3120
+ },
3121
+ options
3122
+ ),
3123
+ params,
3124
+ requiredParams: ['parent'],
3125
+ pathParams: ['parent'],
3126
+ context: this.context,
3127
+ };
3128
+ if (callback) {
3129
+ createAPIRequest<Schema$ListQueuedResourcesResponse>(
3130
+ parameters,
3131
+ callback as BodyResponseCallback<unknown>
3132
+ );
3133
+ } else {
3134
+ return createAPIRequest<Schema$ListQueuedResourcesResponse>(parameters);
3135
+ }
3136
+ }
3137
+
3138
+ /**
3139
+ * Resets a QueuedResource TPU instance
3473
3140
  *
3474
- * ```
3141
+ * @param params - Parameters for request
3142
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
3143
+ * @param callback - Optional callback that handles the response.
3144
+ * @returns A promise if used with async/await, or void if used with a callback.
3145
+ */
3146
+ reset(
3147
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3148
+ options: StreamMethodOptions
3149
+ ): GaxiosPromise<Readable>;
3150
+ reset(
3151
+ params?: Params$Resource$Projects$Locations$Queuedresources$Reset,
3152
+ options?: MethodOptions
3153
+ ): GaxiosPromise<Schema$Operation>;
3154
+ reset(
3155
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3156
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
3157
+ callback: BodyResponseCallback<Readable>
3158
+ ): void;
3159
+ reset(
3160
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3161
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
3162
+ callback: BodyResponseCallback<Schema$Operation>
3163
+ ): void;
3164
+ reset(
3165
+ params: Params$Resource$Projects$Locations$Queuedresources$Reset,
3166
+ callback: BodyResponseCallback<Schema$Operation>
3167
+ ): void;
3168
+ reset(callback: BodyResponseCallback<Schema$Operation>): void;
3169
+ reset(
3170
+ paramsOrCallback?:
3171
+ | Params$Resource$Projects$Locations$Queuedresources$Reset
3172
+ | BodyResponseCallback<Schema$Operation>
3173
+ | BodyResponseCallback<Readable>,
3174
+ optionsOrCallback?:
3175
+ | MethodOptions
3176
+ | StreamMethodOptions
3177
+ | BodyResponseCallback<Schema$Operation>
3178
+ | BodyResponseCallback<Readable>,
3179
+ callback?:
3180
+ | BodyResponseCallback<Schema$Operation>
3181
+ | BodyResponseCallback<Readable>
3182
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3183
+ let params = (paramsOrCallback ||
3184
+ {}) as Params$Resource$Projects$Locations$Queuedresources$Reset;
3185
+ let options = (optionsOrCallback || {}) as MethodOptions;
3186
+
3187
+ if (typeof paramsOrCallback === 'function') {
3188
+ callback = paramsOrCallback;
3189
+ params = {} as Params$Resource$Projects$Locations$Queuedresources$Reset;
3190
+ options = {};
3191
+ }
3192
+
3193
+ if (typeof optionsOrCallback === 'function') {
3194
+ callback = optionsOrCallback;
3195
+ options = {};
3196
+ }
3197
+
3198
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
3199
+ const parameters = {
3200
+ options: Object.assign(
3201
+ {
3202
+ url: (rootUrl + '/v2alpha1/{+name}:reset').replace(
3203
+ /([^:]\/)\/+/g,
3204
+ '$1'
3205
+ ),
3206
+ method: 'POST',
3207
+ },
3208
+ options
3209
+ ),
3210
+ params,
3211
+ requiredParams: ['name'],
3212
+ pathParams: ['name'],
3213
+ context: this.context,
3214
+ };
3215
+ if (callback) {
3216
+ createAPIRequest<Schema$Operation>(
3217
+ parameters,
3218
+ callback as BodyResponseCallback<unknown>
3219
+ );
3220
+ } else {
3221
+ return createAPIRequest<Schema$Operation>(parameters);
3222
+ }
3223
+ }
3224
+ }
3225
+
3226
+ export interface Params$Resource$Projects$Locations$Queuedresources$Create
3227
+ extends StandardParameters {
3228
+ /**
3229
+ * Required. The parent resource name.
3230
+ */
3231
+ parent?: string;
3232
+ /**
3233
+ * The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
3234
+ */
3235
+ queuedResourceId?: string;
3236
+ /**
3237
+ * Idempotent request UUID.
3238
+ */
3239
+ requestId?: string;
3240
+
3241
+ /**
3242
+ * Request body metadata
3243
+ */
3244
+ requestBody?: Schema$QueuedResource;
3245
+ }
3246
+ export interface Params$Resource$Projects$Locations$Queuedresources$Delete
3247
+ extends StandardParameters {
3248
+ /**
3249
+ * 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.
3250
+ */
3251
+ force?: boolean;
3252
+ /**
3253
+ * Required. The resource name.
3254
+ */
3255
+ name?: string;
3256
+ /**
3257
+ * Idempotent request UUID.
3258
+ */
3259
+ requestId?: string;
3260
+ }
3261
+ export interface Params$Resource$Projects$Locations$Queuedresources$Get
3262
+ extends StandardParameters {
3263
+ /**
3264
+ * Required. The resource name.
3265
+ */
3266
+ name?: string;
3267
+ }
3268
+ export interface Params$Resource$Projects$Locations$Queuedresources$List
3269
+ extends StandardParameters {
3270
+ /**
3271
+ * The maximum number of items to return.
3272
+ */
3273
+ pageSize?: number;
3274
+ /**
3275
+ * The next_page_token value returned from a previous List request, if any.
3276
+ */
3277
+ pageToken?: string;
3278
+ /**
3279
+ * Required. The parent resource name.
3280
+ */
3281
+ parent?: string;
3282
+ }
3283
+ export interface Params$Resource$Projects$Locations$Queuedresources$Reset
3284
+ extends StandardParameters {
3285
+ /**
3286
+ * Required. The name of the queued resource.
3287
+ */
3288
+ name?: string;
3289
+
3290
+ /**
3291
+ * Request body metadata
3292
+ */
3293
+ requestBody?: Schema$ResetQueuedResourceRequest;
3294
+ }
3295
+
3296
+ export class Resource$Projects$Locations$Runtimeversions {
3297
+ context: APIRequestContext;
3298
+ constructor(context: APIRequestContext) {
3299
+ this.context = context;
3300
+ }
3301
+
3302
+ /**
3303
+ * Gets a runtime version.
3475
3304
  *
3476
3305
  * @param params - Parameters for request
3477
3306
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3556,58 +3385,6 @@ export namespace tpu_v2alpha1 {
3556
3385
 
3557
3386
  /**
3558
3387
  * Lists runtime versions supported by this API.
3559
- * @example
3560
- * ```js
3561
- * // Before running the sample:
3562
- * // - Enable the API at:
3563
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3564
- * // - Login into gcloud by running:
3565
- * // `$ gcloud auth application-default login`
3566
- * // - Install the npm module by running:
3567
- * // `$ npm install googleapis`
3568
- *
3569
- * const {google} = require('googleapis');
3570
- * const tpu = google.tpu('v2alpha1');
3571
- *
3572
- * async function main() {
3573
- * const auth = new google.auth.GoogleAuth({
3574
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3575
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3576
- * });
3577
- *
3578
- * // Acquire an auth client, and bind it to all future calls
3579
- * const authClient = await auth.getClient();
3580
- * google.options({auth: authClient});
3581
- *
3582
- * // Do the magic
3583
- * const res = await tpu.projects.locations.runtimeVersions.list({
3584
- * // List filter.
3585
- * filter: 'placeholder-value',
3586
- * // Sort results.
3587
- * orderBy: 'placeholder-value',
3588
- * // The maximum number of items to return.
3589
- * pageSize: 'placeholder-value',
3590
- * // The next_page_token value returned from a previous List request, if any.
3591
- * pageToken: 'placeholder-value',
3592
- * // Required. The parent resource name.
3593
- * parent: 'projects/my-project/locations/my-location',
3594
- * });
3595
- * console.log(res.data);
3596
- *
3597
- * // Example response
3598
- * // {
3599
- * // "nextPageToken": "my_nextPageToken",
3600
- * // "runtimeVersions": [],
3601
- * // "unreachable": []
3602
- * // }
3603
- * }
3604
- *
3605
- * main().catch(e => {
3606
- * console.error(e);
3607
- * throw e;
3608
- * });
3609
- *
3610
- * ```
3611
3388
  *
3612
3389
  * @param params - Parameters for request
3613
3390
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.