@googleapis/tpu 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/v2.d.ts ADDED
@@ -0,0 +1,2072 @@
1
+ /// <reference types="node" />
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
+ import { Readable } from 'stream';
4
+ export declare namespace tpu_v2 {
5
+ export interface Options extends GlobalOptions {
6
+ version: 'v2';
7
+ }
8
+ interface StandardParameters {
9
+ /**
10
+ * Auth client or API Key for the request
11
+ */
12
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
13
+ /**
14
+ * V1 error format.
15
+ */
16
+ '$.xgafv'?: string;
17
+ /**
18
+ * OAuth access token.
19
+ */
20
+ access_token?: string;
21
+ /**
22
+ * Data format for response.
23
+ */
24
+ alt?: string;
25
+ /**
26
+ * JSONP
27
+ */
28
+ callback?: string;
29
+ /**
30
+ * Selector specifying which fields to include in a partial response.
31
+ */
32
+ fields?: string;
33
+ /**
34
+ * 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.
35
+ */
36
+ key?: string;
37
+ /**
38
+ * OAuth 2.0 token for the current user.
39
+ */
40
+ oauth_token?: string;
41
+ /**
42
+ * Returns response with indentations and line breaks.
43
+ */
44
+ prettyPrint?: boolean;
45
+ /**
46
+ * 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.
47
+ */
48
+ quotaUser?: string;
49
+ /**
50
+ * Legacy upload protocol for media (e.g. "media", "multipart").
51
+ */
52
+ uploadType?: string;
53
+ /**
54
+ * Upload protocol for media (e.g. "raw", "multipart").
55
+ */
56
+ upload_protocol?: string;
57
+ }
58
+ /**
59
+ * Cloud TPU API
60
+ *
61
+ * TPU API provides customers with access to Google TPU technology.
62
+ *
63
+ * @example
64
+ * ```js
65
+ * const {google} = require('googleapis');
66
+ * const tpu = google.tpu('v2');
67
+ * ```
68
+ */
69
+ export class Tpu {
70
+ context: APIRequestContext;
71
+ projects: Resource$Projects;
72
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
73
+ }
74
+ /**
75
+ * A accelerator type that a Node can be configured with.
76
+ */
77
+ export interface Schema$AcceleratorType {
78
+ /**
79
+ * The resource name.
80
+ */
81
+ name?: string | null;
82
+ /**
83
+ * the accelerator type.
84
+ */
85
+ type?: string | null;
86
+ }
87
+ /**
88
+ * An access config attached to the TPU worker.
89
+ */
90
+ export interface Schema$AccessConfig {
91
+ /**
92
+ * Output only. An external IP address associated with the TPU worker.
93
+ */
94
+ externalIp?: string | null;
95
+ }
96
+ /**
97
+ * A node-attached disk resource. Next ID: 8;
98
+ */
99
+ export interface Schema$AttachedDisk {
100
+ /**
101
+ * The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.
102
+ */
103
+ mode?: string | null;
104
+ /**
105
+ * Specifies the full path to an existing disk. For example: "projects/my-project/zones/us-central1-c/disks/my-disk".
106
+ */
107
+ sourceDisk?: string | null;
108
+ }
109
+ /**
110
+ * 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); \}
111
+ */
112
+ export interface Schema$Empty {
113
+ }
114
+ /**
115
+ * Request for GenerateServiceIdentity.
116
+ */
117
+ export interface Schema$GenerateServiceIdentityRequest {
118
+ }
119
+ /**
120
+ * Response for GenerateServiceIdentity.
121
+ */
122
+ export interface Schema$GenerateServiceIdentityResponse {
123
+ /**
124
+ * ServiceIdentity that was created or retrieved.
125
+ */
126
+ identity?: Schema$ServiceIdentity;
127
+ }
128
+ /**
129
+ * Request for GetGuestAttributes.
130
+ */
131
+ export interface Schema$GetGuestAttributesRequest {
132
+ /**
133
+ * The guest attributes path to be queried.
134
+ */
135
+ queryPath?: string | null;
136
+ /**
137
+ * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned.
138
+ */
139
+ workerIds?: string[] | null;
140
+ }
141
+ /**
142
+ * Response for GetGuestAttributes.
143
+ */
144
+ export interface Schema$GetGuestAttributesResponse {
145
+ /**
146
+ * The guest attributes for the TPU workers.
147
+ */
148
+ guestAttributes?: Schema$GuestAttributes[];
149
+ }
150
+ /**
151
+ * A guest attributes.
152
+ */
153
+ export interface Schema$GuestAttributes {
154
+ /**
155
+ * The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\/') or a specified key ('/\/\')
156
+ */
157
+ queryPath?: string | null;
158
+ /**
159
+ * The value of the requested queried path.
160
+ */
161
+ queryValue?: Schema$GuestAttributesValue;
162
+ }
163
+ /**
164
+ * A guest attributes namespace/key/value entry.
165
+ */
166
+ export interface Schema$GuestAttributesEntry {
167
+ /**
168
+ * Key for the guest attribute entry.
169
+ */
170
+ key?: string | null;
171
+ /**
172
+ * Namespace for the guest attribute entry.
173
+ */
174
+ namespace?: string | null;
175
+ /**
176
+ * Value for the guest attribute entry.
177
+ */
178
+ value?: string | null;
179
+ }
180
+ /**
181
+ * Array of guest attribute namespace/key/value tuples.
182
+ */
183
+ export interface Schema$GuestAttributesValue {
184
+ /**
185
+ * The list of guest attributes entries.
186
+ */
187
+ items?: Schema$GuestAttributesEntry[];
188
+ }
189
+ /**
190
+ * Response for ListAcceleratorTypes.
191
+ */
192
+ export interface Schema$ListAcceleratorTypesResponse {
193
+ /**
194
+ * The listed nodes.
195
+ */
196
+ acceleratorTypes?: Schema$AcceleratorType[];
197
+ /**
198
+ * The next page token or empty if none.
199
+ */
200
+ nextPageToken?: string | null;
201
+ /**
202
+ * Locations that could not be reached.
203
+ */
204
+ unreachable?: string[] | null;
205
+ }
206
+ /**
207
+ * The response message for Locations.ListLocations.
208
+ */
209
+ export interface Schema$ListLocationsResponse {
210
+ /**
211
+ * A list of locations that matches the specified filter in the request.
212
+ */
213
+ locations?: Schema$Location[];
214
+ /**
215
+ * The standard List next-page token.
216
+ */
217
+ nextPageToken?: string | null;
218
+ }
219
+ /**
220
+ * Response for ListNodes.
221
+ */
222
+ export interface Schema$ListNodesResponse {
223
+ /**
224
+ * The next page token or empty if none.
225
+ */
226
+ nextPageToken?: string | null;
227
+ /**
228
+ * The listed nodes.
229
+ */
230
+ nodes?: Schema$Node[];
231
+ /**
232
+ * Locations that could not be reached.
233
+ */
234
+ unreachable?: string[] | null;
235
+ }
236
+ /**
237
+ * The response message for Operations.ListOperations.
238
+ */
239
+ export interface Schema$ListOperationsResponse {
240
+ /**
241
+ * The standard List next-page token.
242
+ */
243
+ nextPageToken?: string | null;
244
+ /**
245
+ * A list of operations that matches the specified filter in the request.
246
+ */
247
+ operations?: Schema$Operation[];
248
+ }
249
+ /**
250
+ * Response for ListRuntimeVersions.
251
+ */
252
+ export interface Schema$ListRuntimeVersionsResponse {
253
+ /**
254
+ * The next page token or empty if none.
255
+ */
256
+ nextPageToken?: string | null;
257
+ /**
258
+ * The listed nodes.
259
+ */
260
+ runtimeVersions?: Schema$RuntimeVersion[];
261
+ /**
262
+ * Locations that could not be reached.
263
+ */
264
+ unreachable?: string[] | null;
265
+ }
266
+ /**
267
+ * A resource that represents Google Cloud Platform location.
268
+ */
269
+ export interface Schema$Location {
270
+ /**
271
+ * The friendly name for this location, typically a nearby city name. For example, "Tokyo".
272
+ */
273
+ displayName?: string | null;
274
+ /**
275
+ * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\}
276
+ */
277
+ labels?: {
278
+ [key: string]: string;
279
+ } | null;
280
+ /**
281
+ * The canonical id for this location. For example: `"us-east1"`.
282
+ */
283
+ locationId?: string | null;
284
+ /**
285
+ * Service-specific metadata. For example the available capacity at the given location.
286
+ */
287
+ metadata?: {
288
+ [key: string]: any;
289
+ } | null;
290
+ /**
291
+ * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"`
292
+ */
293
+ name?: string | null;
294
+ }
295
+ /**
296
+ * Network related configurations.
297
+ */
298
+ export interface Schema$NetworkConfig {
299
+ /**
300
+ * 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.
301
+ */
302
+ canIpForward?: boolean | null;
303
+ /**
304
+ * 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.
305
+ */
306
+ enableExternalIps?: boolean | null;
307
+ /**
308
+ * 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.
309
+ */
310
+ network?: string | null;
311
+ /**
312
+ * 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.
313
+ */
314
+ subnetwork?: string | null;
315
+ }
316
+ /**
317
+ * A network endpoint over which a TPU worker can be reached.
318
+ */
319
+ export interface Schema$NetworkEndpoint {
320
+ /**
321
+ * The access config for the TPU worker.
322
+ */
323
+ accessConfig?: Schema$AccessConfig;
324
+ /**
325
+ * The internal IP address of this network endpoint.
326
+ */
327
+ ipAddress?: string | null;
328
+ /**
329
+ * The port of this network endpoint.
330
+ */
331
+ port?: number | null;
332
+ }
333
+ /**
334
+ * A TPU instance.
335
+ */
336
+ export interface Schema$Node {
337
+ /**
338
+ * Required. The type of hardware accelerators associated with this node.
339
+ */
340
+ acceleratorType?: string | null;
341
+ /**
342
+ * Output only. The API version that created this Node.
343
+ */
344
+ apiVersion?: string | null;
345
+ /**
346
+ * 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.
347
+ */
348
+ cidrBlock?: string | null;
349
+ /**
350
+ * Output only. The time when the node was created.
351
+ */
352
+ createTime?: string | null;
353
+ /**
354
+ * The additional data disks for the Node.
355
+ */
356
+ dataDisks?: Schema$AttachedDisk[];
357
+ /**
358
+ * The user-supplied description of the TPU. Maximum of 512 characters.
359
+ */
360
+ description?: string | null;
361
+ /**
362
+ * The health status of the TPU node.
363
+ */
364
+ health?: string | null;
365
+ /**
366
+ * Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.
367
+ */
368
+ healthDescription?: string | null;
369
+ /**
370
+ * Output only. The unique identifier for the TPU Node.
371
+ */
372
+ id?: string | null;
373
+ /**
374
+ * Resource labels to represent user-provided metadata.
375
+ */
376
+ labels?: {
377
+ [key: string]: string;
378
+ } | null;
379
+ /**
380
+ * Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
381
+ */
382
+ metadata?: {
383
+ [key: string]: string;
384
+ } | null;
385
+ /**
386
+ * Output only. Immutable. The name of the TPU.
387
+ */
388
+ name?: string | null;
389
+ /**
390
+ * Network configurations for the TPU node.
391
+ */
392
+ networkConfig?: Schema$NetworkConfig;
393
+ /**
394
+ * 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.
395
+ */
396
+ networkEndpoints?: Schema$NetworkEndpoint[];
397
+ /**
398
+ * Required. The runtime version running in the Node.
399
+ */
400
+ runtimeVersion?: string | null;
401
+ /**
402
+ * The scheduling options for this node.
403
+ */
404
+ schedulingConfig?: Schema$SchedulingConfig;
405
+ /**
406
+ * 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.
407
+ */
408
+ serviceAccount?: Schema$ServiceAccount;
409
+ /**
410
+ * Shielded Instance options.
411
+ */
412
+ shieldedInstanceConfig?: Schema$ShieldedInstanceConfig;
413
+ /**
414
+ * Output only. The current state for the TPU Node.
415
+ */
416
+ state?: string | null;
417
+ /**
418
+ * Output only. The Symptoms that have occurred to the TPU Node.
419
+ */
420
+ symptoms?: Schema$Symptom[];
421
+ /**
422
+ * Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
423
+ */
424
+ tags?: string[] | null;
425
+ }
426
+ /**
427
+ * This resource represents a long-running operation that is the result of a network API call.
428
+ */
429
+ export interface Schema$Operation {
430
+ /**
431
+ * 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.
432
+ */
433
+ done?: boolean | null;
434
+ /**
435
+ * The error result of the operation in case of failure or cancellation.
436
+ */
437
+ error?: Schema$Status;
438
+ /**
439
+ * 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.
440
+ */
441
+ metadata?: {
442
+ [key: string]: any;
443
+ } | null;
444
+ /**
445
+ * 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\}`.
446
+ */
447
+ name?: string | null;
448
+ /**
449
+ * 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`.
450
+ */
451
+ response?: {
452
+ [key: string]: any;
453
+ } | null;
454
+ }
455
+ /**
456
+ * Metadata describing an Operation
457
+ */
458
+ export interface Schema$OperationMetadata {
459
+ /**
460
+ * API version.
461
+ */
462
+ apiVersion?: string | null;
463
+ /**
464
+ * Specifies if cancellation was requested for the operation.
465
+ */
466
+ cancelRequested?: boolean | null;
467
+ /**
468
+ * The time the operation was created.
469
+ */
470
+ createTime?: string | null;
471
+ /**
472
+ * The time the operation finished running.
473
+ */
474
+ endTime?: string | null;
475
+ /**
476
+ * Human-readable status of the operation, if any.
477
+ */
478
+ statusDetail?: string | null;
479
+ /**
480
+ * Target of the operation - for example projects/project-1/connectivityTests/test-1
481
+ */
482
+ target?: string | null;
483
+ /**
484
+ * Name of the verb executed by the operation.
485
+ */
486
+ verb?: string | null;
487
+ }
488
+ /**
489
+ * A runtime version that a Node can be configured with.
490
+ */
491
+ export interface Schema$RuntimeVersion {
492
+ /**
493
+ * The resource name.
494
+ */
495
+ name?: string | null;
496
+ /**
497
+ * The runtime version.
498
+ */
499
+ version?: string | null;
500
+ }
501
+ /**
502
+ * Sets the scheduling options for this node.
503
+ */
504
+ export interface Schema$SchedulingConfig {
505
+ /**
506
+ * Defines whether the node is preemptible.
507
+ */
508
+ preemptible?: boolean | null;
509
+ /**
510
+ * Whether the node is created under a reservation.
511
+ */
512
+ reserved?: boolean | null;
513
+ }
514
+ /**
515
+ * A service account.
516
+ */
517
+ export interface Schema$ServiceAccount {
518
+ /**
519
+ * Email address of the service account. If empty, default Compute service account will be used.
520
+ */
521
+ email?: string | null;
522
+ /**
523
+ * The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.
524
+ */
525
+ scope?: string[] | null;
526
+ }
527
+ /**
528
+ * The per-product per-project service identity for Cloud TPU service.
529
+ */
530
+ export interface Schema$ServiceIdentity {
531
+ /**
532
+ * The email address of the service identity.
533
+ */
534
+ email?: string | null;
535
+ }
536
+ /**
537
+ * A set of Shielded Instance options.
538
+ */
539
+ export interface Schema$ShieldedInstanceConfig {
540
+ /**
541
+ * Defines whether the instance has Secure Boot enabled.
542
+ */
543
+ enableSecureBoot?: boolean | null;
544
+ }
545
+ /**
546
+ * Request for StartNode.
547
+ */
548
+ export interface Schema$StartNodeRequest {
549
+ }
550
+ /**
551
+ * 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).
552
+ */
553
+ export interface Schema$Status {
554
+ /**
555
+ * The status code, which should be an enum value of google.rpc.Code.
556
+ */
557
+ code?: number | null;
558
+ /**
559
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
560
+ */
561
+ details?: Array<{
562
+ [key: string]: any;
563
+ }> | null;
564
+ /**
565
+ * 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.
566
+ */
567
+ message?: string | null;
568
+ }
569
+ /**
570
+ * Request for StopNode.
571
+ */
572
+ export interface Schema$StopNodeRequest {
573
+ }
574
+ /**
575
+ * A Symptom instance.
576
+ */
577
+ export interface Schema$Symptom {
578
+ /**
579
+ * Timestamp when the Symptom is created.
580
+ */
581
+ createTime?: string | null;
582
+ /**
583
+ * Detailed information of the current Symptom.
584
+ */
585
+ details?: string | null;
586
+ /**
587
+ * Type of the Symptom.
588
+ */
589
+ symptomType?: string | null;
590
+ /**
591
+ * A string used to uniquely distinguish a worker within a TPU node.
592
+ */
593
+ workerId?: string | null;
594
+ }
595
+ export class Resource$Projects {
596
+ context: APIRequestContext;
597
+ locations: Resource$Projects$Locations;
598
+ constructor(context: APIRequestContext);
599
+ }
600
+ export class Resource$Projects$Locations {
601
+ context: APIRequestContext;
602
+ acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
603
+ nodes: Resource$Projects$Locations$Nodes;
604
+ operations: Resource$Projects$Locations$Operations;
605
+ runtimeVersions: Resource$Projects$Locations$Runtimeversions;
606
+ constructor(context: APIRequestContext);
607
+ /**
608
+ * Generates the Cloud TPU service identity for the project.
609
+ * @example
610
+ * ```js
611
+ * // Before running the sample:
612
+ * // - Enable the API at:
613
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
614
+ * // - Login into gcloud by running:
615
+ * // `$ gcloud auth application-default login`
616
+ * // - Install the npm module by running:
617
+ * // `$ npm install googleapis`
618
+ *
619
+ * const {google} = require('googleapis');
620
+ * const tpu = google.tpu('v2');
621
+ *
622
+ * async function main() {
623
+ * const auth = new google.auth.GoogleAuth({
624
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
625
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
626
+ * });
627
+ *
628
+ * // Acquire an auth client, and bind it to all future calls
629
+ * const authClient = await auth.getClient();
630
+ * google.options({auth: authClient});
631
+ *
632
+ * // Do the magic
633
+ * const res = await tpu.projects.locations.generateServiceIdentity({
634
+ * // Required. The parent resource name.
635
+ * parent: 'projects/my-project/locations/my-location',
636
+ *
637
+ * // Request body metadata
638
+ * requestBody: {
639
+ * // request body parameters
640
+ * // {}
641
+ * },
642
+ * });
643
+ * console.log(res.data);
644
+ *
645
+ * // Example response
646
+ * // {
647
+ * // "identity": {}
648
+ * // }
649
+ * }
650
+ *
651
+ * main().catch(e => {
652
+ * console.error(e);
653
+ * throw e;
654
+ * });
655
+ *
656
+ * ```
657
+ *
658
+ * @param params - Parameters for request
659
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
660
+ * @param callback - Optional callback that handles the response.
661
+ * @returns A promise if used with async/await, or void if used with a callback.
662
+ */
663
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: StreamMethodOptions): GaxiosPromise<Readable>;
664
+ generateServiceIdentity(params?: Params$Resource$Projects$Locations$Generateserviceidentity, options?: MethodOptions): GaxiosPromise<Schema$GenerateServiceIdentityResponse>;
665
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
666
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: MethodOptions | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>, callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
667
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
668
+ generateServiceIdentity(callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
669
+ /**
670
+ * Gets information about a location.
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('v2');
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.get({
696
+ * // Resource name for the location.
697
+ * name: 'projects/my-project/locations/my-location',
698
+ * });
699
+ * console.log(res.data);
700
+ *
701
+ * // Example response
702
+ * // {
703
+ * // "displayName": "my_displayName",
704
+ * // "labels": {},
705
+ * // "locationId": "my_locationId",
706
+ * // "metadata": {},
707
+ * // "name": "my_name"
708
+ * // }
709
+ * }
710
+ *
711
+ * main().catch(e => {
712
+ * console.error(e);
713
+ * throw e;
714
+ * });
715
+ *
716
+ * ```
717
+ *
718
+ * @param params - Parameters for request
719
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
720
+ * @param callback - Optional callback that handles the response.
721
+ * @returns A promise if used with async/await, or void if used with a callback.
722
+ */
723
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
724
+ get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): GaxiosPromise<Schema$Location>;
725
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
726
+ get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void;
727
+ get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void;
728
+ get(callback: BodyResponseCallback<Schema$Location>): void;
729
+ /**
730
+ * Lists information about the supported locations for this service.
731
+ * @example
732
+ * ```js
733
+ * // Before running the sample:
734
+ * // - Enable the API at:
735
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
736
+ * // - Login into gcloud by running:
737
+ * // `$ gcloud auth application-default login`
738
+ * // - Install the npm module by running:
739
+ * // `$ npm install googleapis`
740
+ *
741
+ * const {google} = require('googleapis');
742
+ * const tpu = google.tpu('v2');
743
+ *
744
+ * async function main() {
745
+ * const auth = new google.auth.GoogleAuth({
746
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
747
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
748
+ * });
749
+ *
750
+ * // Acquire an auth client, and bind it to all future calls
751
+ * const authClient = await auth.getClient();
752
+ * google.options({auth: authClient});
753
+ *
754
+ * // Do the magic
755
+ * const res = await tpu.projects.locations.list({
756
+ * // 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).
757
+ * filter: 'placeholder-value',
758
+ * // The resource that owns the locations collection, if applicable.
759
+ * name: 'projects/my-project',
760
+ * // The maximum number of results to return. If not set, the service selects a default.
761
+ * pageSize: 'placeholder-value',
762
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
763
+ * pageToken: 'placeholder-value',
764
+ * });
765
+ * console.log(res.data);
766
+ *
767
+ * // Example response
768
+ * // {
769
+ * // "locations": [],
770
+ * // "nextPageToken": "my_nextPageToken"
771
+ * // }
772
+ * }
773
+ *
774
+ * main().catch(e => {
775
+ * console.error(e);
776
+ * throw e;
777
+ * });
778
+ *
779
+ * ```
780
+ *
781
+ * @param params - Parameters for request
782
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
783
+ * @param callback - Optional callback that handles the response.
784
+ * @returns A promise if used with async/await, or void if used with a callback.
785
+ */
786
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
787
+ list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): GaxiosPromise<Schema$ListLocationsResponse>;
788
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
789
+ list(params: Params$Resource$Projects$Locations$List, options: MethodOptions | BodyResponseCallback<Schema$ListLocationsResponse>, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
790
+ list(params: Params$Resource$Projects$Locations$List, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
791
+ list(callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
792
+ }
793
+ export interface Params$Resource$Projects$Locations$Generateserviceidentity extends StandardParameters {
794
+ /**
795
+ * Required. The parent resource name.
796
+ */
797
+ parent?: string;
798
+ /**
799
+ * Request body metadata
800
+ */
801
+ requestBody?: Schema$GenerateServiceIdentityRequest;
802
+ }
803
+ export interface Params$Resource$Projects$Locations$Get extends StandardParameters {
804
+ /**
805
+ * Resource name for the location.
806
+ */
807
+ name?: string;
808
+ }
809
+ export interface Params$Resource$Projects$Locations$List extends StandardParameters {
810
+ /**
811
+ * 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).
812
+ */
813
+ filter?: string;
814
+ /**
815
+ * The resource that owns the locations collection, if applicable.
816
+ */
817
+ name?: string;
818
+ /**
819
+ * The maximum number of results to return. If not set, the service selects a default.
820
+ */
821
+ pageSize?: number;
822
+ /**
823
+ * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
824
+ */
825
+ pageToken?: string;
826
+ }
827
+ export class Resource$Projects$Locations$Acceleratortypes {
828
+ context: APIRequestContext;
829
+ constructor(context: APIRequestContext);
830
+ /**
831
+ * Gets AcceleratorType.
832
+ * @example
833
+ * ```js
834
+ * // Before running the sample:
835
+ * // - Enable the API at:
836
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
837
+ * // - Login into gcloud by running:
838
+ * // `$ gcloud auth application-default login`
839
+ * // - Install the npm module by running:
840
+ * // `$ npm install googleapis`
841
+ *
842
+ * const {google} = require('googleapis');
843
+ * const tpu = google.tpu('v2');
844
+ *
845
+ * async function main() {
846
+ * const auth = new google.auth.GoogleAuth({
847
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
848
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
849
+ * });
850
+ *
851
+ * // Acquire an auth client, and bind it to all future calls
852
+ * const authClient = await auth.getClient();
853
+ * google.options({auth: authClient});
854
+ *
855
+ * // Do the magic
856
+ * const res = await tpu.projects.locations.acceleratorTypes.get({
857
+ * // Required. The resource name.
858
+ * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
859
+ * });
860
+ * console.log(res.data);
861
+ *
862
+ * // Example response
863
+ * // {
864
+ * // "name": "my_name",
865
+ * // "type": "my_type"
866
+ * // }
867
+ * }
868
+ *
869
+ * main().catch(e => {
870
+ * console.error(e);
871
+ * throw e;
872
+ * });
873
+ *
874
+ * ```
875
+ *
876
+ * @param params - Parameters for request
877
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
878
+ * @param callback - Optional callback that handles the response.
879
+ * @returns A promise if used with async/await, or void if used with a callback.
880
+ */
881
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
882
+ get(params?: Params$Resource$Projects$Locations$Acceleratortypes$Get, options?: MethodOptions): GaxiosPromise<Schema$AcceleratorType>;
883
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
884
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: MethodOptions | BodyResponseCallback<Schema$AcceleratorType>, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
885
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
886
+ get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
887
+ /**
888
+ * Lists accelerator types supported by this API.
889
+ * @example
890
+ * ```js
891
+ * // Before running the sample:
892
+ * // - Enable the API at:
893
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
894
+ * // - Login into gcloud by running:
895
+ * // `$ gcloud auth application-default login`
896
+ * // - Install the npm module by running:
897
+ * // `$ npm install googleapis`
898
+ *
899
+ * const {google} = require('googleapis');
900
+ * const tpu = google.tpu('v2');
901
+ *
902
+ * async function main() {
903
+ * const auth = new google.auth.GoogleAuth({
904
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
905
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
906
+ * });
907
+ *
908
+ * // Acquire an auth client, and bind it to all future calls
909
+ * const authClient = await auth.getClient();
910
+ * google.options({auth: authClient});
911
+ *
912
+ * // Do the magic
913
+ * const res = await tpu.projects.locations.acceleratorTypes.list({
914
+ * // List filter.
915
+ * filter: 'placeholder-value',
916
+ * // Sort results.
917
+ * orderBy: 'placeholder-value',
918
+ * // The maximum number of items to return.
919
+ * pageSize: 'placeholder-value',
920
+ * // The next_page_token value returned from a previous List request, if any.
921
+ * pageToken: 'placeholder-value',
922
+ * // Required. The parent resource name.
923
+ * parent: 'projects/my-project/locations/my-location',
924
+ * });
925
+ * console.log(res.data);
926
+ *
927
+ * // Example response
928
+ * // {
929
+ * // "acceleratorTypes": [],
930
+ * // "nextPageToken": "my_nextPageToken",
931
+ * // "unreachable": []
932
+ * // }
933
+ * }
934
+ *
935
+ * main().catch(e => {
936
+ * console.error(e);
937
+ * throw e;
938
+ * });
939
+ *
940
+ * ```
941
+ *
942
+ * @param params - Parameters for request
943
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
944
+ * @param callback - Optional callback that handles the response.
945
+ * @returns A promise if used with async/await, or void if used with a callback.
946
+ */
947
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
948
+ list(params?: Params$Resource$Projects$Locations$Acceleratortypes$List, options?: MethodOptions): GaxiosPromise<Schema$ListAcceleratorTypesResponse>;
949
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
950
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: MethodOptions | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
951
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
952
+ list(callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
953
+ }
954
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$Get extends StandardParameters {
955
+ /**
956
+ * Required. The resource name.
957
+ */
958
+ name?: string;
959
+ }
960
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$List extends StandardParameters {
961
+ /**
962
+ * List filter.
963
+ */
964
+ filter?: string;
965
+ /**
966
+ * Sort results.
967
+ */
968
+ orderBy?: string;
969
+ /**
970
+ * The maximum number of items to return.
971
+ */
972
+ pageSize?: number;
973
+ /**
974
+ * The next_page_token value returned from a previous List request, if any.
975
+ */
976
+ pageToken?: string;
977
+ /**
978
+ * Required. The parent resource name.
979
+ */
980
+ parent?: string;
981
+ }
982
+ export class Resource$Projects$Locations$Nodes {
983
+ context: APIRequestContext;
984
+ constructor(context: APIRequestContext);
985
+ /**
986
+ * Creates a node.
987
+ * @example
988
+ * ```js
989
+ * // Before running the sample:
990
+ * // - Enable the API at:
991
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
992
+ * // - Login into gcloud by running:
993
+ * // `$ gcloud auth application-default login`
994
+ * // - Install the npm module by running:
995
+ * // `$ npm install googleapis`
996
+ *
997
+ * const {google} = require('googleapis');
998
+ * const tpu = google.tpu('v2');
999
+ *
1000
+ * async function main() {
1001
+ * const auth = new google.auth.GoogleAuth({
1002
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1003
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1004
+ * });
1005
+ *
1006
+ * // Acquire an auth client, and bind it to all future calls
1007
+ * const authClient = await auth.getClient();
1008
+ * google.options({auth: authClient});
1009
+ *
1010
+ * // Do the magic
1011
+ * const res = await tpu.projects.locations.nodes.create({
1012
+ * // The unqualified resource name.
1013
+ * nodeId: 'placeholder-value',
1014
+ * // Required. The parent resource name.
1015
+ * parent: 'projects/my-project/locations/my-location',
1016
+ *
1017
+ * // Request body metadata
1018
+ * requestBody: {
1019
+ * // request body parameters
1020
+ * // {
1021
+ * // "acceleratorType": "my_acceleratorType",
1022
+ * // "apiVersion": "my_apiVersion",
1023
+ * // "cidrBlock": "my_cidrBlock",
1024
+ * // "createTime": "my_createTime",
1025
+ * // "dataDisks": [],
1026
+ * // "description": "my_description",
1027
+ * // "health": "my_health",
1028
+ * // "healthDescription": "my_healthDescription",
1029
+ * // "id": "my_id",
1030
+ * // "labels": {},
1031
+ * // "metadata": {},
1032
+ * // "name": "my_name",
1033
+ * // "networkConfig": {},
1034
+ * // "networkEndpoints": [],
1035
+ * // "runtimeVersion": "my_runtimeVersion",
1036
+ * // "schedulingConfig": {},
1037
+ * // "serviceAccount": {},
1038
+ * // "shieldedInstanceConfig": {},
1039
+ * // "state": "my_state",
1040
+ * // "symptoms": [],
1041
+ * // "tags": []
1042
+ * // }
1043
+ * },
1044
+ * });
1045
+ * console.log(res.data);
1046
+ *
1047
+ * // Example response
1048
+ * // {
1049
+ * // "done": false,
1050
+ * // "error": {},
1051
+ * // "metadata": {},
1052
+ * // "name": "my_name",
1053
+ * // "response": {}
1054
+ * // }
1055
+ * }
1056
+ *
1057
+ * main().catch(e => {
1058
+ * console.error(e);
1059
+ * throw e;
1060
+ * });
1061
+ *
1062
+ * ```
1063
+ *
1064
+ * @param params - Parameters for request
1065
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1066
+ * @param callback - Optional callback that handles the response.
1067
+ * @returns A promise if used with async/await, or void if used with a callback.
1068
+ */
1069
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1070
+ create(params?: Params$Resource$Projects$Locations$Nodes$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1071
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1072
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1073
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, callback: BodyResponseCallback<Schema$Operation>): void;
1074
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1075
+ /**
1076
+ * Deletes a node.
1077
+ * @example
1078
+ * ```js
1079
+ * // Before running the sample:
1080
+ * // - Enable the API at:
1081
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1082
+ * // - Login into gcloud by running:
1083
+ * // `$ gcloud auth application-default login`
1084
+ * // - Install the npm module by running:
1085
+ * // `$ npm install googleapis`
1086
+ *
1087
+ * const {google} = require('googleapis');
1088
+ * const tpu = google.tpu('v2');
1089
+ *
1090
+ * async function main() {
1091
+ * const auth = new google.auth.GoogleAuth({
1092
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1093
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1094
+ * });
1095
+ *
1096
+ * // Acquire an auth client, and bind it to all future calls
1097
+ * const authClient = await auth.getClient();
1098
+ * google.options({auth: authClient});
1099
+ *
1100
+ * // Do the magic
1101
+ * const res = await tpu.projects.locations.nodes.delete({
1102
+ * // Required. The resource name.
1103
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1104
+ * });
1105
+ * console.log(res.data);
1106
+ *
1107
+ * // Example response
1108
+ * // {
1109
+ * // "done": false,
1110
+ * // "error": {},
1111
+ * // "metadata": {},
1112
+ * // "name": "my_name",
1113
+ * // "response": {}
1114
+ * // }
1115
+ * }
1116
+ *
1117
+ * main().catch(e => {
1118
+ * console.error(e);
1119
+ * throw e;
1120
+ * });
1121
+ *
1122
+ * ```
1123
+ *
1124
+ * @param params - Parameters for request
1125
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1126
+ * @param callback - Optional callback that handles the response.
1127
+ * @returns A promise if used with async/await, or void if used with a callback.
1128
+ */
1129
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1130
+ delete(params?: Params$Resource$Projects$Locations$Nodes$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1131
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1132
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1133
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
1134
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1135
+ /**
1136
+ * Gets the details of a node.
1137
+ * @example
1138
+ * ```js
1139
+ * // Before running the sample:
1140
+ * // - Enable the API at:
1141
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1142
+ * // - Login into gcloud by running:
1143
+ * // `$ gcloud auth application-default login`
1144
+ * // - Install the npm module by running:
1145
+ * // `$ npm install googleapis`
1146
+ *
1147
+ * const {google} = require('googleapis');
1148
+ * const tpu = google.tpu('v2');
1149
+ *
1150
+ * async function main() {
1151
+ * const auth = new google.auth.GoogleAuth({
1152
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1153
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1154
+ * });
1155
+ *
1156
+ * // Acquire an auth client, and bind it to all future calls
1157
+ * const authClient = await auth.getClient();
1158
+ * google.options({auth: authClient});
1159
+ *
1160
+ * // Do the magic
1161
+ * const res = await tpu.projects.locations.nodes.get({
1162
+ * // Required. The resource name.
1163
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1164
+ * });
1165
+ * console.log(res.data);
1166
+ *
1167
+ * // Example response
1168
+ * // {
1169
+ * // "acceleratorType": "my_acceleratorType",
1170
+ * // "apiVersion": "my_apiVersion",
1171
+ * // "cidrBlock": "my_cidrBlock",
1172
+ * // "createTime": "my_createTime",
1173
+ * // "dataDisks": [],
1174
+ * // "description": "my_description",
1175
+ * // "health": "my_health",
1176
+ * // "healthDescription": "my_healthDescription",
1177
+ * // "id": "my_id",
1178
+ * // "labels": {},
1179
+ * // "metadata": {},
1180
+ * // "name": "my_name",
1181
+ * // "networkConfig": {},
1182
+ * // "networkEndpoints": [],
1183
+ * // "runtimeVersion": "my_runtimeVersion",
1184
+ * // "schedulingConfig": {},
1185
+ * // "serviceAccount": {},
1186
+ * // "shieldedInstanceConfig": {},
1187
+ * // "state": "my_state",
1188
+ * // "symptoms": [],
1189
+ * // "tags": []
1190
+ * // }
1191
+ * }
1192
+ *
1193
+ * main().catch(e => {
1194
+ * console.error(e);
1195
+ * throw e;
1196
+ * });
1197
+ *
1198
+ * ```
1199
+ *
1200
+ * @param params - Parameters for request
1201
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1202
+ * @param callback - Optional callback that handles the response.
1203
+ * @returns A promise if used with async/await, or void if used with a callback.
1204
+ */
1205
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1206
+ get(params?: Params$Resource$Projects$Locations$Nodes$Get, options?: MethodOptions): GaxiosPromise<Schema$Node>;
1207
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1208
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: MethodOptions | BodyResponseCallback<Schema$Node>, callback: BodyResponseCallback<Schema$Node>): void;
1209
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, callback: BodyResponseCallback<Schema$Node>): void;
1210
+ get(callback: BodyResponseCallback<Schema$Node>): void;
1211
+ /**
1212
+ * Retrieves the guest attributes for the node.
1213
+ * @example
1214
+ * ```js
1215
+ * // Before running the sample:
1216
+ * // - Enable the API at:
1217
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1218
+ * // - Login into gcloud by running:
1219
+ * // `$ gcloud auth application-default login`
1220
+ * // - Install the npm module by running:
1221
+ * // `$ npm install googleapis`
1222
+ *
1223
+ * const {google} = require('googleapis');
1224
+ * const tpu = google.tpu('v2');
1225
+ *
1226
+ * async function main() {
1227
+ * const auth = new google.auth.GoogleAuth({
1228
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1229
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1230
+ * });
1231
+ *
1232
+ * // Acquire an auth client, and bind it to all future calls
1233
+ * const authClient = await auth.getClient();
1234
+ * google.options({auth: authClient});
1235
+ *
1236
+ * // Do the magic
1237
+ * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1238
+ * // Required. The resource name.
1239
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1240
+ *
1241
+ * // Request body metadata
1242
+ * requestBody: {
1243
+ * // request body parameters
1244
+ * // {
1245
+ * // "queryPath": "my_queryPath",
1246
+ * // "workerIds": []
1247
+ * // }
1248
+ * },
1249
+ * });
1250
+ * console.log(res.data);
1251
+ *
1252
+ * // Example response
1253
+ * // {
1254
+ * // "guestAttributes": []
1255
+ * // }
1256
+ * }
1257
+ *
1258
+ * main().catch(e => {
1259
+ * console.error(e);
1260
+ * throw e;
1261
+ * });
1262
+ *
1263
+ * ```
1264
+ *
1265
+ * @param params - Parameters for request
1266
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1267
+ * @param callback - Optional callback that handles the response.
1268
+ * @returns A promise if used with async/await, or void if used with a callback.
1269
+ */
1270
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions): GaxiosPromise<Readable>;
1271
+ getGuestAttributes(params?: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options?: MethodOptions): GaxiosPromise<Schema$GetGuestAttributesResponse>;
1272
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1273
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: MethodOptions | BodyResponseCallback<Schema$GetGuestAttributesResponse>, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1274
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1275
+ getGuestAttributes(callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1276
+ /**
1277
+ * Lists nodes.
1278
+ * @example
1279
+ * ```js
1280
+ * // Before running the sample:
1281
+ * // - Enable the API at:
1282
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1283
+ * // - Login into gcloud by running:
1284
+ * // `$ gcloud auth application-default login`
1285
+ * // - Install the npm module by running:
1286
+ * // `$ npm install googleapis`
1287
+ *
1288
+ * const {google} = require('googleapis');
1289
+ * const tpu = google.tpu('v2');
1290
+ *
1291
+ * async function main() {
1292
+ * const auth = new google.auth.GoogleAuth({
1293
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1294
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1295
+ * });
1296
+ *
1297
+ * // Acquire an auth client, and bind it to all future calls
1298
+ * const authClient = await auth.getClient();
1299
+ * google.options({auth: authClient});
1300
+ *
1301
+ * // Do the magic
1302
+ * const res = await tpu.projects.locations.nodes.list({
1303
+ * // The maximum number of items to return.
1304
+ * pageSize: 'placeholder-value',
1305
+ * // The next_page_token value returned from a previous List request, if any.
1306
+ * pageToken: 'placeholder-value',
1307
+ * // Required. The parent resource name.
1308
+ * parent: 'projects/my-project/locations/my-location',
1309
+ * });
1310
+ * console.log(res.data);
1311
+ *
1312
+ * // Example response
1313
+ * // {
1314
+ * // "nextPageToken": "my_nextPageToken",
1315
+ * // "nodes": [],
1316
+ * // "unreachable": []
1317
+ * // }
1318
+ * }
1319
+ *
1320
+ * main().catch(e => {
1321
+ * console.error(e);
1322
+ * throw e;
1323
+ * });
1324
+ *
1325
+ * ```
1326
+ *
1327
+ * @param params - Parameters for request
1328
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1329
+ * @param callback - Optional callback that handles the response.
1330
+ * @returns A promise if used with async/await, or void if used with a callback.
1331
+ */
1332
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1333
+ list(params?: Params$Resource$Projects$Locations$Nodes$List, options?: MethodOptions): GaxiosPromise<Schema$ListNodesResponse>;
1334
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1335
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: MethodOptions | BodyResponseCallback<Schema$ListNodesResponse>, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1336
+ list(params: Params$Resource$Projects$Locations$Nodes$List, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1337
+ list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1338
+ /**
1339
+ * Updates the configurations of a node.
1340
+ * @example
1341
+ * ```js
1342
+ * // Before running the sample:
1343
+ * // - Enable the API at:
1344
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1345
+ * // - Login into gcloud by running:
1346
+ * // `$ gcloud auth application-default login`
1347
+ * // - Install the npm module by running:
1348
+ * // `$ npm install googleapis`
1349
+ *
1350
+ * const {google} = require('googleapis');
1351
+ * const tpu = google.tpu('v2');
1352
+ *
1353
+ * async function main() {
1354
+ * const auth = new google.auth.GoogleAuth({
1355
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1356
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1357
+ * });
1358
+ *
1359
+ * // Acquire an auth client, and bind it to all future calls
1360
+ * const authClient = await auth.getClient();
1361
+ * google.options({auth: authClient});
1362
+ *
1363
+ * // Do the magic
1364
+ * const res = await tpu.projects.locations.nodes.patch({
1365
+ * // Output only. Immutable. The name of the TPU.
1366
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1367
+ * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1368
+ * updateMask: 'placeholder-value',
1369
+ *
1370
+ * // Request body metadata
1371
+ * requestBody: {
1372
+ * // request body parameters
1373
+ * // {
1374
+ * // "acceleratorType": "my_acceleratorType",
1375
+ * // "apiVersion": "my_apiVersion",
1376
+ * // "cidrBlock": "my_cidrBlock",
1377
+ * // "createTime": "my_createTime",
1378
+ * // "dataDisks": [],
1379
+ * // "description": "my_description",
1380
+ * // "health": "my_health",
1381
+ * // "healthDescription": "my_healthDescription",
1382
+ * // "id": "my_id",
1383
+ * // "labels": {},
1384
+ * // "metadata": {},
1385
+ * // "name": "my_name",
1386
+ * // "networkConfig": {},
1387
+ * // "networkEndpoints": [],
1388
+ * // "runtimeVersion": "my_runtimeVersion",
1389
+ * // "schedulingConfig": {},
1390
+ * // "serviceAccount": {},
1391
+ * // "shieldedInstanceConfig": {},
1392
+ * // "state": "my_state",
1393
+ * // "symptoms": [],
1394
+ * // "tags": []
1395
+ * // }
1396
+ * },
1397
+ * });
1398
+ * console.log(res.data);
1399
+ *
1400
+ * // Example response
1401
+ * // {
1402
+ * // "done": false,
1403
+ * // "error": {},
1404
+ * // "metadata": {},
1405
+ * // "name": "my_name",
1406
+ * // "response": {}
1407
+ * // }
1408
+ * }
1409
+ *
1410
+ * main().catch(e => {
1411
+ * console.error(e);
1412
+ * throw e;
1413
+ * });
1414
+ *
1415
+ * ```
1416
+ *
1417
+ * @param params - Parameters for request
1418
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1419
+ * @param callback - Optional callback that handles the response.
1420
+ * @returns A promise if used with async/await, or void if used with a callback.
1421
+ */
1422
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1423
+ patch(params?: Params$Resource$Projects$Locations$Nodes$Patch, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1424
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1425
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1426
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
1427
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
1428
+ /**
1429
+ * Starts a node.
1430
+ * @example
1431
+ * ```js
1432
+ * // Before running the sample:
1433
+ * // - Enable the API at:
1434
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1435
+ * // - Login into gcloud by running:
1436
+ * // `$ gcloud auth application-default login`
1437
+ * // - Install the npm module by running:
1438
+ * // `$ npm install googleapis`
1439
+ *
1440
+ * const {google} = require('googleapis');
1441
+ * const tpu = google.tpu('v2');
1442
+ *
1443
+ * async function main() {
1444
+ * const auth = new google.auth.GoogleAuth({
1445
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1446
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1447
+ * });
1448
+ *
1449
+ * // Acquire an auth client, and bind it to all future calls
1450
+ * const authClient = await auth.getClient();
1451
+ * google.options({auth: authClient});
1452
+ *
1453
+ * // Do the magic
1454
+ * const res = await tpu.projects.locations.nodes.start({
1455
+ * // The resource name.
1456
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1457
+ *
1458
+ * // Request body metadata
1459
+ * requestBody: {
1460
+ * // request body parameters
1461
+ * // {}
1462
+ * },
1463
+ * });
1464
+ * console.log(res.data);
1465
+ *
1466
+ * // Example response
1467
+ * // {
1468
+ * // "done": false,
1469
+ * // "error": {},
1470
+ * // "metadata": {},
1471
+ * // "name": "my_name",
1472
+ * // "response": {}
1473
+ * // }
1474
+ * }
1475
+ *
1476
+ * main().catch(e => {
1477
+ * console.error(e);
1478
+ * throw e;
1479
+ * });
1480
+ *
1481
+ * ```
1482
+ *
1483
+ * @param params - Parameters for request
1484
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1485
+ * @param callback - Optional callback that handles the response.
1486
+ * @returns A promise if used with async/await, or void if used with a callback.
1487
+ */
1488
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions): GaxiosPromise<Readable>;
1489
+ start(params?: Params$Resource$Projects$Locations$Nodes$Start, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1490
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1491
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1492
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, callback: BodyResponseCallback<Schema$Operation>): void;
1493
+ start(callback: BodyResponseCallback<Schema$Operation>): void;
1494
+ /**
1495
+ * Stops a node. This operation is only available with single TPU nodes.
1496
+ * @example
1497
+ * ```js
1498
+ * // Before running the sample:
1499
+ * // - Enable the API at:
1500
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1501
+ * // - Login into gcloud by running:
1502
+ * // `$ gcloud auth application-default login`
1503
+ * // - Install the npm module by running:
1504
+ * // `$ npm install googleapis`
1505
+ *
1506
+ * const {google} = require('googleapis');
1507
+ * const tpu = google.tpu('v2');
1508
+ *
1509
+ * async function main() {
1510
+ * const auth = new google.auth.GoogleAuth({
1511
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1512
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1513
+ * });
1514
+ *
1515
+ * // Acquire an auth client, and bind it to all future calls
1516
+ * const authClient = await auth.getClient();
1517
+ * google.options({auth: authClient});
1518
+ *
1519
+ * // Do the magic
1520
+ * const res = await tpu.projects.locations.nodes.stop({
1521
+ * // The resource name.
1522
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1523
+ *
1524
+ * // Request body metadata
1525
+ * requestBody: {
1526
+ * // request body parameters
1527
+ * // {}
1528
+ * },
1529
+ * });
1530
+ * console.log(res.data);
1531
+ *
1532
+ * // Example response
1533
+ * // {
1534
+ * // "done": false,
1535
+ * // "error": {},
1536
+ * // "metadata": {},
1537
+ * // "name": "my_name",
1538
+ * // "response": {}
1539
+ * // }
1540
+ * }
1541
+ *
1542
+ * main().catch(e => {
1543
+ * console.error(e);
1544
+ * throw e;
1545
+ * });
1546
+ *
1547
+ * ```
1548
+ *
1549
+ * @param params - Parameters for request
1550
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1551
+ * @param callback - Optional callback that handles the response.
1552
+ * @returns A promise if used with async/await, or void if used with a callback.
1553
+ */
1554
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions): GaxiosPromise<Readable>;
1555
+ stop(params?: Params$Resource$Projects$Locations$Nodes$Stop, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1556
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1557
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1558
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, callback: BodyResponseCallback<Schema$Operation>): void;
1559
+ stop(callback: BodyResponseCallback<Schema$Operation>): void;
1560
+ }
1561
+ export interface Params$Resource$Projects$Locations$Nodes$Create extends StandardParameters {
1562
+ /**
1563
+ * The unqualified resource name.
1564
+ */
1565
+ nodeId?: string;
1566
+ /**
1567
+ * Required. The parent resource name.
1568
+ */
1569
+ parent?: string;
1570
+ /**
1571
+ * Request body metadata
1572
+ */
1573
+ requestBody?: Schema$Node;
1574
+ }
1575
+ export interface Params$Resource$Projects$Locations$Nodes$Delete extends StandardParameters {
1576
+ /**
1577
+ * Required. The resource name.
1578
+ */
1579
+ name?: string;
1580
+ }
1581
+ export interface Params$Resource$Projects$Locations$Nodes$Get extends StandardParameters {
1582
+ /**
1583
+ * Required. The resource name.
1584
+ */
1585
+ name?: string;
1586
+ }
1587
+ export interface Params$Resource$Projects$Locations$Nodes$Getguestattributes extends StandardParameters {
1588
+ /**
1589
+ * Required. The resource name.
1590
+ */
1591
+ name?: string;
1592
+ /**
1593
+ * Request body metadata
1594
+ */
1595
+ requestBody?: Schema$GetGuestAttributesRequest;
1596
+ }
1597
+ export interface Params$Resource$Projects$Locations$Nodes$List extends StandardParameters {
1598
+ /**
1599
+ * The maximum number of items to return.
1600
+ */
1601
+ pageSize?: number;
1602
+ /**
1603
+ * The next_page_token value returned from a previous List request, if any.
1604
+ */
1605
+ pageToken?: string;
1606
+ /**
1607
+ * Required. The parent resource name.
1608
+ */
1609
+ parent?: string;
1610
+ }
1611
+ export interface Params$Resource$Projects$Locations$Nodes$Patch extends StandardParameters {
1612
+ /**
1613
+ * Output only. Immutable. The name of the TPU.
1614
+ */
1615
+ name?: string;
1616
+ /**
1617
+ * Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1618
+ */
1619
+ updateMask?: string;
1620
+ /**
1621
+ * Request body metadata
1622
+ */
1623
+ requestBody?: Schema$Node;
1624
+ }
1625
+ export interface Params$Resource$Projects$Locations$Nodes$Start extends StandardParameters {
1626
+ /**
1627
+ * The resource name.
1628
+ */
1629
+ name?: string;
1630
+ /**
1631
+ * Request body metadata
1632
+ */
1633
+ requestBody?: Schema$StartNodeRequest;
1634
+ }
1635
+ export interface Params$Resource$Projects$Locations$Nodes$Stop extends StandardParameters {
1636
+ /**
1637
+ * The resource name.
1638
+ */
1639
+ name?: string;
1640
+ /**
1641
+ * Request body metadata
1642
+ */
1643
+ requestBody?: Schema$StopNodeRequest;
1644
+ }
1645
+ export class Resource$Projects$Locations$Operations {
1646
+ context: APIRequestContext;
1647
+ constructor(context: APIRequestContext);
1648
+ /**
1649
+ * 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`.
1650
+ * @example
1651
+ * ```js
1652
+ * // Before running the sample:
1653
+ * // - Enable the API at:
1654
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1655
+ * // - Login into gcloud by running:
1656
+ * // `$ gcloud auth application-default login`
1657
+ * // - Install the npm module by running:
1658
+ * // `$ npm install googleapis`
1659
+ *
1660
+ * const {google} = require('googleapis');
1661
+ * const tpu = google.tpu('v2');
1662
+ *
1663
+ * async function main() {
1664
+ * const auth = new google.auth.GoogleAuth({
1665
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1666
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1667
+ * });
1668
+ *
1669
+ * // Acquire an auth client, and bind it to all future calls
1670
+ * const authClient = await auth.getClient();
1671
+ * google.options({auth: authClient});
1672
+ *
1673
+ * // Do the magic
1674
+ * const res = await tpu.projects.locations.operations.cancel({
1675
+ * // The name of the operation resource to be cancelled.
1676
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1677
+ * });
1678
+ * console.log(res.data);
1679
+ *
1680
+ * // Example response
1681
+ * // {}
1682
+ * }
1683
+ *
1684
+ * main().catch(e => {
1685
+ * console.error(e);
1686
+ * throw e;
1687
+ * });
1688
+ *
1689
+ * ```
1690
+ *
1691
+ * @param params - Parameters for request
1692
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1693
+ * @param callback - Optional callback that handles the response.
1694
+ * @returns A promise if used with async/await, or void if used with a callback.
1695
+ */
1696
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
1697
+ cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1698
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1699
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1700
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
1701
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1702
+ /**
1703
+ * 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`.
1704
+ * @example
1705
+ * ```js
1706
+ * // Before running the sample:
1707
+ * // - Enable the API at:
1708
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1709
+ * // - Login into gcloud by running:
1710
+ * // `$ gcloud auth application-default login`
1711
+ * // - Install the npm module by running:
1712
+ * // `$ npm install googleapis`
1713
+ *
1714
+ * const {google} = require('googleapis');
1715
+ * const tpu = google.tpu('v2');
1716
+ *
1717
+ * async function main() {
1718
+ * const auth = new google.auth.GoogleAuth({
1719
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1720
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1721
+ * });
1722
+ *
1723
+ * // Acquire an auth client, and bind it to all future calls
1724
+ * const authClient = await auth.getClient();
1725
+ * google.options({auth: authClient});
1726
+ *
1727
+ * // Do the magic
1728
+ * const res = await tpu.projects.locations.operations.delete({
1729
+ * // The name of the operation resource to be deleted.
1730
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1731
+ * });
1732
+ * console.log(res.data);
1733
+ *
1734
+ * // Example response
1735
+ * // {}
1736
+ * }
1737
+ *
1738
+ * main().catch(e => {
1739
+ * console.error(e);
1740
+ * throw e;
1741
+ * });
1742
+ *
1743
+ * ```
1744
+ *
1745
+ * @param params - Parameters for request
1746
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1747
+ * @param callback - Optional callback that handles the response.
1748
+ * @returns A promise if used with async/await, or void if used with a callback.
1749
+ */
1750
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1751
+ delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1752
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1753
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1754
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
1755
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
1756
+ /**
1757
+ * 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.
1758
+ * @example
1759
+ * ```js
1760
+ * // Before running the sample:
1761
+ * // - Enable the API at:
1762
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1763
+ * // - Login into gcloud by running:
1764
+ * // `$ gcloud auth application-default login`
1765
+ * // - Install the npm module by running:
1766
+ * // `$ npm install googleapis`
1767
+ *
1768
+ * const {google} = require('googleapis');
1769
+ * const tpu = google.tpu('v2');
1770
+ *
1771
+ * async function main() {
1772
+ * const auth = new google.auth.GoogleAuth({
1773
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1774
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1775
+ * });
1776
+ *
1777
+ * // Acquire an auth client, and bind it to all future calls
1778
+ * const authClient = await auth.getClient();
1779
+ * google.options({auth: authClient});
1780
+ *
1781
+ * // Do the magic
1782
+ * const res = await tpu.projects.locations.operations.get({
1783
+ * // The name of the operation resource.
1784
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1785
+ * });
1786
+ * console.log(res.data);
1787
+ *
1788
+ * // Example response
1789
+ * // {
1790
+ * // "done": false,
1791
+ * // "error": {},
1792
+ * // "metadata": {},
1793
+ * // "name": "my_name",
1794
+ * // "response": {}
1795
+ * // }
1796
+ * }
1797
+ *
1798
+ * main().catch(e => {
1799
+ * console.error(e);
1800
+ * throw e;
1801
+ * });
1802
+ *
1803
+ * ```
1804
+ *
1805
+ * @param params - Parameters for request
1806
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1807
+ * @param callback - Optional callback that handles the response.
1808
+ * @returns A promise if used with async/await, or void if used with a callback.
1809
+ */
1810
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1811
+ get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1812
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1813
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1814
+ get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
1815
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
1816
+ /**
1817
+ * 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.
1818
+ * @example
1819
+ * ```js
1820
+ * // Before running the sample:
1821
+ * // - Enable the API at:
1822
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1823
+ * // - Login into gcloud by running:
1824
+ * // `$ gcloud auth application-default login`
1825
+ * // - Install the npm module by running:
1826
+ * // `$ npm install googleapis`
1827
+ *
1828
+ * const {google} = require('googleapis');
1829
+ * const tpu = google.tpu('v2');
1830
+ *
1831
+ * async function main() {
1832
+ * const auth = new google.auth.GoogleAuth({
1833
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1834
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1835
+ * });
1836
+ *
1837
+ * // Acquire an auth client, and bind it to all future calls
1838
+ * const authClient = await auth.getClient();
1839
+ * google.options({auth: authClient});
1840
+ *
1841
+ * // Do the magic
1842
+ * const res = await tpu.projects.locations.operations.list({
1843
+ * // The standard list filter.
1844
+ * filter: 'placeholder-value',
1845
+ * // The name of the operation's parent resource.
1846
+ * name: 'projects/my-project/locations/my-location',
1847
+ * // The standard list page size.
1848
+ * pageSize: 'placeholder-value',
1849
+ * // The standard list page token.
1850
+ * pageToken: 'placeholder-value',
1851
+ * });
1852
+ * console.log(res.data);
1853
+ *
1854
+ * // Example response
1855
+ * // {
1856
+ * // "nextPageToken": "my_nextPageToken",
1857
+ * // "operations": []
1858
+ * // }
1859
+ * }
1860
+ *
1861
+ * main().catch(e => {
1862
+ * console.error(e);
1863
+ * throw e;
1864
+ * });
1865
+ *
1866
+ * ```
1867
+ *
1868
+ * @param params - Parameters for request
1869
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1870
+ * @param callback - Optional callback that handles the response.
1871
+ * @returns A promise if used with async/await, or void if used with a callback.
1872
+ */
1873
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1874
+ list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
1875
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1876
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1877
+ list(params: Params$Resource$Projects$Locations$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1878
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1879
+ }
1880
+ export interface Params$Resource$Projects$Locations$Operations$Cancel extends StandardParameters {
1881
+ /**
1882
+ * The name of the operation resource to be cancelled.
1883
+ */
1884
+ name?: string;
1885
+ }
1886
+ export interface Params$Resource$Projects$Locations$Operations$Delete extends StandardParameters {
1887
+ /**
1888
+ * The name of the operation resource to be deleted.
1889
+ */
1890
+ name?: string;
1891
+ }
1892
+ export interface Params$Resource$Projects$Locations$Operations$Get extends StandardParameters {
1893
+ /**
1894
+ * The name of the operation resource.
1895
+ */
1896
+ name?: string;
1897
+ }
1898
+ export interface Params$Resource$Projects$Locations$Operations$List extends StandardParameters {
1899
+ /**
1900
+ * The standard list filter.
1901
+ */
1902
+ filter?: string;
1903
+ /**
1904
+ * The name of the operation's parent resource.
1905
+ */
1906
+ name?: string;
1907
+ /**
1908
+ * The standard list page size.
1909
+ */
1910
+ pageSize?: number;
1911
+ /**
1912
+ * The standard list page token.
1913
+ */
1914
+ pageToken?: string;
1915
+ }
1916
+ export class Resource$Projects$Locations$Runtimeversions {
1917
+ context: APIRequestContext;
1918
+ constructor(context: APIRequestContext);
1919
+ /**
1920
+ * Gets a runtime version.
1921
+ * @example
1922
+ * ```js
1923
+ * // Before running the sample:
1924
+ * // - Enable the API at:
1925
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1926
+ * // - Login into gcloud by running:
1927
+ * // `$ gcloud auth application-default login`
1928
+ * // - Install the npm module by running:
1929
+ * // `$ npm install googleapis`
1930
+ *
1931
+ * const {google} = require('googleapis');
1932
+ * const tpu = google.tpu('v2');
1933
+ *
1934
+ * async function main() {
1935
+ * const auth = new google.auth.GoogleAuth({
1936
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1937
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1938
+ * });
1939
+ *
1940
+ * // Acquire an auth client, and bind it to all future calls
1941
+ * const authClient = await auth.getClient();
1942
+ * google.options({auth: authClient});
1943
+ *
1944
+ * // Do the magic
1945
+ * const res = await tpu.projects.locations.runtimeVersions.get({
1946
+ * // Required. The resource name.
1947
+ * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
1948
+ * });
1949
+ * console.log(res.data);
1950
+ *
1951
+ * // Example response
1952
+ * // {
1953
+ * // "name": "my_name",
1954
+ * // "version": "my_version"
1955
+ * // }
1956
+ * }
1957
+ *
1958
+ * main().catch(e => {
1959
+ * console.error(e);
1960
+ * throw e;
1961
+ * });
1962
+ *
1963
+ * ```
1964
+ *
1965
+ * @param params - Parameters for request
1966
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1967
+ * @param callback - Optional callback that handles the response.
1968
+ * @returns A promise if used with async/await, or void if used with a callback.
1969
+ */
1970
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1971
+ get(params?: Params$Resource$Projects$Locations$Runtimeversions$Get, options?: MethodOptions): GaxiosPromise<Schema$RuntimeVersion>;
1972
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1973
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: MethodOptions | BodyResponseCallback<Schema$RuntimeVersion>, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1974
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1975
+ get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1976
+ /**
1977
+ * Lists runtime versions supported by this API.
1978
+ * @example
1979
+ * ```js
1980
+ * // Before running the sample:
1981
+ * // - Enable the API at:
1982
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1983
+ * // - Login into gcloud by running:
1984
+ * // `$ gcloud auth application-default login`
1985
+ * // - Install the npm module by running:
1986
+ * // `$ npm install googleapis`
1987
+ *
1988
+ * const {google} = require('googleapis');
1989
+ * const tpu = google.tpu('v2');
1990
+ *
1991
+ * async function main() {
1992
+ * const auth = new google.auth.GoogleAuth({
1993
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1994
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1995
+ * });
1996
+ *
1997
+ * // Acquire an auth client, and bind it to all future calls
1998
+ * const authClient = await auth.getClient();
1999
+ * google.options({auth: authClient});
2000
+ *
2001
+ * // Do the magic
2002
+ * const res = await tpu.projects.locations.runtimeVersions.list({
2003
+ * // List filter.
2004
+ * filter: 'placeholder-value',
2005
+ * // Sort results.
2006
+ * orderBy: 'placeholder-value',
2007
+ * // The maximum number of items to return.
2008
+ * pageSize: 'placeholder-value',
2009
+ * // The next_page_token value returned from a previous List request, if any.
2010
+ * pageToken: 'placeholder-value',
2011
+ * // Required. The parent resource name.
2012
+ * parent: 'projects/my-project/locations/my-location',
2013
+ * });
2014
+ * console.log(res.data);
2015
+ *
2016
+ * // Example response
2017
+ * // {
2018
+ * // "nextPageToken": "my_nextPageToken",
2019
+ * // "runtimeVersions": [],
2020
+ * // "unreachable": []
2021
+ * // }
2022
+ * }
2023
+ *
2024
+ * main().catch(e => {
2025
+ * console.error(e);
2026
+ * throw e;
2027
+ * });
2028
+ *
2029
+ * ```
2030
+ *
2031
+ * @param params - Parameters for request
2032
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2033
+ * @param callback - Optional callback that handles the response.
2034
+ * @returns A promise if used with async/await, or void if used with a callback.
2035
+ */
2036
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2037
+ list(params?: Params$Resource$Projects$Locations$Runtimeversions$List, options?: MethodOptions): GaxiosPromise<Schema$ListRuntimeVersionsResponse>;
2038
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2039
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: MethodOptions | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2040
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2041
+ list(callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2042
+ }
2043
+ export interface Params$Resource$Projects$Locations$Runtimeversions$Get extends StandardParameters {
2044
+ /**
2045
+ * Required. The resource name.
2046
+ */
2047
+ name?: string;
2048
+ }
2049
+ export interface Params$Resource$Projects$Locations$Runtimeversions$List extends StandardParameters {
2050
+ /**
2051
+ * List filter.
2052
+ */
2053
+ filter?: string;
2054
+ /**
2055
+ * Sort results.
2056
+ */
2057
+ orderBy?: string;
2058
+ /**
2059
+ * The maximum number of items to return.
2060
+ */
2061
+ pageSize?: number;
2062
+ /**
2063
+ * The next_page_token value returned from a previous List request, if any.
2064
+ */
2065
+ pageToken?: string;
2066
+ /**
2067
+ * Required. The parent resource name.
2068
+ */
2069
+ parent?: string;
2070
+ }
2071
+ export {};
2072
+ }