@googleapis/tpu 0.3.1 → 1.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.
@@ -0,0 +1,2068 @@
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_v2alpha1 {
5
+ export interface Options extends GlobalOptions {
6
+ version: 'v2alpha1';
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('v2alpha1');
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); \} The JSON representation for `Empty` is empty JSON object `{\}`.
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
+ * Output only. The current state for the TPU Node.
411
+ */
412
+ state?: string | null;
413
+ /**
414
+ * Output only. The Symptoms that have occurred to the TPU Node.
415
+ */
416
+ symptoms?: Schema$Symptom[];
417
+ /**
418
+ * Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
419
+ */
420
+ tags?: string[] | null;
421
+ }
422
+ /**
423
+ * This resource represents a long-running operation that is the result of a network API call.
424
+ */
425
+ export interface Schema$Operation {
426
+ /**
427
+ * 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.
428
+ */
429
+ done?: boolean | null;
430
+ /**
431
+ * The error result of the operation in case of failure or cancellation.
432
+ */
433
+ error?: Schema$Status;
434
+ /**
435
+ * 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.
436
+ */
437
+ metadata?: {
438
+ [key: string]: any;
439
+ } | null;
440
+ /**
441
+ * 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\}`.
442
+ */
443
+ name?: string | null;
444
+ /**
445
+ * 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`.
446
+ */
447
+ response?: {
448
+ [key: string]: any;
449
+ } | null;
450
+ }
451
+ /**
452
+ * Metadata describing an Operation
453
+ */
454
+ export interface Schema$OperationMetadata {
455
+ /**
456
+ * API version.
457
+ */
458
+ apiVersion?: string | null;
459
+ /**
460
+ * Specifies if cancellation was requested for the operation.
461
+ */
462
+ cancelRequested?: boolean | null;
463
+ /**
464
+ * The time the operation was created.
465
+ */
466
+ createTime?: string | null;
467
+ /**
468
+ * The time the operation finished running.
469
+ */
470
+ endTime?: string | null;
471
+ /**
472
+ * Human-readable status of the operation, if any.
473
+ */
474
+ statusDetail?: string | null;
475
+ /**
476
+ * Target of the operation - for example projects/project-1/connectivityTests/test-1
477
+ */
478
+ target?: string | null;
479
+ /**
480
+ * Name of the verb executed by the operation.
481
+ */
482
+ verb?: string | null;
483
+ }
484
+ /**
485
+ * A runtime version that a Node can be configured with.
486
+ */
487
+ export interface Schema$RuntimeVersion {
488
+ /**
489
+ * The resource name.
490
+ */
491
+ name?: string | null;
492
+ /**
493
+ * The runtime version.
494
+ */
495
+ version?: string | null;
496
+ }
497
+ /**
498
+ * Sets the scheduling options for this node.
499
+ */
500
+ export interface Schema$SchedulingConfig {
501
+ /**
502
+ * Defines whether the node is preemptible.
503
+ */
504
+ preemptible?: boolean | null;
505
+ /**
506
+ * Whether the node is created under a reservation.
507
+ */
508
+ reserved?: boolean | null;
509
+ }
510
+ /**
511
+ * A service account.
512
+ */
513
+ export interface Schema$ServiceAccount {
514
+ /**
515
+ * Email address of the service account. If empty, default Compute service account will be used.
516
+ */
517
+ email?: string | null;
518
+ /**
519
+ * The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.
520
+ */
521
+ scope?: string[] | null;
522
+ }
523
+ /**
524
+ * The per-product per-project service identity for Cloud TPU service.
525
+ */
526
+ export interface Schema$ServiceIdentity {
527
+ /**
528
+ * The email address of the service identity.
529
+ */
530
+ email?: string | null;
531
+ }
532
+ /**
533
+ * Request for StartNode.
534
+ */
535
+ export interface Schema$StartNodeRequest {
536
+ }
537
+ /**
538
+ * 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).
539
+ */
540
+ export interface Schema$Status {
541
+ /**
542
+ * The status code, which should be an enum value of google.rpc.Code.
543
+ */
544
+ code?: number | null;
545
+ /**
546
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
547
+ */
548
+ details?: Array<{
549
+ [key: string]: any;
550
+ }> | null;
551
+ /**
552
+ * 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.
553
+ */
554
+ message?: string | null;
555
+ }
556
+ /**
557
+ * Request for StopNode.
558
+ */
559
+ export interface Schema$StopNodeRequest {
560
+ }
561
+ /**
562
+ * A Symptom instance.
563
+ */
564
+ export interface Schema$Symptom {
565
+ /**
566
+ * Timestamp when the Symptom is created.
567
+ */
568
+ createTime?: string | null;
569
+ /**
570
+ * Detailed information of the current Symptom.
571
+ */
572
+ details?: string | null;
573
+ /**
574
+ * Type of the Symptom.
575
+ */
576
+ symptomType?: string | null;
577
+ /**
578
+ * A string used to uniquely distinguish a worker within a TPU node.
579
+ */
580
+ workerId?: string | null;
581
+ }
582
+ export class Resource$Projects {
583
+ context: APIRequestContext;
584
+ locations: Resource$Projects$Locations;
585
+ constructor(context: APIRequestContext);
586
+ }
587
+ export class Resource$Projects$Locations {
588
+ context: APIRequestContext;
589
+ acceleratorTypes: Resource$Projects$Locations$Acceleratortypes;
590
+ nodes: Resource$Projects$Locations$Nodes;
591
+ operations: Resource$Projects$Locations$Operations;
592
+ runtimeVersions: Resource$Projects$Locations$Runtimeversions;
593
+ constructor(context: APIRequestContext);
594
+ /**
595
+ * Generates the Cloud TPU service identity for the project.
596
+ * @example
597
+ * ```js
598
+ * // Before running the sample:
599
+ * // - Enable the API at:
600
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
601
+ * // - Login into gcloud by running:
602
+ * // `$ gcloud auth application-default login`
603
+ * // - Install the npm module by running:
604
+ * // `$ npm install googleapis`
605
+ *
606
+ * const {google} = require('googleapis');
607
+ * const tpu = google.tpu('v2alpha1');
608
+ *
609
+ * async function main() {
610
+ * const auth = new google.auth.GoogleAuth({
611
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
612
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
613
+ * });
614
+ *
615
+ * // Acquire an auth client, and bind it to all future calls
616
+ * const authClient = await auth.getClient();
617
+ * google.options({auth: authClient});
618
+ *
619
+ * // Do the magic
620
+ * const res = await tpu.projects.locations.generateServiceIdentity({
621
+ * // Required. The parent resource name.
622
+ * parent: 'projects/my-project/locations/my-location',
623
+ *
624
+ * // Request body metadata
625
+ * requestBody: {
626
+ * // request body parameters
627
+ * // {}
628
+ * },
629
+ * });
630
+ * console.log(res.data);
631
+ *
632
+ * // Example response
633
+ * // {
634
+ * // "identity": {}
635
+ * // }
636
+ * }
637
+ *
638
+ * main().catch(e => {
639
+ * console.error(e);
640
+ * throw e;
641
+ * });
642
+ *
643
+ * ```
644
+ *
645
+ * @param params - Parameters for request
646
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
647
+ * @param callback - Optional callback that handles the response.
648
+ * @returns A promise if used with async/await, or void if used with a callback.
649
+ */
650
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: StreamMethodOptions): GaxiosPromise<Readable>;
651
+ generateServiceIdentity(params?: Params$Resource$Projects$Locations$Generateserviceidentity, options?: MethodOptions): GaxiosPromise<Schema$GenerateServiceIdentityResponse>;
652
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
653
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, options: MethodOptions | BodyResponseCallback<Schema$GenerateServiceIdentityResponse>, callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
654
+ generateServiceIdentity(params: Params$Resource$Projects$Locations$Generateserviceidentity, callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
655
+ generateServiceIdentity(callback: BodyResponseCallback<Schema$GenerateServiceIdentityResponse>): void;
656
+ /**
657
+ * Gets information about a location.
658
+ * @example
659
+ * ```js
660
+ * // Before running the sample:
661
+ * // - Enable the API at:
662
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
663
+ * // - Login into gcloud by running:
664
+ * // `$ gcloud auth application-default login`
665
+ * // - Install the npm module by running:
666
+ * // `$ npm install googleapis`
667
+ *
668
+ * const {google} = require('googleapis');
669
+ * const tpu = google.tpu('v2alpha1');
670
+ *
671
+ * async function main() {
672
+ * const auth = new google.auth.GoogleAuth({
673
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
674
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
675
+ * });
676
+ *
677
+ * // Acquire an auth client, and bind it to all future calls
678
+ * const authClient = await auth.getClient();
679
+ * google.options({auth: authClient});
680
+ *
681
+ * // Do the magic
682
+ * const res = await tpu.projects.locations.get({
683
+ * // Resource name for the location.
684
+ * name: 'projects/my-project/locations/my-location',
685
+ * });
686
+ * console.log(res.data);
687
+ *
688
+ * // Example response
689
+ * // {
690
+ * // "displayName": "my_displayName",
691
+ * // "labels": {},
692
+ * // "locationId": "my_locationId",
693
+ * // "metadata": {},
694
+ * // "name": "my_name"
695
+ * // }
696
+ * }
697
+ *
698
+ * main().catch(e => {
699
+ * console.error(e);
700
+ * throw e;
701
+ * });
702
+ *
703
+ * ```
704
+ *
705
+ * @param params - Parameters for request
706
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
707
+ * @param callback - Optional callback that handles the response.
708
+ * @returns A promise if used with async/await, or void if used with a callback.
709
+ */
710
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
711
+ get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): GaxiosPromise<Schema$Location>;
712
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
713
+ get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void;
714
+ get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void;
715
+ get(callback: BodyResponseCallback<Schema$Location>): void;
716
+ /**
717
+ * Lists information about the supported locations for this service.
718
+ * @example
719
+ * ```js
720
+ * // Before running the sample:
721
+ * // - Enable the API at:
722
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
723
+ * // - Login into gcloud by running:
724
+ * // `$ gcloud auth application-default login`
725
+ * // - Install the npm module by running:
726
+ * // `$ npm install googleapis`
727
+ *
728
+ * const {google} = require('googleapis');
729
+ * const tpu = google.tpu('v2alpha1');
730
+ *
731
+ * async function main() {
732
+ * const auth = new google.auth.GoogleAuth({
733
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
734
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
735
+ * });
736
+ *
737
+ * // Acquire an auth client, and bind it to all future calls
738
+ * const authClient = await auth.getClient();
739
+ * google.options({auth: authClient});
740
+ *
741
+ * // Do the magic
742
+ * const res = await tpu.projects.locations.list({
743
+ * // 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).
744
+ * filter: 'placeholder-value',
745
+ * // The resource that owns the locations collection, if applicable.
746
+ * name: 'projects/my-project',
747
+ * // The maximum number of results to return. If not set, the service selects a default.
748
+ * pageSize: 'placeholder-value',
749
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
750
+ * pageToken: 'placeholder-value',
751
+ * });
752
+ * console.log(res.data);
753
+ *
754
+ * // Example response
755
+ * // {
756
+ * // "locations": [],
757
+ * // "nextPageToken": "my_nextPageToken"
758
+ * // }
759
+ * }
760
+ *
761
+ * main().catch(e => {
762
+ * console.error(e);
763
+ * throw e;
764
+ * });
765
+ *
766
+ * ```
767
+ *
768
+ * @param params - Parameters for request
769
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
770
+ * @param callback - Optional callback that handles the response.
771
+ * @returns A promise if used with async/await, or void if used with a callback.
772
+ */
773
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
774
+ list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): GaxiosPromise<Schema$ListLocationsResponse>;
775
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
776
+ list(params: Params$Resource$Projects$Locations$List, options: MethodOptions | BodyResponseCallback<Schema$ListLocationsResponse>, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
777
+ list(params: Params$Resource$Projects$Locations$List, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
778
+ list(callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
779
+ }
780
+ export interface Params$Resource$Projects$Locations$Generateserviceidentity extends StandardParameters {
781
+ /**
782
+ * Required. The parent resource name.
783
+ */
784
+ parent?: string;
785
+ /**
786
+ * Request body metadata
787
+ */
788
+ requestBody?: Schema$GenerateServiceIdentityRequest;
789
+ }
790
+ export interface Params$Resource$Projects$Locations$Get extends StandardParameters {
791
+ /**
792
+ * Resource name for the location.
793
+ */
794
+ name?: string;
795
+ }
796
+ export interface Params$Resource$Projects$Locations$List extends StandardParameters {
797
+ /**
798
+ * 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).
799
+ */
800
+ filter?: string;
801
+ /**
802
+ * The resource that owns the locations collection, if applicable.
803
+ */
804
+ name?: string;
805
+ /**
806
+ * The maximum number of results to return. If not set, the service selects a default.
807
+ */
808
+ pageSize?: number;
809
+ /**
810
+ * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
811
+ */
812
+ pageToken?: string;
813
+ }
814
+ export class Resource$Projects$Locations$Acceleratortypes {
815
+ context: APIRequestContext;
816
+ constructor(context: APIRequestContext);
817
+ /**
818
+ * Gets AcceleratorType.
819
+ * @example
820
+ * ```js
821
+ * // Before running the sample:
822
+ * // - Enable the API at:
823
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
824
+ * // - Login into gcloud by running:
825
+ * // `$ gcloud auth application-default login`
826
+ * // - Install the npm module by running:
827
+ * // `$ npm install googleapis`
828
+ *
829
+ * const {google} = require('googleapis');
830
+ * const tpu = google.tpu('v2alpha1');
831
+ *
832
+ * async function main() {
833
+ * const auth = new google.auth.GoogleAuth({
834
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
835
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
836
+ * });
837
+ *
838
+ * // Acquire an auth client, and bind it to all future calls
839
+ * const authClient = await auth.getClient();
840
+ * google.options({auth: authClient});
841
+ *
842
+ * // Do the magic
843
+ * const res = await tpu.projects.locations.acceleratorTypes.get({
844
+ * // Required. The resource name.
845
+ * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
846
+ * });
847
+ * console.log(res.data);
848
+ *
849
+ * // Example response
850
+ * // {
851
+ * // "name": "my_name",
852
+ * // "type": "my_type"
853
+ * // }
854
+ * }
855
+ *
856
+ * main().catch(e => {
857
+ * console.error(e);
858
+ * throw e;
859
+ * });
860
+ *
861
+ * ```
862
+ *
863
+ * @param params - Parameters for request
864
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
865
+ * @param callback - Optional callback that handles the response.
866
+ * @returns A promise if used with async/await, or void if used with a callback.
867
+ */
868
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
869
+ get(params?: Params$Resource$Projects$Locations$Acceleratortypes$Get, options?: MethodOptions): GaxiosPromise<Schema$AcceleratorType>;
870
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
871
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: MethodOptions | BodyResponseCallback<Schema$AcceleratorType>, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
872
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
873
+ get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
874
+ /**
875
+ * Lists accelerator types supported by this API.
876
+ * @example
877
+ * ```js
878
+ * // Before running the sample:
879
+ * // - Enable the API at:
880
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
881
+ * // - Login into gcloud by running:
882
+ * // `$ gcloud auth application-default login`
883
+ * // - Install the npm module by running:
884
+ * // `$ npm install googleapis`
885
+ *
886
+ * const {google} = require('googleapis');
887
+ * const tpu = google.tpu('v2alpha1');
888
+ *
889
+ * async function main() {
890
+ * const auth = new google.auth.GoogleAuth({
891
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
892
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
893
+ * });
894
+ *
895
+ * // Acquire an auth client, and bind it to all future calls
896
+ * const authClient = await auth.getClient();
897
+ * google.options({auth: authClient});
898
+ *
899
+ * // Do the magic
900
+ * const res = await tpu.projects.locations.acceleratorTypes.list({
901
+ * // List filter.
902
+ * filter: 'placeholder-value',
903
+ * // Sort results.
904
+ * orderBy: 'placeholder-value',
905
+ * // The maximum number of items to return.
906
+ * pageSize: 'placeholder-value',
907
+ * // The next_page_token value returned from a previous List request, if any.
908
+ * pageToken: 'placeholder-value',
909
+ * // Required. The parent resource name.
910
+ * parent: 'projects/my-project/locations/my-location',
911
+ * });
912
+ * console.log(res.data);
913
+ *
914
+ * // Example response
915
+ * // {
916
+ * // "acceleratorTypes": [],
917
+ * // "nextPageToken": "my_nextPageToken",
918
+ * // "unreachable": []
919
+ * // }
920
+ * }
921
+ *
922
+ * main().catch(e => {
923
+ * console.error(e);
924
+ * throw e;
925
+ * });
926
+ *
927
+ * ```
928
+ *
929
+ * @param params - Parameters for request
930
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
931
+ * @param callback - Optional callback that handles the response.
932
+ * @returns A promise if used with async/await, or void if used with a callback.
933
+ */
934
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
935
+ list(params?: Params$Resource$Projects$Locations$Acceleratortypes$List, options?: MethodOptions): GaxiosPromise<Schema$ListAcceleratorTypesResponse>;
936
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
937
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: MethodOptions | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
938
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
939
+ list(callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
940
+ }
941
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$Get extends StandardParameters {
942
+ /**
943
+ * Required. The resource name.
944
+ */
945
+ name?: string;
946
+ }
947
+ export interface Params$Resource$Projects$Locations$Acceleratortypes$List extends StandardParameters {
948
+ /**
949
+ * List filter.
950
+ */
951
+ filter?: string;
952
+ /**
953
+ * Sort results.
954
+ */
955
+ orderBy?: string;
956
+ /**
957
+ * The maximum number of items to return.
958
+ */
959
+ pageSize?: number;
960
+ /**
961
+ * The next_page_token value returned from a previous List request, if any.
962
+ */
963
+ pageToken?: string;
964
+ /**
965
+ * Required. The parent resource name.
966
+ */
967
+ parent?: string;
968
+ }
969
+ export class Resource$Projects$Locations$Nodes {
970
+ context: APIRequestContext;
971
+ constructor(context: APIRequestContext);
972
+ /**
973
+ * Creates a node.
974
+ * @example
975
+ * ```js
976
+ * // Before running the sample:
977
+ * // - Enable the API at:
978
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
979
+ * // - Login into gcloud by running:
980
+ * // `$ gcloud auth application-default login`
981
+ * // - Install the npm module by running:
982
+ * // `$ npm install googleapis`
983
+ *
984
+ * const {google} = require('googleapis');
985
+ * const tpu = google.tpu('v2alpha1');
986
+ *
987
+ * async function main() {
988
+ * const auth = new google.auth.GoogleAuth({
989
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
990
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
991
+ * });
992
+ *
993
+ * // Acquire an auth client, and bind it to all future calls
994
+ * const authClient = await auth.getClient();
995
+ * google.options({auth: authClient});
996
+ *
997
+ * // Do the magic
998
+ * const res = await tpu.projects.locations.nodes.create({
999
+ * // The unqualified resource name.
1000
+ * nodeId: 'placeholder-value',
1001
+ * // Required. The parent resource name.
1002
+ * parent: 'projects/my-project/locations/my-location',
1003
+ * // Idempotent request UUID.
1004
+ * requestId: 'placeholder-value',
1005
+ *
1006
+ * // Request body metadata
1007
+ * requestBody: {
1008
+ * // request body parameters
1009
+ * // {
1010
+ * // "acceleratorType": "my_acceleratorType",
1011
+ * // "apiVersion": "my_apiVersion",
1012
+ * // "cidrBlock": "my_cidrBlock",
1013
+ * // "createTime": "my_createTime",
1014
+ * // "dataDisks": [],
1015
+ * // "description": "my_description",
1016
+ * // "health": "my_health",
1017
+ * // "healthDescription": "my_healthDescription",
1018
+ * // "id": "my_id",
1019
+ * // "labels": {},
1020
+ * // "metadata": {},
1021
+ * // "name": "my_name",
1022
+ * // "networkConfig": {},
1023
+ * // "networkEndpoints": [],
1024
+ * // "runtimeVersion": "my_runtimeVersion",
1025
+ * // "schedulingConfig": {},
1026
+ * // "serviceAccount": {},
1027
+ * // "state": "my_state",
1028
+ * // "symptoms": [],
1029
+ * // "tags": []
1030
+ * // }
1031
+ * },
1032
+ * });
1033
+ * console.log(res.data);
1034
+ *
1035
+ * // Example response
1036
+ * // {
1037
+ * // "done": false,
1038
+ * // "error": {},
1039
+ * // "metadata": {},
1040
+ * // "name": "my_name",
1041
+ * // "response": {}
1042
+ * // }
1043
+ * }
1044
+ *
1045
+ * main().catch(e => {
1046
+ * console.error(e);
1047
+ * throw e;
1048
+ * });
1049
+ *
1050
+ * ```
1051
+ *
1052
+ * @param params - Parameters for request
1053
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1054
+ * @param callback - Optional callback that handles the response.
1055
+ * @returns A promise if used with async/await, or void if used with a callback.
1056
+ */
1057
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1058
+ create(params?: Params$Resource$Projects$Locations$Nodes$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1059
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1060
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1061
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, callback: BodyResponseCallback<Schema$Operation>): void;
1062
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1063
+ /**
1064
+ * Deletes a node.
1065
+ * @example
1066
+ * ```js
1067
+ * // Before running the sample:
1068
+ * // - Enable the API at:
1069
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1070
+ * // - Login into gcloud by running:
1071
+ * // `$ gcloud auth application-default login`
1072
+ * // - Install the npm module by running:
1073
+ * // `$ npm install googleapis`
1074
+ *
1075
+ * const {google} = require('googleapis');
1076
+ * const tpu = google.tpu('v2alpha1');
1077
+ *
1078
+ * async function main() {
1079
+ * const auth = new google.auth.GoogleAuth({
1080
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1081
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1082
+ * });
1083
+ *
1084
+ * // Acquire an auth client, and bind it to all future calls
1085
+ * const authClient = await auth.getClient();
1086
+ * google.options({auth: authClient});
1087
+ *
1088
+ * // Do the magic
1089
+ * const res = await tpu.projects.locations.nodes.delete({
1090
+ * // Required. The resource name.
1091
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1092
+ * // Idempotent request UUID.
1093
+ * requestId: 'placeholder-value',
1094
+ * });
1095
+ * console.log(res.data);
1096
+ *
1097
+ * // Example response
1098
+ * // {
1099
+ * // "done": false,
1100
+ * // "error": {},
1101
+ * // "metadata": {},
1102
+ * // "name": "my_name",
1103
+ * // "response": {}
1104
+ * // }
1105
+ * }
1106
+ *
1107
+ * main().catch(e => {
1108
+ * console.error(e);
1109
+ * throw e;
1110
+ * });
1111
+ *
1112
+ * ```
1113
+ *
1114
+ * @param params - Parameters for request
1115
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1116
+ * @param callback - Optional callback that handles the response.
1117
+ * @returns A promise if used with async/await, or void if used with a callback.
1118
+ */
1119
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1120
+ delete(params?: Params$Resource$Projects$Locations$Nodes$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1121
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1122
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1123
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
1124
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1125
+ /**
1126
+ * Gets the details of a node.
1127
+ * @example
1128
+ * ```js
1129
+ * // Before running the sample:
1130
+ * // - Enable the API at:
1131
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1132
+ * // - Login into gcloud by running:
1133
+ * // `$ gcloud auth application-default login`
1134
+ * // - Install the npm module by running:
1135
+ * // `$ npm install googleapis`
1136
+ *
1137
+ * const {google} = require('googleapis');
1138
+ * const tpu = google.tpu('v2alpha1');
1139
+ *
1140
+ * async function main() {
1141
+ * const auth = new google.auth.GoogleAuth({
1142
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1143
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1144
+ * });
1145
+ *
1146
+ * // Acquire an auth client, and bind it to all future calls
1147
+ * const authClient = await auth.getClient();
1148
+ * google.options({auth: authClient});
1149
+ *
1150
+ * // Do the magic
1151
+ * const res = await tpu.projects.locations.nodes.get({
1152
+ * // Required. The resource name.
1153
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1154
+ * });
1155
+ * console.log(res.data);
1156
+ *
1157
+ * // Example response
1158
+ * // {
1159
+ * // "acceleratorType": "my_acceleratorType",
1160
+ * // "apiVersion": "my_apiVersion",
1161
+ * // "cidrBlock": "my_cidrBlock",
1162
+ * // "createTime": "my_createTime",
1163
+ * // "dataDisks": [],
1164
+ * // "description": "my_description",
1165
+ * // "health": "my_health",
1166
+ * // "healthDescription": "my_healthDescription",
1167
+ * // "id": "my_id",
1168
+ * // "labels": {},
1169
+ * // "metadata": {},
1170
+ * // "name": "my_name",
1171
+ * // "networkConfig": {},
1172
+ * // "networkEndpoints": [],
1173
+ * // "runtimeVersion": "my_runtimeVersion",
1174
+ * // "schedulingConfig": {},
1175
+ * // "serviceAccount": {},
1176
+ * // "state": "my_state",
1177
+ * // "symptoms": [],
1178
+ * // "tags": []
1179
+ * // }
1180
+ * }
1181
+ *
1182
+ * main().catch(e => {
1183
+ * console.error(e);
1184
+ * throw e;
1185
+ * });
1186
+ *
1187
+ * ```
1188
+ *
1189
+ * @param params - Parameters for request
1190
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1191
+ * @param callback - Optional callback that handles the response.
1192
+ * @returns A promise if used with async/await, or void if used with a callback.
1193
+ */
1194
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1195
+ get(params?: Params$Resource$Projects$Locations$Nodes$Get, options?: MethodOptions): GaxiosPromise<Schema$Node>;
1196
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1197
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: MethodOptions | BodyResponseCallback<Schema$Node>, callback: BodyResponseCallback<Schema$Node>): void;
1198
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, callback: BodyResponseCallback<Schema$Node>): void;
1199
+ get(callback: BodyResponseCallback<Schema$Node>): void;
1200
+ /**
1201
+ * Retrieves the guest attributes for the node.
1202
+ * @example
1203
+ * ```js
1204
+ * // Before running the sample:
1205
+ * // - Enable the API at:
1206
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1207
+ * // - Login into gcloud by running:
1208
+ * // `$ gcloud auth application-default login`
1209
+ * // - Install the npm module by running:
1210
+ * // `$ npm install googleapis`
1211
+ *
1212
+ * const {google} = require('googleapis');
1213
+ * const tpu = google.tpu('v2alpha1');
1214
+ *
1215
+ * async function main() {
1216
+ * const auth = new google.auth.GoogleAuth({
1217
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1218
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1219
+ * });
1220
+ *
1221
+ * // Acquire an auth client, and bind it to all future calls
1222
+ * const authClient = await auth.getClient();
1223
+ * google.options({auth: authClient});
1224
+ *
1225
+ * // Do the magic
1226
+ * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1227
+ * // Required. The resource name.
1228
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1229
+ *
1230
+ * // Request body metadata
1231
+ * requestBody: {
1232
+ * // request body parameters
1233
+ * // {
1234
+ * // "queryPath": "my_queryPath",
1235
+ * // "workerIds": []
1236
+ * // }
1237
+ * },
1238
+ * });
1239
+ * console.log(res.data);
1240
+ *
1241
+ * // Example response
1242
+ * // {
1243
+ * // "guestAttributes": []
1244
+ * // }
1245
+ * }
1246
+ *
1247
+ * main().catch(e => {
1248
+ * console.error(e);
1249
+ * throw e;
1250
+ * });
1251
+ *
1252
+ * ```
1253
+ *
1254
+ * @param params - Parameters for request
1255
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1256
+ * @param callback - Optional callback that handles the response.
1257
+ * @returns A promise if used with async/await, or void if used with a callback.
1258
+ */
1259
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions): GaxiosPromise<Readable>;
1260
+ getGuestAttributes(params?: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options?: MethodOptions): GaxiosPromise<Schema$GetGuestAttributesResponse>;
1261
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1262
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: MethodOptions | BodyResponseCallback<Schema$GetGuestAttributesResponse>, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1263
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1264
+ getGuestAttributes(callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1265
+ /**
1266
+ * Lists nodes.
1267
+ * @example
1268
+ * ```js
1269
+ * // Before running the sample:
1270
+ * // - Enable the API at:
1271
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1272
+ * // - Login into gcloud by running:
1273
+ * // `$ gcloud auth application-default login`
1274
+ * // - Install the npm module by running:
1275
+ * // `$ npm install googleapis`
1276
+ *
1277
+ * const {google} = require('googleapis');
1278
+ * const tpu = google.tpu('v2alpha1');
1279
+ *
1280
+ * async function main() {
1281
+ * const auth = new google.auth.GoogleAuth({
1282
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1283
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1284
+ * });
1285
+ *
1286
+ * // Acquire an auth client, and bind it to all future calls
1287
+ * const authClient = await auth.getClient();
1288
+ * google.options({auth: authClient});
1289
+ *
1290
+ * // Do the magic
1291
+ * const res = await tpu.projects.locations.nodes.list({
1292
+ * // The maximum number of items to return.
1293
+ * pageSize: 'placeholder-value',
1294
+ * // The next_page_token value returned from a previous List request, if any.
1295
+ * pageToken: 'placeholder-value',
1296
+ * // Required. The parent resource name.
1297
+ * parent: 'projects/my-project/locations/my-location',
1298
+ * });
1299
+ * console.log(res.data);
1300
+ *
1301
+ * // Example response
1302
+ * // {
1303
+ * // "nextPageToken": "my_nextPageToken",
1304
+ * // "nodes": [],
1305
+ * // "unreachable": []
1306
+ * // }
1307
+ * }
1308
+ *
1309
+ * main().catch(e => {
1310
+ * console.error(e);
1311
+ * throw e;
1312
+ * });
1313
+ *
1314
+ * ```
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
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1322
+ list(params?: Params$Resource$Projects$Locations$Nodes$List, options?: MethodOptions): GaxiosPromise<Schema$ListNodesResponse>;
1323
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1324
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: MethodOptions | BodyResponseCallback<Schema$ListNodesResponse>, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1325
+ list(params: Params$Resource$Projects$Locations$Nodes$List, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1326
+ list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1327
+ /**
1328
+ * Updates the configurations of a node.
1329
+ * @example
1330
+ * ```js
1331
+ * // Before running the sample:
1332
+ * // - Enable the API at:
1333
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1334
+ * // - Login into gcloud by running:
1335
+ * // `$ gcloud auth application-default login`
1336
+ * // - Install the npm module by running:
1337
+ * // `$ npm install googleapis`
1338
+ *
1339
+ * const {google} = require('googleapis');
1340
+ * const tpu = google.tpu('v2alpha1');
1341
+ *
1342
+ * async function main() {
1343
+ * const auth = new google.auth.GoogleAuth({
1344
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1345
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1346
+ * });
1347
+ *
1348
+ * // Acquire an auth client, and bind it to all future calls
1349
+ * const authClient = await auth.getClient();
1350
+ * google.options({auth: authClient});
1351
+ *
1352
+ * // Do the magic
1353
+ * const res = await tpu.projects.locations.nodes.patch({
1354
+ * // Output only. Immutable. The name of the TPU.
1355
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1356
+ * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1357
+ * updateMask: 'placeholder-value',
1358
+ *
1359
+ * // Request body metadata
1360
+ * requestBody: {
1361
+ * // request body parameters
1362
+ * // {
1363
+ * // "acceleratorType": "my_acceleratorType",
1364
+ * // "apiVersion": "my_apiVersion",
1365
+ * // "cidrBlock": "my_cidrBlock",
1366
+ * // "createTime": "my_createTime",
1367
+ * // "dataDisks": [],
1368
+ * // "description": "my_description",
1369
+ * // "health": "my_health",
1370
+ * // "healthDescription": "my_healthDescription",
1371
+ * // "id": "my_id",
1372
+ * // "labels": {},
1373
+ * // "metadata": {},
1374
+ * // "name": "my_name",
1375
+ * // "networkConfig": {},
1376
+ * // "networkEndpoints": [],
1377
+ * // "runtimeVersion": "my_runtimeVersion",
1378
+ * // "schedulingConfig": {},
1379
+ * // "serviceAccount": {},
1380
+ * // "state": "my_state",
1381
+ * // "symptoms": [],
1382
+ * // "tags": []
1383
+ * // }
1384
+ * },
1385
+ * });
1386
+ * console.log(res.data);
1387
+ *
1388
+ * // Example response
1389
+ * // {
1390
+ * // "done": false,
1391
+ * // "error": {},
1392
+ * // "metadata": {},
1393
+ * // "name": "my_name",
1394
+ * // "response": {}
1395
+ * // }
1396
+ * }
1397
+ *
1398
+ * main().catch(e => {
1399
+ * console.error(e);
1400
+ * throw e;
1401
+ * });
1402
+ *
1403
+ * ```
1404
+ *
1405
+ * @param params - Parameters for request
1406
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1407
+ * @param callback - Optional callback that handles the response.
1408
+ * @returns A promise if used with async/await, or void if used with a callback.
1409
+ */
1410
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1411
+ patch(params?: Params$Resource$Projects$Locations$Nodes$Patch, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1412
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1413
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1414
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
1415
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
1416
+ /**
1417
+ * Starts a node.
1418
+ * @example
1419
+ * ```js
1420
+ * // Before running the sample:
1421
+ * // - Enable the API at:
1422
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1423
+ * // - Login into gcloud by running:
1424
+ * // `$ gcloud auth application-default login`
1425
+ * // - Install the npm module by running:
1426
+ * // `$ npm install googleapis`
1427
+ *
1428
+ * const {google} = require('googleapis');
1429
+ * const tpu = google.tpu('v2alpha1');
1430
+ *
1431
+ * async function main() {
1432
+ * const auth = new google.auth.GoogleAuth({
1433
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1434
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1435
+ * });
1436
+ *
1437
+ * // Acquire an auth client, and bind it to all future calls
1438
+ * const authClient = await auth.getClient();
1439
+ * google.options({auth: authClient});
1440
+ *
1441
+ * // Do the magic
1442
+ * const res = await tpu.projects.locations.nodes.start({
1443
+ * // The resource name.
1444
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1445
+ *
1446
+ * // Request body metadata
1447
+ * requestBody: {
1448
+ * // request body parameters
1449
+ * // {}
1450
+ * },
1451
+ * });
1452
+ * console.log(res.data);
1453
+ *
1454
+ * // Example response
1455
+ * // {
1456
+ * // "done": false,
1457
+ * // "error": {},
1458
+ * // "metadata": {},
1459
+ * // "name": "my_name",
1460
+ * // "response": {}
1461
+ * // }
1462
+ * }
1463
+ *
1464
+ * main().catch(e => {
1465
+ * console.error(e);
1466
+ * throw e;
1467
+ * });
1468
+ *
1469
+ * ```
1470
+ *
1471
+ * @param params - Parameters for request
1472
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1473
+ * @param callback - Optional callback that handles the response.
1474
+ * @returns A promise if used with async/await, or void if used with a callback.
1475
+ */
1476
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions): GaxiosPromise<Readable>;
1477
+ start(params?: Params$Resource$Projects$Locations$Nodes$Start, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1478
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1479
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1480
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, callback: BodyResponseCallback<Schema$Operation>): void;
1481
+ start(callback: BodyResponseCallback<Schema$Operation>): void;
1482
+ /**
1483
+ * Stops a node. This operation is only available with single TPU nodes.
1484
+ * @example
1485
+ * ```js
1486
+ * // Before running the sample:
1487
+ * // - Enable the API at:
1488
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1489
+ * // - Login into gcloud by running:
1490
+ * // `$ gcloud auth application-default login`
1491
+ * // - Install the npm module by running:
1492
+ * // `$ npm install googleapis`
1493
+ *
1494
+ * const {google} = require('googleapis');
1495
+ * const tpu = google.tpu('v2alpha1');
1496
+ *
1497
+ * async function main() {
1498
+ * const auth = new google.auth.GoogleAuth({
1499
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1500
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1501
+ * });
1502
+ *
1503
+ * // Acquire an auth client, and bind it to all future calls
1504
+ * const authClient = await auth.getClient();
1505
+ * google.options({auth: authClient});
1506
+ *
1507
+ * // Do the magic
1508
+ * const res = await tpu.projects.locations.nodes.stop({
1509
+ * // The resource name.
1510
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1511
+ *
1512
+ * // Request body metadata
1513
+ * requestBody: {
1514
+ * // request body parameters
1515
+ * // {}
1516
+ * },
1517
+ * });
1518
+ * console.log(res.data);
1519
+ *
1520
+ * // Example response
1521
+ * // {
1522
+ * // "done": false,
1523
+ * // "error": {},
1524
+ * // "metadata": {},
1525
+ * // "name": "my_name",
1526
+ * // "response": {}
1527
+ * // }
1528
+ * }
1529
+ *
1530
+ * main().catch(e => {
1531
+ * console.error(e);
1532
+ * throw e;
1533
+ * });
1534
+ *
1535
+ * ```
1536
+ *
1537
+ * @param params - Parameters for request
1538
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1539
+ * @param callback - Optional callback that handles the response.
1540
+ * @returns A promise if used with async/await, or void if used with a callback.
1541
+ */
1542
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions): GaxiosPromise<Readable>;
1543
+ stop(params?: Params$Resource$Projects$Locations$Nodes$Stop, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1544
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1545
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1546
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, callback: BodyResponseCallback<Schema$Operation>): void;
1547
+ stop(callback: BodyResponseCallback<Schema$Operation>): void;
1548
+ }
1549
+ export interface Params$Resource$Projects$Locations$Nodes$Create extends StandardParameters {
1550
+ /**
1551
+ * The unqualified resource name.
1552
+ */
1553
+ nodeId?: string;
1554
+ /**
1555
+ * Required. The parent resource name.
1556
+ */
1557
+ parent?: string;
1558
+ /**
1559
+ * Idempotent request UUID.
1560
+ */
1561
+ requestId?: string;
1562
+ /**
1563
+ * Request body metadata
1564
+ */
1565
+ requestBody?: Schema$Node;
1566
+ }
1567
+ export interface Params$Resource$Projects$Locations$Nodes$Delete extends StandardParameters {
1568
+ /**
1569
+ * Required. The resource name.
1570
+ */
1571
+ name?: string;
1572
+ /**
1573
+ * Idempotent request UUID.
1574
+ */
1575
+ requestId?: string;
1576
+ }
1577
+ export interface Params$Resource$Projects$Locations$Nodes$Get extends StandardParameters {
1578
+ /**
1579
+ * Required. The resource name.
1580
+ */
1581
+ name?: string;
1582
+ }
1583
+ export interface Params$Resource$Projects$Locations$Nodes$Getguestattributes extends StandardParameters {
1584
+ /**
1585
+ * Required. The resource name.
1586
+ */
1587
+ name?: string;
1588
+ /**
1589
+ * Request body metadata
1590
+ */
1591
+ requestBody?: Schema$GetGuestAttributesRequest;
1592
+ }
1593
+ export interface Params$Resource$Projects$Locations$Nodes$List extends StandardParameters {
1594
+ /**
1595
+ * The maximum number of items to return.
1596
+ */
1597
+ pageSize?: number;
1598
+ /**
1599
+ * The next_page_token value returned from a previous List request, if any.
1600
+ */
1601
+ pageToken?: string;
1602
+ /**
1603
+ * Required. The parent resource name.
1604
+ */
1605
+ parent?: string;
1606
+ }
1607
+ export interface Params$Resource$Projects$Locations$Nodes$Patch extends StandardParameters {
1608
+ /**
1609
+ * Output only. Immutable. The name of the TPU.
1610
+ */
1611
+ name?: string;
1612
+ /**
1613
+ * Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1614
+ */
1615
+ updateMask?: string;
1616
+ /**
1617
+ * Request body metadata
1618
+ */
1619
+ requestBody?: Schema$Node;
1620
+ }
1621
+ export interface Params$Resource$Projects$Locations$Nodes$Start extends StandardParameters {
1622
+ /**
1623
+ * The resource name.
1624
+ */
1625
+ name?: string;
1626
+ /**
1627
+ * Request body metadata
1628
+ */
1629
+ requestBody?: Schema$StartNodeRequest;
1630
+ }
1631
+ export interface Params$Resource$Projects$Locations$Nodes$Stop extends StandardParameters {
1632
+ /**
1633
+ * The resource name.
1634
+ */
1635
+ name?: string;
1636
+ /**
1637
+ * Request body metadata
1638
+ */
1639
+ requestBody?: Schema$StopNodeRequest;
1640
+ }
1641
+ export class Resource$Projects$Locations$Operations {
1642
+ context: APIRequestContext;
1643
+ constructor(context: APIRequestContext);
1644
+ /**
1645
+ * 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`.
1646
+ * @example
1647
+ * ```js
1648
+ * // Before running the sample:
1649
+ * // - Enable the API at:
1650
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1651
+ * // - Login into gcloud by running:
1652
+ * // `$ gcloud auth application-default login`
1653
+ * // - Install the npm module by running:
1654
+ * // `$ npm install googleapis`
1655
+ *
1656
+ * const {google} = require('googleapis');
1657
+ * const tpu = google.tpu('v2alpha1');
1658
+ *
1659
+ * async function main() {
1660
+ * const auth = new google.auth.GoogleAuth({
1661
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1662
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1663
+ * });
1664
+ *
1665
+ * // Acquire an auth client, and bind it to all future calls
1666
+ * const authClient = await auth.getClient();
1667
+ * google.options({auth: authClient});
1668
+ *
1669
+ * // Do the magic
1670
+ * const res = await tpu.projects.locations.operations.cancel({
1671
+ * // The name of the operation resource to be cancelled.
1672
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1673
+ * });
1674
+ * console.log(res.data);
1675
+ *
1676
+ * // Example response
1677
+ * // {}
1678
+ * }
1679
+ *
1680
+ * main().catch(e => {
1681
+ * console.error(e);
1682
+ * throw e;
1683
+ * });
1684
+ *
1685
+ * ```
1686
+ *
1687
+ * @param params - Parameters for request
1688
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1689
+ * @param callback - Optional callback that handles the response.
1690
+ * @returns A promise if used with async/await, or void if used with a callback.
1691
+ */
1692
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
1693
+ cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1694
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1695
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1696
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
1697
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1698
+ /**
1699
+ * 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`.
1700
+ * @example
1701
+ * ```js
1702
+ * // Before running the sample:
1703
+ * // - Enable the API at:
1704
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1705
+ * // - Login into gcloud by running:
1706
+ * // `$ gcloud auth application-default login`
1707
+ * // - Install the npm module by running:
1708
+ * // `$ npm install googleapis`
1709
+ *
1710
+ * const {google} = require('googleapis');
1711
+ * const tpu = google.tpu('v2alpha1');
1712
+ *
1713
+ * async function main() {
1714
+ * const auth = new google.auth.GoogleAuth({
1715
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1716
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1717
+ * });
1718
+ *
1719
+ * // Acquire an auth client, and bind it to all future calls
1720
+ * const authClient = await auth.getClient();
1721
+ * google.options({auth: authClient});
1722
+ *
1723
+ * // Do the magic
1724
+ * const res = await tpu.projects.locations.operations.delete({
1725
+ * // The name of the operation resource to be deleted.
1726
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1727
+ * });
1728
+ * console.log(res.data);
1729
+ *
1730
+ * // Example response
1731
+ * // {}
1732
+ * }
1733
+ *
1734
+ * main().catch(e => {
1735
+ * console.error(e);
1736
+ * throw e;
1737
+ * });
1738
+ *
1739
+ * ```
1740
+ *
1741
+ * @param params - Parameters for request
1742
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1743
+ * @param callback - Optional callback that handles the response.
1744
+ * @returns A promise if used with async/await, or void if used with a callback.
1745
+ */
1746
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1747
+ delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1748
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1749
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1750
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
1751
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
1752
+ /**
1753
+ * 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.
1754
+ * @example
1755
+ * ```js
1756
+ * // Before running the sample:
1757
+ * // - Enable the API at:
1758
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1759
+ * // - Login into gcloud by running:
1760
+ * // `$ gcloud auth application-default login`
1761
+ * // - Install the npm module by running:
1762
+ * // `$ npm install googleapis`
1763
+ *
1764
+ * const {google} = require('googleapis');
1765
+ * const tpu = google.tpu('v2alpha1');
1766
+ *
1767
+ * async function main() {
1768
+ * const auth = new google.auth.GoogleAuth({
1769
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1770
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1771
+ * });
1772
+ *
1773
+ * // Acquire an auth client, and bind it to all future calls
1774
+ * const authClient = await auth.getClient();
1775
+ * google.options({auth: authClient});
1776
+ *
1777
+ * // Do the magic
1778
+ * const res = await tpu.projects.locations.operations.get({
1779
+ * // The name of the operation resource.
1780
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1781
+ * });
1782
+ * console.log(res.data);
1783
+ *
1784
+ * // Example response
1785
+ * // {
1786
+ * // "done": false,
1787
+ * // "error": {},
1788
+ * // "metadata": {},
1789
+ * // "name": "my_name",
1790
+ * // "response": {}
1791
+ * // }
1792
+ * }
1793
+ *
1794
+ * main().catch(e => {
1795
+ * console.error(e);
1796
+ * throw e;
1797
+ * });
1798
+ *
1799
+ * ```
1800
+ *
1801
+ * @param params - Parameters for request
1802
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1803
+ * @param callback - Optional callback that handles the response.
1804
+ * @returns A promise if used with async/await, or void if used with a callback.
1805
+ */
1806
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1807
+ get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1808
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1809
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1810
+ get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
1811
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
1812
+ /**
1813
+ * 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.
1814
+ * @example
1815
+ * ```js
1816
+ * // Before running the sample:
1817
+ * // - Enable the API at:
1818
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1819
+ * // - Login into gcloud by running:
1820
+ * // `$ gcloud auth application-default login`
1821
+ * // - Install the npm module by running:
1822
+ * // `$ npm install googleapis`
1823
+ *
1824
+ * const {google} = require('googleapis');
1825
+ * const tpu = google.tpu('v2alpha1');
1826
+ *
1827
+ * async function main() {
1828
+ * const auth = new google.auth.GoogleAuth({
1829
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1830
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1831
+ * });
1832
+ *
1833
+ * // Acquire an auth client, and bind it to all future calls
1834
+ * const authClient = await auth.getClient();
1835
+ * google.options({auth: authClient});
1836
+ *
1837
+ * // Do the magic
1838
+ * const res = await tpu.projects.locations.operations.list({
1839
+ * // The standard list filter.
1840
+ * filter: 'placeholder-value',
1841
+ * // The name of the operation's parent resource.
1842
+ * name: 'projects/my-project/locations/my-location',
1843
+ * // The standard list page size.
1844
+ * pageSize: 'placeholder-value',
1845
+ * // The standard list page token.
1846
+ * pageToken: 'placeholder-value',
1847
+ * });
1848
+ * console.log(res.data);
1849
+ *
1850
+ * // Example response
1851
+ * // {
1852
+ * // "nextPageToken": "my_nextPageToken",
1853
+ * // "operations": []
1854
+ * // }
1855
+ * }
1856
+ *
1857
+ * main().catch(e => {
1858
+ * console.error(e);
1859
+ * throw e;
1860
+ * });
1861
+ *
1862
+ * ```
1863
+ *
1864
+ * @param params - Parameters for request
1865
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1866
+ * @param callback - Optional callback that handles the response.
1867
+ * @returns A promise if used with async/await, or void if used with a callback.
1868
+ */
1869
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1870
+ list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
1871
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1872
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1873
+ list(params: Params$Resource$Projects$Locations$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1874
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1875
+ }
1876
+ export interface Params$Resource$Projects$Locations$Operations$Cancel extends StandardParameters {
1877
+ /**
1878
+ * The name of the operation resource to be cancelled.
1879
+ */
1880
+ name?: string;
1881
+ }
1882
+ export interface Params$Resource$Projects$Locations$Operations$Delete extends StandardParameters {
1883
+ /**
1884
+ * The name of the operation resource to be deleted.
1885
+ */
1886
+ name?: string;
1887
+ }
1888
+ export interface Params$Resource$Projects$Locations$Operations$Get extends StandardParameters {
1889
+ /**
1890
+ * The name of the operation resource.
1891
+ */
1892
+ name?: string;
1893
+ }
1894
+ export interface Params$Resource$Projects$Locations$Operations$List extends StandardParameters {
1895
+ /**
1896
+ * The standard list filter.
1897
+ */
1898
+ filter?: string;
1899
+ /**
1900
+ * The name of the operation's parent resource.
1901
+ */
1902
+ name?: string;
1903
+ /**
1904
+ * The standard list page size.
1905
+ */
1906
+ pageSize?: number;
1907
+ /**
1908
+ * The standard list page token.
1909
+ */
1910
+ pageToken?: string;
1911
+ }
1912
+ export class Resource$Projects$Locations$Runtimeversions {
1913
+ context: APIRequestContext;
1914
+ constructor(context: APIRequestContext);
1915
+ /**
1916
+ * Gets a runtime version.
1917
+ * @example
1918
+ * ```js
1919
+ * // Before running the sample:
1920
+ * // - Enable the API at:
1921
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1922
+ * // - Login into gcloud by running:
1923
+ * // `$ gcloud auth application-default login`
1924
+ * // - Install the npm module by running:
1925
+ * // `$ npm install googleapis`
1926
+ *
1927
+ * const {google} = require('googleapis');
1928
+ * const tpu = google.tpu('v2alpha1');
1929
+ *
1930
+ * async function main() {
1931
+ * const auth = new google.auth.GoogleAuth({
1932
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1933
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1934
+ * });
1935
+ *
1936
+ * // Acquire an auth client, and bind it to all future calls
1937
+ * const authClient = await auth.getClient();
1938
+ * google.options({auth: authClient});
1939
+ *
1940
+ * // Do the magic
1941
+ * const res = await tpu.projects.locations.runtimeVersions.get({
1942
+ * // Required. The resource name.
1943
+ * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
1944
+ * });
1945
+ * console.log(res.data);
1946
+ *
1947
+ * // Example response
1948
+ * // {
1949
+ * // "name": "my_name",
1950
+ * // "version": "my_version"
1951
+ * // }
1952
+ * }
1953
+ *
1954
+ * main().catch(e => {
1955
+ * console.error(e);
1956
+ * throw e;
1957
+ * });
1958
+ *
1959
+ * ```
1960
+ *
1961
+ * @param params - Parameters for request
1962
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1963
+ * @param callback - Optional callback that handles the response.
1964
+ * @returns A promise if used with async/await, or void if used with a callback.
1965
+ */
1966
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1967
+ get(params?: Params$Resource$Projects$Locations$Runtimeversions$Get, options?: MethodOptions): GaxiosPromise<Schema$RuntimeVersion>;
1968
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1969
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: MethodOptions | BodyResponseCallback<Schema$RuntimeVersion>, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1970
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1971
+ get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1972
+ /**
1973
+ * Lists runtime versions supported by this API.
1974
+ * @example
1975
+ * ```js
1976
+ * // Before running the sample:
1977
+ * // - Enable the API at:
1978
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1979
+ * // - Login into gcloud by running:
1980
+ * // `$ gcloud auth application-default login`
1981
+ * // - Install the npm module by running:
1982
+ * // `$ npm install googleapis`
1983
+ *
1984
+ * const {google} = require('googleapis');
1985
+ * const tpu = google.tpu('v2alpha1');
1986
+ *
1987
+ * async function main() {
1988
+ * const auth = new google.auth.GoogleAuth({
1989
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1990
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1991
+ * });
1992
+ *
1993
+ * // Acquire an auth client, and bind it to all future calls
1994
+ * const authClient = await auth.getClient();
1995
+ * google.options({auth: authClient});
1996
+ *
1997
+ * // Do the magic
1998
+ * const res = await tpu.projects.locations.runtimeVersions.list({
1999
+ * // List filter.
2000
+ * filter: 'placeholder-value',
2001
+ * // Sort results.
2002
+ * orderBy: 'placeholder-value',
2003
+ * // The maximum number of items to return.
2004
+ * pageSize: 'placeholder-value',
2005
+ * // The next_page_token value returned from a previous List request, if any.
2006
+ * pageToken: 'placeholder-value',
2007
+ * // Required. The parent resource name.
2008
+ * parent: 'projects/my-project/locations/my-location',
2009
+ * });
2010
+ * console.log(res.data);
2011
+ *
2012
+ * // Example response
2013
+ * // {
2014
+ * // "nextPageToken": "my_nextPageToken",
2015
+ * // "runtimeVersions": [],
2016
+ * // "unreachable": []
2017
+ * // }
2018
+ * }
2019
+ *
2020
+ * main().catch(e => {
2021
+ * console.error(e);
2022
+ * throw e;
2023
+ * });
2024
+ *
2025
+ * ```
2026
+ *
2027
+ * @param params - Parameters for request
2028
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2029
+ * @param callback - Optional callback that handles the response.
2030
+ * @returns A promise if used with async/await, or void if used with a callback.
2031
+ */
2032
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2033
+ list(params?: Params$Resource$Projects$Locations$Runtimeversions$List, options?: MethodOptions): GaxiosPromise<Schema$ListRuntimeVersionsResponse>;
2034
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2035
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: MethodOptions | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2036
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2037
+ list(callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2038
+ }
2039
+ export interface Params$Resource$Projects$Locations$Runtimeversions$Get extends StandardParameters {
2040
+ /**
2041
+ * Required. The resource name.
2042
+ */
2043
+ name?: string;
2044
+ }
2045
+ export interface Params$Resource$Projects$Locations$Runtimeversions$List extends StandardParameters {
2046
+ /**
2047
+ * List filter.
2048
+ */
2049
+ filter?: string;
2050
+ /**
2051
+ * Sort results.
2052
+ */
2053
+ orderBy?: string;
2054
+ /**
2055
+ * The maximum number of items to return.
2056
+ */
2057
+ pageSize?: number;
2058
+ /**
2059
+ * The next_page_token value returned from a previous List request, if any.
2060
+ */
2061
+ pageToken?: string;
2062
+ /**
2063
+ * Required. The parent resource name.
2064
+ */
2065
+ parent?: string;
2066
+ }
2067
+ export {};
2068
+ }