@googleapis/tpu 5.5.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
3
  import { Readable } from 'stream';
4
4
  export declare namespace tpu_v1 {
5
5
  export interface Options extends GlobalOptions {
@@ -452,28 +452,133 @@ export declare namespace tpu_v1 {
452
452
  constructor(context: APIRequestContext);
453
453
  /**
454
454
  * Gets information about a location.
455
+ * @example
456
+ * ```js
457
+ * // Before running the sample:
458
+ * // - Enable the API at:
459
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
460
+ * // - Login into gcloud by running:
461
+ * // ```sh
462
+ * // $ gcloud auth application-default login
463
+ * // ```
464
+ * // - Install the npm module by running:
465
+ * // ```sh
466
+ * // $ npm install googleapis
467
+ * // ```
468
+ *
469
+ * const {google} = require('googleapis');
470
+ * const tpu = google.tpu('v1');
471
+ *
472
+ * async function main() {
473
+ * const auth = new google.auth.GoogleAuth({
474
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
475
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
476
+ * });
477
+ *
478
+ * // Acquire an auth client, and bind it to all future calls
479
+ * const authClient = await auth.getClient();
480
+ * google.options({auth: authClient});
481
+ *
482
+ * // Do the magic
483
+ * const res = await tpu.projects.locations.get({
484
+ * // Resource name for the location.
485
+ * name: 'projects/my-project/locations/my-location',
486
+ * });
487
+ * console.log(res.data);
488
+ *
489
+ * // Example response
490
+ * // {
491
+ * // "displayName": "my_displayName",
492
+ * // "labels": {},
493
+ * // "locationId": "my_locationId",
494
+ * // "metadata": {},
495
+ * // "name": "my_name"
496
+ * // }
497
+ * }
498
+ *
499
+ * main().catch(e => {
500
+ * console.error(e);
501
+ * throw e;
502
+ * });
503
+ *
504
+ * ```
455
505
  *
456
506
  * @param params - Parameters for request
457
507
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
458
508
  * @param callback - Optional callback that handles the response.
459
509
  * @returns A promise if used with async/await, or void if used with a callback.
460
510
  */
461
- get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
462
- get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): GaxiosPromise<Schema$Location>;
511
+ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
512
+ get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Location>>;
463
513
  get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
464
514
  get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void;
465
515
  get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void;
466
516
  get(callback: BodyResponseCallback<Schema$Location>): void;
467
517
  /**
468
518
  * Lists information about the supported locations for this service.
519
+ * @example
520
+ * ```js
521
+ * // Before running the sample:
522
+ * // - Enable the API at:
523
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
524
+ * // - Login into gcloud by running:
525
+ * // ```sh
526
+ * // $ gcloud auth application-default login
527
+ * // ```
528
+ * // - Install the npm module by running:
529
+ * // ```sh
530
+ * // $ npm install googleapis
531
+ * // ```
532
+ *
533
+ * const {google} = require('googleapis');
534
+ * const tpu = google.tpu('v1');
535
+ *
536
+ * async function main() {
537
+ * const auth = new google.auth.GoogleAuth({
538
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
539
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
540
+ * });
541
+ *
542
+ * // Acquire an auth client, and bind it to all future calls
543
+ * const authClient = await auth.getClient();
544
+ * google.options({auth: authClient});
545
+ *
546
+ * // Do the magic
547
+ * const res = await tpu.projects.locations.list({
548
+ * // Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.
549
+ * extraLocationTypes: 'placeholder-value',
550
+ * // 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).
551
+ * filter: 'placeholder-value',
552
+ * // The resource that owns the locations collection, if applicable.
553
+ * name: 'projects/my-project',
554
+ * // The maximum number of results to return. If not set, the service selects a default.
555
+ * pageSize: 'placeholder-value',
556
+ * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
557
+ * pageToken: 'placeholder-value',
558
+ * });
559
+ * console.log(res.data);
560
+ *
561
+ * // Example response
562
+ * // {
563
+ * // "locations": [],
564
+ * // "nextPageToken": "my_nextPageToken"
565
+ * // }
566
+ * }
567
+ *
568
+ * main().catch(e => {
569
+ * console.error(e);
570
+ * throw e;
571
+ * });
572
+ *
573
+ * ```
469
574
  *
470
575
  * @param params - Parameters for request
471
576
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
472
577
  * @param callback - Optional callback that handles the response.
473
578
  * @returns A promise if used with async/await, or void if used with a callback.
474
579
  */
475
- list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
476
- list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): GaxiosPromise<Schema$ListLocationsResponse>;
580
+ list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
581
+ list(params?: Params$Resource$Projects$Locations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListLocationsResponse>>;
477
582
  list(params: Params$Resource$Projects$Locations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
478
583
  list(params: Params$Resource$Projects$Locations$List, options: MethodOptions | BodyResponseCallback<Schema$ListLocationsResponse>, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
479
584
  list(params: Params$Resource$Projects$Locations$List, callback: BodyResponseCallback<Schema$ListLocationsResponse>): void;
@@ -512,28 +617,131 @@ export declare namespace tpu_v1 {
512
617
  constructor(context: APIRequestContext);
513
618
  /**
514
619
  * Gets AcceleratorType.
620
+ * @example
621
+ * ```js
622
+ * // Before running the sample:
623
+ * // - Enable the API at:
624
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
625
+ * // - Login into gcloud by running:
626
+ * // ```sh
627
+ * // $ gcloud auth application-default login
628
+ * // ```
629
+ * // - Install the npm module by running:
630
+ * // ```sh
631
+ * // $ npm install googleapis
632
+ * // ```
633
+ *
634
+ * const {google} = require('googleapis');
635
+ * const tpu = google.tpu('v1');
636
+ *
637
+ * async function main() {
638
+ * const auth = new google.auth.GoogleAuth({
639
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
640
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
641
+ * });
642
+ *
643
+ * // Acquire an auth client, and bind it to all future calls
644
+ * const authClient = await auth.getClient();
645
+ * google.options({auth: authClient});
646
+ *
647
+ * // Do the magic
648
+ * const res = await tpu.projects.locations.acceleratorTypes.get({
649
+ * // Required. The resource name.
650
+ * name: 'projects/my-project/locations/my-location/acceleratorTypes/my-acceleratorType',
651
+ * });
652
+ * console.log(res.data);
653
+ *
654
+ * // Example response
655
+ * // {
656
+ * // "name": "my_name",
657
+ * // "type": "my_type"
658
+ * // }
659
+ * }
660
+ *
661
+ * main().catch(e => {
662
+ * console.error(e);
663
+ * throw e;
664
+ * });
665
+ *
666
+ * ```
515
667
  *
516
668
  * @param params - Parameters for request
517
669
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
518
670
  * @param callback - Optional callback that handles the response.
519
671
  * @returns A promise if used with async/await, or void if used with a callback.
520
672
  */
521
- get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
522
- get(params?: Params$Resource$Projects$Locations$Acceleratortypes$Get, options?: MethodOptions): GaxiosPromise<Schema$AcceleratorType>;
673
+ get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
674
+ get(params?: Params$Resource$Projects$Locations$Acceleratortypes$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$AcceleratorType>>;
523
675
  get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
524
676
  get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, options: MethodOptions | BodyResponseCallback<Schema$AcceleratorType>, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
525
677
  get(params: Params$Resource$Projects$Locations$Acceleratortypes$Get, callback: BodyResponseCallback<Schema$AcceleratorType>): void;
526
678
  get(callback: BodyResponseCallback<Schema$AcceleratorType>): void;
527
679
  /**
528
680
  * Lists accelerator types supported by this API.
681
+ * @example
682
+ * ```js
683
+ * // Before running the sample:
684
+ * // - Enable the API at:
685
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
686
+ * // - Login into gcloud by running:
687
+ * // ```sh
688
+ * // $ gcloud auth application-default login
689
+ * // ```
690
+ * // - Install the npm module by running:
691
+ * // ```sh
692
+ * // $ npm install googleapis
693
+ * // ```
694
+ *
695
+ * const {google} = require('googleapis');
696
+ * const tpu = google.tpu('v1');
697
+ *
698
+ * async function main() {
699
+ * const auth = new google.auth.GoogleAuth({
700
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
701
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
702
+ * });
703
+ *
704
+ * // Acquire an auth client, and bind it to all future calls
705
+ * const authClient = await auth.getClient();
706
+ * google.options({auth: authClient});
707
+ *
708
+ * // Do the magic
709
+ * const res = await tpu.projects.locations.acceleratorTypes.list({
710
+ * // List filter.
711
+ * filter: 'placeholder-value',
712
+ * // Sort results.
713
+ * orderBy: 'placeholder-value',
714
+ * // The maximum number of items to return.
715
+ * pageSize: 'placeholder-value',
716
+ * // The next_page_token value returned from a previous List request, if any.
717
+ * pageToken: 'placeholder-value',
718
+ * // Required. The parent resource name.
719
+ * parent: 'projects/my-project/locations/my-location',
720
+ * });
721
+ * console.log(res.data);
722
+ *
723
+ * // Example response
724
+ * // {
725
+ * // "acceleratorTypes": [],
726
+ * // "nextPageToken": "my_nextPageToken",
727
+ * // "unreachable": []
728
+ * // }
729
+ * }
730
+ *
731
+ * main().catch(e => {
732
+ * console.error(e);
733
+ * throw e;
734
+ * });
735
+ *
736
+ * ```
529
737
  *
530
738
  * @param params - Parameters for request
531
739
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
532
740
  * @param callback - Optional callback that handles the response.
533
741
  * @returns A promise if used with async/await, or void if used with a callback.
534
742
  */
535
- list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
536
- list(params?: Params$Resource$Projects$Locations$Acceleratortypes$List, options?: MethodOptions): GaxiosPromise<Schema$ListAcceleratorTypesResponse>;
743
+ list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
744
+ list(params?: Params$Resource$Projects$Locations$Acceleratortypes$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAcceleratorTypesResponse>>;
537
745
  list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
538
746
  list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, options: MethodOptions | BodyResponseCallback<Schema$ListAcceleratorTypesResponse>, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
539
747
  list(params: Params$Resource$Projects$Locations$Acceleratortypes$List, callback: BodyResponseCallback<Schema$ListAcceleratorTypesResponse>): void;
@@ -572,98 +780,512 @@ export declare namespace tpu_v1 {
572
780
  constructor(context: APIRequestContext);
573
781
  /**
574
782
  * Creates a node.
783
+ * @example
784
+ * ```js
785
+ * // Before running the sample:
786
+ * // - Enable the API at:
787
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
788
+ * // - Login into gcloud by running:
789
+ * // ```sh
790
+ * // $ gcloud auth application-default login
791
+ * // ```
792
+ * // - Install the npm module by running:
793
+ * // ```sh
794
+ * // $ npm install googleapis
795
+ * // ```
796
+ *
797
+ * const {google} = require('googleapis');
798
+ * const tpu = google.tpu('v1');
799
+ *
800
+ * async function main() {
801
+ * const auth = new google.auth.GoogleAuth({
802
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
803
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
804
+ * });
805
+ *
806
+ * // Acquire an auth client, and bind it to all future calls
807
+ * const authClient = await auth.getClient();
808
+ * google.options({auth: authClient});
809
+ *
810
+ * // Do the magic
811
+ * const res = await tpu.projects.locations.nodes.create({
812
+ * // The unqualified resource name.
813
+ * nodeId: 'placeholder-value',
814
+ * // Required. The parent resource name.
815
+ * parent: 'projects/my-project/locations/my-location',
816
+ *
817
+ * // Request body metadata
818
+ * requestBody: {
819
+ * // request body parameters
820
+ * // {
821
+ * // "acceleratorType": "my_acceleratorType",
822
+ * // "apiVersion": "my_apiVersion",
823
+ * // "cidrBlock": "my_cidrBlock",
824
+ * // "createTime": "my_createTime",
825
+ * // "description": "my_description",
826
+ * // "health": "my_health",
827
+ * // "healthDescription": "my_healthDescription",
828
+ * // "ipAddress": "my_ipAddress",
829
+ * // "labels": {},
830
+ * // "name": "my_name",
831
+ * // "network": "my_network",
832
+ * // "networkEndpoints": [],
833
+ * // "port": "my_port",
834
+ * // "schedulingConfig": {},
835
+ * // "serviceAccount": "my_serviceAccount",
836
+ * // "state": "my_state",
837
+ * // "symptoms": [],
838
+ * // "tensorflowVersion": "my_tensorflowVersion",
839
+ * // "useServiceNetworking": false
840
+ * // }
841
+ * },
842
+ * });
843
+ * console.log(res.data);
844
+ *
845
+ * // Example response
846
+ * // {
847
+ * // "done": false,
848
+ * // "error": {},
849
+ * // "metadata": {},
850
+ * // "name": "my_name",
851
+ * // "response": {}
852
+ * // }
853
+ * }
854
+ *
855
+ * main().catch(e => {
856
+ * console.error(e);
857
+ * throw e;
858
+ * });
859
+ *
860
+ * ```
575
861
  *
576
862
  * @param params - Parameters for request
577
863
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
578
864
  * @param callback - Optional callback that handles the response.
579
865
  * @returns A promise if used with async/await, or void if used with a callback.
580
866
  */
581
- create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
582
- create(params?: Params$Resource$Projects$Locations$Nodes$Create, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
867
+ create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
868
+ create(params?: Params$Resource$Projects$Locations$Nodes$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
583
869
  create(params: Params$Resource$Projects$Locations$Nodes$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
584
870
  create(params: Params$Resource$Projects$Locations$Nodes$Create, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
585
871
  create(params: Params$Resource$Projects$Locations$Nodes$Create, callback: BodyResponseCallback<Schema$Operation>): void;
586
872
  create(callback: BodyResponseCallback<Schema$Operation>): void;
587
873
  /**
588
874
  * Deletes a node.
875
+ * @example
876
+ * ```js
877
+ * // Before running the sample:
878
+ * // - Enable the API at:
879
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
880
+ * // - Login into gcloud by running:
881
+ * // ```sh
882
+ * // $ gcloud auth application-default login
883
+ * // ```
884
+ * // - Install the npm module by running:
885
+ * // ```sh
886
+ * // $ npm install googleapis
887
+ * // ```
888
+ *
889
+ * const {google} = require('googleapis');
890
+ * const tpu = google.tpu('v1');
891
+ *
892
+ * async function main() {
893
+ * const auth = new google.auth.GoogleAuth({
894
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
895
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
896
+ * });
897
+ *
898
+ * // Acquire an auth client, and bind it to all future calls
899
+ * const authClient = await auth.getClient();
900
+ * google.options({auth: authClient});
901
+ *
902
+ * // Do the magic
903
+ * const res = await tpu.projects.locations.nodes.delete({
904
+ * // Required. The resource name.
905
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
906
+ * });
907
+ * console.log(res.data);
908
+ *
909
+ * // Example response
910
+ * // {
911
+ * // "done": false,
912
+ * // "error": {},
913
+ * // "metadata": {},
914
+ * // "name": "my_name",
915
+ * // "response": {}
916
+ * // }
917
+ * }
918
+ *
919
+ * main().catch(e => {
920
+ * console.error(e);
921
+ * throw e;
922
+ * });
923
+ *
924
+ * ```
589
925
  *
590
926
  * @param params - Parameters for request
591
927
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
592
928
  * @param callback - Optional callback that handles the response.
593
929
  * @returns A promise if used with async/await, or void if used with a callback.
594
930
  */
595
- delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
596
- delete(params?: Params$Resource$Projects$Locations$Nodes$Delete, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
931
+ delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
932
+ delete(params?: Params$Resource$Projects$Locations$Nodes$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
597
933
  delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
598
934
  delete(params: Params$Resource$Projects$Locations$Nodes$Delete, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
599
935
  delete(params: Params$Resource$Projects$Locations$Nodes$Delete, callback: BodyResponseCallback<Schema$Operation>): void;
600
936
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
601
937
  /**
602
938
  * Gets the details of a node.
939
+ * @example
940
+ * ```js
941
+ * // Before running the sample:
942
+ * // - Enable the API at:
943
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
944
+ * // - Login into gcloud by running:
945
+ * // ```sh
946
+ * // $ gcloud auth application-default login
947
+ * // ```
948
+ * // - Install the npm module by running:
949
+ * // ```sh
950
+ * // $ npm install googleapis
951
+ * // ```
952
+ *
953
+ * const {google} = require('googleapis');
954
+ * const tpu = google.tpu('v1');
955
+ *
956
+ * async function main() {
957
+ * const auth = new google.auth.GoogleAuth({
958
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
959
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
960
+ * });
961
+ *
962
+ * // Acquire an auth client, and bind it to all future calls
963
+ * const authClient = await auth.getClient();
964
+ * google.options({auth: authClient});
965
+ *
966
+ * // Do the magic
967
+ * const res = await tpu.projects.locations.nodes.get({
968
+ * // Required. The resource name.
969
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
970
+ * });
971
+ * console.log(res.data);
972
+ *
973
+ * // Example response
974
+ * // {
975
+ * // "acceleratorType": "my_acceleratorType",
976
+ * // "apiVersion": "my_apiVersion",
977
+ * // "cidrBlock": "my_cidrBlock",
978
+ * // "createTime": "my_createTime",
979
+ * // "description": "my_description",
980
+ * // "health": "my_health",
981
+ * // "healthDescription": "my_healthDescription",
982
+ * // "ipAddress": "my_ipAddress",
983
+ * // "labels": {},
984
+ * // "name": "my_name",
985
+ * // "network": "my_network",
986
+ * // "networkEndpoints": [],
987
+ * // "port": "my_port",
988
+ * // "schedulingConfig": {},
989
+ * // "serviceAccount": "my_serviceAccount",
990
+ * // "state": "my_state",
991
+ * // "symptoms": [],
992
+ * // "tensorflowVersion": "my_tensorflowVersion",
993
+ * // "useServiceNetworking": false
994
+ * // }
995
+ * }
996
+ *
997
+ * main().catch(e => {
998
+ * console.error(e);
999
+ * throw e;
1000
+ * });
1001
+ *
1002
+ * ```
603
1003
  *
604
1004
  * @param params - Parameters for request
605
1005
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
606
1006
  * @param callback - Optional callback that handles the response.
607
1007
  * @returns A promise if used with async/await, or void if used with a callback.
608
1008
  */
609
- get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
610
- get(params?: Params$Resource$Projects$Locations$Nodes$Get, options?: MethodOptions): GaxiosPromise<Schema$Node>;
1009
+ get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1010
+ get(params?: Params$Resource$Projects$Locations$Nodes$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Node>>;
611
1011
  get(params: Params$Resource$Projects$Locations$Nodes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
612
1012
  get(params: Params$Resource$Projects$Locations$Nodes$Get, options: MethodOptions | BodyResponseCallback<Schema$Node>, callback: BodyResponseCallback<Schema$Node>): void;
613
1013
  get(params: Params$Resource$Projects$Locations$Nodes$Get, callback: BodyResponseCallback<Schema$Node>): void;
614
1014
  get(callback: BodyResponseCallback<Schema$Node>): void;
615
1015
  /**
616
1016
  * Lists nodes.
1017
+ * @example
1018
+ * ```js
1019
+ * // Before running the sample:
1020
+ * // - Enable the API at:
1021
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1022
+ * // - Login into gcloud by running:
1023
+ * // ```sh
1024
+ * // $ gcloud auth application-default login
1025
+ * // ```
1026
+ * // - Install the npm module by running:
1027
+ * // ```sh
1028
+ * // $ npm install googleapis
1029
+ * // ```
1030
+ *
1031
+ * const {google} = require('googleapis');
1032
+ * const tpu = google.tpu('v1');
1033
+ *
1034
+ * async function main() {
1035
+ * const auth = new google.auth.GoogleAuth({
1036
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1037
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1038
+ * });
1039
+ *
1040
+ * // Acquire an auth client, and bind it to all future calls
1041
+ * const authClient = await auth.getClient();
1042
+ * google.options({auth: authClient});
1043
+ *
1044
+ * // Do the magic
1045
+ * const res = await tpu.projects.locations.nodes.list({
1046
+ * // The maximum number of items to return.
1047
+ * pageSize: 'placeholder-value',
1048
+ * // The next_page_token value returned from a previous List request, if any.
1049
+ * pageToken: 'placeholder-value',
1050
+ * // Required. The parent resource name.
1051
+ * parent: 'projects/my-project/locations/my-location',
1052
+ * });
1053
+ * console.log(res.data);
1054
+ *
1055
+ * // Example response
1056
+ * // {
1057
+ * // "nextPageToken": "my_nextPageToken",
1058
+ * // "nodes": [],
1059
+ * // "unreachable": []
1060
+ * // }
1061
+ * }
1062
+ *
1063
+ * main().catch(e => {
1064
+ * console.error(e);
1065
+ * throw e;
1066
+ * });
1067
+ *
1068
+ * ```
617
1069
  *
618
1070
  * @param params - Parameters for request
619
1071
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
620
1072
  * @param callback - Optional callback that handles the response.
621
1073
  * @returns A promise if used with async/await, or void if used with a callback.
622
1074
  */
623
- list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
624
- list(params?: Params$Resource$Projects$Locations$Nodes$List, options?: MethodOptions): GaxiosPromise<Schema$ListNodesResponse>;
1075
+ list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1076
+ list(params?: Params$Resource$Projects$Locations$Nodes$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListNodesResponse>>;
625
1077
  list(params: Params$Resource$Projects$Locations$Nodes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
626
1078
  list(params: Params$Resource$Projects$Locations$Nodes$List, options: MethodOptions | BodyResponseCallback<Schema$ListNodesResponse>, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
627
1079
  list(params: Params$Resource$Projects$Locations$Nodes$List, callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
628
1080
  list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
629
1081
  /**
630
1082
  * Reimages a node's OS.
1083
+ * @example
1084
+ * ```js
1085
+ * // Before running the sample:
1086
+ * // - Enable the API at:
1087
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1088
+ * // - Login into gcloud by running:
1089
+ * // ```sh
1090
+ * // $ gcloud auth application-default login
1091
+ * // ```
1092
+ * // - Install the npm module by running:
1093
+ * // ```sh
1094
+ * // $ npm install googleapis
1095
+ * // ```
1096
+ *
1097
+ * const {google} = require('googleapis');
1098
+ * const tpu = google.tpu('v1');
1099
+ *
1100
+ * async function main() {
1101
+ * const auth = new google.auth.GoogleAuth({
1102
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1103
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1104
+ * });
1105
+ *
1106
+ * // Acquire an auth client, and bind it to all future calls
1107
+ * const authClient = await auth.getClient();
1108
+ * google.options({auth: authClient});
1109
+ *
1110
+ * // Do the magic
1111
+ * const res = await tpu.projects.locations.nodes.reimage({
1112
+ * // The resource name.
1113
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1114
+ *
1115
+ * // Request body metadata
1116
+ * requestBody: {
1117
+ * // request body parameters
1118
+ * // {
1119
+ * // "tensorflowVersion": "my_tensorflowVersion"
1120
+ * // }
1121
+ * },
1122
+ * });
1123
+ * console.log(res.data);
1124
+ *
1125
+ * // Example response
1126
+ * // {
1127
+ * // "done": false,
1128
+ * // "error": {},
1129
+ * // "metadata": {},
1130
+ * // "name": "my_name",
1131
+ * // "response": {}
1132
+ * // }
1133
+ * }
1134
+ *
1135
+ * main().catch(e => {
1136
+ * console.error(e);
1137
+ * throw e;
1138
+ * });
1139
+ *
1140
+ * ```
631
1141
  *
632
1142
  * @param params - Parameters for request
633
1143
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
634
1144
  * @param callback - Optional callback that handles the response.
635
1145
  * @returns A promise if used with async/await, or void if used with a callback.
636
1146
  */
637
- reimage(params: Params$Resource$Projects$Locations$Nodes$Reimage, options: StreamMethodOptions): GaxiosPromise<Readable>;
638
- reimage(params?: Params$Resource$Projects$Locations$Nodes$Reimage, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1147
+ reimage(params: Params$Resource$Projects$Locations$Nodes$Reimage, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1148
+ reimage(params?: Params$Resource$Projects$Locations$Nodes$Reimage, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
639
1149
  reimage(params: Params$Resource$Projects$Locations$Nodes$Reimage, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
640
1150
  reimage(params: Params$Resource$Projects$Locations$Nodes$Reimage, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
641
1151
  reimage(params: Params$Resource$Projects$Locations$Nodes$Reimage, callback: BodyResponseCallback<Schema$Operation>): void;
642
1152
  reimage(callback: BodyResponseCallback<Schema$Operation>): void;
643
1153
  /**
644
1154
  * Starts a node.
1155
+ * @example
1156
+ * ```js
1157
+ * // Before running the sample:
1158
+ * // - Enable the API at:
1159
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1160
+ * // - Login into gcloud by running:
1161
+ * // ```sh
1162
+ * // $ gcloud auth application-default login
1163
+ * // ```
1164
+ * // - Install the npm module by running:
1165
+ * // ```sh
1166
+ * // $ npm install googleapis
1167
+ * // ```
1168
+ *
1169
+ * const {google} = require('googleapis');
1170
+ * const tpu = google.tpu('v1');
1171
+ *
1172
+ * async function main() {
1173
+ * const auth = new google.auth.GoogleAuth({
1174
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1175
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1176
+ * });
1177
+ *
1178
+ * // Acquire an auth client, and bind it to all future calls
1179
+ * const authClient = await auth.getClient();
1180
+ * google.options({auth: authClient});
1181
+ *
1182
+ * // Do the magic
1183
+ * const res = await tpu.projects.locations.nodes.start({
1184
+ * // The resource name.
1185
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1186
+ *
1187
+ * // Request body metadata
1188
+ * requestBody: {
1189
+ * // request body parameters
1190
+ * // {}
1191
+ * },
1192
+ * });
1193
+ * console.log(res.data);
1194
+ *
1195
+ * // Example response
1196
+ * // {
1197
+ * // "done": false,
1198
+ * // "error": {},
1199
+ * // "metadata": {},
1200
+ * // "name": "my_name",
1201
+ * // "response": {}
1202
+ * // }
1203
+ * }
1204
+ *
1205
+ * main().catch(e => {
1206
+ * console.error(e);
1207
+ * throw e;
1208
+ * });
1209
+ *
1210
+ * ```
645
1211
  *
646
1212
  * @param params - Parameters for request
647
1213
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
648
1214
  * @param callback - Optional callback that handles the response.
649
1215
  * @returns A promise if used with async/await, or void if used with a callback.
650
1216
  */
651
- start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions): GaxiosPromise<Readable>;
652
- start(params?: Params$Resource$Projects$Locations$Nodes$Start, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1217
+ start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1218
+ start(params?: Params$Resource$Projects$Locations$Nodes$Start, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
653
1219
  start(params: Params$Resource$Projects$Locations$Nodes$Start, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
654
1220
  start(params: Params$Resource$Projects$Locations$Nodes$Start, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
655
1221
  start(params: Params$Resource$Projects$Locations$Nodes$Start, callback: BodyResponseCallback<Schema$Operation>): void;
656
1222
  start(callback: BodyResponseCallback<Schema$Operation>): void;
657
1223
  /**
658
1224
  * Stops a node, this operation is only available with single TPU nodes.
1225
+ * @example
1226
+ * ```js
1227
+ * // Before running the sample:
1228
+ * // - Enable the API at:
1229
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1230
+ * // - Login into gcloud by running:
1231
+ * // ```sh
1232
+ * // $ gcloud auth application-default login
1233
+ * // ```
1234
+ * // - Install the npm module by running:
1235
+ * // ```sh
1236
+ * // $ npm install googleapis
1237
+ * // ```
1238
+ *
1239
+ * const {google} = require('googleapis');
1240
+ * const tpu = google.tpu('v1');
1241
+ *
1242
+ * async function main() {
1243
+ * const auth = new google.auth.GoogleAuth({
1244
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1245
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1246
+ * });
1247
+ *
1248
+ * // Acquire an auth client, and bind it to all future calls
1249
+ * const authClient = await auth.getClient();
1250
+ * google.options({auth: authClient});
1251
+ *
1252
+ * // Do the magic
1253
+ * const res = await tpu.projects.locations.nodes.stop({
1254
+ * // The resource name.
1255
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1256
+ *
1257
+ * // Request body metadata
1258
+ * requestBody: {
1259
+ * // request body parameters
1260
+ * // {}
1261
+ * },
1262
+ * });
1263
+ * console.log(res.data);
1264
+ *
1265
+ * // Example response
1266
+ * // {
1267
+ * // "done": false,
1268
+ * // "error": {},
1269
+ * // "metadata": {},
1270
+ * // "name": "my_name",
1271
+ * // "response": {}
1272
+ * // }
1273
+ * }
1274
+ *
1275
+ * main().catch(e => {
1276
+ * console.error(e);
1277
+ * throw e;
1278
+ * });
1279
+ *
1280
+ * ```
659
1281
  *
660
1282
  * @param params - Parameters for request
661
1283
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
662
1284
  * @param callback - Optional callback that handles the response.
663
1285
  * @returns A promise if used with async/await, or void if used with a callback.
664
1286
  */
665
- stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions): GaxiosPromise<Readable>;
666
- stop(params?: Params$Resource$Projects$Locations$Nodes$Stop, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1287
+ stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1288
+ stop(params?: Params$Resource$Projects$Locations$Nodes$Stop, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
667
1289
  stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
668
1290
  stop(params: Params$Resource$Projects$Locations$Nodes$Stop, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
669
1291
  stop(params: Params$Resource$Projects$Locations$Nodes$Stop, callback: BodyResponseCallback<Schema$Operation>): void;
@@ -744,56 +1366,247 @@ export declare namespace tpu_v1 {
744
1366
  constructor(context: APIRequestContext);
745
1367
  /**
746
1368
  * 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`.
1369
+ * @example
1370
+ * ```js
1371
+ * // Before running the sample:
1372
+ * // - Enable the API at:
1373
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1374
+ * // - Login into gcloud by running:
1375
+ * // ```sh
1376
+ * // $ gcloud auth application-default login
1377
+ * // ```
1378
+ * // - Install the npm module by running:
1379
+ * // ```sh
1380
+ * // $ npm install googleapis
1381
+ * // ```
1382
+ *
1383
+ * const {google} = require('googleapis');
1384
+ * const tpu = google.tpu('v1');
1385
+ *
1386
+ * async function main() {
1387
+ * const auth = new google.auth.GoogleAuth({
1388
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1389
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1390
+ * });
1391
+ *
1392
+ * // Acquire an auth client, and bind it to all future calls
1393
+ * const authClient = await auth.getClient();
1394
+ * google.options({auth: authClient});
1395
+ *
1396
+ * // Do the magic
1397
+ * const res = await tpu.projects.locations.operations.cancel({
1398
+ * // The name of the operation resource to be cancelled.
1399
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1400
+ * });
1401
+ * console.log(res.data);
1402
+ *
1403
+ * // Example response
1404
+ * // {}
1405
+ * }
1406
+ *
1407
+ * main().catch(e => {
1408
+ * console.error(e);
1409
+ * throw e;
1410
+ * });
1411
+ *
1412
+ * ```
747
1413
  *
748
1414
  * @param params - Parameters for request
749
1415
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
750
1416
  * @param callback - Optional callback that handles the response.
751
1417
  * @returns A promise if used with async/await, or void if used with a callback.
752
1418
  */
753
- cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): GaxiosPromise<Readable>;
754
- cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1419
+ cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1420
+ cancel(params?: Params$Resource$Projects$Locations$Operations$Cancel, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
755
1421
  cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
756
1422
  cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
757
1423
  cancel(params: Params$Resource$Projects$Locations$Operations$Cancel, callback: BodyResponseCallback<Schema$Empty>): void;
758
1424
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
759
1425
  /**
760
1426
  * 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`.
1427
+ * @example
1428
+ * ```js
1429
+ * // Before running the sample:
1430
+ * // - Enable the API at:
1431
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1432
+ * // - Login into gcloud by running:
1433
+ * // ```sh
1434
+ * // $ gcloud auth application-default login
1435
+ * // ```
1436
+ * // - Install the npm module by running:
1437
+ * // ```sh
1438
+ * // $ npm install googleapis
1439
+ * // ```
1440
+ *
1441
+ * const {google} = require('googleapis');
1442
+ * const tpu = google.tpu('v1');
1443
+ *
1444
+ * async function main() {
1445
+ * const auth = new google.auth.GoogleAuth({
1446
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1447
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1448
+ * });
1449
+ *
1450
+ * // Acquire an auth client, and bind it to all future calls
1451
+ * const authClient = await auth.getClient();
1452
+ * google.options({auth: authClient});
1453
+ *
1454
+ * // Do the magic
1455
+ * const res = await tpu.projects.locations.operations.delete({
1456
+ * // The name of the operation resource to be deleted.
1457
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1458
+ * });
1459
+ * console.log(res.data);
1460
+ *
1461
+ * // Example response
1462
+ * // {}
1463
+ * }
1464
+ *
1465
+ * main().catch(e => {
1466
+ * console.error(e);
1467
+ * throw e;
1468
+ * });
1469
+ *
1470
+ * ```
761
1471
  *
762
1472
  * @param params - Parameters for request
763
1473
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
764
1474
  * @param callback - Optional callback that handles the response.
765
1475
  * @returns A promise if used with async/await, or void if used with a callback.
766
1476
  */
767
- delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>;
768
- delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
1477
+ delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1478
+ delete(params?: Params$Resource$Projects$Locations$Operations$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
769
1479
  delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
770
1480
  delete(params: Params$Resource$Projects$Locations$Operations$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
771
1481
  delete(params: Params$Resource$Projects$Locations$Operations$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
772
1482
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
773
1483
  /**
774
1484
  * 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.
1485
+ * @example
1486
+ * ```js
1487
+ * // Before running the sample:
1488
+ * // - Enable the API at:
1489
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1490
+ * // - Login into gcloud by running:
1491
+ * // ```sh
1492
+ * // $ gcloud auth application-default login
1493
+ * // ```
1494
+ * // - Install the npm module by running:
1495
+ * // ```sh
1496
+ * // $ npm install googleapis
1497
+ * // ```
1498
+ *
1499
+ * const {google} = require('googleapis');
1500
+ * const tpu = google.tpu('v1');
1501
+ *
1502
+ * async function main() {
1503
+ * const auth = new google.auth.GoogleAuth({
1504
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1505
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1506
+ * });
1507
+ *
1508
+ * // Acquire an auth client, and bind it to all future calls
1509
+ * const authClient = await auth.getClient();
1510
+ * google.options({auth: authClient});
1511
+ *
1512
+ * // Do the magic
1513
+ * const res = await tpu.projects.locations.operations.get({
1514
+ * // The name of the operation resource.
1515
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1516
+ * });
1517
+ * console.log(res.data);
1518
+ *
1519
+ * // Example response
1520
+ * // {
1521
+ * // "done": false,
1522
+ * // "error": {},
1523
+ * // "metadata": {},
1524
+ * // "name": "my_name",
1525
+ * // "response": {}
1526
+ * // }
1527
+ * }
1528
+ *
1529
+ * main().catch(e => {
1530
+ * console.error(e);
1531
+ * throw e;
1532
+ * });
1533
+ *
1534
+ * ```
775
1535
  *
776
1536
  * @param params - Parameters for request
777
1537
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
778
1538
  * @param callback - Optional callback that handles the response.
779
1539
  * @returns A promise if used with async/await, or void if used with a callback.
780
1540
  */
781
- get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
782
- get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): GaxiosPromise<Schema$Operation>;
1541
+ get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1542
+ get(params?: Params$Resource$Projects$Locations$Operations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
783
1543
  get(params: Params$Resource$Projects$Locations$Operations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
784
1544
  get(params: Params$Resource$Projects$Locations$Operations$Get, options: MethodOptions | BodyResponseCallback<Schema$Operation>, callback: BodyResponseCallback<Schema$Operation>): void;
785
1545
  get(params: Params$Resource$Projects$Locations$Operations$Get, callback: BodyResponseCallback<Schema$Operation>): void;
786
1546
  get(callback: BodyResponseCallback<Schema$Operation>): void;
787
1547
  /**
788
1548
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1549
+ * @example
1550
+ * ```js
1551
+ * // Before running the sample:
1552
+ * // - Enable the API at:
1553
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1554
+ * // - Login into gcloud by running:
1555
+ * // ```sh
1556
+ * // $ gcloud auth application-default login
1557
+ * // ```
1558
+ * // - Install the npm module by running:
1559
+ * // ```sh
1560
+ * // $ npm install googleapis
1561
+ * // ```
1562
+ *
1563
+ * const {google} = require('googleapis');
1564
+ * const tpu = google.tpu('v1');
1565
+ *
1566
+ * async function main() {
1567
+ * const auth = new google.auth.GoogleAuth({
1568
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1569
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1570
+ * });
1571
+ *
1572
+ * // Acquire an auth client, and bind it to all future calls
1573
+ * const authClient = await auth.getClient();
1574
+ * google.options({auth: authClient});
1575
+ *
1576
+ * // Do the magic
1577
+ * const res = await tpu.projects.locations.operations.list({
1578
+ * // The standard list filter.
1579
+ * filter: 'placeholder-value',
1580
+ * // The name of the operation's parent resource.
1581
+ * name: 'projects/my-project/locations/my-location',
1582
+ * // The standard list page size.
1583
+ * pageSize: 'placeholder-value',
1584
+ * // The standard list page token.
1585
+ * pageToken: 'placeholder-value',
1586
+ * });
1587
+ * console.log(res.data);
1588
+ *
1589
+ * // Example response
1590
+ * // {
1591
+ * // "nextPageToken": "my_nextPageToken",
1592
+ * // "operations": []
1593
+ * // }
1594
+ * }
1595
+ *
1596
+ * main().catch(e => {
1597
+ * console.error(e);
1598
+ * throw e;
1599
+ * });
1600
+ *
1601
+ * ```
789
1602
  *
790
1603
  * @param params - Parameters for request
791
1604
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
792
1605
  * @param callback - Optional callback that handles the response.
793
1606
  * @returns A promise if used with async/await, or void if used with a callback.
794
1607
  */
795
- list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
796
- list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): GaxiosPromise<Schema$ListOperationsResponse>;
1608
+ list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1609
+ list(params?: Params$Resource$Projects$Locations$Operations$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
797
1610
  list(params: Params$Resource$Projects$Locations$Operations$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
798
1611
  list(params: Params$Resource$Projects$Locations$Operations$List, options: MethodOptions | BodyResponseCallback<Schema$ListOperationsResponse>, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
799
1612
  list(params: Params$Resource$Projects$Locations$Operations$List, callback: BodyResponseCallback<Schema$ListOperationsResponse>): void;
@@ -840,28 +1653,131 @@ export declare namespace tpu_v1 {
840
1653
  constructor(context: APIRequestContext);
841
1654
  /**
842
1655
  * Gets TensorFlow Version.
1656
+ * @example
1657
+ * ```js
1658
+ * // Before running the sample:
1659
+ * // - Enable the API at:
1660
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1661
+ * // - Login into gcloud by running:
1662
+ * // ```sh
1663
+ * // $ gcloud auth application-default login
1664
+ * // ```
1665
+ * // - Install the npm module by running:
1666
+ * // ```sh
1667
+ * // $ npm install googleapis
1668
+ * // ```
1669
+ *
1670
+ * const {google} = require('googleapis');
1671
+ * const tpu = google.tpu('v1');
1672
+ *
1673
+ * async function main() {
1674
+ * const auth = new google.auth.GoogleAuth({
1675
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1676
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1677
+ * });
1678
+ *
1679
+ * // Acquire an auth client, and bind it to all future calls
1680
+ * const authClient = await auth.getClient();
1681
+ * google.options({auth: authClient});
1682
+ *
1683
+ * // Do the magic
1684
+ * const res = await tpu.projects.locations.tensorflowVersions.get({
1685
+ * // Required. The resource name.
1686
+ * name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
1687
+ * });
1688
+ * console.log(res.data);
1689
+ *
1690
+ * // Example response
1691
+ * // {
1692
+ * // "name": "my_name",
1693
+ * // "version": "my_version"
1694
+ * // }
1695
+ * }
1696
+ *
1697
+ * main().catch(e => {
1698
+ * console.error(e);
1699
+ * throw e;
1700
+ * });
1701
+ *
1702
+ * ```
843
1703
  *
844
1704
  * @param params - Parameters for request
845
1705
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
846
1706
  * @param callback - Optional callback that handles the response.
847
1707
  * @returns A promise if used with async/await, or void if used with a callback.
848
1708
  */
849
- get(params: Params$Resource$Projects$Locations$Tensorflowversions$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
850
- get(params?: Params$Resource$Projects$Locations$Tensorflowversions$Get, options?: MethodOptions): GaxiosPromise<Schema$TensorFlowVersion>;
1709
+ get(params: Params$Resource$Projects$Locations$Tensorflowversions$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1710
+ get(params?: Params$Resource$Projects$Locations$Tensorflowversions$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$TensorFlowVersion>>;
851
1711
  get(params: Params$Resource$Projects$Locations$Tensorflowversions$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
852
1712
  get(params: Params$Resource$Projects$Locations$Tensorflowversions$Get, options: MethodOptions | BodyResponseCallback<Schema$TensorFlowVersion>, callback: BodyResponseCallback<Schema$TensorFlowVersion>): void;
853
1713
  get(params: Params$Resource$Projects$Locations$Tensorflowversions$Get, callback: BodyResponseCallback<Schema$TensorFlowVersion>): void;
854
1714
  get(callback: BodyResponseCallback<Schema$TensorFlowVersion>): void;
855
1715
  /**
856
1716
  * List TensorFlow versions supported by this API.
1717
+ * @example
1718
+ * ```js
1719
+ * // Before running the sample:
1720
+ * // - Enable the API at:
1721
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1722
+ * // - Login into gcloud by running:
1723
+ * // ```sh
1724
+ * // $ gcloud auth application-default login
1725
+ * // ```
1726
+ * // - Install the npm module by running:
1727
+ * // ```sh
1728
+ * // $ npm install googleapis
1729
+ * // ```
1730
+ *
1731
+ * const {google} = require('googleapis');
1732
+ * const tpu = google.tpu('v1');
1733
+ *
1734
+ * async function main() {
1735
+ * const auth = new google.auth.GoogleAuth({
1736
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1737
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1738
+ * });
1739
+ *
1740
+ * // Acquire an auth client, and bind it to all future calls
1741
+ * const authClient = await auth.getClient();
1742
+ * google.options({auth: authClient});
1743
+ *
1744
+ * // Do the magic
1745
+ * const res = await tpu.projects.locations.tensorflowVersions.list({
1746
+ * // List filter.
1747
+ * filter: 'placeholder-value',
1748
+ * // Sort results.
1749
+ * orderBy: 'placeholder-value',
1750
+ * // The maximum number of items to return.
1751
+ * pageSize: 'placeholder-value',
1752
+ * // The next_page_token value returned from a previous List request, if any.
1753
+ * pageToken: 'placeholder-value',
1754
+ * // Required. The parent resource name.
1755
+ * parent: 'projects/my-project/locations/my-location',
1756
+ * });
1757
+ * console.log(res.data);
1758
+ *
1759
+ * // Example response
1760
+ * // {
1761
+ * // "nextPageToken": "my_nextPageToken",
1762
+ * // "tensorflowVersions": [],
1763
+ * // "unreachable": []
1764
+ * // }
1765
+ * }
1766
+ *
1767
+ * main().catch(e => {
1768
+ * console.error(e);
1769
+ * throw e;
1770
+ * });
1771
+ *
1772
+ * ```
857
1773
  *
858
1774
  * @param params - Parameters for request
859
1775
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
860
1776
  * @param callback - Optional callback that handles the response.
861
1777
  * @returns A promise if used with async/await, or void if used with a callback.
862
1778
  */
863
- list(params: Params$Resource$Projects$Locations$Tensorflowversions$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
864
- list(params?: Params$Resource$Projects$Locations$Tensorflowversions$List, options?: MethodOptions): GaxiosPromise<Schema$ListTensorFlowVersionsResponse>;
1779
+ list(params: Params$Resource$Projects$Locations$Tensorflowversions$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
1780
+ list(params?: Params$Resource$Projects$Locations$Tensorflowversions$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListTensorFlowVersionsResponse>>;
865
1781
  list(params: Params$Resource$Projects$Locations$Tensorflowversions$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
866
1782
  list(params: Params$Resource$Projects$Locations$Tensorflowversions$List, options: MethodOptions | BodyResponseCallback<Schema$ListTensorFlowVersionsResponse>, callback: BodyResponseCallback<Schema$ListTensorFlowVersionsResponse>): void;
867
1783
  list(params: Params$Resource$Projects$Locations$Tensorflowversions$List, callback: BodyResponseCallback<Schema$ListTensorFlowVersionsResponse>): void;