@googleapis/tpu 2.0.0 → 2.2.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
  */
@@ -466,6 +580,27 @@ export namespace tpu_v2alpha1 {
466
580
  */
467
581
  tags?: string[] | null;
468
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
+ }
469
604
  /**
470
605
  * This resource represents a long-running operation that is the result of a network API call.
471
606
  */
@@ -487,7 +622,7 @@ export namespace tpu_v2alpha1 {
487
622
  */
488
623
  name?: string | null;
489
624
  /**
490
- * 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`.
491
626
  */
492
627
  response?: {[key: string]: any} | null;
493
628
  }
@@ -524,6 +659,121 @@ export namespace tpu_v2alpha1 {
524
659
  */
525
660
  verb?: string | null;
526
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 {}
527
777
  /**
528
778
  * A runtime version that a Node can be configured with.
529
779
  */
@@ -590,6 +840,10 @@ export namespace tpu_v2alpha1 {
590
840
  */
591
841
  workerIds?: string[] | null;
592
842
  }
843
+ /**
844
+ * Spot tier definition.
845
+ */
846
+ export interface Schema$Spot {}
593
847
  /**
594
848
  * Request for StartNode.
595
849
  */
@@ -615,6 +869,14 @@ export namespace tpu_v2alpha1 {
615
869
  * Request for StopNode.
616
870
  */
617
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 {}
618
880
  /**
619
881
  * A Symptom instance.
620
882
  */
@@ -636,6 +898,15 @@ export namespace tpu_v2alpha1 {
636
898
  */
637
899
  workerId?: string | null;
638
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
+ }
639
910
 
640
911
  export class Resource$Projects {
641
912
  context: APIRequestContext;
@@ -651,6 +922,7 @@ export namespace tpu_v2alpha1 {
651
922
  acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
652
923
  nodes: Resource$Projects$Locations$Nodes;
653
924
  operations: Resource$Projects$Locations$Operations;
925
+ queuedResources: Resource$Projects$Locations$Queuedresources;
654
926
  runtimeVersions: Resource$Projects$Locations$Runtimeversions;
655
927
  constructor(context: APIRequestContext) {
656
928
  this.context = context;
@@ -661,6 +933,9 @@ export namespace tpu_v2alpha1 {
661
933
  this.operations = new Resource$Projects$Locations$Operations(
662
934
  this.context
663
935
  );
936
+ this.queuedResources = new Resource$Projects$Locations$Queuedresources(
937
+ this.context
938
+ );
664
939
  this.runtimeVersions = new Resource$Projects$Locations$Runtimeversions(
665
940
  this.context
666
941
  );
@@ -668,54 +943,6 @@ export namespace tpu_v2alpha1 {
668
943
 
669
944
  /**
670
945
  * Generates the Cloud TPU service identity for the project.
671
- * @example
672
- * ```js
673
- * // Before running the sample:
674
- * // - Enable the API at:
675
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
676
- * // - Login into gcloud by running:
677
- * // `$ gcloud auth application-default login`
678
- * // - Install the npm module by running:
679
- * // `$ npm install googleapis`
680
- *
681
- * const {google} = require('googleapis');
682
- * const tpu = google.tpu('v2alpha1');
683
- *
684
- * async function main() {
685
- * const auth = new google.auth.GoogleAuth({
686
- * // Scopes can be specified either as an array or as a single, space-delimited string.
687
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
688
- * });
689
- *
690
- * // Acquire an auth client, and bind it to all future calls
691
- * const authClient = await auth.getClient();
692
- * google.options({auth: authClient});
693
- *
694
- * // Do the magic
695
- * const res = await tpu.projects.locations.generateServiceIdentity({
696
- * // Required. The parent resource name.
697
- * parent: 'projects/my-project/locations/my-location',
698
- *
699
- * // Request body metadata
700
- * requestBody: {
701
- * // request body parameters
702
- * // {}
703
- * },
704
- * });
705
- * console.log(res.data);
706
- *
707
- * // Example response
708
- * // {
709
- * // "identity": {}
710
- * // }
711
- * }
712
- *
713
- * main().catch(e => {
714
- * console.error(e);
715
- * throw e;
716
- * });
717
- *
718
- * ```
719
946
  *
720
947
  * @param params - Parameters for request
721
948
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -812,52 +1039,6 @@ export namespace tpu_v2alpha1 {
812
1039
 
813
1040
  /**
814
1041
  * Gets information about a location.
815
- * @example
816
- * ```js
817
- * // Before running the sample:
818
- * // - Enable the API at:
819
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
820
- * // - Login into gcloud by running:
821
- * // `$ gcloud auth application-default login`
822
- * // - Install the npm module by running:
823
- * // `$ npm install googleapis`
824
- *
825
- * const {google} = require('googleapis');
826
- * const tpu = google.tpu('v2alpha1');
827
- *
828
- * async function main() {
829
- * const auth = new google.auth.GoogleAuth({
830
- * // Scopes can be specified either as an array or as a single, space-delimited string.
831
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
832
- * });
833
- *
834
- * // Acquire an auth client, and bind it to all future calls
835
- * const authClient = await auth.getClient();
836
- * google.options({auth: authClient});
837
- *
838
- * // Do the magic
839
- * const res = await tpu.projects.locations.get({
840
- * // Resource name for the location.
841
- * name: 'projects/my-project/locations/my-location',
842
- * });
843
- * console.log(res.data);
844
- *
845
- * // Example response
846
- * // {
847
- * // "displayName": "my_displayName",
848
- * // "labels": {},
849
- * // "locationId": "my_locationId",
850
- * // "metadata": {},
851
- * // "name": "my_name"
852
- * // }
853
- * }
854
- *
855
- * main().catch(e => {
856
- * console.error(e);
857
- * throw e;
858
- * });
859
- *
860
- * ```
861
1042
  *
862
1043
  * @param params - Parameters for request
863
1044
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -942,55 +1123,6 @@ export namespace tpu_v2alpha1 {
942
1123
 
943
1124
  /**
944
1125
  * Lists information about the supported locations for this service.
945
- * @example
946
- * ```js
947
- * // Before running the sample:
948
- * // - Enable the API at:
949
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
950
- * // - Login into gcloud by running:
951
- * // `$ gcloud auth application-default login`
952
- * // - Install the npm module by running:
953
- * // `$ npm install googleapis`
954
- *
955
- * const {google} = require('googleapis');
956
- * const tpu = google.tpu('v2alpha1');
957
- *
958
- * async function main() {
959
- * const auth = new google.auth.GoogleAuth({
960
- * // Scopes can be specified either as an array or as a single, space-delimited string.
961
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
962
- * });
963
- *
964
- * // Acquire an auth client, and bind it to all future calls
965
- * const authClient = await auth.getClient();
966
- * google.options({auth: authClient});
967
- *
968
- * // Do the magic
969
- * const res = await tpu.projects.locations.list({
970
- * // 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).
971
- * filter: 'placeholder-value',
972
- * // The resource that owns the locations collection, if applicable.
973
- * name: 'projects/my-project',
974
- * // The maximum number of results to return. If not set, the service selects a default.
975
- * pageSize: 'placeholder-value',
976
- * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
977
- * pageToken: 'placeholder-value',
978
- * });
979
- * console.log(res.data);
980
- *
981
- * // Example response
982
- * // {
983
- * // "locations": [],
984
- * // "nextPageToken": "my_nextPageToken"
985
- * // }
986
- * }
987
- *
988
- * main().catch(e => {
989
- * console.error(e);
990
- * throw e;
991
- * });
992
- *
993
- * ```
994
1126
  *
995
1127
  * @param params - Parameters for request
996
1128
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1129,49 +1261,6 @@ export namespace tpu_v2alpha1 {
1129
1261
 
1130
1262
  /**
1131
1263
  * Gets AcceleratorType.
1132
- * @example
1133
- * ```js
1134
- * // Before running the sample:
1135
- * // - Enable the API at:
1136
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1137
- * // - Login into gcloud by running:
1138
- * // `$ gcloud auth application-default login`
1139
- * // - Install the npm module by running:
1140
- * // `$ npm install googleapis`
1141
- *
1142
- * const {google} = require('googleapis');
1143
- * const tpu = google.tpu('v2alpha1');
1144
- *
1145
- * async function main() {
1146
- * const auth = new google.auth.GoogleAuth({
1147
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1148
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1149
- * });
1150
- *
1151
- * // Acquire an auth client, and bind it to all future calls
1152
- * const authClient = await auth.getClient();
1153
- * google.options({auth: authClient});
1154
- *
1155
- * // Do the magic
1156
- * const res = await tpu.projects.locations.acceleratorTypes.get({
1157
- * // Required. The resource name.
1158
- * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
1159
- * });
1160
- * console.log(res.data);
1161
- *
1162
- * // Example response
1163
- * // {
1164
- * // "name": "my_name",
1165
- * // "type": "my_type"
1166
- * // }
1167
- * }
1168
- *
1169
- * main().catch(e => {
1170
- * console.error(e);
1171
- * throw e;
1172
- * });
1173
- *
1174
- * ```
1175
1264
  *
1176
1265
  * @param params - Parameters for request
1177
1266
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1256,58 +1345,6 @@ export namespace tpu_v2alpha1 {
1256
1345
 
1257
1346
  /**
1258
1347
  * Lists accelerator types supported by this API.
1259
- * @example
1260
- * ```js
1261
- * // Before running the sample:
1262
- * // - Enable the API at:
1263
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1264
- * // - Login into gcloud by running:
1265
- * // `$ gcloud auth application-default login`
1266
- * // - Install the npm module by running:
1267
- * // `$ npm install googleapis`
1268
- *
1269
- * const {google} = require('googleapis');
1270
- * const tpu = google.tpu('v2alpha1');
1271
- *
1272
- * async function main() {
1273
- * const auth = new google.auth.GoogleAuth({
1274
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1275
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1276
- * });
1277
- *
1278
- * // Acquire an auth client, and bind it to all future calls
1279
- * const authClient = await auth.getClient();
1280
- * google.options({auth: authClient});
1281
- *
1282
- * // Do the magic
1283
- * const res = await tpu.projects.locations.acceleratorTypes.list({
1284
- * // List filter.
1285
- * filter: 'placeholder-value',
1286
- * // Sort results.
1287
- * orderBy: 'placeholder-value',
1288
- * // The maximum number of items to return.
1289
- * pageSize: 'placeholder-value',
1290
- * // The next_page_token value returned from a previous List request, if any.
1291
- * pageToken: 'placeholder-value',
1292
- * // Required. The parent resource name.
1293
- * parent: 'projects/my-project/locations/my-location',
1294
- * });
1295
- * console.log(res.data);
1296
- *
1297
- * // Example response
1298
- * // {
1299
- * // "acceleratorTypes": [],
1300
- * // "nextPageToken": "my_nextPageToken",
1301
- * // "unreachable": []
1302
- * // }
1303
- * }
1304
- *
1305
- * main().catch(e => {
1306
- * console.error(e);
1307
- * throw e;
1308
- * });
1309
- *
1310
- * ```
1311
1348
  *
1312
1349
  * @param params - Parameters for request
1313
1350
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1442,84 +1479,6 @@ export namespace tpu_v2alpha1 {
1442
1479
 
1443
1480
  /**
1444
1481
  * Creates a node.
1445
- * @example
1446
- * ```js
1447
- * // Before running the sample:
1448
- * // - Enable the API at:
1449
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1450
- * // - Login into gcloud by running:
1451
- * // `$ gcloud auth application-default login`
1452
- * // - Install the npm module by running:
1453
- * // `$ npm install googleapis`
1454
- *
1455
- * const {google} = require('googleapis');
1456
- * const tpu = google.tpu('v2alpha1');
1457
- *
1458
- * async function main() {
1459
- * const auth = new google.auth.GoogleAuth({
1460
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1461
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1462
- * });
1463
- *
1464
- * // Acquire an auth client, and bind it to all future calls
1465
- * const authClient = await auth.getClient();
1466
- * google.options({auth: authClient});
1467
- *
1468
- * // Do the magic
1469
- * const res = await tpu.projects.locations.nodes.create({
1470
- * // The unqualified resource name.
1471
- * nodeId: 'placeholder-value',
1472
- * // Required. The parent resource name.
1473
- * parent: 'projects/my-project/locations/my-location',
1474
- * // Idempotent request UUID.
1475
- * requestId: 'placeholder-value',
1476
- *
1477
- * // Request body metadata
1478
- * requestBody: {
1479
- * // request body parameters
1480
- * // {
1481
- * // "acceleratorType": "my_acceleratorType",
1482
- * // "apiVersion": "my_apiVersion",
1483
- * // "cidrBlock": "my_cidrBlock",
1484
- * // "createTime": "my_createTime",
1485
- * // "dataDisks": [],
1486
- * // "description": "my_description",
1487
- * // "health": "my_health",
1488
- * // "healthDescription": "my_healthDescription",
1489
- * // "id": "my_id",
1490
- * // "labels": {},
1491
- * // "metadata": {},
1492
- * // "name": "my_name",
1493
- * // "networkConfig": {},
1494
- * // "networkEndpoints": [],
1495
- * // "runtimeVersion": "my_runtimeVersion",
1496
- * // "schedulingConfig": {},
1497
- * // "serviceAccount": {},
1498
- * // "shieldedInstanceConfig": {},
1499
- * // "state": "my_state",
1500
- * // "symptoms": [],
1501
- * // "tags": []
1502
- * // }
1503
- * },
1504
- * });
1505
- * console.log(res.data);
1506
- *
1507
- * // Example response
1508
- * // {
1509
- * // "done": false,
1510
- * // "error": {},
1511
- * // "metadata": {},
1512
- * // "name": "my_name",
1513
- * // "response": {}
1514
- * // }
1515
- * }
1516
- *
1517
- * main().catch(e => {
1518
- * console.error(e);
1519
- * throw e;
1520
- * });
1521
- *
1522
- * ```
1523
1482
  *
1524
1483
  * @param params - Parameters for request
1525
1484
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1607,54 +1566,6 @@ export namespace tpu_v2alpha1 {
1607
1566
 
1608
1567
  /**
1609
1568
  * Deletes a node.
1610
- * @example
1611
- * ```js
1612
- * // Before running the sample:
1613
- * // - Enable the API at:
1614
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1615
- * // - Login into gcloud by running:
1616
- * // `$ gcloud auth application-default login`
1617
- * // - Install the npm module by running:
1618
- * // `$ npm install googleapis`
1619
- *
1620
- * const {google} = require('googleapis');
1621
- * const tpu = google.tpu('v2alpha1');
1622
- *
1623
- * async function main() {
1624
- * const auth = new google.auth.GoogleAuth({
1625
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1626
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1627
- * });
1628
- *
1629
- * // Acquire an auth client, and bind it to all future calls
1630
- * const authClient = await auth.getClient();
1631
- * google.options({auth: authClient});
1632
- *
1633
- * // Do the magic
1634
- * const res = await tpu.projects.locations.nodes.delete({
1635
- * // Required. The resource name.
1636
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1637
- * // Idempotent request UUID.
1638
- * requestId: 'placeholder-value',
1639
- * });
1640
- * console.log(res.data);
1641
- *
1642
- * // Example response
1643
- * // {
1644
- * // "done": false,
1645
- * // "error": {},
1646
- * // "metadata": {},
1647
- * // "name": "my_name",
1648
- * // "response": {}
1649
- * // }
1650
- * }
1651
- *
1652
- * main().catch(e => {
1653
- * console.error(e);
1654
- * throw e;
1655
- * });
1656
- *
1657
- * ```
1658
1569
  *
1659
1570
  * @param params - Parameters for request
1660
1571
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1739,68 +1650,6 @@ export namespace tpu_v2alpha1 {
1739
1650
 
1740
1651
  /**
1741
1652
  * Gets the details of a node.
1742
- * @example
1743
- * ```js
1744
- * // Before running the sample:
1745
- * // - Enable the API at:
1746
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1747
- * // - Login into gcloud by running:
1748
- * // `$ gcloud auth application-default login`
1749
- * // - Install the npm module by running:
1750
- * // `$ npm install googleapis`
1751
- *
1752
- * const {google} = require('googleapis');
1753
- * const tpu = google.tpu('v2alpha1');
1754
- *
1755
- * async function main() {
1756
- * const auth = new google.auth.GoogleAuth({
1757
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1758
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1759
- * });
1760
- *
1761
- * // Acquire an auth client, and bind it to all future calls
1762
- * const authClient = await auth.getClient();
1763
- * google.options({auth: authClient});
1764
- *
1765
- * // Do the magic
1766
- * const res = await tpu.projects.locations.nodes.get({
1767
- * // Required. The resource name.
1768
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1769
- * });
1770
- * console.log(res.data);
1771
- *
1772
- * // Example response
1773
- * // {
1774
- * // "acceleratorType": "my_acceleratorType",
1775
- * // "apiVersion": "my_apiVersion",
1776
- * // "cidrBlock": "my_cidrBlock",
1777
- * // "createTime": "my_createTime",
1778
- * // "dataDisks": [],
1779
- * // "description": "my_description",
1780
- * // "health": "my_health",
1781
- * // "healthDescription": "my_healthDescription",
1782
- * // "id": "my_id",
1783
- * // "labels": {},
1784
- * // "metadata": {},
1785
- * // "name": "my_name",
1786
- * // "networkConfig": {},
1787
- * // "networkEndpoints": [],
1788
- * // "runtimeVersion": "my_runtimeVersion",
1789
- * // "schedulingConfig": {},
1790
- * // "serviceAccount": {},
1791
- * // "shieldedInstanceConfig": {},
1792
- * // "state": "my_state",
1793
- * // "symptoms": [],
1794
- * // "tags": []
1795
- * // }
1796
- * }
1797
- *
1798
- * main().catch(e => {
1799
- * console.error(e);
1800
- * throw e;
1801
- * });
1802
- *
1803
- * ```
1804
1653
  *
1805
1654
  * @param params - Parameters for request
1806
1655
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1885,57 +1734,6 @@ export namespace tpu_v2alpha1 {
1885
1734
 
1886
1735
  /**
1887
1736
  * Retrieves the guest attributes for the node.
1888
- * @example
1889
- * ```js
1890
- * // Before running the sample:
1891
- * // - Enable the API at:
1892
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1893
- * // - Login into gcloud by running:
1894
- * // `$ gcloud auth application-default login`
1895
- * // - Install the npm module by running:
1896
- * // `$ npm install googleapis`
1897
- *
1898
- * const {google} = require('googleapis');
1899
- * const tpu = google.tpu('v2alpha1');
1900
- *
1901
- * async function main() {
1902
- * const auth = new google.auth.GoogleAuth({
1903
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1904
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1905
- * });
1906
- *
1907
- * // Acquire an auth client, and bind it to all future calls
1908
- * const authClient = await auth.getClient();
1909
- * google.options({auth: authClient});
1910
- *
1911
- * // Do the magic
1912
- * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1913
- * // Required. The resource name.
1914
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
1915
- *
1916
- * // Request body metadata
1917
- * requestBody: {
1918
- * // request body parameters
1919
- * // {
1920
- * // "queryPath": "my_queryPath",
1921
- * // "workerIds": []
1922
- * // }
1923
- * },
1924
- * });
1925
- * console.log(res.data);
1926
- *
1927
- * // Example response
1928
- * // {
1929
- * // "guestAttributes": []
1930
- * // }
1931
- * }
1932
- *
1933
- * main().catch(e => {
1934
- * console.error(e);
1935
- * throw e;
1936
- * });
1937
- *
1938
- * ```
1939
1737
  *
1940
1738
  * @param params - Parameters for request
1941
1739
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2031,54 +1829,6 @@ export namespace tpu_v2alpha1 {
2031
1829
 
2032
1830
  /**
2033
1831
  * Lists nodes.
2034
- * @example
2035
- * ```js
2036
- * // Before running the sample:
2037
- * // - Enable the API at:
2038
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2039
- * // - Login into gcloud by running:
2040
- * // `$ gcloud auth application-default login`
2041
- * // - Install the npm module by running:
2042
- * // `$ npm install googleapis`
2043
- *
2044
- * const {google} = require('googleapis');
2045
- * const tpu = google.tpu('v2alpha1');
2046
- *
2047
- * async function main() {
2048
- * const auth = new google.auth.GoogleAuth({
2049
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2050
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2051
- * });
2052
- *
2053
- * // Acquire an auth client, and bind it to all future calls
2054
- * const authClient = await auth.getClient();
2055
- * google.options({auth: authClient});
2056
- *
2057
- * // Do the magic
2058
- * const res = await tpu.projects.locations.nodes.list({
2059
- * // The maximum number of items to return.
2060
- * pageSize: 'placeholder-value',
2061
- * // The next_page_token value returned from a previous List request, if any.
2062
- * pageToken: 'placeholder-value',
2063
- * // Required. The parent resource name.
2064
- * parent: 'projects/my-project/locations/my-location',
2065
- * });
2066
- * console.log(res.data);
2067
- *
2068
- * // Example response
2069
- * // {
2070
- * // "nextPageToken": "my_nextPageToken",
2071
- * // "nodes": [],
2072
- * // "unreachable": []
2073
- * // }
2074
- * }
2075
- *
2076
- * main().catch(e => {
2077
- * console.error(e);
2078
- * throw e;
2079
- * });
2080
- *
2081
- * ```
2082
1832
  *
2083
1833
  * @param params - Parameters for request
2084
1834
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2169,82 +1919,6 @@ export namespace tpu_v2alpha1 {
2169
1919
 
2170
1920
  /**
2171
1921
  * Updates the configurations of a node.
2172
- * @example
2173
- * ```js
2174
- * // Before running the sample:
2175
- * // - Enable the API at:
2176
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2177
- * // - Login into gcloud by running:
2178
- * // `$ gcloud auth application-default login`
2179
- * // - Install the npm module by running:
2180
- * // `$ npm install googleapis`
2181
- *
2182
- * const {google} = require('googleapis');
2183
- * const tpu = google.tpu('v2alpha1');
2184
- *
2185
- * async function main() {
2186
- * const auth = new google.auth.GoogleAuth({
2187
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2188
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2189
- * });
2190
- *
2191
- * // Acquire an auth client, and bind it to all future calls
2192
- * const authClient = await auth.getClient();
2193
- * google.options({auth: authClient});
2194
- *
2195
- * // Do the magic
2196
- * const res = await tpu.projects.locations.nodes.patch({
2197
- * // Output only. Immutable. The name of the TPU.
2198
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2199
- * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
2200
- * updateMask: 'placeholder-value',
2201
- *
2202
- * // Request body metadata
2203
- * requestBody: {
2204
- * // request body parameters
2205
- * // {
2206
- * // "acceleratorType": "my_acceleratorType",
2207
- * // "apiVersion": "my_apiVersion",
2208
- * // "cidrBlock": "my_cidrBlock",
2209
- * // "createTime": "my_createTime",
2210
- * // "dataDisks": [],
2211
- * // "description": "my_description",
2212
- * // "health": "my_health",
2213
- * // "healthDescription": "my_healthDescription",
2214
- * // "id": "my_id",
2215
- * // "labels": {},
2216
- * // "metadata": {},
2217
- * // "name": "my_name",
2218
- * // "networkConfig": {},
2219
- * // "networkEndpoints": [],
2220
- * // "runtimeVersion": "my_runtimeVersion",
2221
- * // "schedulingConfig": {},
2222
- * // "serviceAccount": {},
2223
- * // "shieldedInstanceConfig": {},
2224
- * // "state": "my_state",
2225
- * // "symptoms": [],
2226
- * // "tags": []
2227
- * // }
2228
- * },
2229
- * });
2230
- * console.log(res.data);
2231
- *
2232
- * // Example response
2233
- * // {
2234
- * // "done": false,
2235
- * // "error": {},
2236
- * // "metadata": {},
2237
- * // "name": "my_name",
2238
- * // "response": {}
2239
- * // }
2240
- * }
2241
- *
2242
- * main().catch(e => {
2243
- * console.error(e);
2244
- * throw e;
2245
- * });
2246
- *
2247
- * ```
2248
1922
  *
2249
1923
  * @param params - Parameters for request
2250
1924
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2329,60 +2003,6 @@ export namespace tpu_v2alpha1 {
2329
2003
 
2330
2004
  /**
2331
2005
  * Simulates a maintenance event.
2332
- * @example
2333
- * ```js
2334
- * // Before running the sample:
2335
- * // - Enable the API at:
2336
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2337
- * // - Login into gcloud by running:
2338
- * // `$ gcloud auth application-default login`
2339
- * // - Install the npm module by running:
2340
- * // `$ npm install googleapis`
2341
- *
2342
- * const {google} = require('googleapis');
2343
- * const tpu = google.tpu('v2alpha1');
2344
- *
2345
- * async function main() {
2346
- * const auth = new google.auth.GoogleAuth({
2347
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2348
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2349
- * });
2350
- *
2351
- * // Acquire an auth client, and bind it to all future calls
2352
- * const authClient = await auth.getClient();
2353
- * google.options({auth: authClient});
2354
- *
2355
- * // Do the magic
2356
- * const res = await tpu.projects.locations.nodes.simulateMaintenanceEvent({
2357
- * // Required. The resource name.
2358
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2359
- *
2360
- * // Request body metadata
2361
- * requestBody: {
2362
- * // request body parameters
2363
- * // {
2364
- * // "workerIds": []
2365
- * // }
2366
- * },
2367
- * });
2368
- * console.log(res.data);
2369
- *
2370
- * // Example response
2371
- * // {
2372
- * // "done": false,
2373
- * // "error": {},
2374
- * // "metadata": {},
2375
- * // "name": "my_name",
2376
- * // "response": {}
2377
- * // }
2378
- * }
2379
- *
2380
- * main().catch(e => {
2381
- * console.error(e);
2382
- * throw e;
2383
- * });
2384
- *
2385
- * ```
2386
2006
  *
2387
2007
  * @param params - Parameters for request
2388
2008
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2472,58 +2092,6 @@ export namespace tpu_v2alpha1 {
2472
2092
 
2473
2093
  /**
2474
2094
  * Starts a node.
2475
- * @example
2476
- * ```js
2477
- * // Before running the sample:
2478
- * // - Enable the API at:
2479
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2480
- * // - Login into gcloud by running:
2481
- * // `$ gcloud auth application-default login`
2482
- * // - Install the npm module by running:
2483
- * // `$ npm install googleapis`
2484
- *
2485
- * const {google} = require('googleapis');
2486
- * const tpu = google.tpu('v2alpha1');
2487
- *
2488
- * async function main() {
2489
- * const auth = new google.auth.GoogleAuth({
2490
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2491
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2492
- * });
2493
- *
2494
- * // Acquire an auth client, and bind it to all future calls
2495
- * const authClient = await auth.getClient();
2496
- * google.options({auth: authClient});
2497
- *
2498
- * // Do the magic
2499
- * const res = await tpu.projects.locations.nodes.start({
2500
- * // The resource name.
2501
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2502
- *
2503
- * // Request body metadata
2504
- * requestBody: {
2505
- * // request body parameters
2506
- * // {}
2507
- * },
2508
- * });
2509
- * console.log(res.data);
2510
- *
2511
- * // Example response
2512
- * // {
2513
- * // "done": false,
2514
- * // "error": {},
2515
- * // "metadata": {},
2516
- * // "name": "my_name",
2517
- * // "response": {}
2518
- * // }
2519
- * }
2520
- *
2521
- * main().catch(e => {
2522
- * console.error(e);
2523
- * throw e;
2524
- * });
2525
- *
2526
- * ```
2527
2095
  *
2528
2096
  * @param params - Parameters for request
2529
2097
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2611,58 +2179,6 @@ export namespace tpu_v2alpha1 {
2611
2179
 
2612
2180
  /**
2613
2181
  * Stops a node. This operation is only available with single TPU nodes.
2614
- * @example
2615
- * ```js
2616
- * // Before running the sample:
2617
- * // - Enable the API at:
2618
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2619
- * // - Login into gcloud by running:
2620
- * // `$ gcloud auth application-default login`
2621
- * // - Install the npm module by running:
2622
- * // `$ npm install googleapis`
2623
- *
2624
- * const {google} = require('googleapis');
2625
- * const tpu = google.tpu('v2alpha1');
2626
- *
2627
- * async function main() {
2628
- * const auth = new google.auth.GoogleAuth({
2629
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2630
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2631
- * });
2632
- *
2633
- * // Acquire an auth client, and bind it to all future calls
2634
- * const authClient = await auth.getClient();
2635
- * google.options({auth: authClient});
2636
- *
2637
- * // Do the magic
2638
- * const res = await tpu.projects.locations.nodes.stop({
2639
- * // The resource name.
2640
- * name: 'projects/my-project/locations/my-location/nodes/my-node',
2641
- *
2642
- * // Request body metadata
2643
- * requestBody: {
2644
- * // request body parameters
2645
- * // {}
2646
- * },
2647
- * });
2648
- * console.log(res.data);
2649
- *
2650
- * // Example response
2651
- * // {
2652
- * // "done": false,
2653
- * // "error": {},
2654
- * // "metadata": {},
2655
- * // "name": "my_name",
2656
- * // "response": {}
2657
- * // }
2658
- * }
2659
- *
2660
- * main().catch(e => {
2661
- * console.error(e);
2662
- * throw e;
2663
- * });
2664
- *
2665
- * ```
2666
2182
  *
2667
2183
  * @param params - Parameters for request
2668
2184
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2845,7 +2361,7 @@ export namespace tpu_v2alpha1 {
2845
2361
  export interface Params$Resource$Projects$Locations$Nodes$Start
2846
2362
  extends StandardParameters {
2847
2363
  /**
2848
- * The resource name.
2364
+ * Required. The resource name.
2849
2365
  */
2850
2366
  name?: string;
2851
2367
 
@@ -2857,7 +2373,7 @@ export namespace tpu_v2alpha1 {
2857
2373
  export interface Params$Resource$Projects$Locations$Nodes$Stop
2858
2374
  extends StandardParameters {
2859
2375
  /**
2860
- * The resource name.
2376
+ * Required. The resource name.
2861
2377
  */
2862
2378
  name?: string;
2863
2379
 
@@ -2875,46 +2391,6 @@ export namespace tpu_v2alpha1 {
2875
2391
 
2876
2392
  /**
2877
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`.
2878
- * @example
2879
- * ```js
2880
- * // Before running the sample:
2881
- * // - Enable the API at:
2882
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
2883
- * // - Login into gcloud by running:
2884
- * // `$ gcloud auth application-default login`
2885
- * // - Install the npm module by running:
2886
- * // `$ npm install googleapis`
2887
- *
2888
- * const {google} = require('googleapis');
2889
- * const tpu = google.tpu('v2alpha1');
2890
- *
2891
- * async function main() {
2892
- * const auth = new google.auth.GoogleAuth({
2893
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2894
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2895
- * });
2896
- *
2897
- * // Acquire an auth client, and bind it to all future calls
2898
- * const authClient = await auth.getClient();
2899
- * google.options({auth: authClient});
2900
- *
2901
- * // Do the magic
2902
- * const res = await tpu.projects.locations.operations.cancel({
2903
- * // The name of the operation resource to be cancelled.
2904
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
2905
- * });
2906
- * console.log(res.data);
2907
- *
2908
- * // Example response
2909
- * // {}
2910
- * }
2911
- *
2912
- * main().catch(e => {
2913
- * console.error(e);
2914
- * throw e;
2915
- * });
2916
- *
2917
- * ```
2918
2394
  *
2919
2395
  * @param params - Parameters for request
2920
2396
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3002,46 +2478,6 @@ export namespace tpu_v2alpha1 {
3002
2478
 
3003
2479
  /**
3004
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`.
3005
- * @example
3006
- * ```js
3007
- * // Before running the sample:
3008
- * // - Enable the API at:
3009
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3010
- * // - Login into gcloud by running:
3011
- * // `$ gcloud auth application-default login`
3012
- * // - Install the npm module by running:
3013
- * // `$ npm install googleapis`
3014
- *
3015
- * const {google} = require('googleapis');
3016
- * const tpu = google.tpu('v2alpha1');
3017
- *
3018
- * async function main() {
3019
- * const auth = new google.auth.GoogleAuth({
3020
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3021
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3022
- * });
3023
- *
3024
- * // Acquire an auth client, and bind it to all future calls
3025
- * const authClient = await auth.getClient();
3026
- * google.options({auth: authClient});
3027
- *
3028
- * // Do the magic
3029
- * const res = await tpu.projects.locations.operations.delete({
3030
- * // The name of the operation resource to be deleted.
3031
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
3032
- * });
3033
- * console.log(res.data);
3034
- *
3035
- * // Example response
3036
- * // {}
3037
- * }
3038
- *
3039
- * main().catch(e => {
3040
- * console.error(e);
3041
- * throw e;
3042
- * });
3043
- *
3044
- * ```
3045
2481
  *
3046
2482
  * @param params - Parameters for request
3047
2483
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3126,52 +2562,6 @@ export namespace tpu_v2alpha1 {
3126
2562
 
3127
2563
  /**
3128
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.
3129
- * @example
3130
- * ```js
3131
- * // Before running the sample:
3132
- * // - Enable the API at:
3133
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3134
- * // - Login into gcloud by running:
3135
- * // `$ gcloud auth application-default login`
3136
- * // - Install the npm module by running:
3137
- * // `$ npm install googleapis`
3138
- *
3139
- * const {google} = require('googleapis');
3140
- * const tpu = google.tpu('v2alpha1');
3141
- *
3142
- * async function main() {
3143
- * const auth = new google.auth.GoogleAuth({
3144
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3145
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3146
- * });
3147
- *
3148
- * // Acquire an auth client, and bind it to all future calls
3149
- * const authClient = await auth.getClient();
3150
- * google.options({auth: authClient});
3151
- *
3152
- * // Do the magic
3153
- * const res = await tpu.projects.locations.operations.get({
3154
- * // The name of the operation resource.
3155
- * name: 'projects/my-project/locations/my-location/operations/my-operation',
3156
- * });
3157
- * console.log(res.data);
3158
- *
3159
- * // Example response
3160
- * // {
3161
- * // "done": false,
3162
- * // "error": {},
3163
- * // "metadata": {},
3164
- * // "name": "my_name",
3165
- * // "response": {}
3166
- * // }
3167
- * }
3168
- *
3169
- * main().catch(e => {
3170
- * console.error(e);
3171
- * throw e;
3172
- * });
3173
- *
3174
- * ```
3175
2565
  *
3176
2566
  * @param params - Parameters for request
3177
2567
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3255,56 +2645,7 @@ export namespace tpu_v2alpha1 {
3255
2645
  }
3256
2646
 
3257
2647
  /**
3258
- * 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.
3259
- * @example
3260
- * ```js
3261
- * // Before running the sample:
3262
- * // - Enable the API at:
3263
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3264
- * // - Login into gcloud by running:
3265
- * // `$ gcloud auth application-default login`
3266
- * // - Install the npm module by running:
3267
- * // `$ npm install googleapis`
3268
- *
3269
- * const {google} = require('googleapis');
3270
- * const tpu = google.tpu('v2alpha1');
3271
- *
3272
- * async function main() {
3273
- * const auth = new google.auth.GoogleAuth({
3274
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3275
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3276
- * });
3277
- *
3278
- * // Acquire an auth client, and bind it to all future calls
3279
- * const authClient = await auth.getClient();
3280
- * google.options({auth: authClient});
3281
- *
3282
- * // Do the magic
3283
- * const res = await tpu.projects.locations.operations.list({
3284
- * // The standard list filter.
3285
- * filter: 'placeholder-value',
3286
- * // The name of the operation's parent resource.
3287
- * name: 'projects/my-project/locations/my-location',
3288
- * // The standard list page size.
3289
- * pageSize: 'placeholder-value',
3290
- * // The standard list page token.
3291
- * pageToken: 'placeholder-value',
3292
- * });
3293
- * console.log(res.data);
3294
- *
3295
- * // Example response
3296
- * // {
3297
- * // "nextPageToken": "my_nextPageToken",
3298
- * // "operations": []
3299
- * // }
3300
- * }
3301
- *
3302
- * main().catch(e => {
3303
- * console.error(e);
3304
- * throw e;
3305
- * });
3306
- *
3307
- * ```
2648
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
3308
2649
  *
3309
2650
  * @param params - Parameters for request
3310
2651
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3437,57 +2778,529 @@ export namespace tpu_v2alpha1 {
3437
2778
  pageToken?: string;
3438
2779
  }
3439
2780
 
3440
- export class Resource$Projects$Locations$Runtimeversions {
2781
+ export class Resource$Projects$Locations$Queuedresources {
3441
2782
  context: APIRequestContext;
3442
2783
  constructor(context: APIRequestContext) {
3443
2784
  this.context = context;
3444
2785
  }
3445
2786
 
3446
2787
  /**
3447
- * Gets a runtime version.
3448
- * @example
3449
- * ```js
3450
- * // Before running the sample:
3451
- * // - Enable the API at:
3452
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3453
- * // - Login into gcloud by running:
3454
- * // `$ gcloud auth application-default login`
3455
- * // - Install the npm module by running:
3456
- * // `$ npm install googleapis`
3457
- *
3458
- * const {google} = require('googleapis');
3459
- * const tpu = google.tpu('v2alpha1');
2788
+ * Creates a QueuedResource TPU instance.
3460
2789
  *
3461
- * async function main() {
3462
- * const auth = new google.auth.GoogleAuth({
3463
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3464
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3465
- * });
3466
- *
3467
- * // Acquire an auth client, and bind it to all future calls
3468
- * const authClient = await auth.getClient();
3469
- * 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.
3470
2877
  *
3471
- * // Do the magic
3472
- * const res = await tpu.projects.locations.runtimeVersions.get({
3473
- * // Required. The resource name.
3474
- * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
3475
- * });
3476
- * 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.
3477
2962
  *
3478
- * // Example response
3479
- * // {
3480
- * // "name": "my_name",
3481
- * // "version": "my_version"
3482
- * // }
3483
- * }
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.
3484
3046
  *
3485
- * main().catch(e => {
3486
- * console.error(e);
3487
- * throw e;
3488
- * });
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
3489
3140
  *
3490
- * ```
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.
3491
3304
  *
3492
3305
  * @param params - Parameters for request
3493
3306
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3572,58 +3385,6 @@ export namespace tpu_v2alpha1 {
3572
3385
 
3573
3386
  /**
3574
3387
  * Lists runtime versions supported by this API.
3575
- * @example
3576
- * ```js
3577
- * // Before running the sample:
3578
- * // - Enable the API at:
3579
- * // https://console.developers.google.com/apis/api/tpu.googleapis.com
3580
- * // - Login into gcloud by running:
3581
- * // `$ gcloud auth application-default login`
3582
- * // - Install the npm module by running:
3583
- * // `$ npm install googleapis`
3584
- *
3585
- * const {google} = require('googleapis');
3586
- * const tpu = google.tpu('v2alpha1');
3587
- *
3588
- * async function main() {
3589
- * const auth = new google.auth.GoogleAuth({
3590
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3591
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3592
- * });
3593
- *
3594
- * // Acquire an auth client, and bind it to all future calls
3595
- * const authClient = await auth.getClient();
3596
- * google.options({auth: authClient});
3597
- *
3598
- * // Do the magic
3599
- * const res = await tpu.projects.locations.runtimeVersions.list({
3600
- * // List filter.
3601
- * filter: 'placeholder-value',
3602
- * // Sort results.
3603
- * orderBy: 'placeholder-value',
3604
- * // The maximum number of items to return.
3605
- * pageSize: 'placeholder-value',
3606
- * // The next_page_token value returned from a previous List request, if any.
3607
- * pageToken: 'placeholder-value',
3608
- * // Required. The parent resource name.
3609
- * parent: 'projects/my-project/locations/my-location',
3610
- * });
3611
- * console.log(res.data);
3612
- *
3613
- * // Example response
3614
- * // {
3615
- * // "nextPageToken": "my_nextPageToken",
3616
- * // "runtimeVersions": [],
3617
- * // "unreachable": []
3618
- * // }
3619
- * }
3620
- *
3621
- * main().catch(e => {
3622
- * console.error(e);
3623
- * throw e;
3624
- * });
3625
- *
3626
- * ```
3627
3388
  *
3628
3389
  * @param params - Parameters for request
3629
3390
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.