@googleapis/tpu 6.0.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -452,6 +452,56 @@ export declare namespace tpu_v1alpha1 {
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('v1alpha1');
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`.
@@ -466,6 +516,61 @@ export declare namespace tpu_v1alpha1 {
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('v1alpha1');
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`.
@@ -512,6 +617,53 @@ export declare namespace tpu_v1alpha1 {
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('v1alpha1');
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`.
@@ -526,6 +678,62 @@ export declare namespace tpu_v1alpha1 {
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('v1alpha1');
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`.
@@ -572,6 +780,86 @@ export declare namespace tpu_v1alpha1 {
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('v1alpha1');
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
+ * // Idempotent request UUID.
817
+ * requestId: 'placeholder-value',
818
+ *
819
+ * // Request body metadata
820
+ * requestBody: {
821
+ * // request body parameters
822
+ * // {
823
+ * // "acceleratorType": "my_acceleratorType",
824
+ * // "apiVersion": "my_apiVersion",
825
+ * // "cidrBlock": "my_cidrBlock",
826
+ * // "createTime": "my_createTime",
827
+ * // "description": "my_description",
828
+ * // "health": "my_health",
829
+ * // "healthDescription": "my_healthDescription",
830
+ * // "ipAddress": "my_ipAddress",
831
+ * // "labels": {},
832
+ * // "name": "my_name",
833
+ * // "network": "my_network",
834
+ * // "networkEndpoints": [],
835
+ * // "port": "my_port",
836
+ * // "schedulingConfig": {},
837
+ * // "serviceAccount": "my_serviceAccount",
838
+ * // "state": "my_state",
839
+ * // "symptoms": [],
840
+ * // "tensorflowVersion": "my_tensorflowVersion",
841
+ * // "useServiceNetworking": false
842
+ * // }
843
+ * },
844
+ * });
845
+ * console.log(res.data);
846
+ *
847
+ * // Example response
848
+ * // {
849
+ * // "done": false,
850
+ * // "error": {},
851
+ * // "metadata": {},
852
+ * // "name": "my_name",
853
+ * // "response": {}
854
+ * // }
855
+ * }
856
+ *
857
+ * main().catch(e => {
858
+ * console.error(e);
859
+ * throw e;
860
+ * });
861
+ *
862
+ * ```
575
863
  *
576
864
  * @param params - Parameters for request
577
865
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -586,6 +874,58 @@ export declare namespace tpu_v1alpha1 {
586
874
  create(callback: BodyResponseCallback<Schema$Operation>): void;
587
875
  /**
588
876
  * Deletes a node.
877
+ * @example
878
+ * ```js
879
+ * // Before running the sample:
880
+ * // - Enable the API at:
881
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
882
+ * // - Login into gcloud by running:
883
+ * // ```sh
884
+ * // $ gcloud auth application-default login
885
+ * // ```
886
+ * // - Install the npm module by running:
887
+ * // ```sh
888
+ * // $ npm install googleapis
889
+ * // ```
890
+ *
891
+ * const {google} = require('googleapis');
892
+ * const tpu = google.tpu('v1alpha1');
893
+ *
894
+ * async function main() {
895
+ * const auth = new google.auth.GoogleAuth({
896
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
897
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
898
+ * });
899
+ *
900
+ * // Acquire an auth client, and bind it to all future calls
901
+ * const authClient = await auth.getClient();
902
+ * google.options({auth: authClient});
903
+ *
904
+ * // Do the magic
905
+ * const res = await tpu.projects.locations.nodes.delete({
906
+ * // Required. The resource name.
907
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
908
+ * // Idempotent request UUID.
909
+ * requestId: 'placeholder-value',
910
+ * });
911
+ * console.log(res.data);
912
+ *
913
+ * // Example response
914
+ * // {
915
+ * // "done": false,
916
+ * // "error": {},
917
+ * // "metadata": {},
918
+ * // "name": "my_name",
919
+ * // "response": {}
920
+ * // }
921
+ * }
922
+ *
923
+ * main().catch(e => {
924
+ * console.error(e);
925
+ * throw e;
926
+ * });
927
+ *
928
+ * ```
589
929
  *
590
930
  * @param params - Parameters for request
591
931
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -600,6 +940,70 @@ export declare namespace tpu_v1alpha1 {
600
940
  delete(callback: BodyResponseCallback<Schema$Operation>): void;
601
941
  /**
602
942
  * Gets the details of a node.
943
+ * @example
944
+ * ```js
945
+ * // Before running the sample:
946
+ * // - Enable the API at:
947
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
948
+ * // - Login into gcloud by running:
949
+ * // ```sh
950
+ * // $ gcloud auth application-default login
951
+ * // ```
952
+ * // - Install the npm module by running:
953
+ * // ```sh
954
+ * // $ npm install googleapis
955
+ * // ```
956
+ *
957
+ * const {google} = require('googleapis');
958
+ * const tpu = google.tpu('v1alpha1');
959
+ *
960
+ * async function main() {
961
+ * const auth = new google.auth.GoogleAuth({
962
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
963
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
964
+ * });
965
+ *
966
+ * // Acquire an auth client, and bind it to all future calls
967
+ * const authClient = await auth.getClient();
968
+ * google.options({auth: authClient});
969
+ *
970
+ * // Do the magic
971
+ * const res = await tpu.projects.locations.nodes.get({
972
+ * // Required. The resource name.
973
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
974
+ * });
975
+ * console.log(res.data);
976
+ *
977
+ * // Example response
978
+ * // {
979
+ * // "acceleratorType": "my_acceleratorType",
980
+ * // "apiVersion": "my_apiVersion",
981
+ * // "cidrBlock": "my_cidrBlock",
982
+ * // "createTime": "my_createTime",
983
+ * // "description": "my_description",
984
+ * // "health": "my_health",
985
+ * // "healthDescription": "my_healthDescription",
986
+ * // "ipAddress": "my_ipAddress",
987
+ * // "labels": {},
988
+ * // "name": "my_name",
989
+ * // "network": "my_network",
990
+ * // "networkEndpoints": [],
991
+ * // "port": "my_port",
992
+ * // "schedulingConfig": {},
993
+ * // "serviceAccount": "my_serviceAccount",
994
+ * // "state": "my_state",
995
+ * // "symptoms": [],
996
+ * // "tensorflowVersion": "my_tensorflowVersion",
997
+ * // "useServiceNetworking": false
998
+ * // }
999
+ * }
1000
+ *
1001
+ * main().catch(e => {
1002
+ * console.error(e);
1003
+ * throw e;
1004
+ * });
1005
+ *
1006
+ * ```
603
1007
  *
604
1008
  * @param params - Parameters for request
605
1009
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -614,6 +1018,58 @@ export declare namespace tpu_v1alpha1 {
614
1018
  get(callback: BodyResponseCallback<Schema$Node>): void;
615
1019
  /**
616
1020
  * Lists nodes.
1021
+ * @example
1022
+ * ```js
1023
+ * // Before running the sample:
1024
+ * // - Enable the API at:
1025
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1026
+ * // - Login into gcloud by running:
1027
+ * // ```sh
1028
+ * // $ gcloud auth application-default login
1029
+ * // ```
1030
+ * // - Install the npm module by running:
1031
+ * // ```sh
1032
+ * // $ npm install googleapis
1033
+ * // ```
1034
+ *
1035
+ * const {google} = require('googleapis');
1036
+ * const tpu = google.tpu('v1alpha1');
1037
+ *
1038
+ * async function main() {
1039
+ * const auth = new google.auth.GoogleAuth({
1040
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1041
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1042
+ * });
1043
+ *
1044
+ * // Acquire an auth client, and bind it to all future calls
1045
+ * const authClient = await auth.getClient();
1046
+ * google.options({auth: authClient});
1047
+ *
1048
+ * // Do the magic
1049
+ * const res = await tpu.projects.locations.nodes.list({
1050
+ * // The maximum number of items to return.
1051
+ * pageSize: 'placeholder-value',
1052
+ * // The next_page_token value returned from a previous List request, if any.
1053
+ * pageToken: 'placeholder-value',
1054
+ * // Required. The parent resource name.
1055
+ * parent: 'projects/my-project/locations/my-location',
1056
+ * });
1057
+ * console.log(res.data);
1058
+ *
1059
+ * // Example response
1060
+ * // {
1061
+ * // "nextPageToken": "my_nextPageToken",
1062
+ * // "nodes": [],
1063
+ * // "unreachable": []
1064
+ * // }
1065
+ * }
1066
+ *
1067
+ * main().catch(e => {
1068
+ * console.error(e);
1069
+ * throw e;
1070
+ * });
1071
+ *
1072
+ * ```
617
1073
  *
618
1074
  * @param params - Parameters for request
619
1075
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -628,6 +1084,64 @@ export declare namespace tpu_v1alpha1 {
628
1084
  list(callback: BodyResponseCallback<Schema$ListNodesResponse>): void;
629
1085
  /**
630
1086
  * Reimages a node's OS.
1087
+ * @example
1088
+ * ```js
1089
+ * // Before running the sample:
1090
+ * // - Enable the API at:
1091
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1092
+ * // - Login into gcloud by running:
1093
+ * // ```sh
1094
+ * // $ gcloud auth application-default login
1095
+ * // ```
1096
+ * // - Install the npm module by running:
1097
+ * // ```sh
1098
+ * // $ npm install googleapis
1099
+ * // ```
1100
+ *
1101
+ * const {google} = require('googleapis');
1102
+ * const tpu = google.tpu('v1alpha1');
1103
+ *
1104
+ * async function main() {
1105
+ * const auth = new google.auth.GoogleAuth({
1106
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1107
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1108
+ * });
1109
+ *
1110
+ * // Acquire an auth client, and bind it to all future calls
1111
+ * const authClient = await auth.getClient();
1112
+ * google.options({auth: authClient});
1113
+ *
1114
+ * // Do the magic
1115
+ * const res = await tpu.projects.locations.nodes.reimage({
1116
+ * // The resource name.
1117
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1118
+ *
1119
+ * // Request body metadata
1120
+ * requestBody: {
1121
+ * // request body parameters
1122
+ * // {
1123
+ * // "tensorflowVersion": "my_tensorflowVersion"
1124
+ * // }
1125
+ * },
1126
+ * });
1127
+ * console.log(res.data);
1128
+ *
1129
+ * // Example response
1130
+ * // {
1131
+ * // "done": false,
1132
+ * // "error": {},
1133
+ * // "metadata": {},
1134
+ * // "name": "my_name",
1135
+ * // "response": {}
1136
+ * // }
1137
+ * }
1138
+ *
1139
+ * main().catch(e => {
1140
+ * console.error(e);
1141
+ * throw e;
1142
+ * });
1143
+ *
1144
+ * ```
631
1145
  *
632
1146
  * @param params - Parameters for request
633
1147
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -642,6 +1156,62 @@ export declare namespace tpu_v1alpha1 {
642
1156
  reimage(callback: BodyResponseCallback<Schema$Operation>): void;
643
1157
  /**
644
1158
  * Starts a node.
1159
+ * @example
1160
+ * ```js
1161
+ * // Before running the sample:
1162
+ * // - Enable the API at:
1163
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1164
+ * // - Login into gcloud by running:
1165
+ * // ```sh
1166
+ * // $ gcloud auth application-default login
1167
+ * // ```
1168
+ * // - Install the npm module by running:
1169
+ * // ```sh
1170
+ * // $ npm install googleapis
1171
+ * // ```
1172
+ *
1173
+ * const {google} = require('googleapis');
1174
+ * const tpu = google.tpu('v1alpha1');
1175
+ *
1176
+ * async function main() {
1177
+ * const auth = new google.auth.GoogleAuth({
1178
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1179
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1180
+ * });
1181
+ *
1182
+ * // Acquire an auth client, and bind it to all future calls
1183
+ * const authClient = await auth.getClient();
1184
+ * google.options({auth: authClient});
1185
+ *
1186
+ * // Do the magic
1187
+ * const res = await tpu.projects.locations.nodes.start({
1188
+ * // The resource name.
1189
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1190
+ *
1191
+ * // Request body metadata
1192
+ * requestBody: {
1193
+ * // request body parameters
1194
+ * // {}
1195
+ * },
1196
+ * });
1197
+ * console.log(res.data);
1198
+ *
1199
+ * // Example response
1200
+ * // {
1201
+ * // "done": false,
1202
+ * // "error": {},
1203
+ * // "metadata": {},
1204
+ * // "name": "my_name",
1205
+ * // "response": {}
1206
+ * // }
1207
+ * }
1208
+ *
1209
+ * main().catch(e => {
1210
+ * console.error(e);
1211
+ * throw e;
1212
+ * });
1213
+ *
1214
+ * ```
645
1215
  *
646
1216
  * @param params - Parameters for request
647
1217
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -656,6 +1226,62 @@ export declare namespace tpu_v1alpha1 {
656
1226
  start(callback: BodyResponseCallback<Schema$Operation>): void;
657
1227
  /**
658
1228
  * Stops a node. This operation is only available with single TPU nodes.
1229
+ * @example
1230
+ * ```js
1231
+ * // Before running the sample:
1232
+ * // - Enable the API at:
1233
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1234
+ * // - Login into gcloud by running:
1235
+ * // ```sh
1236
+ * // $ gcloud auth application-default login
1237
+ * // ```
1238
+ * // - Install the npm module by running:
1239
+ * // ```sh
1240
+ * // $ npm install googleapis
1241
+ * // ```
1242
+ *
1243
+ * const {google} = require('googleapis');
1244
+ * const tpu = google.tpu('v1alpha1');
1245
+ *
1246
+ * async function main() {
1247
+ * const auth = new google.auth.GoogleAuth({
1248
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1249
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1250
+ * });
1251
+ *
1252
+ * // Acquire an auth client, and bind it to all future calls
1253
+ * const authClient = await auth.getClient();
1254
+ * google.options({auth: authClient});
1255
+ *
1256
+ * // Do the magic
1257
+ * const res = await tpu.projects.locations.nodes.stop({
1258
+ * // The resource name.
1259
+ * name: 'projects/my-project/locations/my-location/nodes/my-node',
1260
+ *
1261
+ * // Request body metadata
1262
+ * requestBody: {
1263
+ * // request body parameters
1264
+ * // {}
1265
+ * },
1266
+ * });
1267
+ * console.log(res.data);
1268
+ *
1269
+ * // Example response
1270
+ * // {
1271
+ * // "done": false,
1272
+ * // "error": {},
1273
+ * // "metadata": {},
1274
+ * // "name": "my_name",
1275
+ * // "response": {}
1276
+ * // }
1277
+ * }
1278
+ *
1279
+ * main().catch(e => {
1280
+ * console.error(e);
1281
+ * throw e;
1282
+ * });
1283
+ *
1284
+ * ```
659
1285
  *
660
1286
  * @param params - Parameters for request
661
1287
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -752,6 +1378,50 @@ export declare namespace tpu_v1alpha1 {
752
1378
  constructor(context: APIRequestContext);
753
1379
  /**
754
1380
  * 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`.
