@googleapis/tpu 0.2.0 → 0.6.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,2056 @@
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
+ * Represents the metadata of the long-running operation.
453
+ */
454
+ export interface Schema$OperationMetadata {
455
+ /**
456
+ * Output only. API version used to start the operation.
457
+ */
458
+ apiVersion?: string | null;
459
+ /**
460
+ * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
461
+ */
462
+ cancelRequested?: boolean | null;
463
+ /**
464
+ * Output only. The time the operation was created.
465
+ */
466
+ createTime?: string | null;
467
+ /**
468
+ * Output only. The time the operation finished running.
469
+ */
470
+ endTime?: string | null;
471
+ /**
472
+ * Output only. Human-readable status of the operation, if any.
473
+ */
474
+ statusDetail?: string | null;
475
+ /**
476
+ * Output only. Server-defined resource path for the target of the operation.
477
+ */
478
+ target?: string | null;
479
+ /**
480
+ * Output only. 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
+ *
1004
+ * // Request body metadata
1005
+ * requestBody: {
1006
+ * // request body parameters
1007
+ * // {
1008
+ * // "acceleratorType": "my_acceleratorType",
1009
+ * // "apiVersion": "my_apiVersion",
1010
+ * // "cidrBlock": "my_cidrBlock",
1011
+ * // "createTime": "my_createTime",
1012
+ * // "dataDisks": [],
1013
+ * // "description": "my_description",
1014
+ * // "health": "my_health",
1015
+ * // "healthDescription": "my_healthDescription",
1016
+ * // "id": "my_id",
1017
+ * // "labels": {},
1018
+ * // "metadata": {},
1019
+ * // "name": "my_name",
1020
+ * // "networkConfig": {},
1021
+ * // "networkEndpoints": [],
1022
+ * // "runtimeVersion": "my_runtimeVersion",
1023
+ * // "schedulingConfig": {},
1024
+ * // "serviceAccount": {},
1025
+ * // "state": "my_state",
1026
+ * // "symptoms": [],
1027
+ * // "tags": []
1028
+ * // }
1029
+ * },
1030
+ * });
1031
+ * console.log(res.data);
1032
+ *
1033
+ * // Example response
1034
+ * // {
1035
+ * // "done": false,
1036
+ * // "error": {},
1037
+ * // "metadata": {},
1038
+ * // "name": "my_name",
1039
+ * // "response": {}
1040
+ * // }
1041
+ * }
1042
+ *
1043
+ * main().catch(e => {
1044
+ * console.error(e);
1045
+ * throw e;
1046
+ * });
1047
+ *
1048
+ * ```
1049
+ *
1050
+ * @param params - Parameters for request
1051
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1052
+ * @param callback - Optional callback that handles the response.
1053
+ * @returns A promise if used with async/await, or void if used with a callback.
1054
+ */
1055
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
1056
+ create(params?: Params$Resource$Projects$Locations$Nodes$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1057
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1058
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1059
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, callback: BodyResponseCallback<Schema$Operation>): void;
1060
+ create(callback: BodyResponseCallback<Schema$Operation>): void;
1061
+ /**
1062
+ * Deletes a node.
1063
+ * @example
1064
+ * ```js
1065
+ * // Before running the sample:
1066
+ * // - Enable the API at:
1067
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1068
+ * // - Login into gcloud by running:
1069
+ * // `$ gcloud auth application-default login`
1070
+ * // - Install the npm module by running:
1071
+ * // `$ npm install googleapis`
1072
+ *
1073
+ * const {google} = require('googleapis');
1074
+ * const tpu = google.tpu('v2alpha1');
1075
+ *
1076
+ * async function main() {
1077
+ * const auth = new google.auth.GoogleAuth({
1078
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1079
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1080
+ * });
1081
+ *
1082
+ * // Acquire an auth client, and bind it to all future calls
1083
+ * const authClient = await auth.getClient();
1084
+ * google.options({auth: authClient});
1085
+ *
1086
+ * // Do the magic
1087
+ * const res = await tpu.projects.locations.nodes.delete({
1088
+ * // Required. The resource name.
1089
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1090
+ * });
1091
+ * console.log(res.data);
1092
+ *
1093
+ * // Example response
1094
+ * // {
1095
+ * // "done": false,
1096
+ * // "error": {},
1097
+ * // "metadata": {},
1098
+ * // "name": "my_name",
1099
+ * // "response": {}
1100
+ * // }
1101
+ * }
1102
+ *
1103
+ * main().catch(e => {
1104
+ * console.error(e);
1105
+ * throw e;
1106
+ * });
1107
+ *
1108
+ * ```
1109
+ *
1110
+ * @param params - Parameters for request
1111
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1112
+ * @param callback - Optional callback that handles the response.
1113
+ * @returns A promise if used with async/await, or void if used with a callback.
1114
+ */
1115
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1116
+ delete(params?: Params$Resource$Projects$Locations$Nodes$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1117
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1118
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1119
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
1120
+ delete(callback: BodyResponseCallback<Schema$Operation>): void;
1121
+ /**
1122
+ * Gets the details of a node.
1123
+ * @example
1124
+ * ```js
1125
+ * // Before running the sample:
1126
+ * // - Enable the API at:
1127
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1128
+ * // - Login into gcloud by running:
1129
+ * // `$ gcloud auth application-default login`
1130
+ * // - Install the npm module by running:
1131
+ * // `$ npm install googleapis`
1132
+ *
1133
+ * const {google} = require('googleapis');
1134
+ * const tpu = google.tpu('v2alpha1');
1135
+ *
1136
+ * async function main() {
1137
+ * const auth = new google.auth.GoogleAuth({
1138
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1139
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1140
+ * });
1141
+ *
1142
+ * // Acquire an auth client, and bind it to all future calls
1143
+ * const authClient = await auth.getClient();
1144
+ * google.options({auth: authClient});
1145
+ *
1146
+ * // Do the magic
1147
+ * const res = await tpu.projects.locations.nodes.get({
1148
+ * // Required. The resource name.
1149
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1150
+ * });
1151
+ * console.log(res.data);
1152
+ *
1153
+ * // Example response
1154
+ * // {
1155
+ * // "acceleratorType": "my_acceleratorType",
1156
+ * // "apiVersion": "my_apiVersion",
1157
+ * // "cidrBlock": "my_cidrBlock",
1158
+ * // "createTime": "my_createTime",
1159
+ * // "dataDisks": [],
1160
+ * // "description": "my_description",
1161
+ * // "health": "my_health",
1162
+ * // "healthDescription": "my_healthDescription",
1163
+ * // "id": "my_id",
1164
+ * // "labels": {},
1165
+ * // "metadata": {},
1166
+ * // "name": "my_name",
1167
+ * // "networkConfig": {},
1168
+ * // "networkEndpoints": [],
1169
+ * // "runtimeVersion": "my_runtimeVersion",
1170
+ * // "schedulingConfig": {},
1171
+ * // "serviceAccount": {},
1172
+ * // "state": "my_state",
1173
+ * // "symptoms": [],
1174
+ * // "tags": []
1175
+ * // }
1176
+ * }
1177
+ *
1178
+ * main().catch(e => {
1179
+ * console.error(e);
1180
+ * throw e;
1181
+ * });
1182
+ *
1183
+ * ```
1184
+ *
1185
+ * @param params - Parameters for request
1186
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1187
+ * @param callback - Optional callback that handles the response.
1188
+ * @returns A promise if used with async/await, or void if used with a callback.
1189
+ */
1190
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1191
+ get(params?: Params$Resource$Projects$Locations$Nodes$Get, options?: MethodOptions): GaxiosPromise<Schema$Node>;
1192
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1193
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: MethodOptions | BodyResponseCallback<Schema$Node>, callback: BodyResponseCallback<Schema$Node>): void;
1194
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, callback: BodyResponseCallback<Schema$Node>): void;
1195
+ get(callback: BodyResponseCallback<Schema$Node>): void;
1196
+ /**
1197
+ * Retrieves the guest attributes for the node.
1198
+ * @example
1199
+ * ```js
1200
+ * // Before running the sample:
1201
+ * // - Enable the API at:
1202
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1203
+ * // - Login into gcloud by running:
1204
+ * // `$ gcloud auth application-default login`
1205
+ * // - Install the npm module by running:
1206
+ * // `$ npm install googleapis`
1207
+ *
1208
+ * const {google} = require('googleapis');
1209
+ * const tpu = google.tpu('v2alpha1');
1210
+ *
1211
+ * async function main() {
1212
+ * const auth = new google.auth.GoogleAuth({
1213
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1214
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1215
+ * });
1216
+ *
1217
+ * // Acquire an auth client, and bind it to all future calls
1218
+ * const authClient = await auth.getClient();
1219
+ * google.options({auth: authClient});
1220
+ *
1221
+ * // Do the magic
1222
+ * const res = await tpu.projects.locations.nodes.getGuestAttributes({
1223
+ * // Required. The resource name.
1224
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1225
+ *
1226
+ * // Request body metadata
1227
+ * requestBody: {
1228
+ * // request body parameters
1229
+ * // {
1230
+ * // "queryPath": "my_queryPath",
1231
+ * // "workerIds": []
1232
+ * // }
1233
+ * },
1234
+ * });
1235
+ * console.log(res.data);
1236
+ *
1237
+ * // Example response
1238
+ * // {
1239
+ * // "guestAttributes": []
1240
+ * // }
1241
+ * }
1242
+ *
1243
+ * main().catch(e => {
1244
+ * console.error(e);
1245
+ * throw e;
1246
+ * });
1247
+ *
1248
+ * ```
1249
+ *
1250
+ * @param params - Parameters for request
1251
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1252
+ * @param callback - Optional callback that handles the response.
1253
+ * @returns A promise if used with async/await, or void if used with a callback.
1254
+ */
1255
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions): GaxiosPromise<Readable>;
1256
+ getGuestAttributes(params?: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options?: MethodOptions): GaxiosPromise<Schema$GetGuestAttributesResponse>;
1257
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1258
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, options: MethodOptions | BodyResponseCallback<Schema$GetGuestAttributesResponse>, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1259
+ getGuestAttributes(params: Params$Resource$Projects$Locations$Nodes$Getguestattributes, callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1260
+ getGuestAttributes(callback: BodyResponseCallback<Schema$GetGuestAttributesResponse>): void;
1261
+ /**
1262
+ * Lists nodes.
1263
+ * @example
1264
+ * ```js
1265
+ * // Before running the sample:
1266
+ * // - Enable the API at:
1267
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1268
+ * // - Login into gcloud by running:
1269
+ * // `$ gcloud auth application-default login`
1270
+ * // - Install the npm module by running:
1271
+ * // `$ npm install googleapis`
1272
+ *
1273
+ * const {google} = require('googleapis');
1274
+ * const tpu = google.tpu('v2alpha1');
1275
+ *
1276
+ * async function main() {
1277
+ * const auth = new google.auth.GoogleAuth({
1278
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1279
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1280
+ * });
1281
+ *
1282
+ * // Acquire an auth client, and bind it to all future calls
1283
+ * const authClient = await auth.getClient();
1284
+ * google.options({auth: authClient});
1285
+ *
1286
+ * // Do the magic
1287
+ * const res = await tpu.projects.locations.nodes.list({
1288
+ * // The maximum number of items to return.
1289
+ * pageSize: 'placeholder-value',
1290
+ * // The next_page_token value returned from a previous List request, if any.
1291
+ * pageToken: 'placeholder-value',
1292
+ * // Required. The parent resource name.
1293
+ * parent: 'projects/my-project/locations/my-location',
1294
+ * });
1295
+ * console.log(res.data);
1296
+ *
1297
+ * // Example response
1298
+ * // {
1299
+ * // "nextPageToken": "my_nextPageToken",
1300
+ * // "nodes": [],
1301
+ * // "unreachable": []
1302
+ * // }
1303
+ * }
1304
+ *
1305
+ * main().catch(e => {
1306
+ * console.error(e);
1307
+ * throw e;
1308
+ * });
1309
+ *
1310
+ * ```
1311
+ *
1312
+ * @param params - Parameters for request
1313
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1314
+ * @param callback - Optional callback that handles the response.
1315
+ * @returns A promise if used with async/await, or void if used with a callback.
1316
+ */
1317
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1318
+ list(params?: Params$Resource$Projects$Locations$Nodes$List, options?: MethodOptions): GaxiosPromise<Schema$ListNodesResponse>;
1319
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1320
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: MethodOptions | BodyResponseCallback<Schema$ListNodesResponse>, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1321
+ list(params: Params$Resource$Projects$Locations$Nodes$List, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1322
+ list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
1323
+ /**
1324
+ * Updates the configurations of a node.
1325
+ * @example
1326
+ * ```js
1327
+ * // Before running the sample:
1328
+ * // - Enable the API at:
1329
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1330
+ * // - Login into gcloud by running:
1331
+ * // `$ gcloud auth application-default login`
1332
+ * // - Install the npm module by running:
1333
+ * // `$ npm install googleapis`
1334
+ *
1335
+ * const {google} = require('googleapis');
1336
+ * const tpu = google.tpu('v2alpha1');
1337
+ *
1338
+ * async function main() {
1339
+ * const auth = new google.auth.GoogleAuth({
1340
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1341
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1342
+ * });
1343
+ *
1344
+ * // Acquire an auth client, and bind it to all future calls
1345
+ * const authClient = await auth.getClient();
1346
+ * google.options({auth: authClient});
1347
+ *
1348
+ * // Do the magic
1349
+ * const res = await tpu.projects.locations.nodes.patch({
1350
+ * // Output only. Immutable. The name of the TPU.
1351
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1352
+ * // Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1353
+ * updateMask: 'placeholder-value',
1354
+ *
1355
+ * // Request body metadata
1356
+ * requestBody: {
1357
+ * // request body parameters
1358
+ * // {
1359
+ * // "acceleratorType": "my_acceleratorType",
1360
+ * // "apiVersion": "my_apiVersion",
1361
+ * // "cidrBlock": "my_cidrBlock",
1362
+ * // "createTime": "my_createTime",
1363
+ * // "dataDisks": [],
1364
+ * // "description": "my_description",
1365
+ * // "health": "my_health",
1366
+ * // "healthDescription": "my_healthDescription",
1367
+ * // "id": "my_id",
1368
+ * // "labels": {},
1369
+ * // "metadata": {},
1370
+ * // "name": "my_name",
1371
+ * // "networkConfig": {},
1372
+ * // "networkEndpoints": [],
1373
+ * // "runtimeVersion": "my_runtimeVersion",
1374
+ * // "schedulingConfig": {},
1375
+ * // "serviceAccount": {},
1376
+ * // "state": "my_state",
1377
+ * // "symptoms": [],
1378
+ * // "tags": []
1379
+ * // }
1380
+ * },
1381
+ * });
1382
+ * console.log(res.data);
1383
+ *
1384
+ * // Example response
1385
+ * // {
1386
+ * // "done": false,
1387
+ * // "error": {},
1388
+ * // "metadata": {},
1389
+ * // "name": "my_name",
1390
+ * // "response": {}
1391
+ * // }
1392
+ * }
1393
+ *
1394
+ * main().catch(e => {
1395
+ * console.error(e);
1396
+ * throw e;
1397
+ * });
1398
+ *
1399
+ * ```
1400
+ *
1401
+ * @param params - Parameters for request
1402
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1403
+ * @param callback - Optional callback that handles the response.
1404
+ * @returns A promise if used with async/await, or void if used with a callback.
1405
+ */
1406
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions): GaxiosPromise<Readable>;
1407
+ patch(params?: Params$Resource$Projects$Locations$Nodes$Patch, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1408
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1409
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1410
+ patch(params: Params$Resource$Projects$Locations$Nodes$Patch, callback: BodyResponseCallback<Schema$Operation>): void;
1411
+ patch(callback: BodyResponseCallback<Schema$Operation>): void;
1412
+ /**
1413
+ * Starts a node.
1414
+ * @example
1415
+ * ```js
1416
+ * // Before running the sample:
1417
+ * // - Enable the API at:
1418
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1419
+ * // - Login into gcloud by running:
1420
+ * // `$ gcloud auth application-default login`
1421
+ * // - Install the npm module by running:
1422
+ * // `$ npm install googleapis`
1423
+ *
1424
+ * const {google} = require('googleapis');
1425
+ * const tpu = google.tpu('v2alpha1');
1426
+ *
1427
+ * async function main() {
1428
+ * const auth = new google.auth.GoogleAuth({
1429
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1430
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1431
+ * });
1432
+ *
1433
+ * // Acquire an auth client, and bind it to all future calls
1434
+ * const authClient = await auth.getClient();
1435
+ * google.options({auth: authClient});
1436
+ *
1437
+ * // Do the magic
1438
+ * const res = await tpu.projects.locations.nodes.start({
1439
+ * // The resource name.
1440
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1441
+ *
1442
+ * // Request body metadata
1443
+ * requestBody: {
1444
+ * // request body parameters
1445
+ * // {}
1446
+ * },
1447
+ * });
1448
+ * console.log(res.data);
1449
+ *
1450
+ * // Example response
1451
+ * // {
1452
+ * // "done": false,
1453
+ * // "error": {},
1454
+ * // "metadata": {},
1455
+ * // "name": "my_name",
1456
+ * // "response": {}
1457
+ * // }
1458
+ * }
1459
+ *
1460
+ * main().catch(e => {
1461
+ * console.error(e);
1462
+ * throw e;
1463
+ * });
1464
+ *
1465
+ * ```
1466
+ *
1467
+ * @param params - Parameters for request
1468
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1469
+ * @param callback - Optional callback that handles the response.
1470
+ * @returns A promise if used with async/await, or void if used with a callback.
1471
+ */
1472
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions): GaxiosPromise<Readable>;
1473
+ start(params?: Params$Resource$Projects$Locations$Nodes$Start, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1474
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1475
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1476
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, callback: BodyResponseCallback<Schema$Operation>): void;
1477
+ start(callback: BodyResponseCallback<Schema$Operation>): void;
1478
+ /**
1479
+ * Stops a node. This operation is only available with single TPU nodes.
1480
+ * @example
1481
+ * ```js
1482
+ * // Before running the sample:
1483
+ * // - Enable the API at:
1484
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1485
+ * // - Login into gcloud by running:
1486
+ * // `$ gcloud auth application-default login`
1487
+ * // - Install the npm module by running:
1488
+ * // `$ npm install googleapis`
1489
+ *
1490
+ * const {google} = require('googleapis');
1491
+ * const tpu = google.tpu('v2alpha1');
1492
+ *
1493
+ * async function main() {
1494
+ * const auth = new google.auth.GoogleAuth({
1495
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1496
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1497
+ * });
1498
+ *
1499
+ * // Acquire an auth client, and bind it to all future calls
1500
+ * const authClient = await auth.getClient();
1501
+ * google.options({auth: authClient});
1502
+ *
1503
+ * // Do the magic
1504
+ * const res = await tpu.projects.locations.nodes.stop({
1505
+ * // The resource name.
1506
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1507
+ *
1508
+ * // Request body metadata
1509
+ * requestBody: {
1510
+ * // request body parameters
1511
+ * // {}
1512
+ * },
1513
+ * });
1514
+ * console.log(res.data);
1515
+ *
1516
+ * // Example response
1517
+ * // {
1518
+ * // "done": false,
1519
+ * // "error": {},
1520
+ * // "metadata": {},
1521
+ * // "name": "my_name",
1522
+ * // "response": {}
1523
+ * // }
1524
+ * }
1525
+ *
1526
+ * main().catch(e => {
1527
+ * console.error(e);
1528
+ * throw e;
1529
+ * });
1530
+ *
1531
+ * ```
1532
+ *
1533
+ * @param params - Parameters for request
1534
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1535
+ * @param callback - Optional callback that handles the response.
1536
+ * @returns A promise if used with async/await, or void if used with a callback.
1537
+ */
1538
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions): GaxiosPromise<Readable>;
1539
+ stop(params?: Params$Resource$Projects$Locations$Nodes$Stop, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1540
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1541
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1542
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, callback: BodyResponseCallback<Schema$Operation>): void;
1543
+ stop(callback: BodyResponseCallback<Schema$Operation>): void;
1544
+ }
1545
+ export interface Params$Resource$Projects$Locations$Nodes$Create extends StandardParameters {
1546
+ /**
1547
+ * The unqualified resource name.
1548
+ */
1549
+ nodeId?: string;
1550
+ /**
1551
+ * Required. The parent resource name.
1552
+ */
1553
+ parent?: string;
1554
+ /**
1555
+ * Request body metadata
1556
+ */
1557
+ requestBody?: Schema$Node;
1558
+ }
1559
+ export interface Params$Resource$Projects$Locations$Nodes$Delete extends StandardParameters {
1560
+ /**
1561
+ * Required. The resource name.
1562
+ */
1563
+ name?: string;
1564
+ }
1565
+ export interface Params$Resource$Projects$Locations$Nodes$Get extends StandardParameters {
1566
+ /**
1567
+ * Required. The resource name.
1568
+ */
1569
+ name?: string;
1570
+ }
1571
+ export interface Params$Resource$Projects$Locations$Nodes$Getguestattributes extends StandardParameters {
1572
+ /**
1573
+ * Required. The resource name.
1574
+ */
1575
+ name?: string;
1576
+ /**
1577
+ * Request body metadata
1578
+ */
1579
+ requestBody?: Schema$GetGuestAttributesRequest;
1580
+ }
1581
+ export interface Params$Resource$Projects$Locations$Nodes$List extends StandardParameters {
1582
+ /**
1583
+ * The maximum number of items to return.
1584
+ */
1585
+ pageSize?: number;
1586
+ /**
1587
+ * The next_page_token value returned from a previous List request, if any.
1588
+ */
1589
+ pageToken?: string;
1590
+ /**
1591
+ * Required. The parent resource name.
1592
+ */
1593
+ parent?: string;
1594
+ }
1595
+ export interface Params$Resource$Projects$Locations$Nodes$Patch extends StandardParameters {
1596
+ /**
1597
+ * Output only. Immutable. The name of the TPU.
1598
+ */
1599
+ name?: string;
1600
+ /**
1601
+ * Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].
1602
+ */
1603
+ updateMask?: string;
1604
+ /**
1605
+ * Request body metadata
1606
+ */
1607
+ requestBody?: Schema$Node;
1608
+ }
1609
+ export interface Params$Resource$Projects$Locations$Nodes$Start extends StandardParameters {
1610
+ /**
1611
+ * The resource name.
1612
+ */
1613
+ name?: string;
1614
+ /**
1615
+ * Request body metadata
1616
+ */
1617
+ requestBody?: Schema$StartNodeRequest;
1618
+ }
1619
+ export interface Params$Resource$Projects$Locations$Nodes$Stop extends StandardParameters {
1620
+ /**
1621
+ * The resource name.
1622
+ */
1623
+ name?: string;
1624
+ /**
1625
+ * Request body metadata
1626
+ */
1627
+ requestBody?: Schema$StopNodeRequest;
1628
+ }
1629
+ export class Resource$Projects$Locations$Operations {
1630
+ context: APIRequestContext;
1631
+ constructor(context: APIRequestContext);
1632
+ /**
1633
+ * 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`.
1634
+ * @example
1635
+ * ```js
1636
+ * // Before running the sample:
1637
+ * // - Enable the API at:
1638
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1639
+ * // - Login into gcloud by running:
1640
+ * // `$ gcloud auth application-default login`
1641
+ * // - Install the npm module by running:
1642
+ * // `$ npm install googleapis`
1643
+ *
1644
+ * const {google} = require('googleapis');
1645
+ * const tpu = google.tpu('v2alpha1');
1646
+ *
1647
+ * async function main() {
1648
+ * const auth = new google.auth.GoogleAuth({
1649
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1650
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1651
+ * });
1652
+ *
1653
+ * // Acquire an auth client, and bind it to all future calls
1654
+ * const authClient = await auth.getClient();
1655
+ * google.options({auth: authClient});
1656
+ *
1657
+ * // Do the magic
1658
+ * const res = await tpu.projects.locations.operations.cancel({
1659
+ * // The name of the operation resource to be cancelled.
1660
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1661
+ * });
1662
+ * console.log(res.data);
1663
+ *
1664
+ * // Example response
1665
+ * // {}
1666
+ * }
1667
+ *
1668
+ * main().catch(e => {
1669
+ * console.error(e);
1670
+ * throw e;
1671
+ * });
1672
+ *
1673
+ * ```
1674
+ *
1675
+ * @param params - Parameters for request
1676
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1677
+ * @param callback - Optional callback that handles the response.
1678
+ * @returns A promise if used with async/await, or void if used with a callback.
1679
+ */
1680
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
1681
+ cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1682
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1683
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1684
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
1685
+ cancel(callback: BodyResponseCallback<Schema$Empty>): void;
1686
+ /**
1687
+ * 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`.
1688
+ * @example
1689
+ * ```js
1690
+ * // Before running the sample:
1691
+ * // - Enable the API at:
1692
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1693
+ * // - Login into gcloud by running:
1694
+ * // `$ gcloud auth application-default login`
1695
+ * // - Install the npm module by running:
1696
+ * // `$ npm install googleapis`
1697
+ *
1698
+ * const {google} = require('googleapis');
1699
+ * const tpu = google.tpu('v2alpha1');
1700
+ *
1701
+ * async function main() {
1702
+ * const auth = new google.auth.GoogleAuth({
1703
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1704
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1705
+ * });
1706
+ *
1707
+ * // Acquire an auth client, and bind it to all future calls
1708
+ * const authClient = await auth.getClient();
1709
+ * google.options({auth: authClient});
1710
+ *
1711
+ * // Do the magic
1712
+ * const res = await tpu.projects.locations.operations.delete({
1713
+ * // The name of the operation resource to be deleted.
1714
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1715
+ * });
1716
+ * console.log(res.data);
1717
+ *
1718
+ * // Example response
1719
+ * // {}
1720
+ * }
1721
+ *
1722
+ * main().catch(e => {
1723
+ * console.error(e);
1724
+ * throw e;
1725
+ * });
1726
+ *
1727
+ * ```
1728
+ *
1729
+ * @param params - Parameters for request
1730
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1731
+ * @param callback - Optional callback that handles the response.
1732
+ * @returns A promise if used with async/await, or void if used with a callback.
1733
+ */
1734
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
1735
+ delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1736
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1737
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
1738
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
1739
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
1740
+ /**
1741
+ * 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.
1742
+ * @example
1743
+ * ```js
1744
+ * // Before running the sample:
1745
+ * // - Enable the API at:
1746
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1747
+ * // - Login into gcloud by running:
1748
+ * // `$ gcloud auth application-default login`
1749
+ * // - Install the npm module by running:
1750
+ * // `$ npm install googleapis`
1751
+ *
1752
+ * const {google} = require('googleapis');
1753
+ * const tpu = google.tpu('v2alpha1');
1754
+ *
1755
+ * async function main() {
1756
+ * const auth = new google.auth.GoogleAuth({
1757
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1758
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1759
+ * });
1760
+ *
1761
+ * // Acquire an auth client, and bind it to all future calls
1762
+ * const authClient = await auth.getClient();
1763
+ * google.options({auth: authClient});
1764
+ *
1765
+ * // Do the magic
1766
+ * const res = await tpu.projects.locations.operations.get({
1767
+ * // The name of the operation resource.
1768
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1769
+ * });
1770
+ * console.log(res.data);
1771
+ *
1772
+ * // Example response
1773
+ * // {
1774
+ * // "done": false,
1775
+ * // "error": {},
1776
+ * // "metadata": {},
1777
+ * // "name": "my_name",
1778
+ * // "response": {}
1779
+ * // }
1780
+ * }
1781
+ *
1782
+ * main().catch(e => {
1783
+ * console.error(e);
1784
+ * throw e;
1785
+ * });
1786
+ *
1787
+ * ```
1788
+ *
1789
+ * @param params - Parameters for request
1790
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1791
+ * @param callback - Optional callback that handles the response.
1792
+ * @returns A promise if used with async/await, or void if used with a callback.
1793
+ */
1794
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1795
+ get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1796
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1797
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
1798
+ get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
1799
+ get(callback: BodyResponseCallback<Schema$Operation>): void;
1800
+ /**
1801
+ * 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.
1802
+ * @example
1803
+ * ```js
1804
+ * // Before running the sample:
1805
+ * // - Enable the API at:
1806
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1807
+ * // - Login into gcloud by running:
1808
+ * // `$ gcloud auth application-default login`
1809
+ * // - Install the npm module by running:
1810
+ * // `$ npm install googleapis`
1811
+ *
1812
+ * const {google} = require('googleapis');
1813
+ * const tpu = google.tpu('v2alpha1');
1814
+ *
1815
+ * async function main() {
1816
+ * const auth = new google.auth.GoogleAuth({
1817
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1818
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1819
+ * });
1820
+ *
1821
+ * // Acquire an auth client, and bind it to all future calls
1822
+ * const authClient = await auth.getClient();
1823
+ * google.options({auth: authClient});
1824
+ *
1825
+ * // Do the magic
1826
+ * const res = await tpu.projects.locations.operations.list({
1827
+ * // The standard list filter.
1828
+ * filter: 'placeholder-value',
1829
+ * // The name of the operation's parent resource.
1830
+ * name: 'projects/my-project/locations/my-location',
1831
+ * // The standard list page size.
1832
+ * pageSize: 'placeholder-value',
1833
+ * // The standard list page token.
1834
+ * pageToken: 'placeholder-value',
1835
+ * });
1836
+ * console.log(res.data);
1837
+ *
1838
+ * // Example response
1839
+ * // {
1840
+ * // "nextPageToken": "my_nextPageToken",
1841
+ * // "operations": []
1842
+ * // }
1843
+ * }
1844
+ *
1845
+ * main().catch(e => {
1846
+ * console.error(e);
1847
+ * throw e;
1848
+ * });
1849
+ *
1850
+ * ```
1851
+ *
1852
+ * @param params - Parameters for request
1853
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1854
+ * @param callback - Optional callback that handles the response.
1855
+ * @returns A promise if used with async/await, or void if used with a callback.
1856
+ */
1857
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
1858
+ list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
1859
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1860
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1861
+ list(params: Params$Resource$Projects$Locations$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1862
+ list(callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
1863
+ }
1864
+ export interface Params$Resource$Projects$Locations$Operations$Cancel extends StandardParameters {
1865
+ /**
1866
+ * The name of the operation resource to be cancelled.
1867
+ */
1868
+ name?: string;
1869
+ }
1870
+ export interface Params$Resource$Projects$Locations$Operations$Delete extends StandardParameters {
1871
+ /**
1872
+ * The name of the operation resource to be deleted.
1873
+ */
1874
+ name?: string;
1875
+ }
1876
+ export interface Params$Resource$Projects$Locations$Operations$Get extends StandardParameters {
1877
+ /**
1878
+ * The name of the operation resource.
1879
+ */
1880
+ name?: string;
1881
+ }
1882
+ export interface Params$Resource$Projects$Locations$Operations$List extends StandardParameters {
1883
+ /**
1884
+ * The standard list filter.
1885
+ */
1886
+ filter?: string;
1887
+ /**
1888
+ * The name of the operation's parent resource.
1889
+ */
1890
+ name?: string;
1891
+ /**
1892
+ * The standard list page size.
1893
+ */
1894
+ pageSize?: number;
1895
+ /**
1896
+ * The standard list page token.
1897
+ */
1898
+ pageToken?: string;
1899
+ }
1900
+ export class Resource$Projects$Locations$Runtimeversions {
1901
+ context: APIRequestContext;
1902
+ constructor(context: APIRequestContext);
1903
+ /**
1904
+ * Gets a runtime version.
1905
+ * @example
1906
+ * ```js
1907
+ * // Before running the sample:
1908
+ * // - Enable the API at:
1909
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1910
+ * // - Login into gcloud by running:
1911
+ * // `$ gcloud auth application-default login`
1912
+ * // - Install the npm module by running:
1913
+ * // `$ npm install googleapis`
1914
+ *
1915
+ * const {google} = require('googleapis');
1916
+ * const tpu = google.tpu('v2alpha1');
1917
+ *
1918
+ * async function main() {
1919
+ * const auth = new google.auth.GoogleAuth({
1920
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1921
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1922
+ * });
1923
+ *
1924
+ * // Acquire an auth client, and bind it to all future calls
1925
+ * const authClient = await auth.getClient();
1926
+ * google.options({auth: authClient});
1927
+ *
1928
+ * // Do the magic
1929
+ * const res = await tpu.projects.locations.runtimeVersions.get({
1930
+ * // Required. The resource name.
1931
+ * name: 'projects/my-project/locations/my-location/runtimeVersions/my-runtimeVersion',
1932
+ * });
1933
+ * console.log(res.data);
1934
+ *
1935
+ * // Example response
1936
+ * // {
1937
+ * // "name": "my_name",
1938
+ * // "version": "my_version"
1939
+ * // }
1940
+ * }
1941
+ *
1942
+ * main().catch(e => {
1943
+ * console.error(e);
1944
+ * throw e;
1945
+ * });
1946
+ *
1947
+ * ```
1948
+ *
1949
+ * @param params - Parameters for request
1950
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1951
+ * @param callback - Optional callback that handles the response.
1952
+ * @returns A promise if used with async/await, or void if used with a callback.
1953
+ */
1954
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
1955
+ get(params?: Params$Resource$Projects$Locations$Runtimeversions$Get, options?: MethodOptions): GaxiosPromise<Schema$RuntimeVersion>;
1956
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
1957
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, options: MethodOptions | BodyResponseCallback<Schema$RuntimeVersion>, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1958
+ get(params: Params$Resource$Projects$Locations$Runtimeversions$Get, callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1959
+ get(callback: BodyResponseCallback<Schema$RuntimeVersion>): void;
1960
+ /**
1961
+ * Lists runtime versions supported by this API.
1962
+ * @example
1963
+ * ```js
1964
+ * // Before running the sample:
1965
+ * // - Enable the API at:
1966
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1967
+ * // - Login into gcloud by running:
1968
+ * // `$ gcloud auth application-default login`
1969
+ * // - Install the npm module by running:
1970
+ * // `$ npm install googleapis`
1971
+ *
1972
+ * const {google} = require('googleapis');
1973
+ * const tpu = google.tpu('v2alpha1');
1974
+ *
1975
+ * async function main() {
1976
+ * const auth = new google.auth.GoogleAuth({
1977
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1978
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1979
+ * });
1980
+ *
1981
+ * // Acquire an auth client, and bind it to all future calls
1982
+ * const authClient = await auth.getClient();
1983
+ * google.options({auth: authClient});
1984
+ *
1985
+ * // Do the magic
1986
+ * const res = await tpu.projects.locations.runtimeVersions.list({
1987
+ * // List filter.
1988
+ * filter: 'placeholder-value',
1989
+ * // Sort results.
1990
+ * orderBy: 'placeholder-value',
1991
+ * // The maximum number of items to return.
1992
+ * pageSize: 'placeholder-value',
1993
+ * // The next_page_token value returned from a previous List request, if any.
1994
+ * pageToken: 'placeholder-value',
1995
+ * // Required. The parent resource name.
1996
+ * parent: 'projects/my-project/locations/my-location',
1997
+ * });
1998
+ * console.log(res.data);
1999
+ *
2000
+ * // Example response
2001
+ * // {
2002
+ * // "nextPageToken": "my_nextPageToken",
2003
+ * // "runtimeVersions": [],
2004
+ * // "unreachable": []
2005
+ * // }
2006
+ * }
2007
+ *
2008
+ * main().catch(e => {
2009
+ * console.error(e);
2010
+ * throw e;
2011
+ * });
2012
+ *
2013
+ * ```
2014
+ *
2015
+ * @param params - Parameters for request
2016
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2017
+ * @param callback - Optional callback that handles the response.
2018
+ * @returns A promise if used with async/await, or void if used with a callback.
2019
+ */
2020
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
2021
+ list(params?: Params$Resource$Projects$Locations$Runtimeversions$List, options?: MethodOptions): GaxiosPromise<Schema$ListRuntimeVersionsResponse>;
2022
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
2023
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, options: MethodOptions | BodyResponseCallback<Schema$ListRuntimeVersionsResponse>, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2024
+ list(params: Params$Resource$Projects$Locations$Runtimeversions$List, callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2025
+ list(callback: BodyResponseCallback<Schema$ListRuntimeVersionsResponse>): void;
2026
+ }
2027
+ export interface Params$Resource$Projects$Locations$Runtimeversions$Get extends StandardParameters {
2028
+ /**
2029
+ * Required. The resource name.
2030
+ */
2031
+ name?: string;
2032
+ }
2033
+ export interface Params$Resource$Projects$Locations$Runtimeversions$List extends StandardParameters {
2034
+ /**
2035
+ * List filter.
2036
+ */
2037
+ filter?: string;
2038
+ /**
2039
+ * Sort results.
2040
+ */
2041
+ orderBy?: string;
2042
+ /**
2043
+ * The maximum number of items to return.
2044
+ */
2045
+ pageSize?: number;
2046
+ /**
2047
+ * The next_page_token value returned from a previous List request, if any.
2048
+ */
2049
+ pageToken?: string;
2050
+ /**
2051
+ * Required. The parent resource name.
2052
+ */
2053
+ parent?: string;
2054
+ }
2055
+ export {};
2056
+ }