1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
// This file is @generated by prost-build.
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// Output only. The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Output only. Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Output only. Identifies whether the user has requested cancellation
/// of the operation. Operations that have been cancelled successfully
/// have
/// \[google.longrunning.Operation.error\]\[google.longrunning.Operation.error\]
/// value with a \[google.rpc.Status.code\]\[google.rpc.Status.code\] of `1`,
/// corresponding to `Code.CANCELLED`.
#[prost(bool, tag = "5")]
pub requested_cancellation: bool,
/// Output only. API version used to start the operation.
#[prost(string, tag = "6")]
pub api_version: ::prost::alloc::string::String,
/// Output only. Progress of the operation.
#[prost(message, optional, tag = "7")]
pub progress: ::core::option::Option<OperationProgress>,
}
/// Message describing the progress of a cluster mutation long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationProgress {
/// Output only. Steps and status of the operation.
#[prost(message, repeated, tag = "1")]
pub steps: ::prost::alloc::vec::Vec<OperationStep>,
}
/// Message describing the status of a single step in a cluster mutation
/// long-running operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationStep {
/// Output only. State of the operation step.
#[prost(enumeration = "operation_step::State", tag = "1")]
pub state: i32,
/// Step of the operation.
#[prost(
oneof = "operation_step::Type",
tags = "2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26"
)]
pub r#type: ::core::option::Option<operation_step::Type>,
}
/// Nested message and enum types in `OperationStep`.
pub mod operation_step {
/// State of the operation step.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified state.
Unspecified = 0,
/// Initial state before step execution starts.
Waiting = 1,
/// Step execution is running in progress.
InProgress = 2,
/// Step execution is completed.
Done = 3,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Waiting => "WAITING",
Self::InProgress => "IN_PROGRESS",
Self::Done => "DONE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"WAITING" => Some(Self::Waiting),
"IN_PROGRESS" => Some(Self::InProgress),
"DONE" => Some(Self::Done),
_ => None,
}
}
}
/// Step of the operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Type {
/// Output only. If set, indicates that new network creation is part of the
/// operation.
#[prost(message, tag = "2")]
CreateNetwork(super::CreateNetwork),
/// Output only. If set, indicates that new private service access creation
/// is part of the operation.
#[prost(message, tag = "3")]
CreatePrivateServiceAccess(super::CreatePrivateServiceAccess),
/// Output only. If set, indicates that new Filestore instance creation is
/// part of the operation.
#[prost(message, tag = "4")]
CreateFilestoreInstance(super::CreateFilestoreInstance),
/// Output only. If set, indicates that new Cloud Storage bucket creation is
/// part of the operation.
#[prost(message, tag = "5")]
CreateStorageBucket(super::CreateStorageBucket),
/// Output only. If set, indicates that new Lustre instance creation is part
/// of the operation.
#[prost(message, tag = "6")]
CreateLustreInstance(super::CreateLustreInstance),
/// Output only. If set, indicates that orchestrator creation is part of the
/// operation.
#[prost(message, tag = "8")]
CreateOrchestrator(super::CreateOrchestrator),
/// Output only. If set, indicates that new nodeset creation is part of the
/// operation.
#[prost(message, tag = "9")]
CreateNodeset(super::CreateNodeset),
/// Output only. If set, indicates that new partition creation is part of the
/// operation.
#[prost(message, tag = "10")]
CreatePartition(super::CreatePartition),
/// Output only. If set, indicates that new login node creation is part of
/// the operation.
#[prost(message, tag = "11")]
CreateLoginNode(super::CreateLoginNode),
/// Output only. If set, indicates that cluster health check is part of the
/// operation.
#[prost(message, tag = "12")]
CheckClusterHealth(super::CheckClusterHealth),
/// Output only. If set, indicates that an orchestrator update is part of the
/// operation.
#[prost(message, tag = "13")]
UpdateOrchestrator(super::UpdateOrchestrator),
/// Output only. If set, indicates that nodeset update is part of the
/// operation.
#[prost(message, tag = "14")]
UpdateNodeset(super::UpdateNodeset),
/// Output only. If set, indicates that partition update is part of the
/// operation.
#[prost(message, tag = "15")]
UpdatePartition(super::UpdatePartition),
/// Output only. If set, indicates that login node update is part of the
/// operation.
#[prost(message, tag = "16")]
UpdateLoginNode(super::UpdateLoginNode),
/// Output only. If set, indicates that orchestrator deletion is part of the
/// operation.
#[prost(message, tag = "18")]
DeleteOrchestrator(super::DeleteOrchestrator),
/// Output only. If set, indicates that nodeset deletion is part of the
/// operation.
#[prost(message, tag = "19")]
DeleteNodeset(super::DeleteNodeset),
/// Output only. If set, indicates that partition deletion is part of the
/// operation.
#[prost(message, tag = "20")]
DeletePartition(super::DeletePartition),
/// Output only. If set, indicates that login node deletion is part of the
/// operation.
#[prost(message, tag = "21")]
DeleteLoginNode(super::DeleteLoginNode),
/// Output only. If set, indicates that Filestore instance deletion is part
/// of the operation.
#[prost(message, tag = "22")]
DeleteFilestoreInstance(super::DeleteFilestoreInstance),
/// Output only. If set, indicates that Cloud Storage bucket deletion is part
/// of the operation.
#[prost(message, tag = "23")]
DeleteStorageBucket(super::DeleteStorageBucket),
/// Output only. If set, indicates that Lustre instance deletion is part of
/// the operation.
#[prost(message, tag = "24")]
DeleteLustreInstance(super::DeleteLustreInstance),
/// Output only. If set, indicates that private service access deletion is
/// part of the operation.
#[prost(message, tag = "25")]
DeletePrivateServiceAccess(super::DeletePrivateServiceAccess),
/// Output only. If set, indicates that network deletion is part of the
/// operation.
#[prost(message, tag = "26")]
DeleteNetwork(super::DeleteNetwork),
}
}
/// When set in OperationStep, indicates that a new network should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateNetwork {
/// Output only. Name of the network to create, in the format
/// `projects/{project}/global/networks/{network}`.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that a new private service access should
/// be created.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePrivateServiceAccess {}
/// When set in OperationStep, indicates that a new filestore instance should be
/// created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateFilestoreInstance {
/// Output only. Name of the Filestore instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub filestore: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that a new storage bucket should be
/// created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateStorageBucket {
/// Output only. Name of the bucket.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that a new lustre instance should be
/// created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateLustreInstance {
/// Output only. Name of the Managed Lustre instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub lustre: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that an orchestrator should be created.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateOrchestrator {}
/// When set in OperationStep, indicates that a nodeset should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateNodeset {
/// Output only. Name of the nodeset to create
#[prost(string, repeated, tag = "1")]
pub nodesets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a partition should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePartition {
/// Output only. Name of the partition to create
#[prost(string, repeated, tag = "1")]
pub partitions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a login node should be created.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateLoginNode {}
/// When set in OperationStep, indicates that cluster health check should be
/// performed.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CheckClusterHealth {}
/// When set in OperationStep, indicates that an orchestrator should be updated.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateOrchestrator {}
/// When set in OperationStep, indicates that a nodeset should be updated.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateNodeset {
/// Output only. Name of the nodeset to update
#[prost(string, repeated, tag = "1")]
pub nodesets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a partition should be updated.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdatePartition {
/// Output only. Name of the partition to update
#[prost(string, repeated, tag = "1")]
pub partitions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a login node should be updated.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateLoginNode {}
/// When set in OperationStep, indicates that an orchestrator should be deleted.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteOrchestrator {}
/// When set in OperationStep, indicates that a nodeset should be deleted.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteNodeset {
/// Output only. Name of the nodeset to delete
#[prost(string, repeated, tag = "1")]
pub nodesets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a partition should be deleted.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePartition {
/// Output only. Name of the partition to delete
#[prost(string, repeated, tag = "1")]
pub partitions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// When set in OperationStep, indicates that a login node should be deleted.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteLoginNode {}
/// When set in OperationStep, indicates that a Filestore instance should be
/// deleted.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteFilestoreInstance {
/// Output only. Name of the Filestore instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub filestore: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that Cloud Storage bucket should be
/// deleted.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteStorageBucket {
/// Output only. Name of the bucket.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates that a Lustre instance should be
/// deleted.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteLustreInstance {
/// Output only. Name of the Managed Lustre instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub lustre: ::prost::alloc::string::String,
}
/// When set in OperationStep, indicates private service access deletion
/// step.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePrivateServiceAccess {}
/// When set in OperationStep, indicates network deletion step with the
/// resource name.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteNetwork {
/// Output only. Name of the network to delete, in the format
/// `projects/{project}/global/networks/{network}`.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
}
/// A collection of virtual machines and connected resources forming a
/// high-performance computing cluster capable of running large-scale, tightly
/// coupled workloads. A cluster combines a set a compute resources that perform
/// computations, storage resources that contain inputs and store outputs, an
/// orchestrator that is responsible for assigning jobs to compute resources, and
/// network resources that connect everything together.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
/// Identifier. [Relative resource name](<https://google.aip.dev/122>) of the
/// cluster, in the format
/// `projects/{project}/locations/{location}/clusters/{cluster}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. User-provided description of the cluster.
#[prost(string, tag = "9")]
pub description: ::prost::alloc::string::String,
/// Optional.
/// [Labels](<https://cloud.google.com/compute/docs/labeling-resources>) applied
/// to the cluster. Labels can be used to organize clusters and to filter them
/// in queries.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Time that the cluster was originally created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Time that the cluster was most recently updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Indicates whether changes to the cluster are currently in
/// flight. If this is `true`, then the current state might not match the
/// cluster's intended state.
#[prost(bool, tag = "10")]
pub reconciling: bool,
/// Optional. Network resources available to the cluster. Must contain at most
/// one value. Keys specify the ID of the network resource by which it can be
/// referenced elsewhere, and must conform to
/// [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>) (lower-case,
/// alphanumeric, and at most 63 characters).
#[prost(map = "string, message", tag = "11")]
pub network_resources: ::std::collections::HashMap<
::prost::alloc::string::String,
NetworkResource,
>,
/// Optional. Storage resources available to the cluster. Keys specify the ID
/// of the storage resource by which it can be referenced elsewhere, and must
/// conform to [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>)
/// (lower-case, alphanumeric, and at most 63 characters).
#[prost(map = "string, message", tag = "12")]
pub storage_resources: ::std::collections::HashMap<
::prost::alloc::string::String,
StorageResource,
>,
/// Optional. Compute resources available to the cluster. Keys specify the ID
/// of the compute resource by which it can be referenced elsewhere, and must
/// conform to [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>)
/// (lower-case, alphanumeric, and at most 63 characters).
#[prost(map = "string, message", tag = "13")]
pub compute_resources: ::std::collections::HashMap<
::prost::alloc::string::String,
ComputeResource,
>,
/// Optional. Orchestrator that is responsible for scheduling and running jobs
/// on the cluster.
#[prost(message, optional, tag = "8")]
pub orchestrator: ::core::option::Option<Orchestrator>,
}
/// Request message for
/// \[ListClusters\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.ListClusters\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListClustersRequest {
/// Required. Parent location of the clusters to list, in the format
/// `projects/{project}/locations/{location}`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Maximum number of clusters to return. The service may return
/// fewer than this value.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A page token received from a previous `ListClusters` call.
/// Provide this to retrieve the subsequent page. When paginating, all other
/// parameters provided to `ListClusters` must match the call that provided the
/// page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. [Filter](<https://google.aip.dev/160>) to apply to the returned
/// results.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. How to order the resulting clusters. Must be one of the following
/// strings:
///
/// * `name`
/// * `name desc`
/// * `create_time`
/// * `create_time desc`
///
/// If not specified, clusters will be returned in an arbitrary order.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// \[ListClusters\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.ListClusters\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
/// Clusters in the specified location.
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<Cluster>,
/// A token that can be sent as `page_token` to retrieve the next page. If this
/// field is absent, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// \[GetCluster\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.GetCluster\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetClusterRequest {
/// Required. Name of the cluster to retrieve, in the format
/// `projects/{project}/locations/{location}/clusters/{cluster}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request message for
/// \[CreateCluster\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.CreateCluster\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
/// Required. Parent location in which the cluster should be created, in the
/// format `projects/{project}/locations/{location}`.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the cluster to create. Must conform to
/// [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>) (lower-case,
/// alphanumeric, and at most 63 characters).
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Required. Cluster to create.
#[prost(message, optional, tag = "3")]
pub cluster: ::core::option::Option<Cluster>,
/// Optional. A unique identifier for this request. A random UUID is
/// recommended. This request is idempotent if and only if `request_id` is
/// provided.
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// \[UpdateCluster\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.UpdateCluster\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
/// Required. Cluster to update.
#[prost(message, optional, tag = "2")]
pub cluster: ::core::option::Option<Cluster>,
/// Optional. Mask specifying which fields in the cluster to update. All paths
/// must be specified explicitly - wildcards are not supported. At least one
/// path must be provided.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. A unique identifier for this request. A random UUID is
/// recommended. This request is idempotent if and only if `request_id` is
/// provided.
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// \[DeleteCluster\]\[google.cloud.hypercomputecluster.v1.HypercomputeCluster.DeleteCluster\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteClusterRequest {
/// Required. Name of the cluster to delete, in the format
/// `projects/{project}/locations/{location}/clusters/{cluster}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. A unique identifier for this request. A random UUID is
/// recommended. This request is idempotent if and only if `request_id` is
/// provided.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
/// A resource representing a network that connects the various components of a
/// cluster together.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NetworkResource {
/// Immutable. Configuration for this network resource, which describes how it
/// should be created or imported. This field only controls how the network
/// resource is initially created or imported. Subsequent changes to the
/// network resource should be made via the resource's API and will not be
/// reflected in the configuration.
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<NetworkResourceConfig>,
/// Reference to the network resource in Google Cloud. Exactly one of these
/// fields will be populated based on the configured type of network resource.
#[prost(oneof = "network_resource::Reference", tags = "3")]
pub reference: ::core::option::Option<network_resource::Reference>,
}
/// Nested message and enum types in `NetworkResource`.
pub mod network_resource {
/// Reference to the network resource in Google Cloud. Exactly one of these
/// fields will be populated based on the configured type of network resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Reference {
/// Reference to a network in Google Compute Engine.
#[prost(message, tag = "3")]
Network(super::NetworkReference),
}
}
/// A reference to a [VPC network](<https://cloud.google.com/vpc/docs/vpc>) in
/// Google Compute Engine.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NetworkReference {
/// Output only. Name of the network, in the format
/// `projects/{project}/global/networks/{network}`.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
/// Output only. Name of the particular subnetwork being used by the cluster,
/// in the format
/// `projects/{project}/regions/{region}/subnetworks/{subnetwork}`.
#[prost(string, tag = "2")]
pub subnetwork: ::prost::alloc::string::String,
}
/// Describes how a network resource should be initialized. Each network resource
/// can either be imported from an existing Google Cloud resource or initialized
/// when the cluster is created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NetworkResourceConfig {
/// Particular type of configuration for this network resource.
#[prost(oneof = "network_resource_config::Config", tags = "3, 4")]
pub config: ::core::option::Option<network_resource_config::Config>,
}
/// Nested message and enum types in `NetworkResourceConfig`.
pub mod network_resource_config {
/// Particular type of configuration for this network resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Config {
/// Optional. Immutable. If set, indicates that a new network should be
/// created.
#[prost(message, tag = "3")]
NewNetwork(super::NewNetworkConfig),
/// Optional. Immutable. If set, indicates that an existing network should be
/// imported.
#[prost(message, tag = "4")]
ExistingNetwork(super::ExistingNetworkConfig),
}
}
/// When set in a
/// \[NetworkResourceConfig\]\[google.cloud.hypercomputecluster.v1.NetworkResourceConfig\],
/// indicates that a new network should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewNetworkConfig {
/// Required. Immutable. Name of the network to create, in the format
/// `projects/{project}/global/networks/{network}`.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
/// Optional. Immutable. Description of the network. Maximum of 2048
/// characters.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
}
/// When set in a
/// \[NetworkResourceConfig\]\[google.cloud.hypercomputecluster.v1.NetworkResourceConfig\],
/// indicates that an existing network should be imported.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExistingNetworkConfig {
/// Required. Immutable. Name of the network to import, in the format
/// `projects/{project}/global/networks/{network}`.
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
/// Required. Immutable. Particular subnetwork to use, in the format
/// `projects/{project}/regions/{region}/subnetworks/{subnetwork}`.
#[prost(string, tag = "2")]
pub subnetwork: ::prost::alloc::string::String,
}
/// A resource representing a form of persistent storage that is accessible to
/// compute resources in the cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageResource {
/// Required. Immutable. Configuration for this storage resource, which
/// describes how it should be created or imported. This field only controls
/// how the storage resource is initially created or imported. Subsequent
/// changes to the storage resource should be made via the resource's API and
/// will not be reflected in the configuration.
#[prost(message, optional, tag = "4")]
pub config: ::core::option::Option<StorageResourceConfig>,
/// Reference to the storage resource in Google Cloud. Exactly one of these
/// fields will be populated based on the configured type of storage resource.
#[prost(oneof = "storage_resource::Reference", tags = "1, 2, 3")]
pub reference: ::core::option::Option<storage_resource::Reference>,
}
/// Nested message and enum types in `StorageResource`.
pub mod storage_resource {
/// Reference to the storage resource in Google Cloud. Exactly one of these
/// fields will be populated based on the configured type of storage resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Reference {
/// Reference to a Filestore instance. Populated if and only if the storage
/// resource was configured to use Filestore.
#[prost(message, tag = "1")]
Filestore(super::FilestoreReference),
/// Reference to a Google Cloud Storage bucket. Populated if and only if the
/// storage resource was configured to use Google Cloud Storage.
#[prost(message, tag = "2")]
Bucket(super::BucketReference),
/// Reference to a Managed Lustre instance. Populated if and only if the
/// storage resource was configured to use Managed Lustre.
#[prost(message, tag = "3")]
Lustre(super::LustreReference),
}
}
/// A reference to a [Filestore](<https://cloud.google.com/filestore>) instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilestoreReference {
/// Output only. Name of the Filestore instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub filestore: ::prost::alloc::string::String,
}
/// A reference to a [Google Cloud Storage](<https://cloud.google.com/storage>)
/// bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BucketReference {
/// Output only. Name of the bucket.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
}
/// A reference to a [Managed
/// Lustre](<https://cloud.google.com/products/managed-lustre>) instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LustreReference {
/// Output only. Name of the Managed Lustre instance, in the format
/// `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub lustre: ::prost::alloc::string::String,
}
/// Describes how a storage resource should be initialized. Each storage resource
/// can either be imported from an existing Google Cloud resource or initialized
/// when the cluster is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageResourceConfig {
/// Particular type of configuration for this storage resource.
#[prost(oneof = "storage_resource_config::Config", tags = "1, 2, 3, 4, 5, 6")]
pub config: ::core::option::Option<storage_resource_config::Config>,
}
/// Nested message and enum types in `StorageResourceConfig`.
pub mod storage_resource_config {
/// Particular type of configuration for this storage resource.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
/// Optional. Immutable. If set, indicates that a new Filestore instance
/// should be created.
#[prost(message, tag = "1")]
NewFilestore(super::NewFilestoreConfig),
/// Optional. Immutable. If set, indicates that an existing Filestore
/// instance should be imported.
#[prost(message, tag = "2")]
ExistingFilestore(super::ExistingFilestoreConfig),
/// Optional. Immutable. If set, indicates that a new Cloud Storage bucket
/// should be created.
#[prost(message, tag = "3")]
NewBucket(super::NewBucketConfig),
/// Optional. Immutable. If set, indicates that an existing Cloud Storage
/// bucket should be imported.
#[prost(message, tag = "4")]
ExistingBucket(super::ExistingBucketConfig),
/// Optional. Immutable. If set, indicates that a new Managed Lustre instance
/// should be created.
#[prost(message, tag = "5")]
NewLustre(super::NewLustreConfig),
/// Optional. Immutable. If set, indicates that an existing Managed Lustre
/// instance should be imported.
#[prost(message, tag = "6")]
ExistingLustre(super::ExistingLustreConfig),
}
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that a new [Filestore](<https://cloud.google.com/filestore>) instance
/// should be created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewFilestoreConfig {
/// Required. Immutable. Name of the Filestore instance to create, in the
/// format `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub filestore: ::prost::alloc::string::String,
/// Optional. Immutable. Description of the instance. Maximum of 2048
/// characters.
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// Required. Immutable. File system shares on the instance. Exactly one file
/// share must be specified.
#[prost(message, repeated, tag = "2")]
pub file_shares: ::prost::alloc::vec::Vec<FileShareConfig>,
/// Required. Immutable. Service tier to use for the instance.
#[prost(enumeration = "new_filestore_config::Tier", tag = "3")]
pub tier: i32,
/// Optional. Immutable. Access protocol to use for all file shares in the
/// instance. Defaults to NFS V3 if not set.
#[prost(enumeration = "new_filestore_config::Protocol", tag = "5")]
pub protocol: i32,
}
/// Nested message and enum types in `NewFilestoreConfig`.
pub mod new_filestore_config {
/// Available [service
/// tiers](<https://cloud.google.com/filestore/docs/service-tiers>) for Filestore
/// instances.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Tier {
/// Not set.
Unspecified = 0,
/// Offers expanded capacity and performance scaling capabilities suitable
/// for high-performance computing application requirements.
Zonal = 4,
/// Offers features and availability needed for mission-critical,
/// high-performance computing workloads.
Regional = 6,
}
impl Tier {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIER_UNSPECIFIED",
Self::Zonal => "ZONAL",
Self::Regional => "REGIONAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIER_UNSPECIFIED" => Some(Self::Unspecified),
"ZONAL" => Some(Self::Zonal),
"REGIONAL" => Some(Self::Regional),
_ => None,
}
}
}
/// File access protocol for Filestore instances.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Protocol {
/// Not set.
Unspecified = 0,
/// NFS 3.0.
Nfsv3 = 1,
/// NFS 4.1.
Nfsv41 = 2,
}
impl Protocol {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PROTOCOL_UNSPECIFIED",
Self::Nfsv3 => "NFSV3",
Self::Nfsv41 => "NFSV41",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROTOCOL_UNSPECIFIED" => Some(Self::Unspecified),
"NFSV3" => Some(Self::Nfsv3),
"NFSV41" => Some(Self::Nfsv41),
_ => None,
}
}
}
}
/// Message describing filestore configuration
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FileShareConfig {
/// Required. Size of the filestore in GB. Must be between 1024 and 102400, and
/// must meet scalability requirements described at
/// <https://cloud.google.com/filestore/docs/service-tiers.>
#[prost(int64, tag = "1")]
pub capacity_gb: i64,
/// Required. Filestore share location
#[prost(string, tag = "2")]
pub file_share: ::prost::alloc::string::String,
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that an existing [Filestore](<https://cloud.google.com/filestore>)
/// instance should be imported.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExistingFilestoreConfig {
/// Required. Immutable. Name of the Filestore instance to import, in the
/// format `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub filestore: ::prost::alloc::string::String,
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that a new [Google Cloud Storage](<https://cloud.google.com/storage>)
/// bucket should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewBucketConfig {
/// Required. Immutable. Name of the Cloud Storage bucket to create.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// Optional. Immutable. If set, indicates that the bucket should use
/// [hierarchical
/// namespaces](<https://cloud.google.com/storage/docs/hns-overview>).
#[prost(message, optional, tag = "4")]
pub hierarchical_namespace: ::core::option::Option<GcsHierarchicalNamespaceConfig>,
/// Storage class of the bucket, which can be set automatically or explicitly.
#[prost(oneof = "new_bucket_config::Option", tags = "2, 3")]
pub option: ::core::option::Option<new_bucket_config::Option>,
}
/// Nested message and enum types in `NewBucketConfig`.
pub mod new_bucket_config {
/// [Storage class](<https://cloud.google.com/storage/docs/storage-classes>) for
/// a Cloud Storage bucket.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StorageClass {
/// Not set.
Unspecified = 0,
/// Best for data that is frequently accessed.
Standard = 1,
/// Low-cost storage for data that is accessed less frequently.
Nearline = 2,
/// Very low-cost storage for infrequently accessed data.
Coldline = 3,
/// Lowest-cost storage for data archiving, online backup, and disaster
/// recovery.
Archive = 4,
}
impl StorageClass {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STORAGE_CLASS_UNSPECIFIED",
Self::Standard => "STANDARD",
Self::Nearline => "NEARLINE",
Self::Coldline => "COLDLINE",
Self::Archive => "ARCHIVE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STORAGE_CLASS_UNSPECIFIED" => Some(Self::Unspecified),
"STANDARD" => Some(Self::Standard),
"NEARLINE" => Some(Self::Nearline),
"COLDLINE" => Some(Self::Coldline),
"ARCHIVE" => Some(Self::Archive),
_ => None,
}
}
}
/// Storage class of the bucket, which can be set automatically or explicitly.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Option {
/// Optional. Immutable. If set, indicates that the bucket should use
/// [Autoclass](<https://cloud.google.com/storage/docs/autoclass>).
#[prost(message, tag = "2")]
Autoclass(super::GcsAutoclassConfig),
/// Optional. Immutable. If set, uses the provided storage class as the
/// bucket's default storage class.
#[prost(enumeration = "StorageClass", tag = "3")]
StorageClass(i32),
}
}
/// Message describing Google Cloud Storage autoclass configuration
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GcsAutoclassConfig {
/// Required. Enables Auto-class feature.
#[prost(bool, tag = "1")]
pub enabled: bool,
/// Optional. Terminal storage class of the autoclass bucket
#[prost(enumeration = "gcs_autoclass_config::TerminalStorageClass", tag = "2")]
pub terminal_storage_class: i32,
}
/// Nested message and enum types in `GcsAutoclassConfig`.
pub mod gcs_autoclass_config {
/// Terminal storage class types of the autoclass bucket
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TerminalStorageClass {
/// Unspecified terminal storage class
Unspecified = 0,
}
impl TerminalStorageClass {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TERMINAL_STORAGE_CLASS_UNSPECIFIED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TERMINAL_STORAGE_CLASS_UNSPECIFIED" => Some(Self::Unspecified),
_ => None,
}
}
}
}
/// Message describing Google Cloud Storage hierarchical namespace configuration
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GcsHierarchicalNamespaceConfig {
/// Required. Enables hierarchical namespace setup for the bucket.
#[prost(bool, tag = "1")]
pub enabled: bool,
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that an existing [Google Cloud
/// Storage](<https://cloud.google.com/storage>) bucket should be imported.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExistingBucketConfig {
/// Required. Immutable. Name of the Cloud Storage bucket to import.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that a new [Managed
/// Lustre](<https://cloud.google.com/products/managed-lustre>) instance should be
/// created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewLustreConfig {
/// Required. Immutable. Name of the Managed Lustre instance to create, in the
/// format `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub lustre: ::prost::alloc::string::String,
/// Optional. Immutable. Description of the Managed Lustre instance. Maximum of
/// 2048 characters.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// Required. Immutable. Filesystem name for this instance. This name is used
/// by client-side tools, including when mounting the instance. Must be 8
/// characters or less and can only contain letters and numbers.
#[prost(string, tag = "3")]
pub filesystem: ::prost::alloc::string::String,
/// Required. Immutable. Storage capacity of the instance in gibibytes (GiB).
/// Allowed values are between 18000 and 7632000.
#[prost(int64, tag = "4")]
pub capacity_gb: i64,
}
/// When set in a
/// \[StorageResourceConfig\]\[google.cloud.hypercomputecluster.v1.StorageResourceConfig\],
/// indicates that an existing [Managed
/// Lustre](<https://cloud.google.com/products/managed-lustre>) instance should be
/// imported.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExistingLustreConfig {
/// Required. Immutable. Name of the Managed Lustre instance to import, in the
/// format `projects/{project}/locations/{location}/instances/{instance}`
#[prost(string, tag = "1")]
pub lustre: ::prost::alloc::string::String,
}
/// A resource defining how virtual machines and accelerators should be
/// provisioned for the cluster.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComputeResource {
/// Required. Immutable. Configuration for this compute resource, which
/// describes how it should be created at runtime.
#[prost(message, optional, tag = "6")]
pub config: ::core::option::Option<ComputeResourceConfig>,
}
/// Describes how a compute resource should be created at runtime.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComputeResourceConfig {
/// Particular type of configuration for this compute resource.
#[prost(oneof = "compute_resource_config::Config", tags = "1, 2, 3, 5")]
pub config: ::core::option::Option<compute_resource_config::Config>,
}
/// Nested message and enum types in `ComputeResourceConfig`.
pub mod compute_resource_config {
/// Particular type of configuration for this compute resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Config {
/// Optional. Immutable. If set, indicates that this resource should use
/// on-demand VMs.
#[prost(message, tag = "1")]
NewOnDemandInstances(super::NewOnDemandInstancesConfig),
/// Optional. Immutable. If set, indicates that this resource should use spot
/// VMs.
#[prost(message, tag = "2")]
NewSpotInstances(super::NewSpotInstancesConfig),
/// Optional. Immutable. If set, indicates that this resource should use
/// reserved VMs.
#[prost(message, tag = "3")]
NewReservedInstances(super::NewReservedInstancesConfig),
/// Optional. Immutable. If set, indicates that this resource should use
/// flex-start VMs.
#[prost(message, tag = "5")]
NewFlexStartInstances(super::NewFlexStartInstancesConfig),
}
}
/// When set in a
/// \[ComputeResourceConfig\]\[google.cloud.hypercomputecluster.v1.ComputeResourceConfig\],
/// indicates that on-demand (i.e., using the standard provisioning model) VM
/// instances should be created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewOnDemandInstancesConfig {
/// Required. Immutable. Name of the zone in which VM instances should run,
/// e.g., `us-central1-a`. Must be in the same region as the cluster, and must
/// match the zone of any other resources specified in the cluster.
#[prost(string, tag = "1")]
pub zone: ::prost::alloc::string::String,
/// Required. Immutable. Name of the Compute Engine [machine
/// type](<https://cloud.google.com/compute/docs/machine-resource>) to use, e.g.
/// `n2-standard-2`.
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
}
/// When set in a
/// \[ComputeResourceConfig\]\[google.cloud.hypercomputecluster.v1.ComputeResourceConfig\],
/// indicates that [spot
/// VM](<https://cloud.google.com/compute/docs/instances/spot>) instances should be
/// created.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewSpotInstancesConfig {
/// Required. Immutable. Name of the zone in which VM instances should run,
/// e.g., `us-central1-a`. Must be in the same region as the cluster, and must
/// match the zone of any other resources specified in the cluster.
#[prost(string, tag = "1")]
pub zone: ::prost::alloc::string::String,
/// Required. Immutable. Name of the Compute Engine [machine
/// type](<https://cloud.google.com/compute/docs/machine-resource>) to use, e.g.
/// `n2-standard-2`.
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
/// Optional. Termination action for the instance. If not specified, Compute
/// Engine sets the termination action to DELETE.
#[prost(enumeration = "new_spot_instances_config::TerminationAction", tag = "5")]
pub termination_action: i32,
}
/// Nested message and enum types in `NewSpotInstancesConfig`.
pub mod new_spot_instances_config {
/// Specifies the termination action of the instance
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TerminationAction {
/// Not set.
Unspecified = 0,
/// Compute Engine stops the Spot VM on preemption.
Stop = 1,
/// Compute Engine deletes the Spot VM on preemption.
Delete = 2,
}
impl TerminationAction {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TERMINATION_ACTION_UNSPECIFIED",
Self::Stop => "STOP",
Self::Delete => "DELETE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TERMINATION_ACTION_UNSPECIFIED" => Some(Self::Unspecified),
"STOP" => Some(Self::Stop),
"DELETE" => Some(Self::Delete),
_ => None,
}
}
}
}
/// When set in a
/// \[ComputeResourceConfig\]\[google.cloud.hypercomputecluster.v1.ComputeResourceConfig\],
/// indicates that VM instances should be created from a
/// [reservation](<https://cloud.google.com/compute/docs/instances/reservations-overview>).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewReservedInstancesConfig {
/// Source of the reservation
#[prost(oneof = "new_reserved_instances_config::Source", tags = "1")]
pub source: ::core::option::Option<new_reserved_instances_config::Source>,
}
/// Nested message and enum types in `NewReservedInstancesConfig`.
pub mod new_reserved_instances_config {
/// Source of the reservation
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Source {
/// Optional. Immutable. Name of the reservation from which VM instances
/// should be created, in the format
/// `projects/{project}/zones/{zone}/reservations/{reservation}`.
#[prost(string, tag = "1")]
Reservation(::prost::alloc::string::String),
}
}
/// When set in a
/// \[ComputeResourceConfig\]\[google.cloud.hypercomputecluster.v1.ComputeResourceConfig\],
/// indicates that VM instances should be created using [Flex
/// Start](<https://cloud.google.com/compute/docs/instances/provisioning-models>).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewFlexStartInstancesConfig {
/// Required. Immutable. Name of the zone in which VM instances should run,
/// e.g., `us-central1-a`. Must be in the same region as the cluster, and must
/// match the zone of any other resources specified in the cluster.
#[prost(string, tag = "1")]
pub zone: ::prost::alloc::string::String,
/// Required. Immutable. Name of the Compute Engine [machine
/// type](<https://cloud.google.com/compute/docs/machine-resource>) to use, e.g.
/// `n2-standard-2`.
#[prost(string, tag = "2")]
pub machine_type: ::prost::alloc::string::String,
/// Required. Immutable. Specifies the time limit for created instances.
/// Instances will be terminated at the end of this duration.
#[prost(message, optional, tag = "3")]
pub max_duration: ::core::option::Option<::prost_types::Duration>,
}
/// A [Persistent disk](<https://cloud.google.com/compute/docs/disks>) used as the
/// boot disk for a Compute Engine VM instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BootDisk {
/// Required. Immutable. [Persistent disk
/// type](<https://cloud.google.com/compute/docs/disks#disk-types>), in the
/// format `projects/{project}/zones/{zone}/diskTypes/{disk_type}`.
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
/// Required. Immutable. Size of the disk in gigabytes. Must be at least 10GB.
#[prost(int64, tag = "2")]
pub size_gb: i64,
}
/// The component responsible for scheduling and running workloads on the
/// cluster as well as providing the user interface for interacting with the
/// cluster at runtime.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Orchestrator {
/// Particular type of orchestrator to use in this cluster.
#[prost(oneof = "orchestrator::Option", tags = "1")]
pub option: ::core::option::Option<orchestrator::Option>,
}
/// Nested message and enum types in `Orchestrator`.
pub mod orchestrator {
/// Particular type of orchestrator to use in this cluster.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Option {
/// Optional. If set, indicates that the cluster should use Slurm as the
/// orchestrator.
#[prost(message, tag = "1")]
Slurm(super::SlurmOrchestrator),
}
}
/// When set in \[Orchestrator\]\[google.cloud.hypercomputecluster.v1.Orchestrator\],
/// indicates that the cluster should use [Slurm](<https://slurm.schedmd.com/>) as
/// the orchestrator.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlurmOrchestrator {
/// Required. Configuration for login nodes, which allow users to access the
/// cluster over SSH.
#[prost(message, optional, tag = "6")]
pub login_nodes: ::core::option::Option<SlurmLoginNodes>,
/// Optional. Compute resource configuration for the Slurm nodesets in your
/// cluster. If not specified, the cluster won't create any nodes.
#[prost(message, repeated, tag = "1")]
pub node_sets: ::prost::alloc::vec::Vec<SlurmNodeSet>,
/// Optional. Configuration for the Slurm partitions in your cluster. Each
/// partition can contain one or more nodesets, and you can submit separate
/// jobs on each partition. If you don't specify at least one partition in your
/// cluster, you can't submit jobs to the cluster.
#[prost(message, repeated, tag = "2")]
pub partitions: ::prost::alloc::vec::Vec<SlurmPartition>,
/// Optional. Default partition to use for submitted jobs that do not
/// explicitly specify a partition. Required if and only if there is more than
/// one partition, in which case it must match the id of one of the partitions.
#[prost(string, tag = "3")]
pub default_partition: ::prost::alloc::string::String,
/// Optional. Slurm [prolog
/// scripts](<https://slurm.schedmd.com/prolog_epilog.html>), which will be
/// executed by compute nodes before a node begins running a new job. Values
/// must not be empty.
#[prost(string, repeated, tag = "4")]
pub prolog_bash_scripts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Slurm [epilog
/// scripts](<https://slurm.schedmd.com/prolog_epilog.html>), which will be
/// executed by compute nodes whenever a node finishes running a job. Values
/// must not be empty.
#[prost(string, repeated, tag = "5")]
pub epilog_bash_scripts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Configuration for Slurm nodesets in the cluster. Nodesets are groups of
/// compute nodes used by Slurm that are responsible for running workloads
/// submitted to the cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlurmNodeSet {
/// Required. Identifier for the nodeset, which allows it to be referenced by
/// partitions. Must conform to
/// [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>) (lower-case,
/// alphanumeric, and at most 63 characters).
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Optional. ID of the compute resource on which this nodeset will run. Must
/// match a key in the cluster's
/// \[compute_resources\]\[google.cloud.hypercomputecluster.v1.Cluster.compute_resources\].
#[prost(string, tag = "16")]
pub compute_id: ::prost::alloc::string::String,
/// Optional. How \[storage
/// resources\]\[google.cloud.hypercomputecluster.v1.StorageResource\] should be
/// mounted on each compute node.
#[prost(message, repeated, tag = "3")]
pub storage_configs: ::prost::alloc::vec::Vec<StorageConfig>,
/// Optional. Number of nodes to be statically created for this nodeset. The
/// cluster will attempt to ensure that at least this many nodes exist at all
/// times.
#[prost(int64, tag = "4")]
pub static_node_count: i64,
/// Optional. Controls how many additional nodes a cluster can bring online to
/// handle workloads. Set this value to enable dynamic node creation and limit
/// the number of additional nodes the cluster can bring online. Leave empty if
/// you do not want the cluster to create nodes dynamically, and instead rely
/// only on static nodes.
#[prost(int64, tag = "5")]
pub max_dynamic_node_count: i64,
/// Additional configuration for the nodeset. If not set, the nodeset will
/// use
/// \[ComputeInstanceSlurmNodeSet\]\[google.cloud.hypercomputecluster.v1.ComputeInstanceSlurmNodeSet\]
/// with default values.
#[prost(oneof = "slurm_node_set::Type", tags = "17")]
pub r#type: ::core::option::Option<slurm_node_set::Type>,
}
/// Nested message and enum types in `SlurmNodeSet`.
pub mod slurm_node_set {
/// Additional configuration for the nodeset. If not set, the nodeset will
/// use
/// \[ComputeInstanceSlurmNodeSet\]\[google.cloud.hypercomputecluster.v1.ComputeInstanceSlurmNodeSet\]
/// with default values.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// Optional. If set, indicates that the nodeset should be backed by Compute
/// Engine instances.
#[prost(message, tag = "17")]
ComputeInstance(super::ComputeInstanceSlurmNodeSet),
}
}
/// When set in a
/// \[SlurmNodeSet\]\[google.cloud.hypercomputecluster.v1.SlurmNodeSet\], indicates
/// that the nodeset should be backed by Compute Engine VM instances.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeInstanceSlurmNodeSet {
/// Optional. [Startup
/// script](<https://cloud.google.com/compute/docs/instances/startup-scripts/linux>)
/// to be run on each VM instance in the nodeset. Max 256KB.
#[prost(string, tag = "1")]
pub startup_script: ::prost::alloc::string::String,
/// Optional.
/// [Labels](<https://cloud.google.com/compute/docs/labeling-resources>) that
/// should be applied to each VM instance in the nodeset.
#[prost(map = "string, string", tag = "2")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. Boot disk for the compute instance
#[prost(message, optional, tag = "3")]
pub boot_disk: ::core::option::Option<BootDisk>,
}
/// Configuration for Slurm partitions in the cluster. Partitions are groups of
/// nodesets, and are how clients specify where their workloads should be run.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SlurmPartition {
/// Required. ID of the partition, which is how users will identify it. Must
/// conform to [RFC-1034](<https://datatracker.ietf.org/doc/html/rfc1034>)
/// (lower-case, alphanumeric, and at most 63 characters).
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Required. IDs of the nodesets that make up this partition. Values must
/// match
/// \[SlurmNodeSet.id\]\[google.cloud.hypercomputecluster.v1.SlurmNodeSet.id\].
#[prost(string, repeated, tag = "2")]
pub node_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Configuration for Slurm [login
/// nodes](<https://slurm.schedmd.com/quickstart_admin.html#login>) in the cluster.
/// Login nodes are Compute Engine VM instances that allow users to access the
/// cluster over SSH.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlurmLoginNodes {
/// Required. Number of login node instances to create.
#[prost(int64, tag = "3")]
pub count: i64,
/// Required. Name of the zone in which login nodes should run, e.g.,
/// `us-central1-a`. Must be in the same region as the cluster, and must match
/// the zone of any other resources specified in the cluster.
#[prost(string, tag = "2")]
pub zone: ::prost::alloc::string::String,
/// Required. Name of the Compute Engine [machine
/// type](<https://cloud.google.com/compute/docs/machine-resource>) to use for
/// login nodes, e.g. `n2-standard-2`.
#[prost(string, tag = "1")]
pub machine_type: ::prost::alloc::string::String,
/// Optional. [Startup
/// script](<https://cloud.google.com/compute/docs/instances/startup-scripts/linux>)
/// to be run on each login node instance. Max 256KB.
/// The script must complete within the system-defined default timeout of 5
/// minutes. For tasks that require more time, consider running them in the
/// background using methods such as `&` or `nohup`.
#[prost(string, tag = "5")]
pub startup_script: ::prost::alloc::string::String,
/// Optional. Whether [OS Login](<https://cloud.google.com/compute/docs/oslogin>)
/// should be enabled on login node instances.
#[prost(bool, tag = "6")]
pub enable_os_login: bool,
/// Optional. Whether login node instances should be assigned [external IP
/// addresses](<https://cloud.google.com/compute/docs/ip-addresses#externaladdresses>).
#[prost(bool, tag = "7")]
pub enable_public_ips: bool,
/// Optional.
/// [Labels](<https://cloud.google.com/compute/docs/labeling-resources>) that
/// should be applied to each login node instance.
#[prost(map = "string, string", tag = "8")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. How \[storage
/// resources\]\[google.cloud.hypercomputecluster.v1.StorageResource\] should be
/// mounted on each login node.
#[prost(message, repeated, tag = "12")]
pub storage_configs: ::prost::alloc::vec::Vec<StorageConfig>,
/// Output only. Information about the login node instances that were created
/// in Compute Engine.
#[prost(message, repeated, tag = "10")]
pub instances: ::prost::alloc::vec::Vec<ComputeInstance>,
/// Optional. Boot disk for the login node.
#[prost(message, optional, tag = "13")]
pub boot_disk: ::core::option::Option<BootDisk>,
}
/// Description of how a \[storage
/// resource\]\[google.cloud.hypercomputecluster.v1.StorageResource\] should be
/// mounted on a VM instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StorageConfig {
/// Required. ID of the storage resource to mount, which must match a key in
/// the cluster's
/// \[storage_resources\]\[google.cloud.hypercomputecluster.v1.Cluster.storage_resources\].
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Required. A directory inside the VM instance's file system where the
/// storage resource should be mounted (e.g., `/mnt/share`).
#[prost(string, tag = "2")]
pub local_mount: ::prost::alloc::string::String,
}
/// Details about a Compute Engine
/// [instance](<https://cloud.google.com/compute/docs/instances>).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComputeInstance {
/// Output only. Name of the VM instance, in the format
/// `projects/{project}/zones/{zone}/instances/{instance}`.
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod hypercompute_cluster_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service describing handlers for resources
#[derive(Debug, Clone)]
pub struct HypercomputeClusterClient<T> {
inner: tonic::client::Grpc<T>,
}
impl HypercomputeClusterClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> HypercomputeClusterClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HypercomputeClusterClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
HypercomputeClusterClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists Clusters in a given project and location.
pub async fn list_clusters(
&mut self,
request: impl tonic::IntoRequest<super::ListClustersRequest>,
) -> std::result::Result<
tonic::Response<super::ListClustersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.hypercomputecluster.v1.HypercomputeCluster/ListClusters",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.hypercomputecluster.v1.HypercomputeCluster",
"ListClusters",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Cluster.
pub async fn get_cluster(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRequest>,
) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.hypercomputecluster.v1.HypercomputeCluster/GetCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.hypercomputecluster.v1.HypercomputeCluster",
"GetCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Cluster in a given project and location.
pub async fn create_cluster(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.hypercomputecluster.v1.HypercomputeCluster/CreateCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.hypercomputecluster.v1.HypercomputeCluster",
"CreateCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single Cluster.
pub async fn update_cluster(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.hypercomputecluster.v1.HypercomputeCluster/UpdateCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.hypercomputecluster.v1.HypercomputeCluster",
"UpdateCluster",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Cluster.
pub async fn delete_cluster(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.hypercomputecluster.v1.HypercomputeCluster/DeleteCluster",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.hypercomputecluster.v1.HypercomputeCluster",
"DeleteCluster",
),
);
self.inner.unary(req, path, codec).await
}
}
}