@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/v2.ts ADDED
@@ -0,0 +1,2624 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/no-unused-vars */
16
+ /* eslint-disable @typescript-eslint/no-empty-interface */
17
+ /* eslint-disable @typescript-eslint/no-namespace */
18
+ /* eslint-disable no-irregular-whitespace */
19
+
20
+ import {
21
+ OAuth2Client,
22
+ JWT,
23
+ Compute,
24
+ UserRefreshClient,
25
+ BaseExternalAccountClient,
26
+ GaxiosPromise,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace tpu_v2 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'v2';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | BaseExternalAccountClient
54
+ | GoogleAuth;
55
+
56
+ /**
57
+ * V1 error format.
58
+ */
59
+ '$.xgafv'?: string;
60
+ /**
61
+ * OAuth access token.
62
+ */
63
+ access_token?: string;
64
+ /**
65
+ * Data format for response.
66
+ */
67
+ alt?: string;
68
+ /**
69
+ * JSONP
70
+ */
71
+ callback?: string;
72
+ /**
73
+ * Selector specifying which fields to include in a partial response.
74
+ */
75
+ fields?: string;
76
+ /**
77
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
78
+ */
79
+ key?: string;
80
+ /**
81
+ * OAuth 2.0 token for the current user.
82
+ */
83
+ oauth_token?: string;
84
+ /**
85
+ * Returns response with indentations and line breaks.
86
+ */
87
+ prettyPrint?: boolean;
88
+ /**
89
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
90
+ */
91
+ quotaUser?: string;
92
+ /**
93
+ * Legacy upload protocol for media (e.g. "media", "multipart").
94
+ */
95
+ uploadType?: string;
96
+ /**
97
+ * Upload protocol for media (e.g. "raw", "multipart").
98
+ */
99
+ upload_protocol?: string;
100
+ }
101
+
102
+ /**
103
+ * Cloud TPU API
104
+ *
105
+ * TPU API provides customers with access to Google TPU technology.
106
+ *
107
+ * @example
108
+ * ```js
109
+ * const {google} = require('googleapis');
110
+ * const tpu = google.tpu('v2');
111
+ * ```
112
+ */
113
+ export class Tpu {
114
+ context: APIRequestContext;
115
+ projects: Resource$Projects;
116
+
117
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
118
+ this.context = {
119
+ _options: options || {},
120
+ google,
121
+ };
122
+
123
+ this.projects = new Resource$Projects(this.context);
124
+ }
125
+ }
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
+ }
140
+ /**
141
+ * A accelerator type that a Node can be configured with.
142
+ */
143
+ export interface Schema$AcceleratorType {
144
+ /**
145
+ * The accelerator config.
146
+ */
147
+ acceleratorConfigs?: Schema$AcceleratorConfig[];
148
+ /**
149
+ * The resource name.
150
+ */
151
+ name?: string | null;
152
+ /**
153
+ * The accelerator type.
154
+ */
155
+ type?: string | null;
156
+ }
157
+ /**
158
+ * An access config attached to the TPU worker.
159
+ */
160
+ export interface Schema$AccessConfig {
161
+ /**
162
+ * Output only. An external IP address associated with the TPU worker.
163
+ */
164
+ externalIp?: string | null;
165
+ }
166
+ /**
167
+ * A node-attached disk resource. Next ID: 8;
168
+ */
169
+ export interface Schema$AttachedDisk {
170
+ /**
171
+ * The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.
172
+ */
173
+ mode?: string | null;
174
+ /**
175
+ * Specifies the full path to an existing disk. For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
176
+ */
177
+ sourceDisk?: string | null;
178
+ }
179
+ /**
180
+ * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
181
+ */
182
+ export interface Schema$Empty {}
183
+ /**
184
+ * Request for GenerateServiceIdentity.
185
+ */
186
+ export interface Schema$GenerateServiceIdentityRequest {}
187
+ /**
188
+ * Response for GenerateServiceIdentity.
189
+ */
190
+ export interface Schema$GenerateServiceIdentityResponse {
191
+ /**
192
+ * ServiceIdentity that was created or retrieved.
193
+ */
194
+ identity?: Schema$ServiceIdentity;
195
+ }
196
+ /**
197
+ * Request for GetGuestAttributes.
198
+ */
199
+ export interface Schema$GetGuestAttributesRequest {
200
+ /**
201
+ * The guest attributes path to be queried.
202
+ */
203
+ queryPath?: string | null;
204
+ /**
205
+ * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned.
206
+ */
207
+ workerIds?: string[] | null;
208
+ }
209
+ /**
210
+ * Response for GetGuestAttributes.
211
+ */
212
+ export interface Schema$GetGuestAttributesResponse {
213
+ /**
214
+ * The guest attributes for the TPU workers.
215
+ */
216
+ guestAttributes?: Schema$GuestAttributes[];
217
+ }
218
+ /**
219
+ * A guest attributes.
220
+ */
221
+ export interface Schema$GuestAttributes {
222
+ /**
223
+ * The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\/') or a specified key ('/\/\')
224
+ */
225
+ queryPath?: string | null;
226
+ /**
227
+ * The value of the requested queried path.
228
+ */
229
+ queryValue?: Schema$GuestAttributesValue;
230
+ }
231
+ /**
232
+ * A guest attributes namespace/key/value entry.
233
+ */
234
+ export interface Schema$GuestAttributesEntry {
235
+ /**
236
+ * Key for the guest attribute entry.
237
+ */
238
+ key?: string | null;
239
+ /**
240
+ * Namespace for the guest attribute entry.
241
+ */
242
+ namespace?: string | null;
243
+ /**
244
+ * Value for the guest attribute entry.
245
+ */
246
+ value?: string | null;
247
+ }
248
+ /**
249
+ * Array of guest attribute namespace/key/value tuples.
250
+ */
251
+ export interface Schema$GuestAttributesValue {
252
+ /**
253
+ * The list of guest attributes entries.
254
+ */
255
+ items?: Schema$GuestAttributesEntry[];
256
+ }
257
+ /**
258
+ * Response for ListAcceleratorTypes.
259
+ */
260
+ export interface Schema$ListAcceleratorTypesResponse {
261
+ /**
262
+ * The listed nodes.
263
+ */
264
+ acceleratorTypes?: Schema$AcceleratorType[];
265
+ /**
266
+ * The next page token or empty if none.
267
+ */
268
+ nextPageToken?: string | null;
269
+ /**
270
+ * Locations that could not be reached.
271
+ */
272
+ unreachable?: string[] | null;
273
+ }
274
+ /**
275
+ * The response message for Locations.ListLocations.
276
+ */
277
+ export interface Schema$ListLocationsResponse {
278
+ /**
279
+ * A list of locations that matches the specified filter in the request.
280
+ */
281
+ locations?: Schema$Location[];
282
+ /**
283
+ * The standard List next-page token.
284
+ */
285
+ nextPageToken?: string | null;
286
+ }
287
+ /**
288
+ * Response for ListNodes.
289
+ */
290
+ export interface Schema$ListNodesResponse {
291
+ /**
292
+ * The next page token or empty if none.
293
+ */
294
+ nextPageToken?: string | null;
295
+ /**
296
+ * The listed nodes.
297
+ */
298
+ nodes?: Schema$Node[];
299
+ /**
300
+ * Locations that could not be reached.
301
+ */
302
+ unreachable?: string[] | null;
303
+ }
304
+ /**
305
+ * The response message for Operations.ListOperations.
306
+ */
307
+ export interface Schema$ListOperationsResponse {
308
+ /**
309
+ * The standard List next-page token.
310
+ */
311
+ nextPageToken?: string | null;
312
+ /**
313
+ * A list of operations that matches the specified filter in the request.
314
+ */
315
+ operations?: Schema$Operation[];
316
+ }
317
+ /**
318
+ * Response for ListRuntimeVersions.
319
+ */
320
+ export interface Schema$ListRuntimeVersionsResponse {
321
+ /**
322
+ * The next page token or empty if none.
323
+ */
324
+ nextPageToken?: string | null;
325
+ /**
326
+ * The listed nodes.
327
+ */
328
+ runtimeVersions?: Schema$RuntimeVersion[];
329
+ /**
330
+ * Locations that could not be reached.
331
+ */
332
+ unreachable?: string[] | null;
333
+ }
334
+ /**
335
+ * A resource that represents a Google Cloud location.
336
+ */
337
+ export interface Schema$Location {
338
+ /**
339
+ * The friendly name for this location, typically a nearby city name. For example, "Tokyo".
340
+ */
341
+ displayName?: string | null;
342
+ /**
343
+ * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\}
344
+ */
345
+ labels?: {[key: string]: string} | null;
346
+ /**
347
+ * The canonical id for this location. For example: `"us-east1"`.
348
+ */
349
+ locationId?: string | null;
350
+ /**
351
+ * Service-specific metadata. For example the available capacity at the given location.
352
+ */
353
+ metadata?: {[key: string]: any} | null;
354
+ /**
355
+ * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"`
356
+ */
357
+ name?: string | null;
358
+ }
359
+ /**
360
+ * Network related configurations.
361
+ */
362
+ export interface Schema$NetworkConfig {
363
+ /**
364
+ * Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.
365
+ */
366
+ canIpForward?: boolean | null;
367
+ /**
368
+ * Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.
369
+ */
370
+ enableExternalIps?: boolean | null;
371
+ /**
372
+ * The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used.
373
+ */
374
+ network?: string | null;
375
+ /**
376
+ * The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used.
377
+ */
378
+ subnetwork?: string | null;
379
+ }
380
+ /**
381
+ * A network endpoint over which a TPU worker can be reached.
382
+ */
383
+ export interface Schema$NetworkEndpoint {
384
+ /**
385
+ * The access config for the TPU worker.
386
+ */
387
+ accessConfig?: Schema$AccessConfig;
388
+ /**
389
+ * The internal IP address of this network endpoint.
390
+ */
391
+ ipAddress?: string | null;
392
+ /**
393
+ * The port of this network endpoint.
394
+ */
395
+ port?: number | null;
396
+ }
397
+ /**
398
+ * A TPU instance.
399
+ */
400
+ export interface Schema$Node {
401
+ /**
402
+ * The AccleratorConfig for the TPU Node.
403
+ */
404
+ acceleratorConfig?: Schema$AcceleratorConfig;
405
+ /**
406
+ * Optional. The type of hardware accelerators associated with this node.
407
+ */
408
+ acceleratorType?: string | null;
409
+ /**
410
+ * Output only. The API version that created this Node.
411
+ */
412
+ apiVersion?: string | null;
413
+ /**
414
+ * The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.
415
+ */
416
+ cidrBlock?: string | null;
417
+ /**
418
+ * Output only. The time when the node was created.
419
+ */
420
+ createTime?: string | null;
421
+ /**
422
+ * The additional data disks for the Node.
423
+ */
424
+ dataDisks?: Schema$AttachedDisk[];
425
+ /**
426
+ * The user-supplied description of the TPU. Maximum of 512 characters.
427
+ */
428
+ description?: string | null;
429
+ /**
430
+ * The health status of the TPU node.
431
+ */
432
+ health?: string | null;
433
+ /**
434
+ * Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.
435
+ */
436
+ healthDescription?: string | null;
437
+ /**
438
+ * Output only. The unique identifier for the TPU Node.
439
+ */
440
+ id?: string | null;
441
+ /**
442
+ * Resource labels to represent user-provided metadata.
443
+ */
444
+ labels?: {[key: string]: string} | null;
445
+ /**
446
+ * Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
447
+ */
448
+ metadata?: {[key: string]: string} | null;
449
+ /**
450
+ * Output only. Whether the Node belongs to a Multislice group.
451
+ */
452
+ multisliceNode?: boolean | null;
453
+ /**
454
+ * Output only. Immutable. The name of the TPU.
455
+ */
456
+ name?: string | null;
457
+ /**
458
+ * Network configurations for the TPU node.
459
+ */
460
+ networkConfig?: Schema$NetworkConfig;
461
+ /**
462
+ * 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.
463
+ */
464
+ networkEndpoints?: Schema$NetworkEndpoint[];
465
+ /**
466
+ * Output only. The qualified name of the QueuedResource that requested this Node.
467
+ */
468
+ queuedResource?: string | null;
469
+ /**
470
+ * Required. The runtime version running in the Node.
471
+ */
472
+ runtimeVersion?: string | null;
473
+ /**
474
+ * The scheduling options for this node.
475
+ */
476
+ schedulingConfig?: Schema$SchedulingConfig;
477
+ /**
478
+ * 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.
479
+ */
480
+ serviceAccount?: Schema$ServiceAccount;
481
+ /**
482
+ * Shielded Instance options.
483
+ */
484
+ shieldedInstanceConfig?: Schema$ShieldedInstanceConfig;
485
+ /**
486
+ * Output only. The current state for the TPU Node.
487
+ */
488
+ state?: string | null;
489
+ /**
490
+ * Output only. The Symptoms that have occurred to the TPU Node.
491
+ */
492
+ symptoms?: Schema$Symptom[];
493
+ /**
494
+ * Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
495
+ */
496
+ tags?: string[] | null;
497
+ }
498
+ /**
499
+ * This resource represents a long-running operation that is the result of a network API call.
500
+ */
501
+ export interface Schema$Operation {
502
+ /**
503
+ * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
504
+ */
505
+ done?: boolean | null;
506
+ /**
507
+ * The error result of the operation in case of failure or cancellation.
508
+ */
509
+ error?: Schema$Status;
510
+ /**
511
+ * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
512
+ */
513
+ metadata?: {[key: string]: any} | null;
514
+ /**
515
+ * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`.
516
+ */
517
+ name?: string | null;
518
+ /**
519
+ * 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`.
520
+ */
521
+ response?: {[key: string]: any} | null;
522
+ }
523
+ /**
524
+ * Metadata describing an Operation
525
+ */
526
+ export interface Schema$OperationMetadata {
527
+ /**
528
+ * API version.
529
+ */
530
+ apiVersion?: string | null;
531
+ /**
532
+ * Specifies if cancellation was requested for the operation.
533
+ */
534
+ cancelRequested?: boolean | null;
535
+ /**
536
+ * The time the operation was created.
537
+ */
538
+ createTime?: string | null;
539
+ /**
540
+ * The time the operation finished running.
541
+ */
542
+ endTime?: string | null;
543
+ /**
544
+ * Human-readable status of the operation, if any.
545
+ */
546
+ statusDetail?: string | null;
547
+ /**
548
+ * Target of the operation - for example projects/project-1/connectivityTests/test-1
549
+ */
550
+ target?: string | null;
551
+ /**
552
+ * Name of the verb executed by the operation.
553
+ */
554
+ verb?: string | null;
555
+ }
556
+ /**
557
+ * A runtime version that a Node can be configured with.
558
+ */
559
+ export interface Schema$RuntimeVersion {
560
+ /**
561
+ * The resource name.
562
+ */
563
+ name?: string | null;
564
+ /**
565
+ * The runtime version.
566
+ */
567
+ version?: string | null;
568
+ }
569
+ /**
570
+ * Sets the scheduling options for this node.
571
+ */
572
+ export interface Schema$SchedulingConfig {
573
+ /**
574
+ * Defines whether the node is preemptible.
575
+ */
576
+ preemptible?: boolean | null;
577
+ /**
578
+ * Whether the node is created under a reservation.
579
+ */
580
+ reserved?: boolean | null;
581
+ }
582
+ /**
583
+ * A service account.
584
+ */
585
+ export interface Schema$ServiceAccount {
586
+ /**
587
+ * Email address of the service account. If empty, default Compute service account will be used.
588
+ */
589
+ email?: string | null;
590
+ /**
591
+ * The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.
592
+ */
593
+ scope?: string[] | null;
594
+ }
595
+ /**
596
+ * The per-product per-project service identity for Cloud TPU service.
597
+ */
598
+ export interface Schema$ServiceIdentity {
599
+ /**
600
+ * The email address of the service identity.
601
+ */
602
+ email?: string | null;
603
+ }
604
+ /**
605
+ * A set of Shielded Instance options.
606
+ */
607
+ export interface Schema$ShieldedInstanceConfig {
608
+ /**
609
+ * Defines whether the instance has Secure Boot enabled.
610
+ */
611
+ enableSecureBoot?: boolean | null;
612
+ }
613
+ /**
614
+ * Request for StartNode.
615
+ */
616
+ export interface Schema$StartNodeRequest {}
617
+ /**
618
+ * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
619
+ */
620
+ export interface Schema$Status {
621
+ /**
622
+ * The status code, which should be an enum value of google.rpc.Code.
623
+ */
624
+ code?: number | null;
625
+ /**
626
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
627
+ */
628
+ details?: Array<{[key: string]: any}> | null;
629
+ /**
630
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
631
+ */
632
+ message?: string | null;
633
+ }
634
+ /**
635
+ * Request for StopNode.
636
+ */
637
+ export interface Schema$StopNodeRequest {}
638
+ /**
639
+ * A Symptom instance.
640
+ */
641
+ export interface Schema$Symptom {
642
+ /**
643
+ * Timestamp when the Symptom is created.
644
+ */
645
+ createTime?: string | null;
646
+ /**
647
+ * Detailed information of the current Symptom.
648
+ */
649
+ details?: string | null;
650
+ /**
651
+ * Type of the Symptom.
652
+ */
653
+ symptomType?: string | null;
654
+ /**
655
+ * A string used to uniquely distinguish a worker within a TPU node.
656
+ */
657
+ workerId?: string | null;
658
+ }
659
+
660
+ export class Resource$Projects {
661
+ context: APIRequestContext;
662
+ locations: Resource$Projects$Locations;
663
+ constructor(context: APIRequestContext) {
664
+ this.context = context;
665
+ this.locations = new Resource$Projects$Locations(this.context);
666
+ }
667
+ }
668
+
669
+ export class Resource$Projects$Locations {
670
+ context: APIRequestContext;
671
+ acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
672
+ nodes: Resource$Projects$Locations$Nodes;
673
+ operations: Resource$Projects$Locations$Operations;
674
+ runtimeVersions: Resource$Projects$Locations$Runtimeversions;
675
+ constructor(context: APIRequestContext) {
676
+ this.context = context;
677
+ this.acceleratorTypes = new Resource$Projects$Locations$Acceleratortypes(
678
+ this.context
679
+ );
680
+ this.nodes = new Resource$Projects$Locations$Nodes(this.context);
681
+ this.operations = new Resource$Projects$Locations$Operations(
682
+ this.context
683
+ );
684
+ this.runtimeVersions = new Resource$Projects$Locations$Runtimeversions(
685
+ this.context
686
+ );
687
+ }
688
+
689
+ /**
690
+ * Generates the Cloud TPU service identity for the project.
691
+ *
692
+ * @param params - Parameters for request
693
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
694
+ * @param callback - Optional callback that handles the response.
695
+ * @returns A promise if used with async/await, or void if used with a callback.
696
+ */
697
+ generateServiceIdentity(
698
+ params: Params$Resource$Projects$Locations$Generateserviceidentity,
699
+ options: StreamMethodOptions
700
+ ): GaxiosPromise<Readable>;
701
+ generateServiceIdentity(
702
+ params?: Params$Resource$Projects$Locations$Generateserviceidentity,
703
+ options?: MethodOptions
704
+ ): GaxiosPromise<Schema$GenerateServiceIdentityResponse>;
705
+ generateServiceIdentity(
706
+ params: Params$Resource$Projects$Locations$Generateserviceidentity,
707
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
708
+ callback: BodyResponseCallback<Readable>
709
+ ): void;
710
+ generateServiceIdentity(
711
+ params: Params$Resource$Projects$Locations$Generateserviceidentity,
712
+ options:
713
+ | MethodOptions
714
+ | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>,
715
+ callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
716
+ ): void;
717
+ generateServiceIdentity(
718
+ params: Params$Resource$Projects$Locations$Generateserviceidentity,
719
+ callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
720
+ ): void;
721
+ generateServiceIdentity(
722
+ callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
723
+ ): void;
724
+ generateServiceIdentity(
725
+ paramsOrCallback?:
726
+ | Params$Resource$Projects$Locations$Generateserviceidentity
727
+ | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
728
+ | BodyResponseCallback<Readable>,
729
+ optionsOrCallback?:
730
+ | MethodOptions
731
+ | StreamMethodOptions
732
+ | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
733
+ | BodyResponseCallback<Readable>,
734
+ callback?:
735
+ | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>
736
+ | BodyResponseCallback<Readable>
737
+ ):
738
+ | void
739
+ | GaxiosPromise<Schema$GenerateServiceIdentityResponse>
740
+ | GaxiosPromise<Readable> {
741
+ let params = (paramsOrCallback ||
742
+ {}) as Params$Resource$Projects$Locations$Generateserviceidentity;
743
+ let options = (optionsOrCallback || {}) as MethodOptions;
744
+
745
+ if (typeof paramsOrCallback === 'function') {
746
+ callback = paramsOrCallback;
747
+ params =
748
+ {} as Params$Resource$Projects$Locations$Generateserviceidentity;
749
+ options = {};
750
+ }
751
+
752
+ if (typeof optionsOrCallback === 'function') {
753
+ callback = optionsOrCallback;
754
+ options = {};
755
+ }
756
+
757
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
758
+ const parameters = {
759
+ options: Object.assign(
760
+ {
761
+ url: (rootUrl + '/v2/{+parent}:generateServiceIdentity').replace(
762
+ /([^:]\/)\/+/g,
763
+ '$1'
764
+ ),
765
+ method: 'POST',
766
+ },
767
+ options
768
+ ),
769
+ params,
770
+ requiredParams: ['parent'],
771
+ pathParams: ['parent'],
772
+ context: this.context,
773
+ };
774
+ if (callback) {
775
+ createAPIRequest<Schema$GenerateServiceIdentityResponse>(
776
+ parameters,
777
+ callback as BodyResponseCallback<unknown>
778
+ );
779
+ } else {
780
+ return createAPIRequest<Schema$GenerateServiceIdentityResponse>(
781
+ parameters
782
+ );
783
+ }
784
+ }
785
+
786
+ /**
787
+ * Gets information about a location.
788
+ *
789
+ * @param params - Parameters for request
790
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
791
+ * @param callback - Optional callback that handles the response.
792
+ * @returns A promise if used with async/await, or void if used with a callback.
793
+ */
794
+ get(
795
+ params: Params$Resource$Projects$Locations$Get,
796
+ options: StreamMethodOptions
797
+ ): GaxiosPromise<Readable>;
798
+ get(
799
+ params?: Params$Resource$Projects$Locations$Get,
800
+ options?: MethodOptions
801
+ ): GaxiosPromise<Schema$Location>;
802
+ get(
803
+ params: Params$Resource$Projects$Locations$Get,
804
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
805
+ callback: BodyResponseCallback<Readable>
806
+ ): void;
807
+ get(
808
+ params: Params$Resource$Projects$Locations$Get,
809
+ options: MethodOptions | BodyResponseCallback<Schema$Location>,
810
+ callback: BodyResponseCallback<Schema$Location>
811
+ ): void;
812
+ get(
813
+ params: Params$Resource$Projects$Locations$Get,
814
+ callback: BodyResponseCallback<Schema$Location>
815
+ ): void;
816
+ get(callback: BodyResponseCallback<Schema$Location>): void;
817
+ get(
818
+ paramsOrCallback?:
819
+ | Params$Resource$Projects$Locations$Get
820
+ | BodyResponseCallback<Schema$Location>
821
+ | BodyResponseCallback<Readable>,
822
+ optionsOrCallback?:
823
+ | MethodOptions
824
+ | StreamMethodOptions
825
+ | BodyResponseCallback<Schema$Location>
826
+ | BodyResponseCallback<Readable>,
827
+ callback?:
828
+ | BodyResponseCallback<Schema$Location>
829
+ | BodyResponseCallback<Readable>
830
+ ): void | GaxiosPromise<Schema$Location> | GaxiosPromise<Readable> {
831
+ let params = (paramsOrCallback ||
832
+ {}) as Params$Resource$Projects$Locations$Get;
833
+ let options = (optionsOrCallback || {}) as MethodOptions;
834
+
835
+ if (typeof paramsOrCallback === 'function') {
836
+ callback = paramsOrCallback;
837
+ params = {} as Params$Resource$Projects$Locations$Get;
838
+ options = {};
839
+ }
840
+
841
+ if (typeof optionsOrCallback === 'function') {
842
+ callback = optionsOrCallback;
843
+ options = {};
844
+ }
845
+
846
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
847
+ const parameters = {
848
+ options: Object.assign(
849
+ {
850
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
851
+ method: 'GET',
852
+ },
853
+ options
854
+ ),
855
+ params,
856
+ requiredParams: ['name'],
857
+ pathParams: ['name'],
858
+ context: this.context,
859
+ };
860
+ if (callback) {
861
+ createAPIRequest<Schema$Location>(
862
+ parameters,
863
+ callback as BodyResponseCallback<unknown>
864
+ );
865
+ } else {
866
+ return createAPIRequest<Schema$Location>(parameters);
867
+ }
868
+ }
869
+
870
+ /**
871
+ * Lists information about the supported locations for this service.
872
+ *
873
+ * @param params - Parameters for request
874
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
875
+ * @param callback - Optional callback that handles the response.
876
+ * @returns A promise if used with async/await, or void if used with a callback.
877
+ */
878
+ list(
879
+ params: Params$Resource$Projects$Locations$List,
880
+ options: StreamMethodOptions
881
+ ): GaxiosPromise<Readable>;
882
+ list(
883
+ params?: Params$Resource$Projects$Locations$List,
884
+ options?: MethodOptions
885
+ ): GaxiosPromise<Schema$ListLocationsResponse>;
886
+ list(
887
+ params: Params$Resource$Projects$Locations$List,
888
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
889
+ callback: BodyResponseCallback<Readable>
890
+ ): void;
891
+ list(
892
+ params: Params$Resource$Projects$Locations$List,
893
+ options:
894
+ | MethodOptions
895
+ | BodyResponseCallback<Schema$ListLocationsResponse>,
896
+ callback: BodyResponseCallback<Schema$ListLocationsResponse>
897
+ ): void;
898
+ list(
899
+ params: Params$Resource$Projects$Locations$List,
900
+ callback: BodyResponseCallback<Schema$ListLocationsResponse>
901
+ ): void;
902
+ list(callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
903
+ list(
904
+ paramsOrCallback?:
905
+ | Params$Resource$Projects$Locations$List
906
+ | BodyResponseCallback<Schema$ListLocationsResponse>
907
+ | BodyResponseCallback<Readable>,
908
+ optionsOrCallback?:
909
+ | MethodOptions
910
+ | StreamMethodOptions
911
+ | BodyResponseCallback<Schema$ListLocationsResponse>
912
+ | BodyResponseCallback<Readable>,
913
+ callback?:
914
+ | BodyResponseCallback<Schema$ListLocationsResponse>
915
+ | BodyResponseCallback<Readable>
916
+ ):
917
+ | void
918
+ | GaxiosPromise<Schema$ListLocationsResponse>
919
+ | GaxiosPromise<Readable> {
920
+ let params = (paramsOrCallback ||
921
+ {}) as Params$Resource$Projects$Locations$List;
922
+ let options = (optionsOrCallback || {}) as MethodOptions;
923
+
924
+ if (typeof paramsOrCallback === 'function') {
925
+ callback = paramsOrCallback;
926
+ params = {} as Params$Resource$Projects$Locations$List;
927
+ options = {};
928
+ }
929
+
930
+ if (typeof optionsOrCallback === 'function') {
931
+ callback = optionsOrCallback;
932
+ options = {};
933
+ }
934
+
935
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
936
+ const parameters = {
937
+ options: Object.assign(
938
+ {
939
+ url: (rootUrl + '/v2/{+name}/locations').replace(
940
+ /([^:]\/)\/+/g,
941
+ '$1'
942
+ ),
943
+ method: 'GET',
944
+ },
945
+ options
946
+ ),
947
+ params,
948
+ requiredParams: ['name'],
949
+ pathParams: ['name'],
950
+ context: this.context,
951
+ };
952
+ if (callback) {
953
+ createAPIRequest<Schema$ListLocationsResponse>(
954
+ parameters,
955
+ callback as BodyResponseCallback<unknown>
956
+ );
957
+ } else {
958
+ return createAPIRequest<Schema$ListLocationsResponse>(parameters);
959
+ }
960
+ }
961
+ }
962
+
963
+ export interface Params$Resource$Projects$Locations$Generateserviceidentity
964
+ extends StandardParameters {
965
+ /**
966
+ * Required. The parent resource name.
967
+ */
968
+ parent?: string;
969
+
970
+ /**
971
+ * Request body metadata
972
+ */
973
+ requestBody?: Schema$GenerateServiceIdentityRequest;
974
+ }
975
+ export interface Params$Resource$Projects$Locations$Get
976
+ extends StandardParameters {
977
+ /**
978
+ * Resource name for the location.
979
+ */
980
+ name?: string;
981
+ }
982
+ export interface Params$Resource$Projects$Locations$List
983
+ extends StandardParameters {
984
+ /**
985
+ * 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).
986
+ */
987
+ filter?: string;
988
+ /**
989
+ * The resource that owns the locations collection, if applicable.
990
+ */
991
+ name?: string;
992
+ /**
993
+ * The maximum number of results to return. If not set, the service selects a default.
994
+ */
995
+ pageSize?: number;
996
+ /**
997
+ * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
998
+ */
999
+ pageToken?: string;
1000
+ }
1001
+
1002
+ export class Resource$Projects$Locations$Acceleratortypes {
1003
+ context: APIRequestContext;
1004
+ constructor(context: APIRequestContext) {
1005
+ this.context = context;
1006
+ }
1007
+
1008
+ /**
1009
+ * Gets AcceleratorType.
1010
+ *
1011
+ * @param params - Parameters for request
1012
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1013
+ * @param callback - Optional callback that handles the response.
1014
+ * @returns A promise if used with async/await, or void if used with a callback.
1015
+ */
1016
+ get(
1017
+ params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1018
+ options: StreamMethodOptions
1019
+ ): GaxiosPromise<Readable>;
1020
+ get(
1021
+ params?: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1022
+ options?: MethodOptions
1023
+ ): GaxiosPromise<Schema$AcceleratorType>;
1024
+ get(
1025
+ params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1026
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1027
+ callback: BodyResponseCallback<Readable>
1028
+ ): void;
1029
+ get(
1030
+ params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1031
+ options: MethodOptions | BodyResponseCallback<Schema$AcceleratorType>,
1032
+ callback: BodyResponseCallback<Schema$AcceleratorType>
1033
+ ): void;
1034
+ get(
1035
+ params: Params$Resource$Projects$Locations$Acceleratortypes$Get,
1036
+ callback: BodyResponseCallback<Schema$AcceleratorType>
1037
+ ): void;
1038
+ get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
1039
+ get(
1040
+ paramsOrCallback?:
1041
+ | Params$Resource$Projects$Locations$Acceleratortypes$Get
1042
+ | BodyResponseCallback<Schema$AcceleratorType>
1043
+ | BodyResponseCallback<Readable>,
1044
+ optionsOrCallback?:
1045
+ | MethodOptions
1046
+ | StreamMethodOptions
1047
+ | BodyResponseCallback<Schema$AcceleratorType>
1048
+ | BodyResponseCallback<Readable>,
1049
+ callback?:
1050
+ | BodyResponseCallback<Schema$AcceleratorType>
1051
+ | BodyResponseCallback<Readable>
1052
+ ): void | GaxiosPromise<Schema$AcceleratorType> | GaxiosPromise<Readable> {
1053
+ let params = (paramsOrCallback ||
1054
+ {}) as Params$Resource$Projects$Locations$Acceleratortypes$Get;
1055
+ let options = (optionsOrCallback || {}) as MethodOptions;
1056
+
1057
+ if (typeof paramsOrCallback === 'function') {
1058
+ callback = paramsOrCallback;
1059
+ params = {} as Params$Resource$Projects$Locations$Acceleratortypes$Get;
1060
+ options = {};
1061
+ }
1062
+
1063
+ if (typeof optionsOrCallback === 'function') {
1064
+ callback = optionsOrCallback;
1065
+ options = {};
1066
+ }
1067
+
1068
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1069
+ const parameters = {
1070
+ options: Object.assign(
1071
+ {
1072
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1073
+ method: 'GET',
1074
+ },
1075
+ options
1076
+ ),
1077
+ params,
1078
+ requiredParams: ['name'],
1079
+ pathParams: ['name'],
1080
+ context: this.context,
1081
+ };
1082
+ if (callback) {
1083
+ createAPIRequest<Schema$AcceleratorType>(
1084
+ parameters,
1085
+ callback as BodyResponseCallback<unknown>
1086
+ );
1087
+ } else {
1088
+ return createAPIRequest<Schema$AcceleratorType>(parameters);
1089
+ }
1090
+ }
1091
+
1092
+ /**
1093
+ * Lists accelerator types supported by this API.
1094
+ *
1095
+ * @param params - Parameters for request
1096
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1097
+ * @param callback - Optional callback that handles the response.
1098
+ * @returns A promise if used with async/await, or void if used with a callback.
1099
+ */
1100
+ list(
1101
+ params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1102
+ options: StreamMethodOptions
1103
+ ): GaxiosPromise<Readable>;
1104
+ list(
1105
+ params?: Params$Resource$Projects$Locations$Acceleratortypes$List,
1106
+ options?: MethodOptions
1107
+ ): GaxiosPromise<Schema$ListAcceleratorTypesResponse>;
1108
+ list(
1109
+ params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1110
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1111
+ callback: BodyResponseCallback<Readable>
1112
+ ): void;
1113
+ list(
1114
+ params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1115
+ options:
1116
+ | MethodOptions
1117
+ | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>,
1118
+ callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1119
+ ): void;
1120
+ list(
1121
+ params: Params$Resource$Projects$Locations$Acceleratortypes$List,
1122
+ callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1123
+ ): void;
1124
+ list(
1125
+ callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1126
+ ): void;
1127
+ list(
1128
+ paramsOrCallback?:
1129
+ | Params$Resource$Projects$Locations$Acceleratortypes$List
1130
+ | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1131
+ | BodyResponseCallback<Readable>,
1132
+ optionsOrCallback?:
1133
+ | MethodOptions
1134
+ | StreamMethodOptions
1135
+ | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1136
+ | BodyResponseCallback<Readable>,
1137
+ callback?:
1138
+ | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>
1139
+ | BodyResponseCallback<Readable>
1140
+ ):
1141
+ | void
1142
+ | GaxiosPromise<Schema$ListAcceleratorTypesResponse>
1143
+ | GaxiosPromise<Readable> {
1144
+ let params = (paramsOrCallback ||
1145
+ {}) as Params$Resource$Projects$Locations$Acceleratortypes$List;
1146
+ let options = (optionsOrCallback || {}) as MethodOptions;
1147
+
1148
+ if (typeof paramsOrCallback === 'function') {
1149
+ callback = paramsOrCallback;
1150
+ params = {} as Params$Resource$Projects$Locations$Acceleratortypes$List;
1151
+ options = {};
1152
+ }
1153
+
1154
+ if (typeof optionsOrCallback === 'function') {
1155
+ callback = optionsOrCallback;
1156
+ options = {};
1157
+ }
1158
+
1159
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1160
+ const parameters = {
1161
+ options: Object.assign(
1162
+ {
1163
+ url: (rootUrl + '/v2/{+parent}/acceleratorTypes').replace(
1164
+ /([^:]\/)\/+/g,
1165
+ '$1'
1166
+ ),
1167
+ method: 'GET',
1168
+ },
1169
+ options
1170
+ ),
1171
+ params,
1172
+ requiredParams: ['parent'],
1173
+ pathParams: ['parent'],
1174
+ context: this.context,
1175
+ };
1176
+ if (callback) {
1177
+ createAPIRequest<Schema$ListAcceleratorTypesResponse>(
1178
+ parameters,
1179
+ callback as BodyResponseCallback<unknown>
1180
+ );
1181
+ } else {
1182
+ return createAPIRequest<Schema$ListAcceleratorTypesResponse>(
1183
+ parameters
1184
+ );
1185
+ }
1186
+ }
1187
+ }
1188
+
1189
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$Get
1190
+ extends StandardParameters {
1191
+ /**
1192
+ * Required. The resource name.
1193
+ */
1194
+ name?: string;
1195
+ }
1196
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$List
1197
+ extends StandardParameters {
1198
+ /**
1199
+ * List filter.
1200
+ */
1201
+ filter?: string;
1202
+ /**
1203
+ * Sort results.
1204
+ */
1205
+ orderBy?: string;
1206
+ /**
1207
+ * The maximum number of items to return.
1208
+ */
1209
+ pageSize?: number;
1210
+ /**
1211
+ * The next_page_token value returned from a previous List request, if any.
1212
+ */
1213
+ pageToken?: string;
1214
+ /**
1215
+ * Required. The parent resource name.
1216
+ */
1217
+ parent?: string;
1218
+ }
1219
+
1220
+ export class Resource$Projects$Locations$Nodes {
1221
+ context: APIRequestContext;
1222
+ constructor(context: APIRequestContext) {
1223
+ this.context = context;
1224
+ }
1225
+
1226
+ /**
1227
+ * Creates a node.
1228
+ *
1229
+ * @param params - Parameters for request
1230
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1231
+ * @param callback - Optional callback that handles the response.
1232
+ * @returns A promise if used with async/await, or void if used with a callback.
1233
+ */
1234
+ create(
1235
+ params: Params$Resource$Projects$Locations$Nodes$Create,
1236
+ options: StreamMethodOptions
1237
+ ): GaxiosPromise<Readable>;
1238
+ create(
1239
+ params?: Params$Resource$Projects$Locations$Nodes$Create,
1240
+ options?: MethodOptions
1241
+ ): GaxiosPromise<Schema$Operation>;
1242
+ create(
1243
+ params: Params$Resource$Projects$Locations$Nodes$Create,
1244
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1245
+ callback: BodyResponseCallback<Readable>
1246
+ ): void;
1247
+ create(
1248
+ params: Params$Resource$Projects$Locations$Nodes$Create,
1249
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1250
+ callback: BodyResponseCallback<Schema$Operation>
1251
+ ): void;
1252
+ create(
1253
+ params: Params$Resource$Projects$Locations$Nodes$Create,
1254
+ callback: BodyResponseCallback<Schema$Operation>
1255
+ ): void;
1256
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1257
+ create(
1258
+ paramsOrCallback?:
1259
+ | Params$Resource$Projects$Locations$Nodes$Create
1260
+ | BodyResponseCallback<Schema$Operation>
1261
+ | BodyResponseCallback<Readable>,
1262
+ optionsOrCallback?:
1263
+ | MethodOptions
1264
+ | StreamMethodOptions
1265
+ | BodyResponseCallback<Schema$Operation>
1266
+ | BodyResponseCallback<Readable>,
1267
+ callback?:
1268
+ | BodyResponseCallback<Schema$Operation>
1269
+ | BodyResponseCallback<Readable>
1270
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1271
+ let params = (paramsOrCallback ||
1272
+ {}) as Params$Resource$Projects$Locations$Nodes$Create;
1273
+ let options = (optionsOrCallback || {}) as MethodOptions;
1274
+
1275
+ if (typeof paramsOrCallback === 'function') {
1276
+ callback = paramsOrCallback;
1277
+ params = {} as Params$Resource$Projects$Locations$Nodes$Create;
1278
+ options = {};
1279
+ }
1280
+
1281
+ if (typeof optionsOrCallback === 'function') {
1282
+ callback = optionsOrCallback;
1283
+ options = {};
1284
+ }
1285
+
1286
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1287
+ const parameters = {
1288
+ options: Object.assign(
1289
+ {
1290
+ url: (rootUrl + '/v2/{+parent}/nodes').replace(
1291
+ /([^:]\/)\/+/g,
1292
+ '$1'
1293
+ ),
1294
+ method: 'POST',
1295
+ },
1296
+ options
1297
+ ),
1298
+ params,
1299
+ requiredParams: ['parent'],
1300
+ pathParams: ['parent'],
1301
+ context: this.context,
1302
+ };
1303
+ if (callback) {
1304
+ createAPIRequest<Schema$Operation>(
1305
+ parameters,
1306
+ callback as BodyResponseCallback<unknown>
1307
+ );
1308
+ } else {
1309
+ return createAPIRequest<Schema$Operation>(parameters);
1310
+ }
1311
+ }
1312
+
1313
+ /**
1314
+ * Deletes a node.
1315
+ *
1316
+ * @param params - Parameters for request
1317
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1318
+ * @param callback - Optional callback that handles the response.
1319
+ * @returns A promise if used with async/await, or void if used with a callback.
1320
+ */
1321
+ delete(
1322
+ params: Params$Resource$Projects$Locations$Nodes$Delete,
1323
+ options: StreamMethodOptions
1324
+ ): GaxiosPromise<Readable>;
1325
+ delete(
1326
+ params?: Params$Resource$Projects$Locations$Nodes$Delete,
1327
+ options?: MethodOptions
1328
+ ): GaxiosPromise<Schema$Operation>;
1329
+ delete(
1330
+ params: Params$Resource$Projects$Locations$Nodes$Delete,
1331
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1332
+ callback: BodyResponseCallback<Readable>
1333
+ ): void;
1334
+ delete(
1335
+ params: Params$Resource$Projects$Locations$Nodes$Delete,
1336
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1337
+ callback: BodyResponseCallback<Schema$Operation>
1338
+ ): void;
1339
+ delete(
1340
+ params: Params$Resource$Projects$Locations$Nodes$Delete,
1341
+ callback: BodyResponseCallback<Schema$Operation>
1342
+ ): void;
1343
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1344
+ delete(
1345
+ paramsOrCallback?:
1346
+ | Params$Resource$Projects$Locations$Nodes$Delete
1347
+ | BodyResponseCallback<Schema$Operation>
1348
+ | BodyResponseCallback<Readable>,
1349
+ optionsOrCallback?:
1350
+ | MethodOptions
1351
+ | StreamMethodOptions
1352
+ | BodyResponseCallback<Schema$Operation>
1353
+ | BodyResponseCallback<Readable>,
1354
+ callback?:
1355
+ | BodyResponseCallback<Schema$Operation>
1356
+ | BodyResponseCallback<Readable>
1357
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1358
+ let params = (paramsOrCallback ||
1359
+ {}) as Params$Resource$Projects$Locations$Nodes$Delete;
1360
+ let options = (optionsOrCallback || {}) as MethodOptions;
1361
+
1362
+ if (typeof paramsOrCallback === 'function') {
1363
+ callback = paramsOrCallback;
1364
+ params = {} as Params$Resource$Projects$Locations$Nodes$Delete;
1365
+ options = {};
1366
+ }
1367
+
1368
+ if (typeof optionsOrCallback === 'function') {
1369
+ callback = optionsOrCallback;
1370
+ options = {};
1371
+ }
1372
+
1373
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1374
+ const parameters = {
1375
+ options: Object.assign(
1376
+ {
1377
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1378
+ method: 'DELETE',
1379
+ },
1380
+ options
1381
+ ),
1382
+ params,
1383
+ requiredParams: ['name'],
1384
+ pathParams: ['name'],
1385
+ context: this.context,
1386
+ };
1387
+ if (callback) {
1388
+ createAPIRequest<Schema$Operation>(
1389
+ parameters,
1390
+ callback as BodyResponseCallback<unknown>
1391
+ );
1392
+ } else {
1393
+ return createAPIRequest<Schema$Operation>(parameters);
1394
+ }
1395
+ }
1396
+
1397
+ /**
1398
+ * Gets the details of a node.
1399
+ *
1400
+ * @param params - Parameters for request
1401
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1402
+ * @param callback - Optional callback that handles the response.
1403
+ * @returns A promise if used with async/await, or void if used with a callback.
1404
+ */
1405
+ get(
1406
+ params: Params$Resource$Projects$Locations$Nodes$Get,
1407
+ options: StreamMethodOptions
1408
+ ): GaxiosPromise<Readable>;
1409
+ get(
1410
+ params?: Params$Resource$Projects$Locations$Nodes$Get,
1411
+ options?: MethodOptions
1412
+ ): GaxiosPromise<Schema$Node>;
1413
+ get(
1414
+ params: Params$Resource$Projects$Locations$Nodes$Get,
1415
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1416
+ callback: BodyResponseCallback<Readable>
1417
+ ): void;
1418
+ get(
1419
+ params: Params$Resource$Projects$Locations$Nodes$Get,
1420
+ options: MethodOptions | BodyResponseCallback<Schema$Node>,
1421
+ callback: BodyResponseCallback<Schema$Node>
1422
+ ): void;
1423
+ get(
1424
+ params: Params$Resource$Projects$Locations$Nodes$Get,
1425
+ callback: BodyResponseCallback<Schema$Node>
1426
+ ): void;
1427
+ get(callback: BodyResponseCallback<Schema$Node>): void;
1428
+ get(
1429
+ paramsOrCallback?:
1430
+ | Params$Resource$Projects$Locations$Nodes$Get
1431
+ | BodyResponseCallback<Schema$Node>
1432
+ | BodyResponseCallback<Readable>,
1433
+ optionsOrCallback?:
1434
+ | MethodOptions
1435
+ | StreamMethodOptions
1436
+ | BodyResponseCallback<Schema$Node>
1437
+ | BodyResponseCallback<Readable>,
1438
+ callback?:
1439
+ | BodyResponseCallback<Schema$Node>
1440
+ | BodyResponseCallback<Readable>
1441
+ ): void | GaxiosPromise<Schema$Node> | GaxiosPromise<Readable> {
1442
+ let params = (paramsOrCallback ||
1443
+ {}) as Params$Resource$Projects$Locations$Nodes$Get;
1444
+ let options = (optionsOrCallback || {}) as MethodOptions;
1445
+
1446
+ if (typeof paramsOrCallback === 'function') {
1447
+ callback = paramsOrCallback;
1448
+ params = {} as Params$Resource$Projects$Locations$Nodes$Get;
1449
+ options = {};
1450
+ }
1451
+
1452
+ if (typeof optionsOrCallback === 'function') {
1453
+ callback = optionsOrCallback;
1454
+ options = {};
1455
+ }
1456
+
1457
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1458
+ const parameters = {
1459
+ options: Object.assign(
1460
+ {
1461
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1462
+ method: 'GET',
1463
+ },
1464
+ options
1465
+ ),
1466
+ params,
1467
+ requiredParams: ['name'],
1468
+ pathParams: ['name'],
1469
+ context: this.context,
1470
+ };
1471
+ if (callback) {
1472
+ createAPIRequest<Schema$Node>(
1473
+ parameters,
1474
+ callback as BodyResponseCallback<unknown>
1475
+ );
1476
+ } else {
1477
+ return createAPIRequest<Schema$Node>(parameters);
1478
+ }
1479
+ }
1480
+
1481
+ /**
1482
+ * Retrieves the guest attributes for the node.
1483
+ *
1484
+ * @param params - Parameters for request
1485
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1486
+ * @param callback - Optional callback that handles the response.
1487
+ * @returns A promise if used with async/await, or void if used with a callback.
1488
+ */
1489
+ getGuestAttributes(
1490
+ params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1491
+ options: StreamMethodOptions
1492
+ ): GaxiosPromise<Readable>;
1493
+ getGuestAttributes(
1494
+ params?: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1495
+ options?: MethodOptions
1496
+ ): GaxiosPromise<Schema$GetGuestAttributesResponse>;
1497
+ getGuestAttributes(
1498
+ params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1499
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1500
+ callback: BodyResponseCallback<Readable>
1501
+ ): void;
1502
+ getGuestAttributes(
1503
+ params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1504
+ options:
1505
+ | MethodOptions
1506
+ | BodyResponseCallback<Schema$GetGuestAttributesResponse>,
1507
+ callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>
1508
+ ): void;
1509
+ getGuestAttributes(
1510
+ params: Params$Resource$Projects$Locations$Nodes$Getguestattributes,
1511
+ callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>
1512
+ ): void;
1513
+ getGuestAttributes(
1514
+ callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>
1515
+ ): void;
1516
+ getGuestAttributes(
1517
+ paramsOrCallback?:
1518
+ | Params$Resource$Projects$Locations$Nodes$Getguestattributes
1519
+ | BodyResponseCallback<Schema$GetGuestAttributesResponse>
1520
+ | BodyResponseCallback<Readable>,
1521
+ optionsOrCallback?:
1522
+ | MethodOptions
1523
+ | StreamMethodOptions
1524
+ | BodyResponseCallback<Schema$GetGuestAttributesResponse>
1525
+ | BodyResponseCallback<Readable>,
1526
+ callback?:
1527
+ | BodyResponseCallback<Schema$GetGuestAttributesResponse>
1528
+ | BodyResponseCallback<Readable>
1529
+ ):
1530
+ | void
1531
+ | GaxiosPromise<Schema$GetGuestAttributesResponse>
1532
+ | GaxiosPromise<Readable> {
1533
+ let params = (paramsOrCallback ||
1534
+ {}) as Params$Resource$Projects$Locations$Nodes$Getguestattributes;
1535
+ let options = (optionsOrCallback || {}) as MethodOptions;
1536
+
1537
+ if (typeof paramsOrCallback === 'function') {
1538
+ callback = paramsOrCallback;
1539
+ params =
1540
+ {} as Params$Resource$Projects$Locations$Nodes$Getguestattributes;
1541
+ options = {};
1542
+ }
1543
+
1544
+ if (typeof optionsOrCallback === 'function') {
1545
+ callback = optionsOrCallback;
1546
+ options = {};
1547
+ }
1548
+
1549
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1550
+ const parameters = {
1551
+ options: Object.assign(
1552
+ {
1553
+ url: (rootUrl + '/v2/{+name}:getGuestAttributes').replace(
1554
+ /([^:]\/)\/+/g,
1555
+ '$1'
1556
+ ),
1557
+ method: 'POST',
1558
+ },
1559
+ options
1560
+ ),
1561
+ params,
1562
+ requiredParams: ['name'],
1563
+ pathParams: ['name'],
1564
+ context: this.context,
1565
+ };
1566
+ if (callback) {
1567
+ createAPIRequest<Schema$GetGuestAttributesResponse>(
1568
+ parameters,
1569
+ callback as BodyResponseCallback<unknown>
1570
+ );
1571
+ } else {
1572
+ return createAPIRequest<Schema$GetGuestAttributesResponse>(parameters);
1573
+ }
1574
+ }
1575
+
1576
+ /**
1577
+ * Lists nodes.
1578
+ *
1579
+ * @param params - Parameters for request
1580
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1581
+ * @param callback - Optional callback that handles the response.
1582
+ * @returns A promise if used with async/await, or void if used with a callback.
1583
+ */
1584
+ list(
1585
+ params: Params$Resource$Projects$Locations$Nodes$List,
1586
+ options: StreamMethodOptions
1587
+ ): GaxiosPromise<Readable>;
1588
+ list(
1589
+ params?: Params$Resource$Projects$Locations$Nodes$List,
1590
+ options?: MethodOptions
1591
+ ): GaxiosPromise<Schema$ListNodesResponse>;
1592
+ list(
1593
+ params: Params$Resource$Projects$Locations$Nodes$List,
1594
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1595
+ callback: BodyResponseCallback<Readable>
1596
+ ): void;
1597
+ list(
1598
+ params: Params$Resource$Projects$Locations$Nodes$List,
1599
+ options: MethodOptions | BodyResponseCallback<Schema$ListNodesResponse>,
1600
+ callback: BodyResponseCallback<Schema$ListNodesResponse>
1601
+ ): void;
1602
+ list(
1603
+ params: Params$Resource$Projects$Locations$Nodes$List,
1604
+ callback: BodyResponseCallback<Schema$ListNodesResponse>
1605
+ ): void;
1606
+ list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1607
+ list(
1608
+ paramsOrCallback?:
1609
+ | Params$Resource$Projects$Locations$Nodes$List
1610
+ | BodyResponseCallback<Schema$ListNodesResponse>
1611
+ | BodyResponseCallback<Readable>,
1612
+ optionsOrCallback?:
1613
+ | MethodOptions
1614
+ | StreamMethodOptions
1615
+ | BodyResponseCallback<Schema$ListNodesResponse>
1616
+ | BodyResponseCallback<Readable>,
1617
+ callback?:
1618
+ | BodyResponseCallback<Schema$ListNodesResponse>
1619
+ | BodyResponseCallback<Readable>
1620
+ ):
1621
+ | void
1622
+ | GaxiosPromise<Schema$ListNodesResponse>
1623
+ | GaxiosPromise<Readable> {
1624
+ let params = (paramsOrCallback ||
1625
+ {}) as Params$Resource$Projects$Locations$Nodes$List;
1626
+ let options = (optionsOrCallback || {}) as MethodOptions;
1627
+
1628
+ if (typeof paramsOrCallback === 'function') {
1629
+ callback = paramsOrCallback;
1630
+ params = {} as Params$Resource$Projects$Locations$Nodes$List;
1631
+ options = {};
1632
+ }
1633
+
1634
+ if (typeof optionsOrCallback === 'function') {
1635
+ callback = optionsOrCallback;
1636
+ options = {};
1637
+ }
1638
+
1639
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1640
+ const parameters = {
1641
+ options: Object.assign(
1642
+ {
1643
+ url: (rootUrl + '/v2/{+parent}/nodes').replace(
1644
+ /([^:]\/)\/+/g,
1645
+ '$1'
1646
+ ),
1647
+ method: 'GET',
1648
+ },
1649
+ options
1650
+ ),
1651
+ params,
1652
+ requiredParams: ['parent'],
1653
+ pathParams: ['parent'],
1654
+ context: this.context,
1655
+ };
1656
+ if (callback) {
1657
+ createAPIRequest<Schema$ListNodesResponse>(
1658
+ parameters,
1659
+ callback as BodyResponseCallback<unknown>
1660
+ );
1661
+ } else {
1662
+ return createAPIRequest<Schema$ListNodesResponse>(parameters);
1663
+ }
1664
+ }
1665
+
1666
+ /**
1667
+ * Updates the configurations of a node.
1668
+ *
1669
+ * @param params - Parameters for request
1670
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1671
+ * @param callback - Optional callback that handles the response.
1672
+ * @returns A promise if used with async/await, or void if used with a callback.
1673
+ */
1674
+ patch(
1675
+ params: Params$Resource$Projects$Locations$Nodes$Patch,
1676
+ options: StreamMethodOptions
1677
+ ): GaxiosPromise<Readable>;
1678
+ patch(
1679
+ params?: Params$Resource$Projects$Locations$Nodes$Patch,
1680
+ options?: MethodOptions
1681
+ ): GaxiosPromise<Schema$Operation>;
1682
+ patch(
1683
+ params: Params$Resource$Projects$Locations$Nodes$Patch,
1684
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1685
+ callback: BodyResponseCallback<Readable>
1686
+ ): void;
1687
+ patch(
1688
+ params: Params$Resource$Projects$Locations$Nodes$Patch,
1689
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1690
+ callback: BodyResponseCallback<Schema$Operation>
1691
+ ): void;
1692
+ patch(
1693
+ params: Params$Resource$Projects$Locations$Nodes$Patch,
1694
+ callback: BodyResponseCallback<Schema$Operation>
1695
+ ): void;
1696
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
1697
+ patch(
1698
+ paramsOrCallback?:
1699
+ | Params$Resource$Projects$Locations$Nodes$Patch
1700
+ | BodyResponseCallback<Schema$Operation>
1701
+ | BodyResponseCallback<Readable>,
1702
+ optionsOrCallback?:
1703
+ | MethodOptions
1704
+ | StreamMethodOptions
1705
+ | BodyResponseCallback<Schema$Operation>
1706
+ | BodyResponseCallback<Readable>,
1707
+ callback?:
1708
+ | BodyResponseCallback<Schema$Operation>
1709
+ | BodyResponseCallback<Readable>
1710
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1711
+ let params = (paramsOrCallback ||
1712
+ {}) as Params$Resource$Projects$Locations$Nodes$Patch;
1713
+ let options = (optionsOrCallback || {}) as MethodOptions;
1714
+
1715
+ if (typeof paramsOrCallback === 'function') {
1716
+ callback = paramsOrCallback;
1717
+ params = {} as Params$Resource$Projects$Locations$Nodes$Patch;
1718
+ options = {};
1719
+ }
1720
+
1721
+ if (typeof optionsOrCallback === 'function') {
1722
+ callback = optionsOrCallback;
1723
+ options = {};
1724
+ }
1725
+
1726
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1727
+ const parameters = {
1728
+ options: Object.assign(
1729
+ {
1730
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1731
+ method: 'PATCH',
1732
+ },
1733
+ options
1734
+ ),
1735
+ params,
1736
+ requiredParams: ['name'],
1737
+ pathParams: ['name'],
1738
+ context: this.context,
1739
+ };
1740
+ if (callback) {
1741
+ createAPIRequest<Schema$Operation>(
1742
+ parameters,
1743
+ callback as BodyResponseCallback<unknown>
1744
+ );
1745
+ } else {
1746
+ return createAPIRequest<Schema$Operation>(parameters);
1747
+ }
1748
+ }
1749
+
1750
+ /**
1751
+ * Starts a node.
1752
+ *
1753
+ * @param params - Parameters for request
1754
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1755
+ * @param callback - Optional callback that handles the response.
1756
+ * @returns A promise if used with async/await, or void if used with a callback.
1757
+ */
1758
+ start(
1759
+ params: Params$Resource$Projects$Locations$Nodes$Start,
1760
+ options: StreamMethodOptions
1761
+ ): GaxiosPromise<Readable>;
1762
+ start(
1763
+ params?: Params$Resource$Projects$Locations$Nodes$Start,
1764
+ options?: MethodOptions
1765
+ ): GaxiosPromise<Schema$Operation>;
1766
+ start(
1767
+ params: Params$Resource$Projects$Locations$Nodes$Start,
1768
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1769
+ callback: BodyResponseCallback<Readable>
1770
+ ): void;
1771
+ start(
1772
+ params: Params$Resource$Projects$Locations$Nodes$Start,
1773
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1774
+ callback: BodyResponseCallback<Schema$Operation>
1775
+ ): void;
1776
+ start(
1777
+ params: Params$Resource$Projects$Locations$Nodes$Start,
1778
+ callback: BodyResponseCallback<Schema$Operation>
1779
+ ): void;
1780
+ start(callback: BodyResponseCallback<Schema$Operation>): void;
1781
+ start(
1782
+ paramsOrCallback?:
1783
+ | Params$Resource$Projects$Locations$Nodes$Start
1784
+ | BodyResponseCallback<Schema$Operation>
1785
+ | BodyResponseCallback<Readable>,
1786
+ optionsOrCallback?:
1787
+ | MethodOptions
1788
+ | StreamMethodOptions
1789
+ | BodyResponseCallback<Schema$Operation>
1790
+ | BodyResponseCallback<Readable>,
1791
+ callback?:
1792
+ | BodyResponseCallback<Schema$Operation>
1793
+ | BodyResponseCallback<Readable>
1794
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1795
+ let params = (paramsOrCallback ||
1796
+ {}) as Params$Resource$Projects$Locations$Nodes$Start;
1797
+ let options = (optionsOrCallback || {}) as MethodOptions;
1798
+
1799
+ if (typeof paramsOrCallback === 'function') {
1800
+ callback = paramsOrCallback;
1801
+ params = {} as Params$Resource$Projects$Locations$Nodes$Start;
1802
+ options = {};
1803
+ }
1804
+
1805
+ if (typeof optionsOrCallback === 'function') {
1806
+ callback = optionsOrCallback;
1807
+ options = {};
1808
+ }
1809
+
1810
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1811
+ const parameters = {
1812
+ options: Object.assign(
1813
+ {
1814
+ url: (rootUrl + '/v2/{+name}:start').replace(/([^:]\/)\/+/g, '$1'),
1815
+ method: 'POST',
1816
+ },
1817
+ options
1818
+ ),
1819
+ params,
1820
+ requiredParams: ['name'],
1821
+ pathParams: ['name'],
1822
+ context: this.context,
1823
+ };
1824
+ if (callback) {
1825
+ createAPIRequest<Schema$Operation>(
1826
+ parameters,
1827
+ callback as BodyResponseCallback<unknown>
1828
+ );
1829
+ } else {
1830
+ return createAPIRequest<Schema$Operation>(parameters);
1831
+ }
1832
+ }
1833
+
1834
+ /**
1835
+ * Stops a node. This operation is only available with single TPU nodes.
1836
+ *
1837
+ * @param params - Parameters for request
1838
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1839
+ * @param callback - Optional callback that handles the response.
1840
+ * @returns A promise if used with async/await, or void if used with a callback.
1841
+ */
1842
+ stop(
1843
+ params: Params$Resource$Projects$Locations$Nodes$Stop,
1844
+ options: StreamMethodOptions
1845
+ ): GaxiosPromise<Readable>;
1846
+ stop(
1847
+ params?: Params$Resource$Projects$Locations$Nodes$Stop,
1848
+ options?: MethodOptions
1849
+ ): GaxiosPromise<Schema$Operation>;
1850
+ stop(
1851
+ params: Params$Resource$Projects$Locations$Nodes$Stop,
1852
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1853
+ callback: BodyResponseCallback<Readable>
1854
+ ): void;
1855
+ stop(
1856
+ params: Params$Resource$Projects$Locations$Nodes$Stop,
1857
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
1858
+ callback: BodyResponseCallback<Schema$Operation>
1859
+ ): void;
1860
+ stop(
1861
+ params: Params$Resource$Projects$Locations$Nodes$Stop,
1862
+ callback: BodyResponseCallback<Schema$Operation>
1863
+ ): void;
1864
+ stop(callback: BodyResponseCallback<Schema$Operation>): void;
1865
+ stop(
1866
+ paramsOrCallback?:
1867
+ | Params$Resource$Projects$Locations$Nodes$Stop
1868
+ | BodyResponseCallback<Schema$Operation>
1869
+ | BodyResponseCallback<Readable>,
1870
+ optionsOrCallback?:
1871
+ | MethodOptions
1872
+ | StreamMethodOptions
1873
+ | BodyResponseCallback<Schema$Operation>
1874
+ | BodyResponseCallback<Readable>,
1875
+ callback?:
1876
+ | BodyResponseCallback<Schema$Operation>
1877
+ | BodyResponseCallback<Readable>
1878
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
1879
+ let params = (paramsOrCallback ||
1880
+ {}) as Params$Resource$Projects$Locations$Nodes$Stop;
1881
+ let options = (optionsOrCallback || {}) as MethodOptions;
1882
+
1883
+ if (typeof paramsOrCallback === 'function') {
1884
+ callback = paramsOrCallback;
1885
+ params = {} as Params$Resource$Projects$Locations$Nodes$Stop;
1886
+ options = {};
1887
+ }
1888
+
1889
+ if (typeof optionsOrCallback === 'function') {
1890
+ callback = optionsOrCallback;
1891
+ options = {};
1892
+ }
1893
+
1894
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
1895
+ const parameters = {
1896
+ options: Object.assign(
1897
+ {
1898
+ url: (rootUrl + '/v2/{+name}:stop').replace(/([^:]\/)\/+/g, '$1'),
1899
+ method: 'POST',
1900
+ },
1901
+ options
1902
+ ),
1903
+ params,
1904
+ requiredParams: ['name'],
1905
+ pathParams: ['name'],
1906
+ context: this.context,
1907
+ };
1908
+ if (callback) {
1909
+ createAPIRequest<Schema$Operation>(
1910
+ parameters,
1911
+ callback as BodyResponseCallback<unknown>
1912
+ );
1913
+ } else {
1914
+ return createAPIRequest<Schema$Operation>(parameters);
1915
+ }
1916
+ }
1917
+ }
1918
+
1919
+ export interface Params$Resource$Projects$Locations$Nodes$Create
1920
+ extends StandardParameters {
1921
+ /**
1922
+ * The unqualified resource name.
1923
+ */
1924
+ nodeId?: string;
1925
+ /**
1926
+ * Required. The parent resource name.
1927
+ */
1928
+ parent?: string;
1929
+
1930
+ /**
1931
+ * Request body metadata
1932
+ */
1933
+ requestBody?: Schema$Node;
1934
+ }
1935
+ export interface Params$Resource$Projects$Locations$Nodes$Delete
1936
+ extends StandardParameters {
1937
+ /**
1938
+ * Required. The resource name.
1939
+ */
1940
+ name?: string;
1941
+ }
1942
+ export interface Params$Resource$Projects$Locations$Nodes$Get
1943
+ extends StandardParameters {
1944
+ /**
1945
+ * Required. The resource name.
1946
+ */
1947
+ name?: string;
1948
+ }
1949
+ export interface Params$Resource$Projects$Locations$Nodes$Getguestattributes
1950
+ extends StandardParameters {
1951
+ /**
1952
+ * Required. The resource name.
1953
+ */
1954
+ name?: string;
1955
+
1956
+ /**
1957
+ * Request body metadata
1958
+ */
1959
+ requestBody?: Schema$GetGuestAttributesRequest;
1960
+ }
1961
+ export interface Params$Resource$Projects$Locations$Nodes$List
1962
+ extends StandardParameters {
1963
+ /**
1964
+ * The maximum number of items to return.
1965
+ */
1966
+ pageSize?: number;
1967
+ /**
1968
+ * The next_page_token value returned from a previous List request, if any.
1969
+ */
1970
+ pageToken?: string;
1971
+ /**
1972
+ * Required. The parent resource name.
1973
+ */
1974
+ parent?: string;
1975
+ }
1976
+ export interface Params$Resource$Projects$Locations$Nodes$Patch
1977
+ extends StandardParameters {
1978
+ /**
1979
+ * Output only. Immutable. The name of the TPU.
1980
+ */
1981
+ name?: string;
1982
+ /**
1983
+ * Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1984
+ */
1985
+ updateMask?: string;
1986
+
1987
+ /**
1988
+ * Request body metadata
1989
+ */
1990
+ requestBody?: Schema$Node;
1991
+ }
1992
+ export interface Params$Resource$Projects$Locations$Nodes$Start
1993
+ extends StandardParameters {
1994
+ /**
1995
+ * Required. The resource name.
1996
+ */
1997
+ name?: string;
1998
+
1999
+ /**
2000
+ * Request body metadata
2001
+ */
2002
+ requestBody?: Schema$StartNodeRequest;
2003
+ }
2004
+ export interface Params$Resource$Projects$Locations$Nodes$Stop
2005
+ extends StandardParameters {
2006
+ /**
2007
+ * Required. The resource name.
2008
+ */
2009
+ name?: string;
2010
+
2011
+ /**
2012
+ * Request body metadata
2013
+ */
2014
+ requestBody?: Schema$StopNodeRequest;
2015
+ }
2016
+
2017
+ export class Resource$Projects$Locations$Operations {
2018
+ context: APIRequestContext;
2019
+ constructor(context: APIRequestContext) {
2020
+ this.context = context;
2021
+ }
2022
+
2023
+ /**
2024
+ * 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`.
2025
+ *
2026
+ * @param params - Parameters for request
2027
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2028
+ * @param callback - Optional callback that handles the response.
2029
+ * @returns A promise if used with async/await, or void if used with a callback.
2030
+ */
2031
+ cancel(
2032
+ params: Params$Resource$Projects$Locations$Operations$Cancel,
2033
+ options: StreamMethodOptions
2034
+ ): GaxiosPromise<Readable>;
2035
+ cancel(
2036
+ params?: Params$Resource$Projects$Locations$Operations$Cancel,
2037
+ options?: MethodOptions
2038
+ ): GaxiosPromise<Schema$Empty>;
2039
+ cancel(
2040
+ params: Params$Resource$Projects$Locations$Operations$Cancel,
2041
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2042
+ callback: BodyResponseCallback<Readable>
2043
+ ): void;
2044
+ cancel(
2045
+ params: Params$Resource$Projects$Locations$Operations$Cancel,
2046
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
2047
+ callback: BodyResponseCallback<Schema$Empty>
2048
+ ): void;
2049
+ cancel(
2050
+ params: Params$Resource$Projects$Locations$Operations$Cancel,
2051
+ callback: BodyResponseCallback<Schema$Empty>
2052
+ ): void;
2053
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
2054
+ cancel(
2055
+ paramsOrCallback?:
2056
+ | Params$Resource$Projects$Locations$Operations$Cancel
2057
+ | BodyResponseCallback<Schema$Empty>
2058
+ | BodyResponseCallback<Readable>,
2059
+ optionsOrCallback?:
2060
+ | MethodOptions
2061
+ | StreamMethodOptions
2062
+ | BodyResponseCallback<Schema$Empty>
2063
+ | BodyResponseCallback<Readable>,
2064
+ callback?:
2065
+ | BodyResponseCallback<Schema$Empty>
2066
+ | BodyResponseCallback<Readable>
2067
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
2068
+ let params = (paramsOrCallback ||
2069
+ {}) as Params$Resource$Projects$Locations$Operations$Cancel;
2070
+ let options = (optionsOrCallback || {}) as MethodOptions;
2071
+
2072
+ if (typeof paramsOrCallback === 'function') {
2073
+ callback = paramsOrCallback;
2074
+ params = {} as Params$Resource$Projects$Locations$Operations$Cancel;
2075
+ options = {};
2076
+ }
2077
+
2078
+ if (typeof optionsOrCallback === 'function') {
2079
+ callback = optionsOrCallback;
2080
+ options = {};
2081
+ }
2082
+
2083
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2084
+ const parameters = {
2085
+ options: Object.assign(
2086
+ {
2087
+ url: (rootUrl + '/v2/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'),
2088
+ method: 'POST',
2089
+ },
2090
+ options
2091
+ ),
2092
+ params,
2093
+ requiredParams: ['name'],
2094
+ pathParams: ['name'],
2095
+ context: this.context,
2096
+ };
2097
+ if (callback) {
2098
+ createAPIRequest<Schema$Empty>(
2099
+ parameters,
2100
+ callback as BodyResponseCallback<unknown>
2101
+ );
2102
+ } else {
2103
+ return createAPIRequest<Schema$Empty>(parameters);
2104
+ }
2105
+ }
2106
+
2107
+ /**
2108
+ * 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`.
2109
+ *
2110
+ * @param params - Parameters for request
2111
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2112
+ * @param callback - Optional callback that handles the response.
2113
+ * @returns A promise if used with async/await, or void if used with a callback.
2114
+ */
2115
+ delete(
2116
+ params: Params$Resource$Projects$Locations$Operations$Delete,
2117
+ options: StreamMethodOptions
2118
+ ): GaxiosPromise<Readable>;
2119
+ delete(
2120
+ params?: Params$Resource$Projects$Locations$Operations$Delete,
2121
+ options?: MethodOptions
2122
+ ): GaxiosPromise<Schema$Empty>;
2123
+ delete(
2124
+ params: Params$Resource$Projects$Locations$Operations$Delete,
2125
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2126
+ callback: BodyResponseCallback<Readable>
2127
+ ): void;
2128
+ delete(
2129
+ params: Params$Resource$Projects$Locations$Operations$Delete,
2130
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
2131
+ callback: BodyResponseCallback<Schema$Empty>
2132
+ ): void;
2133
+ delete(
2134
+ params: Params$Resource$Projects$Locations$Operations$Delete,
2135
+ callback: BodyResponseCallback<Schema$Empty>
2136
+ ): void;
2137
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
2138
+ delete(
2139
+ paramsOrCallback?:
2140
+ | Params$Resource$Projects$Locations$Operations$Delete
2141
+ | BodyResponseCallback<Schema$Empty>
2142
+ | BodyResponseCallback<Readable>,
2143
+ optionsOrCallback?:
2144
+ | MethodOptions
2145
+ | StreamMethodOptions
2146
+ | BodyResponseCallback<Schema$Empty>
2147
+ | BodyResponseCallback<Readable>,
2148
+ callback?:
2149
+ | BodyResponseCallback<Schema$Empty>
2150
+ | BodyResponseCallback<Readable>
2151
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
2152
+ let params = (paramsOrCallback ||
2153
+ {}) as Params$Resource$Projects$Locations$Operations$Delete;
2154
+ let options = (optionsOrCallback || {}) as MethodOptions;
2155
+
2156
+ if (typeof paramsOrCallback === 'function') {
2157
+ callback = paramsOrCallback;
2158
+ params = {} as Params$Resource$Projects$Locations$Operations$Delete;
2159
+ options = {};
2160
+ }
2161
+
2162
+ if (typeof optionsOrCallback === 'function') {
2163
+ callback = optionsOrCallback;
2164
+ options = {};
2165
+ }
2166
+
2167
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2168
+ const parameters = {
2169
+ options: Object.assign(
2170
+ {
2171
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2172
+ method: 'DELETE',
2173
+ },
2174
+ options
2175
+ ),
2176
+ params,
2177
+ requiredParams: ['name'],
2178
+ pathParams: ['name'],
2179
+ context: this.context,
2180
+ };
2181
+ if (callback) {
2182
+ createAPIRequest<Schema$Empty>(
2183
+ parameters,
2184
+ callback as BodyResponseCallback<unknown>
2185
+ );
2186
+ } else {
2187
+ return createAPIRequest<Schema$Empty>(parameters);
2188
+ }
2189
+ }
2190
+
2191
+ /**
2192
+ * 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.
2193
+ *
2194
+ * @param params - Parameters for request
2195
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2196
+ * @param callback - Optional callback that handles the response.
2197
+ * @returns A promise if used with async/await, or void if used with a callback.
2198
+ */
2199
+ get(
2200
+ params: Params$Resource$Projects$Locations$Operations$Get,
2201
+ options: StreamMethodOptions
2202
+ ): GaxiosPromise<Readable>;
2203
+ get(
2204
+ params?: Params$Resource$Projects$Locations$Operations$Get,
2205
+ options?: MethodOptions
2206
+ ): GaxiosPromise<Schema$Operation>;
2207
+ get(
2208
+ params: Params$Resource$Projects$Locations$Operations$Get,
2209
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2210
+ callback: BodyResponseCallback<Readable>
2211
+ ): void;
2212
+ get(
2213
+ params: Params$Resource$Projects$Locations$Operations$Get,
2214
+ options: MethodOptions | BodyResponseCallback<Schema$Operation>,
2215
+ callback: BodyResponseCallback<Schema$Operation>
2216
+ ): void;
2217
+ get(
2218
+ params: Params$Resource$Projects$Locations$Operations$Get,
2219
+ callback: BodyResponseCallback<Schema$Operation>
2220
+ ): void;
2221
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
2222
+ get(
2223
+ paramsOrCallback?:
2224
+ | Params$Resource$Projects$Locations$Operations$Get
2225
+ | BodyResponseCallback<Schema$Operation>
2226
+ | BodyResponseCallback<Readable>,
2227
+ optionsOrCallback?:
2228
+ | MethodOptions
2229
+ | StreamMethodOptions
2230
+ | BodyResponseCallback<Schema$Operation>
2231
+ | BodyResponseCallback<Readable>,
2232
+ callback?:
2233
+ | BodyResponseCallback<Schema$Operation>
2234
+ | BodyResponseCallback<Readable>
2235
+ ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2236
+ let params = (paramsOrCallback ||
2237
+ {}) as Params$Resource$Projects$Locations$Operations$Get;
2238
+ let options = (optionsOrCallback || {}) as MethodOptions;
2239
+
2240
+ if (typeof paramsOrCallback === 'function') {
2241
+ callback = paramsOrCallback;
2242
+ params = {} as Params$Resource$Projects$Locations$Operations$Get;
2243
+ options = {};
2244
+ }
2245
+
2246
+ if (typeof optionsOrCallback === 'function') {
2247
+ callback = optionsOrCallback;
2248
+ options = {};
2249
+ }
2250
+
2251
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2252
+ const parameters = {
2253
+ options: Object.assign(
2254
+ {
2255
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2256
+ method: 'GET',
2257
+ },
2258
+ options
2259
+ ),
2260
+ params,
2261
+ requiredParams: ['name'],
2262
+ pathParams: ['name'],
2263
+ context: this.context,
2264
+ };
2265
+ if (callback) {
2266
+ createAPIRequest<Schema$Operation>(
2267
+ parameters,
2268
+ callback as BodyResponseCallback<unknown>
2269
+ );
2270
+ } else {
2271
+ return createAPIRequest<Schema$Operation>(parameters);
2272
+ }
2273
+ }
2274
+
2275
+ /**
2276
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
2277
+ *
2278
+ * @param params - Parameters for request
2279
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2280
+ * @param callback - Optional callback that handles the response.
2281
+ * @returns A promise if used with async/await, or void if used with a callback.
2282
+ */
2283
+ list(
2284
+ params: Params$Resource$Projects$Locations$Operations$List,
2285
+ options: StreamMethodOptions
2286
+ ): GaxiosPromise<Readable>;
2287
+ list(
2288
+ params?: Params$Resource$Projects$Locations$Operations$List,
2289
+ options?: MethodOptions
2290
+ ): GaxiosPromise<Schema$ListOperationsResponse>;
2291
+ list(
2292
+ params: Params$Resource$Projects$Locations$Operations$List,
2293
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2294
+ callback: BodyResponseCallback<Readable>
2295
+ ): void;
2296
+ list(
2297
+ params: Params$Resource$Projects$Locations$Operations$List,
2298
+ options:
2299
+ | MethodOptions
2300
+ | BodyResponseCallback<Schema$ListOperationsResponse>,
2301
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
2302
+ ): void;
2303
+ list(
2304
+ params: Params$Resource$Projects$Locations$Operations$List,
2305
+ callback: BodyResponseCallback<Schema$ListOperationsResponse>
2306
+ ): void;
2307
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
2308
+ list(
2309
+ paramsOrCallback?:
2310
+ | Params$Resource$Projects$Locations$Operations$List
2311
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2312
+ | BodyResponseCallback<Readable>,
2313
+ optionsOrCallback?:
2314
+ | MethodOptions
2315
+ | StreamMethodOptions
2316
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2317
+ | BodyResponseCallback<Readable>,
2318
+ callback?:
2319
+ | BodyResponseCallback<Schema$ListOperationsResponse>
2320
+ | BodyResponseCallback<Readable>
2321
+ ):
2322
+ | void
2323
+ | GaxiosPromise<Schema$ListOperationsResponse>
2324
+ | GaxiosPromise<Readable> {
2325
+ let params = (paramsOrCallback ||
2326
+ {}) as Params$Resource$Projects$Locations$Operations$List;
2327
+ let options = (optionsOrCallback || {}) as MethodOptions;
2328
+
2329
+ if (typeof paramsOrCallback === 'function') {
2330
+ callback = paramsOrCallback;
2331
+ params = {} as Params$Resource$Projects$Locations$Operations$List;
2332
+ options = {};
2333
+ }
2334
+
2335
+ if (typeof optionsOrCallback === 'function') {
2336
+ callback = optionsOrCallback;
2337
+ options = {};
2338
+ }
2339
+
2340
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2341
+ const parameters = {
2342
+ options: Object.assign(
2343
+ {
2344
+ url: (rootUrl + '/v2/{+name}/operations').replace(
2345
+ /([^:]\/)\/+/g,
2346
+ '$1'
2347
+ ),
2348
+ method: 'GET',
2349
+ },
2350
+ options
2351
+ ),
2352
+ params,
2353
+ requiredParams: ['name'],
2354
+ pathParams: ['name'],
2355
+ context: this.context,
2356
+ };
2357
+ if (callback) {
2358
+ createAPIRequest<Schema$ListOperationsResponse>(
2359
+ parameters,
2360
+ callback as BodyResponseCallback<unknown>
2361
+ );
2362
+ } else {
2363
+ return createAPIRequest<Schema$ListOperationsResponse>(parameters);
2364
+ }
2365
+ }
2366
+ }
2367
+
2368
+ export interface Params$Resource$Projects$Locations$Operations$Cancel
2369
+ extends StandardParameters {
2370
+ /**
2371
+ * The name of the operation resource to be cancelled.
2372
+ */
2373
+ name?: string;
2374
+ }
2375
+ export interface Params$Resource$Projects$Locations$Operations$Delete
2376
+ extends StandardParameters {
2377
+ /**
2378
+ * The name of the operation resource to be deleted.
2379
+ */
2380
+ name?: string;
2381
+ }
2382
+ export interface Params$Resource$Projects$Locations$Operations$Get
2383
+ extends StandardParameters {
2384
+ /**
2385
+ * The name of the operation resource.
2386
+ */
2387
+ name?: string;
2388
+ }
2389
+ export interface Params$Resource$Projects$Locations$Operations$List
2390
+ extends StandardParameters {
2391
+ /**
2392
+ * The standard list filter.
2393
+ */
2394
+ filter?: string;
2395
+ /**
2396
+ * The name of the operation's parent resource.
2397
+ */
2398
+ name?: string;
2399
+ /**
2400
+ * The standard list page size.
2401
+ */
2402
+ pageSize?: number;
2403
+ /**
2404
+ * The standard list page token.
2405
+ */
2406
+ pageToken?: string;
2407
+ }
2408
+
2409
+ export class Resource$Projects$Locations$Runtimeversions {
2410
+ context: APIRequestContext;
2411
+ constructor(context: APIRequestContext) {
2412
+ this.context = context;
2413
+ }
2414
+
2415
+ /**
2416
+ * Gets a runtime version.
2417
+ *
2418
+ * @param params - Parameters for request
2419
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2420
+ * @param callback - Optional callback that handles the response.
2421
+ * @returns A promise if used with async/await, or void if used with a callback.
2422
+ */
2423
+ get(
2424
+ params: Params$Resource$Projects$Locations$Runtimeversions$Get,
2425
+ options: StreamMethodOptions
2426
+ ): GaxiosPromise<Readable>;
2427
+ get(
2428
+ params?: Params$Resource$Projects$Locations$Runtimeversions$Get,
2429
+ options?: MethodOptions
2430
+ ): GaxiosPromise<Schema$RuntimeVersion>;
2431
+ get(
2432
+ params: Params$Resource$Projects$Locations$Runtimeversions$Get,
2433
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2434
+ callback: BodyResponseCallback<Readable>
2435
+ ): void;
2436
+ get(
2437
+ params: Params$Resource$Projects$Locations$Runtimeversions$Get,
2438
+ options: MethodOptions | BodyResponseCallback<Schema$RuntimeVersion>,
2439
+ callback: BodyResponseCallback<Schema$RuntimeVersion>
2440
+ ): void;
2441
+ get(
2442
+ params: Params$Resource$Projects$Locations$Runtimeversions$Get,
2443
+ callback: BodyResponseCallback<Schema$RuntimeVersion>
2444
+ ): void;
2445
+ get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
2446
+ get(
2447
+ paramsOrCallback?:
2448
+ | Params$Resource$Projects$Locations$Runtimeversions$Get
2449
+ | BodyResponseCallback<Schema$RuntimeVersion>
2450
+ | BodyResponseCallback<Readable>,
2451
+ optionsOrCallback?:
2452
+ | MethodOptions
2453
+ | StreamMethodOptions
2454
+ | BodyResponseCallback<Schema$RuntimeVersion>
2455
+ | BodyResponseCallback<Readable>,
2456
+ callback?:
2457
+ | BodyResponseCallback<Schema$RuntimeVersion>
2458
+ | BodyResponseCallback<Readable>
2459
+ ): void | GaxiosPromise<Schema$RuntimeVersion> | GaxiosPromise<Readable> {
2460
+ let params = (paramsOrCallback ||
2461
+ {}) as Params$Resource$Projects$Locations$Runtimeversions$Get;
2462
+ let options = (optionsOrCallback || {}) as MethodOptions;
2463
+
2464
+ if (typeof paramsOrCallback === 'function') {
2465
+ callback = paramsOrCallback;
2466
+ params = {} as Params$Resource$Projects$Locations$Runtimeversions$Get;
2467
+ options = {};
2468
+ }
2469
+
2470
+ if (typeof optionsOrCallback === 'function') {
2471
+ callback = optionsOrCallback;
2472
+ options = {};
2473
+ }
2474
+
2475
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2476
+ const parameters = {
2477
+ options: Object.assign(
2478
+ {
2479
+ url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2480
+ method: 'GET',
2481
+ },
2482
+ options
2483
+ ),
2484
+ params,
2485
+ requiredParams: ['name'],
2486
+ pathParams: ['name'],
2487
+ context: this.context,
2488
+ };
2489
+ if (callback) {
2490
+ createAPIRequest<Schema$RuntimeVersion>(
2491
+ parameters,
2492
+ callback as BodyResponseCallback<unknown>
2493
+ );
2494
+ } else {
2495
+ return createAPIRequest<Schema$RuntimeVersion>(parameters);
2496
+ }
2497
+ }
2498
+
2499
+ /**
2500
+ * Lists runtime versions supported by this API.
2501
+ *
2502
+ * @param params - Parameters for request
2503
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2504
+ * @param callback - Optional callback that handles the response.
2505
+ * @returns A promise if used with async/await, or void if used with a callback.
2506
+ */
2507
+ list(
2508
+ params: Params$Resource$Projects$Locations$Runtimeversions$List,
2509
+ options: StreamMethodOptions
2510
+ ): GaxiosPromise<Readable>;
2511
+ list(
2512
+ params?: Params$Resource$Projects$Locations$Runtimeversions$List,
2513
+ options?: MethodOptions
2514
+ ): GaxiosPromise<Schema$ListRuntimeVersionsResponse>;
2515
+ list(
2516
+ params: Params$Resource$Projects$Locations$Runtimeversions$List,
2517
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
2518
+ callback: BodyResponseCallback<Readable>
2519
+ ): void;
2520
+ list(
2521
+ params: Params$Resource$Projects$Locations$Runtimeversions$List,
2522
+ options:
2523
+ | MethodOptions
2524
+ | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>,
2525
+ callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2526
+ ): void;
2527
+ list(
2528
+ params: Params$Resource$Projects$Locations$Runtimeversions$List,
2529
+ callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2530
+ ): void;
2531
+ list(
2532
+ callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2533
+ ): void;
2534
+ list(
2535
+ paramsOrCallback?:
2536
+ | Params$Resource$Projects$Locations$Runtimeversions$List
2537
+ | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2538
+ | BodyResponseCallback<Readable>,
2539
+ optionsOrCallback?:
2540
+ | MethodOptions
2541
+ | StreamMethodOptions
2542
+ | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2543
+ | BodyResponseCallback<Readable>,
2544
+ callback?:
2545
+ | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>
2546
+ | BodyResponseCallback<Readable>
2547
+ ):
2548
+ | void
2549
+ | GaxiosPromise<Schema$ListRuntimeVersionsResponse>
2550
+ | GaxiosPromise<Readable> {
2551
+ let params = (paramsOrCallback ||
2552
+ {}) as Params$Resource$Projects$Locations$Runtimeversions$List;
2553
+ let options = (optionsOrCallback || {}) as MethodOptions;
2554
+
2555
+ if (typeof paramsOrCallback === 'function') {
2556
+ callback = paramsOrCallback;
2557
+ params = {} as Params$Resource$Projects$Locations$Runtimeversions$List;
2558
+ options = {};
2559
+ }
2560
+
2561
+ if (typeof optionsOrCallback === 'function') {
2562
+ callback = optionsOrCallback;
2563
+ options = {};
2564
+ }
2565
+
2566
+ const rootUrl = options.rootUrl || 'https://tpu.googleapis.com/';
2567
+ const parameters = {
2568
+ options: Object.assign(
2569
+ {
2570
+ url: (rootUrl + '/v2/{+parent}/runtimeVersions').replace(
2571
+ /([^:]\/)\/+/g,
2572
+ '$1'
2573
+ ),
2574
+ method: 'GET',
2575
+ },
2576
+ options
2577
+ ),
2578
+ params,
2579
+ requiredParams: ['parent'],
2580
+ pathParams: ['parent'],
2581
+ context: this.context,
2582
+ };
2583
+ if (callback) {
2584
+ createAPIRequest<Schema$ListRuntimeVersionsResponse>(
2585
+ parameters,
2586
+ callback as BodyResponseCallback<unknown>
2587
+ );
2588
+ } else {
2589
+ return createAPIRequest<Schema$ListRuntimeVersionsResponse>(parameters);
2590
+ }
2591
+ }
2592
+ }
2593
+
2594
+ export interface Params$Resource$Projects$Locations$Runtimeversions$Get
2595
+ extends StandardParameters {
2596
+ /**
2597
+ * Required. The resource name.
2598
+ */
2599
+ name?: string;
2600
+ }
2601
+ export interface Params$Resource$Projects$Locations$Runtimeversions$List
2602
+ extends StandardParameters {
2603
+ /**
2604
+ * List filter.
2605
+ */
2606
+ filter?: string;
2607
+ /**
2608
+ * Sort results.
2609
+ */
2610
+ orderBy?: string;
2611
+ /**
2612
+ * The maximum number of items to return.
2613
+ */
2614
+ pageSize?: number;
2615
+ /**
2616
+ * The next_page_token value returned from a previous List request, if any.
2617
+ */
2618
+ pageToken?: string;
2619
+ /**
2620
+ * Required. The parent resource name.
2621
+ */
2622
+ parent?: string;
2623
+ }
2624
+ }