1381
+ * @example
1382
+ * ```js
1383
+ * // Before running the sample:
1384
+ * // - Enable the API at:
1385
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1386
+ * // - Login into gcloud by running:
1387
+ * // ```sh
1388
+ * // $ gcloud auth application-default login
1389
+ * // ```
1390
+ * // - Install the npm module by running:
1391
+ * // ```sh
1392
+ * // $ npm install googleapis
1393
+ * // ```
1394
+ *
1395
+ * const {google} = require('googleapis');
1396
+ * const tpu = google.tpu('v1alpha1');
1397
+ *
1398
+ * async function main() {
1399
+ * const auth = new google.auth.GoogleAuth({
1400
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1401
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1402
+ * });
1403
+ *
1404
+ * // Acquire an auth client, and bind it to all future calls
1405
+ * const authClient = await auth.getClient();
1406
+ * google.options({auth: authClient});
1407
+ *
1408
+ * // Do the magic
1409
+ * const res = await tpu.projects.locations.operations.cancel({
1410
+ * // The name of the operation resource to be cancelled.
1411
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1412
+ * });
1413
+ * console.log(res.data);
1414
+ *
1415
+ * // Example response
1416
+ * // {}
1417
+ * }
1418
+ *
1419
+ * main().catch(e => {
1420
+ * console.error(e);
1421
+ * throw e;
1422
+ * });
1423
+ *
1424
+ * ```
755
1425
  *
756
1426
  * @param params - Parameters for request
757
1427
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -766,6 +1436,50 @@ export declare namespace tpu_v1alpha1 {
766
1436
  cancel(callback: BodyResponseCallback<Schema$Empty>): void;
767
1437
  /**
768
1438
  * 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`.
1439
+ * @example
1440
+ * ```js
1441
+ * // Before running the sample:
1442
+ * // - Enable the API at:
1443
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1444
+ * // - Login into gcloud by running:
1445
+ * // ```sh
1446
+ * // $ gcloud auth application-default login
1447
+ * // ```
1448
+ * // - Install the npm module by running:
1449
+ * // ```sh
1450
+ * // $ npm install googleapis
1451
+ * // ```
1452
+ *
1453
+ * const {google} = require('googleapis');
1454
+ * const tpu = google.tpu('v1alpha1');
1455
+ *
1456
+ * async function main() {
1457
+ * const auth = new google.auth.GoogleAuth({
1458
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1459
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1460
+ * });
1461
+ *
1462
+ * // Acquire an auth client, and bind it to all future calls
1463
+ * const authClient = await auth.getClient();
1464
+ * google.options({auth: authClient});
1465
+ *
1466
+ * // Do the magic
1467
+ * const res = await tpu.projects.locations.operations.delete({
1468
+ * // The name of the operation resource to be deleted.
1469
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1470
+ * });
1471
+ * console.log(res.data);
1472
+ *
1473
+ * // Example response
1474
+ * // {}
1475
+ * }
1476
+ *
1477
+ * main().catch(e => {
1478
+ * console.error(e);
1479
+ * throw e;
1480
+ * });
1481
+ *
1482
+ * ```
769
1483
  *
770
1484
  * @param params - Parameters for request
771
1485
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -780,6 +1494,56 @@ export declare namespace tpu_v1alpha1 {
780
1494
  delete(callback: BodyResponseCallback<Schema$Empty>): void;
781
1495
  /**
782
1496
  * 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.
1497
+ * @example
1498
+ * ```js
1499
+ * // Before running the sample:
1500
+ * // - Enable the API at:
1501
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1502
+ * // - Login into gcloud by running:
1503
+ * // ```sh
1504
+ * // $ gcloud auth application-default login
1505
+ * // ```
1506
+ * // - Install the npm module by running:
1507
+ * // ```sh
1508
+ * // $ npm install googleapis
1509
+ * // ```
1510
+ *
1511
+ * const {google} = require('googleapis');
1512
+ * const tpu = google.tpu('v1alpha1');
1513
+ *
1514
+ * async function main() {
1515
+ * const auth = new google.auth.GoogleAuth({
1516
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1517
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1518
+ * });
1519
+ *
1520
+ * // Acquire an auth client, and bind it to all future calls
1521
+ * const authClient = await auth.getClient();
1522
+ * google.options({auth: authClient});
1523
+ *
1524
+ * // Do the magic
1525
+ * const res = await tpu.projects.locations.operations.get({
1526
+ * // The name of the operation resource.
1527
+ * name: 'projects/my-project/locations/my-location/operations/my-operation',
1528
+ * });
1529
+ * console.log(res.data);
1530
+ *
1531
+ * // Example response
1532
+ * // {
1533
+ * // "done": false,
1534
+ * // "error": {},
1535
+ * // "metadata": {},
1536
+ * // "name": "my_name",
1537
+ * // "response": {}
1538
+ * // }
1539
+ * }
1540
+ *
1541
+ * main().catch(e => {
1542
+ * console.error(e);
1543
+ * throw e;
1544
+ * });
1545
+ *
1546
+ * ```
783
1547
  *
784
1548
  * @param params - Parameters for request
785
1549
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -794,6 +1558,59 @@ export declare namespace tpu_v1alpha1 {
794
1558
  get(callback: BodyResponseCallback<Schema$Operation>): void;
795
1559
  /**
796
1560
  * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
1561
+ * @example
1562
+ * ```js
1563
+ * // Before running the sample:
1564
+ * // - Enable the API at:
1565
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1566
+ * // - Login into gcloud by running:
1567
+ * // ```sh
1568
+ * // $ gcloud auth application-default login
1569
+ * // ```
1570
+ * // - Install the npm module by running:
1571
+ * // ```sh
1572
+ * // $ npm install googleapis
1573
+ * // ```
1574
+ *
1575
+ * const {google} = require('googleapis');
1576
+ * const tpu = google.tpu('v1alpha1');
1577
+ *
1578
+ * async function main() {
1579
+ * const auth = new google.auth.GoogleAuth({
1580
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1581
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1582
+ * });
1583
+ *
1584
+ * // Acquire an auth client, and bind it to all future calls
1585
+ * const authClient = await auth.getClient();
1586
+ * google.options({auth: authClient});
1587
+ *
1588
+ * // Do the magic
1589
+ * const res = await tpu.projects.locations.operations.list({
1590
+ * // The standard list filter.
1591
+ * filter: 'placeholder-value',
1592
+ * // The name of the operation's parent resource.
1593
+ * name: 'projects/my-project/locations/my-location',
1594
+ * // The standard list page size.
1595
+ * pageSize: 'placeholder-value',
1596
+ * // The standard list page token.
1597
+ * pageToken: 'placeholder-value',
1598
+ * });
1599
+ * console.log(res.data);
1600
+ *
1601
+ * // Example response
1602
+ * // {
1603
+ * // "nextPageToken": "my_nextPageToken",
1604
+ * // "operations": []
1605
+ * // }
1606
+ * }
1607
+ *
1608
+ * main().catch(e => {
1609
+ * console.error(e);
1610
+ * throw e;
1611
+ * });
1612
+ *
1613
+ * ```
797
1614
  *
798
1615
  * @param params - Parameters for request
799
1616
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -848,6 +1665,53 @@ export declare namespace tpu_v1alpha1 {
848
1665
  constructor(context: APIRequestContext);
849
1666
  /**
850
1667
  * Gets TensorFlow Version.
1668
+ * @example
1669
+ * ```js
1670
+ * // Before running the sample:
1671
+ * // - Enable the API at:
1672
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1673
+ * // - Login into gcloud by running:
1674
+ * // ```sh
1675
+ * // $ gcloud auth application-default login
1676
+ * // ```
1677
+ * // - Install the npm module by running:
1678
+ * // ```sh
1679
+ * // $ npm install googleapis
1680
+ * // ```
1681
+ *
1682
+ * const {google} = require('googleapis');
1683
+ * const tpu = google.tpu('v1alpha1');
1684
+ *
1685
+ * async function main() {
1686
+ * const auth = new google.auth.GoogleAuth({
1687
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1688
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1689
+ * });
1690
+ *
1691
+ * // Acquire an auth client, and bind it to all future calls
1692
+ * const authClient = await auth.getClient();
1693
+ * google.options({auth: authClient});
1694
+ *
1695
+ * // Do the magic
1696
+ * const res = await tpu.projects.locations.tensorflowVersions.get({
1697
+ * // Required. The resource name.
1698
+ * name: 'projects/my-project/locations/my-location/tensorflowVersions/my-tensorflowVersion',
1699
+ * });
1700
+ * console.log(res.data);
1701
+ *
1702
+ * // Example response
1703
+ * // {
1704
+ * // "name": "my_name",
1705
+ * // "version": "my_version"
1706
+ * // }
1707
+ * }
1708
+ *
1709
+ * main().catch(e => {
1710
+ * console.error(e);
1711
+ * throw e;
1712
+ * });
1713
+ *
1714
+ * ```
851
1715
  *
852
1716
  * @param params - Parameters for request
853
1717
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -862,6 +1726,62 @@ export declare namespace tpu_v1alpha1 {
862
1726
  get(callback: BodyResponseCallback<Schema$TensorFlowVersion>): void;
863
1727
  /**
864
1728
  * Lists TensorFlow versions supported by this API.
1729
+ * @example
1730
+ * ```js
1731
+ * // Before running the sample:
1732
+ * // - Enable the API at:
1733
+ * // https://console.developers.google.com/apis/api/tpu.googleapis.com
1734
+ * // - Login into gcloud by running:
1735
+ * // ```sh
1736
+ * // $ gcloud auth application-default login
1737
+ * // ```
1738
+ * // - Install the npm module by running:
1739
+ * // ```sh
1740
+ * // $ npm install googleapis
1741
+ * // ```
1742
+ *
1743
+ * const {google} = require('googleapis');
1744
+ * const tpu = google.tpu('v1alpha1');
1745
+ *
1746
+ * async function main() {
1747
+ * const auth = new google.auth.GoogleAuth({
1748
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1749
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1750
+ * });
1751
+ *
1752
+ * // Acquire an auth client, and bind it to all future calls
1753
+ * const authClient = await auth.getClient();
1754
+ * google.options({auth: authClient});
1755
+ *
1756
+ * // Do the magic
1757
+ * const res = await tpu.projects.locations.tensorflowVersions.list({
1758
+ * // List filter.
1759
+ * filter: 'placeholder-value',
1760
+ * // Sort results.
1761
+ * orderBy: 'placeholder-value',
1762
+ * // The maximum number of items to return.
1763
+ * pageSize: 'placeholder-value',
1764
+ * // The next_page_token value returned from a previous List request, if any.
1765
+ * pageToken: 'placeholder-value',
1766
+ * // Required. The parent resource name.
1767
+ * parent: 'projects/my-project/locations/my-location',
1768
+ * });
1769
+ * console.log(res.data);
1770
+ *
1771
+ * // Example response
1772
+ * // {
1773
+ * // "nextPageToken": "my_nextPageToken",
1774
+ * // "tensorflowVersions": [],
1775
+ * // "unreachable": []
1776
+ * // }
1777
+ * }
1778
+ *
1779
+ * main().catch(e => {
1780
+ * console.error(e);
1781
+ * throw e;
1782
+ * });
1783
+ *
1784
+ * ```
865
1785
  *
866
1786
  * @param params - Parameters for request
867
1787
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.