bazel-remote-apis 0.29.0

Rust bindings for Bazel Remote APIs
Documentation
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
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
// This file is @generated by prost-build.
/// An `Action` captures all the information about an execution which is required
/// to reproduce it.
///
/// `Action`s are the core component of the \[Execution\] service. A single
/// `Action` represents a repeatable action that can be performed by the
/// execution service. `Action`s can be succinctly identified by the digest of
/// their wire format encoding and, once an `Action` has been executed, will be
/// cached in the action cache. Future requests can then use the cached result
/// rather than needing to run afresh.
///
/// When a server completes execution of an
/// \[Action\]\[build.bazel.remote.execution.v2.Action\], it MAY choose to
/// cache the \[result\]\[build.bazel.remote.execution.v2.ActionResult\] in
/// the \[ActionCache\]\[build.bazel.remote.execution.v2.ActionCache\] unless
/// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By
/// default, future calls to
/// \[Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\] the same
/// `Action` will also serve their results from the cache. Clients must take care
/// to understand the caching behaviour. Ideally, all `Action`s will be
/// reproducible so that serving a result from cache is always desirable and
/// correct.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
    /// The digest of the \[Command\]\[build.bazel.remote.execution.v2.Command\]
    /// to run, which MUST be present in the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
    #[prost(message, optional, tag = "1")]
    pub command_digest: ::core::option::Option<Digest>,
    /// The digest of the root
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] for the input
    /// files. The files in the directory tree are available in the correct
    /// location on the build machine before the command is executed. The root
    /// directory, as well as every subdirectory and content blob referred to, MUST
    /// be in the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
    #[prost(message, optional, tag = "2")]
    pub input_root_digest: ::core::option::Option<Digest>,
    /// A timeout after which the execution should be killed. If the timeout is
    /// absent, then the client is specifying that the execution should continue
    /// as long as the server will let it. The server SHOULD impose a timeout if
    /// the client does not specify one, however, if the client does specify a
    /// timeout that is longer than the server's maximum timeout, the server MUST
    /// reject the request.
    ///
    /// The timeout is only intended to cover the "execution" of the specified
    /// action and not time in queue nor any overheads before or after execution
    /// such as marshalling inputs/outputs. The server SHOULD avoid including time
    /// spent the client doesn't have control over, and MAY extend or reduce the
    /// timeout to account for delays or speedups that occur during execution
    /// itself (e.g., lazily loading data from the Content Addressable Storage,
    /// live migration of virtual machines, emulation overhead).
    ///
    /// The timeout is a part of the
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\] message, and
    /// therefore two `Actions` with different timeouts are different, even if they
    /// are otherwise identical. This is because, if they were not, running an
    /// `Action` with a lower timeout than is required might result in a cache hit
    /// from an execution run with a longer timeout, hiding the fact that the
    /// timeout is too short. By encoding it directly in the `Action`, a lower
    /// timeout will result in a cache miss and the execution timeout will fail
    /// immediately, rather than whenever the cache entry gets evicted.
    #[prost(message, optional, tag = "6")]
    pub timeout: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Duration,
    >,
    /// If true, then the `Action`'s result cannot be cached, and in-flight
    /// requests for the same `Action` may not be merged.
    #[prost(bool, tag = "7")]
    pub do_not_cache: bool,
    /// An optional additional salt value used to place this `Action` into a
    /// separate cache namespace from other instances having the same field
    /// contents. This salt typically comes from operational configuration
    /// specific to sources such as repo and service configuration,
    /// and allows disowning an entire set of ActionResults that might have been
    /// poisoned by buggy software or tool failures.
    #[prost(bytes = "vec", tag = "9")]
    pub salt: ::prost::alloc::vec::Vec<u8>,
    /// The optional platform requirements for the execution environment. The
    /// server MAY choose to execute the action on any worker satisfying the
    /// requirements, so the client SHOULD ensure that running the action on any
    /// such worker will have the same result.  A detailed lexicon for this can be
    /// found in the accompanying platform.md.
    /// New in version 2.2: clients SHOULD set these platform properties as well
    /// as those in the \[Command\]\[build.bazel.remote.execution.v2.Command\]. Servers
    /// SHOULD prefer those set here.
    #[prost(message, optional, tag = "10")]
    pub platform: ::core::option::Option<Platform>,
}
/// A `Command` is the actual command executed by a worker running an
/// \[Action\]\[build.bazel.remote.execution.v2.Action\] and specifications of its
/// environment.
///
/// Except as otherwise required, the environment (such as which system
/// libraries or binaries are available, and what filesystems are mounted where)
/// is defined by and specific to the implementation of the remote execution API.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Command {
    /// The arguments to the command.
    ///
    /// The first argument specifies the command to run, which may be either an
    /// absolute path, a path relative to the working directory, or an unqualified
    /// path (without path separators) which will be resolved using the operating
    /// system's equivalent of the PATH environment variable. Path separators
    /// native to the operating system running on the worker SHOULD be used. If the
    /// `environment_variables` list contains an entry for the PATH environment
    /// variable, it SHOULD be respected. If not, the resolution process is
    /// implementation-defined.
    ///
    /// Changed in v2.3. v2.2 and older require that no PATH lookups are performed,
    /// and that relative paths are resolved relative to the input root. This
    /// behavior can, however, not be relied upon, as most implementations already
    /// followed the rules described above.
    #[prost(string, repeated, tag = "1")]
    pub arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The environment variables to set when running the program. The worker may
    /// provide its own default environment variables; these defaults can be
    /// overridden using this field. Additional variables can also be specified.
    ///
    /// In order to ensure that equivalent
    /// \[Command\]\[build.bazel.remote.execution.v2.Command\]s always hash to the same
    /// value, the environment variables MUST be lexicographically sorted by name.
    /// Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
    #[prost(message, repeated, tag = "2")]
    pub environment_variables: ::prost::alloc::vec::Vec<command::EnvironmentVariable>,
    /// A list of the output files that the client expects to retrieve from the
    /// action. Only the listed files, as well as directories listed in
    /// `output_directories`, will be returned to the client as output.
    /// Other files or directories that may be created during command execution
    /// are discarded.
    ///
    /// The paths are relative to the working directory of the action execution.
    /// The paths are specified using a single forward slash (`/`) as a path
    /// separator, even if the execution platform natively uses a different
    /// separator. The path MUST NOT include a trailing slash, nor a leading slash,
    /// being a relative path.
    ///
    /// In order to ensure consistent hashing of the same Action, the output paths
    /// MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
    /// bytes).
    ///
    /// An output file cannot be duplicated, be a parent of another output file, or
    /// have the same path as any of the listed output directories.
    ///
    /// Directories leading up to the output files are created by the worker prior
    /// to execution, even if they are not explicitly part of the input root.
    ///
    /// DEPRECATED since v2.1: Use `output_paths` instead.
    #[deprecated]
    #[prost(string, repeated, tag = "3")]
    pub output_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A list of the output directories that the client expects to retrieve from
    /// the action. Only the listed directories will be returned (an entire
    /// directory structure will be returned as a
    /// \[Tree\]\[build.bazel.remote.execution.v2.Tree\] message digest, see
    /// \[OutputDirectory\]\[build.bazel.remote.execution.v2.OutputDirectory\]), as
    /// well as files listed in `output_files`. Other files or directories that
    /// may be created during command execution are discarded.
    ///
    /// The paths are relative to the working directory of the action execution.
    /// The paths are specified using a single forward slash (`/`) as a path
    /// separator, even if the execution platform natively uses a different
    /// separator. The path MUST NOT include a trailing slash, nor a leading slash,
    /// being a relative path. The special value of empty string is allowed,
    /// although not recommended, and can be used to capture the entire working
    /// directory tree, including inputs.
    ///
    /// In order to ensure consistent hashing of the same Action, the output paths
    /// MUST be sorted lexicographically by code point (or, equivalently, by UTF-8
    /// bytes).
    ///
    /// An output directory cannot be duplicated or have the same path as any of
    /// the listed output files. An output directory is allowed to be a parent of
    /// another output directory.
    ///
    /// Directories leading up to the output directories (but not the output
    /// directories themselves) are created by the worker prior to execution, even
    /// if they are not explicitly part of the input root.
    ///
    /// DEPRECATED since 2.1: Use `output_paths` instead.
    #[deprecated]
    #[prost(string, repeated, tag = "4")]
    pub output_directories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A list of the output paths that the client expects to retrieve from the
    /// action. Only the listed paths will be returned to the client as output.
    /// The type of the output (file or directory) is not specified, and will be
    /// determined by the server after action execution. If the resulting path is
    /// a file, it will be returned in an
    /// \[OutputFile\]\[build.bazel.remote.execution.v2.OutputFile\] typed field.
    /// If the path is a directory, the entire directory structure will be returned
    /// as a \[Tree\]\[build.bazel.remote.execution.v2.Tree\] message digest, see
    /// \[OutputDirectory\]\[build.bazel.remote.execution.v2.OutputDirectory\]
    /// Other files or directories that may be created during command execution
    /// are discarded.
    ///
    /// The paths are relative to the working directory of the action execution.
    /// The paths are specified using a single forward slash (`/`) as a path
    /// separator, even if the execution platform natively uses a different
    /// separator. The path MUST NOT include a trailing slash, nor a leading slash,
    /// being a relative path.
    ///
    /// In order to ensure consistent hashing of the same Action, the output paths
    /// MUST be deduplicated and sorted lexicographically by code point (or,
    /// equivalently, by UTF-8 bytes).
    ///
    /// Directories leading up to the output paths are created by the worker prior
    /// to execution, even if they are not explicitly part of the input root.
    ///
    /// New in v2.1: this field supersedes the DEPRECATED `output_files` and
    /// `output_directories` fields. If `output_paths` is used, `output_files` and
    /// `output_directories` will be ignored!
    #[prost(string, repeated, tag = "7")]
    pub output_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The platform requirements for the execution environment. The server MAY
    /// choose to execute the action on any worker satisfying the requirements, so
    /// the client SHOULD ensure that running the action on any such worker will
    /// have the same result.  A detailed lexicon for this can be found in the
    /// accompanying platform.md.
    /// DEPRECATED as of v2.2: platform properties are now specified directly in
    /// the action. See documentation note in the
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\] for migration.
    #[deprecated]
    #[prost(message, optional, tag = "5")]
    pub platform: ::core::option::Option<Platform>,
    /// The working directory, relative to the input root, for the command to run
    /// in. It must be a directory which exists in the input tree. If it is left
    /// empty, then the action is run in the input root.
    #[prost(string, tag = "6")]
    pub working_directory: ::prost::alloc::string::String,
    /// A list of keys for node properties the client expects to retrieve for
    /// output files and directories. Keys are either names of string-based
    /// \[NodeProperty\]\[build.bazel.remote.execution.v2.NodeProperty\] or
    /// names of fields in \[NodeProperties\]\[build.bazel.remote.execution.v2.NodeProperties\].
    /// In order to ensure that equivalent `Action`s always hash to the same
    /// value, the node properties MUST be lexicographically sorted by name.
    /// Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
    ///
    /// The interpretation of string-based properties is server-dependent. If a
    /// property is not recognized by the server, the server will return an
    /// `INVALID_ARGUMENT`.
    #[prost(string, repeated, tag = "8")]
    pub output_node_properties: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The format that the worker should use to store the contents of
    /// output directories.
    ///
    /// In case this field is set to a value that is not supported by the
    /// worker, the worker SHOULD interpret this field as TREE_ONLY. The
    /// worker MAY store output directories in formats that are a superset
    /// of what was requested (e.g., interpreting DIRECTORY_ONLY as
    /// TREE_AND_DIRECTORY).
    #[prost(enumeration = "command::OutputDirectoryFormat", tag = "9")]
    pub output_directory_format: i32,
}
/// Nested message and enum types in `Command`.
pub mod command {
    /// An `EnvironmentVariable` is one variable to set in the running program's
    /// environment.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct EnvironmentVariable {
        /// The variable name.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// The variable value.
        #[prost(string, tag = "2")]
        pub value: ::prost::alloc::string::String,
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OutputDirectoryFormat {
        /// The client is only interested in receiving output directories in
        /// the form of a single Tree object, using the `tree_digest` field.
        TreeOnly = 0,
        /// The client is only interested in receiving output directories in
        /// the form of a hierarchy of separately stored Directory objects,
        /// using the `root_directory_digest` field.
        DirectoryOnly = 1,
        /// The client is interested in receiving output directories both in
        /// the form of a single Tree object and a hierarchy of separately
        /// stored Directory objects, using both the `tree_digest` and
        /// `root_directory_digest` fields.
        TreeAndDirectory = 2,
    }
    impl OutputDirectoryFormat {
        /// 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::TreeOnly => "TREE_ONLY",
                Self::DirectoryOnly => "DIRECTORY_ONLY",
                Self::TreeAndDirectory => "TREE_AND_DIRECTORY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TREE_ONLY" => Some(Self::TreeOnly),
                "DIRECTORY_ONLY" => Some(Self::DirectoryOnly),
                "TREE_AND_DIRECTORY" => Some(Self::TreeAndDirectory),
                _ => None,
            }
        }
    }
}
/// A `Platform` is a set of requirements, such as hardware, operating system, or
/// compiler toolchain, for an
/// \[Action\]\[build.bazel.remote.execution.v2.Action\]'s execution
/// environment. A `Platform` is represented as a series of key-value pairs
/// representing the properties that are required of the platform.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Platform {
    /// The properties that make up this platform. In order to ensure that
    /// equivalent `Platform`s always hash to the same value, the properties MUST
    /// be lexicographically sorted by name, and then by value. Sorting of strings
    /// is done by code point, equivalently, by the UTF-8 bytes.
    #[prost(message, repeated, tag = "1")]
    pub properties: ::prost::alloc::vec::Vec<platform::Property>,
}
/// Nested message and enum types in `Platform`.
pub mod platform {
    /// A single property for the environment. The server is responsible for
    /// specifying the property `name`s that it accepts. If an unknown `name` is
    /// provided in the requirements for an
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\], the server SHOULD
    /// reject the execution request. If permitted by the server, the same `name`
    /// may occur multiple times.
    ///
    /// The server is also responsible for specifying the interpretation of
    /// property `value`s. For instance, a property describing how much RAM must be
    /// available may be interpreted as allowing a worker with 16GB to fulfill a
    /// request for 8GB, while a property describing the OS environment on which
    /// the action must be performed may require an exact match with the worker's
    /// OS.
    ///
    /// The server MAY use the `value` of one or more properties to determine how
    /// it sets up the execution environment, such as by making specific system
    /// files available to the worker.
    ///
    /// Both names and values are typically case-sensitive. Note that the platform
    /// is implicitly part of the action digest, so even tiny changes in the names
    /// or values (like changing case) may result in different action cache
    /// entries.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Property {
        /// The property name.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// The property value.
        #[prost(string, tag = "2")]
        pub value: ::prost::alloc::string::String,
    }
}
/// A `Directory` represents a directory node in a file tree, containing zero or
/// more children \[FileNodes\]\[build.bazel.remote.execution.v2.FileNode\],
/// \[DirectoryNodes\]\[build.bazel.remote.execution.v2.DirectoryNode\] and
/// \[SymlinkNodes\]\[build.bazel.remote.execution.v2.SymlinkNode\].
/// Each `Node` contains its name in the directory, either the digest of its
/// content (either a file blob or a `Directory` proto) or a symlink target, as
/// well as possibly some metadata about the file or directory.
///
/// In order to ensure that two equivalent directory trees hash to the same
/// value, the following restrictions MUST be obeyed when constructing
/// a `Directory`:
///
/// * Every child in the directory must have a path of exactly one segment.
///   Multiple levels of directory hierarchy may not be collapsed.
/// * Each child in the directory must have a unique path segment (file name).
///   Note that while the API itself is case-sensitive, the environment where
///   the Action is executed may or may not be case-sensitive. That is, it is
///   legal to call the API with a Directory that has both "Foo" and "foo" as
///   children, but the Action may be rejected by the remote system upon
///   execution.
/// * The files, directories and symlinks in the directory must each be sorted
///   in lexicographical order by path. The path strings must be sorted by code
///   point, equivalently, by UTF-8 bytes.
/// * The \[NodeProperties\]\[build.bazel.remote.execution.v2.NodeProperty\] of files,
///   directories, and symlinks must be sorted in lexicographical order by
///   property name.
///
/// A `Directory` that obeys the restrictions is said to be in canonical form.
///
/// As an example, the following could be used for a file named `bar` and a
/// directory named `foo` with an executable file named `baz` (hashes shortened
/// for readability):
///
/// ```text,json
/// // (Directory proto)
/// {
///   files: [
///     {
///       name: "bar",
///       digest: {
///         hash: "4a73bc9d03...",
///         size: 65534
///       },
///       node_properties: [
///         {
///           "name": "MTime",
///           "value": "2017-01-15T01:30:15.01Z"
///         }
///       ]
///     }
///   ],
///   directories: [
///     {
///       name: "foo",
///       digest: {
///         hash: "4cf2eda940...",
///         size: 43
///       }
///     }
///   ]
/// }
///
/// // (Directory proto with hash "4cf2eda940..." and size 43)
/// {
///   files: [
///     {
///       name: "baz",
///       digest: {
///         hash: "b2c941073e...",
///         size: 1294,
///       },
///       is_executable: true
///     }
///   ]
/// }
/// ```
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Directory {
    /// The files in the directory.
    #[prost(message, repeated, tag = "1")]
    pub files: ::prost::alloc::vec::Vec<FileNode>,
    /// The subdirectories in the directory.
    #[prost(message, repeated, tag = "2")]
    pub directories: ::prost::alloc::vec::Vec<DirectoryNode>,
    /// The symlinks in the directory.
    #[prost(message, repeated, tag = "3")]
    pub symlinks: ::prost::alloc::vec::Vec<SymlinkNode>,
    #[prost(message, optional, tag = "5")]
    pub node_properties: ::core::option::Option<NodeProperties>,
}
/// A single property for \[FileNodes\]\[build.bazel.remote.execution.v2.FileNode\],
/// \[DirectoryNodes\]\[build.bazel.remote.execution.v2.DirectoryNode\], and
/// \[SymlinkNodes\]\[build.bazel.remote.execution.v2.SymlinkNode\]. The server is
/// responsible for specifying the property `name`s that it accepts. If
/// permitted by the server, the same `name` may occur multiple times.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeProperty {
    /// The property name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The property value.
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
}
/// Node properties for \[FileNodes\]\[build.bazel.remote.execution.v2.FileNode\],
/// \[DirectoryNodes\]\[build.bazel.remote.execution.v2.DirectoryNode\], and
/// \[SymlinkNodes\]\[build.bazel.remote.execution.v2.SymlinkNode\]. The server is
/// responsible for specifying the properties that it accepts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeProperties {
    /// A list of string-based
    /// \[NodeProperties\]\[build.bazel.remote.execution.v2.NodeProperty\].
    #[prost(message, repeated, tag = "1")]
    pub properties: ::prost::alloc::vec::Vec<NodeProperty>,
    /// The file's last modification timestamp.
    #[prost(message, optional, tag = "2")]
    pub mtime: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// The UNIX file mode, e.g., 0755.
    #[prost(message, optional, tag = "3")]
    pub unix_mode: ::core::option::Option<
        super::super::super::super::super::google::protobuf::UInt32Value,
    >,
}
/// A `FileNode` represents a single file and associated metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileNode {
    /// The name of the file.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The digest of the file's content.
    #[prost(message, optional, tag = "2")]
    pub digest: ::core::option::Option<Digest>,
    /// True if file is executable, false otherwise.
    #[prost(bool, tag = "4")]
    pub is_executable: bool,
    #[prost(message, optional, tag = "6")]
    pub node_properties: ::core::option::Option<NodeProperties>,
}
/// A `DirectoryNode` represents a child of a
/// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] which is itself
/// a `Directory` and its associated metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DirectoryNode {
    /// The name of the directory.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The digest of the
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] object
    /// represented. See \[Digest\]\[build.bazel.remote.execution.v2.Digest\]
    /// for information about how to take the digest of a proto message.
    #[prost(message, optional, tag = "2")]
    pub digest: ::core::option::Option<Digest>,
}
/// A `SymlinkNode` represents a symbolic link.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SymlinkNode {
    /// The name of the symlink.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The target path of the symlink. The path separator is a forward slash `/`.
    /// The target path can be relative to the parent directory of the symlink or
    /// it can be an absolute path starting with `/`. Support for absolute paths
    /// can be checked using the \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\]
    /// API. `..` components are allowed anywhere in the target path as logical
    /// canonicalization may lead to different behavior in the presence of
    /// directory symlinks (e.g. `foo/../bar` may not be the same as `bar`).
    /// To reduce potential cache misses, canonicalization is still recommended
    /// where this is possible without impacting correctness.
    #[prost(string, tag = "2")]
    pub target: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub node_properties: ::core::option::Option<NodeProperties>,
}
/// A content digest. A digest for a given blob consists of the size of the blob
/// and its hash. The hash algorithm to use is defined by the server.
///
/// The size is considered to be an integral part of the digest and cannot be
/// separated. That is, even if the `hash` field is correctly specified but
/// `size_bytes` is not, the server MUST reject the request.
///
/// The reason for including the size in the digest is as follows: in a great
/// many cases, the server needs to know the size of the blob it is about to work
/// with prior to starting an operation with it, such as flattening Merkle tree
/// structures or streaming it to a worker. Technically, the server could
/// implement a separate metadata store, but this results in a significantly more
/// complicated implementation as opposed to having the client specify the size
/// up-front (or storing the size along with the digest in every message where
/// digests are embedded). This does mean that the API leaks some implementation
/// details of (what we consider to be) a reasonable server implementation, but
/// we consider this to be a worthwhile tradeoff.
///
/// When a `Digest` is used to refer to a proto message, it always refers to the
/// message in binary encoded form. To ensure consistent hashing, clients and
/// servers MUST ensure that they serialize messages according to the following
/// rules, even if there are alternate valid encodings for the same message:
///
/// * Fields are serialized in tag order.
/// * There are no unknown fields.
/// * There are no duplicate fields.
/// * Fields are serialized according to the default semantics for their type.
///
/// Most protocol buffer implementations will always follow these rules when
/// serializing, but care should be taken to avoid shortcuts. For instance,
/// concatenating two messages to merge them may produce duplicate fields.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Digest {
    /// The hash, represented as a lowercase hexadecimal string, padded with
    /// leading zeroes up to the hash function length.
    #[prost(string, tag = "1")]
    pub hash: ::prost::alloc::string::String,
    /// The size of the blob, in bytes.
    #[prost(int64, tag = "2")]
    pub size_bytes: i64,
}
/// ExecutedActionMetadata contains details about a completed execution.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutedActionMetadata {
    /// The name of the worker which ran the execution.
    #[prost(string, tag = "1")]
    pub worker: ::prost::alloc::string::String,
    /// When was the action added to the queue.
    #[prost(message, optional, tag = "2")]
    pub queued_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker received the action.
    #[prost(message, optional, tag = "3")]
    pub worker_start_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker completed the action, including all stages.
    #[prost(message, optional, tag = "4")]
    pub worker_completed_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker started fetching action inputs.
    #[prost(message, optional, tag = "5")]
    pub input_fetch_start_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker finished fetching action inputs.
    #[prost(message, optional, tag = "6")]
    pub input_fetch_completed_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker started executing the action command.
    #[prost(message, optional, tag = "7")]
    pub execution_start_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker completed executing the action command.
    #[prost(message, optional, tag = "8")]
    pub execution_completed_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// New in v2.3: the amount of time the worker spent executing the action
    /// command, potentially computed using a worker-specific virtual clock.
    ///
    /// The virtual execution duration is only intended to cover the "execution" of
    /// the specified action and not time in queue nor any overheads before or
    /// after execution such as marshalling inputs/outputs. The server SHOULD avoid
    /// including time spent the client doesn't have control over, and MAY extend
    /// or reduce the execution duration to account for delays or speedups that
    /// occur during execution itself (e.g., lazily loading data from the Content
    /// Addressable Storage, live migration of virtual machines, emulation
    /// overhead).
    ///
    /// The method of timekeeping used to compute the virtual execution duration
    /// MUST be consistent with what is used to enforce the
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\]'s `timeout`. There is no
    /// relationship between the virtual execution duration and the values of
    /// `execution_start_timestamp` and `execution_completed_timestamp`.
    #[prost(message, optional, tag = "12")]
    pub virtual_execution_duration: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Duration,
    >,
    /// When the worker started uploading action outputs.
    #[prost(message, optional, tag = "9")]
    pub output_upload_start_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// When the worker finished uploading action outputs.
    #[prost(message, optional, tag = "10")]
    pub output_upload_completed_timestamp: ::core::option::Option<
        super::super::super::super::super::google::protobuf::Timestamp,
    >,
    /// Details that are specific to the kind of worker used. For example,
    /// on POSIX-like systems this could contain a message with
    /// getrusage(2) statistics.
    #[prost(message, repeated, tag = "11")]
    pub auxiliary_metadata: ::prost::alloc::vec::Vec<
        super::super::super::super::super::google::protobuf::Any,
    >,
}
/// An ActionResult represents the result of an
/// \[Action\]\[build.bazel.remote.execution.v2.Action\] being run.
///
/// It is advised that at least one field (for example
/// `ActionResult.execution_metadata.Worker`) have a non-default value, to
/// ensure that the serialized value is non-empty, which can then be used
/// as a basic data sanity check.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionResult {
    /// The output files of the action. For each output file requested in the
    /// `output_files` or `output_paths` field of the Action, if the corresponding
    /// file existed after the action completed, a single entry will be present
    /// either in this field, or the `output_file_symlinks` field if the file was
    /// a symbolic link to another file (`output_symlinks` field after v2.1).
    ///
    /// If an output listed in `output_files` was found, but was a directory rather
    /// than a regular file, the server will return a FAILED_PRECONDITION.
    /// If the action does not produce the requested output, then that output
    /// will be omitted from the list. The server is free to arrange the output
    /// list as desired; clients MUST NOT assume that the output list is sorted.
    #[prost(message, repeated, tag = "2")]
    pub output_files: ::prost::alloc::vec::Vec<OutputFile>,
    /// The output files of the action that are symbolic links to other files. Those
    /// may be links to other output files, or input files, or even absolute paths
    /// outside of the working directory, if the server supports
    /// \[SymlinkAbsolutePathStrategy.ALLOWED\]\[build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy\].
    /// For each output file requested in the `output_files` or `output_paths`
    /// field of the Action, if the corresponding file existed after
    /// the action completed, a single entry will be present either in this field,
    /// or in the `output_files` field, if the file was not a symbolic link.
    ///
    /// If an output symbolic link of the same name as listed in `output_files` of
    /// the Command was found, but its target type was not a regular file, the
    /// server will return a FAILED_PRECONDITION.
    /// If the action does not produce the requested output, then that output
    /// will be omitted from the list. The server is free to arrange the output
    /// list as desired; clients MUST NOT assume that the output list is sorted.
    ///
    /// DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API
    /// should still populate this field in addition to `output_symlinks`.
    #[deprecated]
    #[prost(message, repeated, tag = "10")]
    pub output_file_symlinks: ::prost::alloc::vec::Vec<OutputSymlink>,
    /// New in v2.1: this field will only be populated if the command
    /// `output_paths` field was used, and not the pre v2.1 `output_files` or
    /// `output_directories` fields.
    /// The output paths of the action that are symbolic links to other paths. Those
    /// may be links to other outputs, or inputs, or even absolute paths
    /// outside of the working directory, if the server supports
    /// \[SymlinkAbsolutePathStrategy.ALLOWED\]\[build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy\].
    /// A single entry for each output requested in `output_paths`
    /// field of the Action, if the corresponding path existed after
    /// the action completed and was a symbolic link.
    ///
    /// If the action does not produce a requested output, then that output
    /// will be omitted from the list. The server is free to arrange the output
    /// list as desired; clients MUST NOT assume that the output list is sorted.
    #[prost(message, repeated, tag = "12")]
    pub output_symlinks: ::prost::alloc::vec::Vec<OutputSymlink>,
    /// The output directories of the action. For each output directory requested
    /// in the `output_directories` or `output_paths` field of the Action, if the
    /// corresponding directory existed after the action completed, a single entry
    /// will be present in the output list, which will contain the digest of a
    /// \[Tree\]\[build.bazel.remote.execution.v2.Tree\] message containing the
    /// directory tree, and the path equal exactly to the corresponding Action
    /// output_directories member.
    ///
    /// As an example, suppose the Action had an output directory `a/b/dir` and the
    /// execution produced the following contents in `a/b/dir`: a file named `bar`
    /// and a directory named `foo` with an executable file named `baz`. Then,
    /// output_directory will contain (hashes shortened for readability):
    ///
    /// ```text,json
    /// // OutputDirectory proto:
    /// {
    ///   path: "a/b/dir"
    ///   tree_digest: {
    ///     hash: "4a73bc9d03...",
    ///     size: 55
    ///   }
    /// }
    /// // Tree proto with hash "4a73bc9d03..." and size 55:
    /// {
    ///   root: {
    ///     files: [
    ///       {
    ///         name: "bar",
    ///         digest: {
    ///           hash: "4a73bc9d03...",
    ///           size: 65534
    ///         }
    ///       }
    ///     ],
    ///     directories: [
    ///       {
    ///         name: "foo",
    ///         digest: {
    ///           hash: "4cf2eda940...",
    ///           size: 43
    ///         }
    ///       }
    ///     ]
    ///   }
    ///   children : {
    ///     // (Directory proto with hash "4cf2eda940..." and size 43)
    ///     files: [
    ///       {
    ///         name: "baz",
    ///         digest: {
    ///           hash: "b2c941073e...",
    ///           size: 1294,
    ///         },
    ///         is_executable: true
    ///       }
    ///     ]
    ///   }
    /// }
    /// ```
    ///
    /// If an output of the same name as listed in `output_files` of
    /// the Command was found in `output_directories`, but was not a directory, the
    /// server will return a FAILED_PRECONDITION.
    #[prost(message, repeated, tag = "3")]
    pub output_directories: ::prost::alloc::vec::Vec<OutputDirectory>,
    /// The output directories of the action that are symbolic links to other
    /// directories. Those may be links to other output directories, or input
    /// directories, or even absolute paths outside of the working directory,
    /// if the server supports
    /// \[SymlinkAbsolutePathStrategy.ALLOWED\]\[build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy\].
    /// For each output directory requested in the `output_directories` field of
    /// the Action, if the directory existed after the action completed, a
    /// single entry will be present either in this field, or in the
    /// `output_directories` field, if the directory was not a symbolic link.
    ///
    /// If an output of the same name was found, but was a symbolic link to a file
    /// instead of a directory, the server will return a FAILED_PRECONDITION.
    /// If the action does not produce the requested output, then that output
    /// will be omitted from the list. The server is free to arrange the output
    /// list as desired; clients MUST NOT assume that the output list is sorted.
    ///
    /// DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API
    /// should still populate this field in addition to `output_symlinks`.
    #[deprecated]
    #[prost(message, repeated, tag = "11")]
    pub output_directory_symlinks: ::prost::alloc::vec::Vec<OutputSymlink>,
    /// The exit code of the command.
    #[prost(int32, tag = "4")]
    pub exit_code: i32,
    /// The standard output buffer of the action. The server SHOULD NOT inline
    /// stdout unless requested by the client in the
    /// \[GetActionResultRequest\]\[build.bazel.remote.execution.v2.GetActionResultRequest\]
    /// message. The server MAY omit inlining, even if requested, and MUST do so if inlining
    /// would cause the response to exceed message size limits.
    /// Clients SHOULD NOT populate this field when uploading to the cache.
    #[prost(bytes = "vec", tag = "5")]
    pub stdout_raw: ::prost::alloc::vec::Vec<u8>,
    /// The digest for a blob containing the standard output of the action, which
    /// can be retrieved from the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
    #[prost(message, optional, tag = "6")]
    pub stdout_digest: ::core::option::Option<Digest>,
    /// The standard error buffer of the action. The server SHOULD NOT inline
    /// stderr unless requested by the client in the
    /// \[GetActionResultRequest\]\[build.bazel.remote.execution.v2.GetActionResultRequest\]
    /// message. The server MAY omit inlining, even if requested, and MUST do so if inlining
    /// would cause the response to exceed message size limits.
    /// Clients SHOULD NOT populate this field when uploading to the cache.
    #[prost(bytes = "vec", tag = "7")]
    pub stderr_raw: ::prost::alloc::vec::Vec<u8>,
    /// The digest for a blob containing the standard error of the action, which
    /// can be retrieved from the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
    #[prost(message, optional, tag = "8")]
    pub stderr_digest: ::core::option::Option<Digest>,
    /// The details of the execution that originally produced this result.
    #[prost(message, optional, tag = "9")]
    pub execution_metadata: ::core::option::Option<ExecutedActionMetadata>,
}
/// An `OutputFile` is similar to a
/// \[FileNode\]\[build.bazel.remote.execution.v2.FileNode\], but it is used as an
/// output in an `ActionResult`. It allows a full file path rather than
/// only a name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputFile {
    /// The full path of the file relative to the working directory, including the
    /// filename. The path separator is a forward slash `/`. Since this is a
    /// relative path, it MUST NOT begin with a leading forward slash.
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
    /// The digest of the file's content.
    #[prost(message, optional, tag = "2")]
    pub digest: ::core::option::Option<Digest>,
    /// True if file is executable, false otherwise.
    #[prost(bool, tag = "4")]
    pub is_executable: bool,
    /// The contents of the file if inlining was requested. The server SHOULD NOT inline
    /// file contents unless requested by the client in the
    /// \[GetActionResultRequest\]\[build.bazel.remote.execution.v2.GetActionResultRequest\]
    /// message. The server MAY omit inlining, even if requested, and MUST do so if inlining
    /// would cause the response to exceed message size limits.
    /// Clients SHOULD NOT populate this field when uploading to the cache.
    #[prost(bytes = "vec", tag = "5")]
    pub contents: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "7")]
    pub node_properties: ::core::option::Option<NodeProperties>,
}
/// A `Tree` contains all the
/// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] protos in a
/// single directory Merkle tree, compressed into one message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tree {
    /// The root directory in the tree.
    #[prost(message, optional, tag = "1")]
    pub root: ::core::option::Option<Directory>,
    /// All the child directories: the directories referred to by the root and,
    /// recursively, all its children. In order to reconstruct the directory tree,
    /// the client must take the digests of each of the child directories and then
    /// build up a tree starting from the `root`.
    /// Servers SHOULD ensure that these are ordered consistently such that two
    /// actions producing equivalent output directories on the same server
    /// implementation also produce Tree messages with matching digests.
    #[prost(message, repeated, tag = "2")]
    pub children: ::prost::alloc::vec::Vec<Directory>,
}
/// An `OutputDirectory` is the output in an `ActionResult` corresponding to a
/// directory's full contents rather than a single file.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OutputDirectory {
    /// The full path of the directory relative to the working directory. The path
    /// separator is a forward slash `/`. Since this is a relative path, it MUST
    /// NOT begin with a leading forward slash. The empty string value is allowed,
    /// and it denotes the entire working directory.
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
    /// The digest of the encoded
    /// \[Tree\]\[build.bazel.remote.execution.v2.Tree\] proto containing the
    /// directory's contents.
    #[prost(message, optional, tag = "3")]
    pub tree_digest: ::core::option::Option<Digest>,
    /// If set, consumers MAY make the following assumptions about the
    /// directories contained in the Tree, so that it may be
    /// instantiated on a local file system by scanning through it
    /// sequentially:
    ///
    /// * All directories with the same binary representation are stored
    ///   exactly once.
    /// * All directories, apart from the root directory, are referenced by
    ///   at least one parent directory.
    /// * Directories are stored in topological order, with parents being
    ///   stored before the child. The root directory is thus the first to
    ///   be stored.
    ///
    /// Additionally, the Tree MUST be encoded as a stream of records,
    /// where each record has the following format:
    ///
    /// * A tag byte, having one of the following two values:
    ///   * (1 \<\< 3) | 2 == 0x0a: First record (the root directory).
    ///   * (2 \<\< 3) | 2 == 0x12: Any subsequent records (child directories).
    /// * The size of the directory, encoded as a base 128 varint.
    /// * The contents of the directory, encoded as a binary serialized
    ///   Protobuf message.
    ///
    /// This encoding is a subset of the Protobuf wire format of the Tree
    /// message. As it is only permitted to store data associated with
    /// field numbers 1 and 2, the tag MUST be encoded as a single byte.
    /// More details on the Protobuf wire format can be found here:
    /// <https://developers.google.com/protocol-buffers/docs/encoding>
    ///
    /// It is recommended that implementations using this feature construct
    /// Tree objects manually using the specification given above, as
    /// opposed to using a Protobuf library to marshal a full Tree message.
    /// As individual Directory messages already need to be marshaled to
    /// compute their digests, constructing the Tree object manually avoids
    /// redundant marshaling.
    #[prost(bool, tag = "4")]
    pub is_topologically_sorted: bool,
    /// The digest of the encoded
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] proto
    /// containing the contents of the directory's root.
    ///
    /// If both `tree_digest` and `root_directory_digest` are set, this
    /// field MUST match the digest of the root directory contained in the
    /// Tree message.
    #[prost(message, optional, tag = "5")]
    pub root_directory_digest: ::core::option::Option<Digest>,
}
/// An `OutputSymlink` is similar to a
/// \[Symlink\]\[build.bazel.remote.execution.v2.SymlinkNode\], but it is used as an
/// output in an `ActionResult`.
///
/// `OutputSymlink` is binary-compatible with `SymlinkNode`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputSymlink {
    /// The full path of the symlink relative to the working directory, including the
    /// filename. The path separator is a forward slash `/`. Since this is a
    /// relative path, it MUST NOT begin with a leading forward slash.
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
    /// The target path of the symlink. The path separator is a forward slash `/`.
    /// The target path can be relative to the parent directory of the symlink or
    /// it can be an absolute path starting with `/`. Support for absolute paths
    /// can be checked using the \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\]
    /// API. `..` components are allowed anywhere in the target path.
    #[prost(string, tag = "2")]
    pub target: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub node_properties: ::core::option::Option<NodeProperties>,
}
/// An `ExecutionPolicy` can be used to control the scheduling of the action.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionPolicy {
    /// The priority (relative importance) of this action. Generally, a lower value
    /// means that the action should be run sooner than actions having a greater
    /// priority value, but the interpretation of a given value is server-
    /// dependent. A priority of 0 means the *default* priority. Priorities may be
    /// positive or negative, and such actions should run later or sooner than
    /// actions having the default priority, respectively. The particular semantics
    /// of this field is up to the server. In particular, every server will have
    /// their own supported range of priorities, and will decide how these map into
    /// scheduling policy.
    #[prost(int32, tag = "1")]
    pub priority: i32,
}
/// A `ResultsCachePolicy` is used for fine-grained control over how action
/// outputs are stored in the CAS and Action Cache.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResultsCachePolicy {
    /// The priority (relative importance) of this content in the overall cache.
    /// Generally, a lower value means a longer retention time or other advantage,
    /// but the interpretation of a given value is server-dependent. A priority of
    /// 0 means a *default* value, decided by the server.
    ///
    /// The particular semantics of this field is up to the server. In particular,
    /// every server will have their own supported range of priorities, and will
    /// decide how these map into retention/eviction policy.
    #[prost(int32, tag = "1")]
    pub priority: i32,
}
/// A request message for
/// \[Execution.Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecuteRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// If true, the action will be executed even if its result is already
    /// present in the \[ActionCache\]\[build.bazel.remote.execution.v2.ActionCache\].
    /// The execution is still allowed to be merged with other in-flight executions
    /// of the same action, however - semantically, the service MUST only guarantee
    /// that the results of an execution with this field set were not visible
    /// before the corresponding execution request was sent.
    /// Note that actions from execution requests setting this field set are still
    /// eligible to be entered into the action cache upon completion, and services
    /// SHOULD overwrite any existing entries that may exist. This allows
    /// skip_cache_lookup requests to be used as a mechanism for replacing action
    /// cache entries that reference outputs no longer available or that are
    /// poisoned in any way.
    /// If false, the result may be served from the action cache.
    #[prost(bool, tag = "3")]
    pub skip_cache_lookup: bool,
    /// The digest of the \[Action\]\[build.bazel.remote.execution.v2.Action\] to
    /// execute.
    #[prost(message, optional, tag = "6")]
    pub action_digest: ::core::option::Option<Digest>,
    /// An optional policy for execution of the action.
    /// The server will have a default policy if this is not provided.
    #[prost(message, optional, tag = "7")]
    pub execution_policy: ::core::option::Option<ExecutionPolicy>,
    /// An optional policy for the results of this execution in the remote cache.
    /// The server will have a default policy if this is not provided.
    /// This may be applied to both the ActionResult and the associated blobs.
    #[prost(message, optional, tag = "8")]
    pub results_cache_policy: ::core::option::Option<ResultsCachePolicy>,
    /// The digest function that was used to compute the action digest.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the action digest hash and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "9")]
    pub digest_function: i32,
    /// A hint to the server to request inlining stdout in the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] message.
    #[prost(bool, tag = "10")]
    pub inline_stdout: bool,
    /// A hint to the server to request inlining stderr in the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] message.
    #[prost(bool, tag = "11")]
    pub inline_stderr: bool,
    /// A hint to the server to inline the contents of the listed output files.
    /// Each path needs to exactly match one file path in either `output_paths` or
    /// `output_files` (DEPRECATED since v2.1) in the
    /// \[Command\]\[build.bazel.remote.execution.v2.Command\] message.
    #[prost(string, repeated, tag = "12")]
    pub inline_output_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A `LogFile` is a log stored in the CAS.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LogFile {
    /// The digest of the log contents.
    #[prost(message, optional, tag = "1")]
    pub digest: ::core::option::Option<Digest>,
    /// This is a hint as to the purpose of the log, and is set to true if the log
    /// is human-readable text that can be usefully displayed to a user, and false
    /// otherwise. For instance, if a command-line client wishes to print the
    /// server logs to the terminal for a failed action, this allows it to avoid
    /// displaying a binary file.
    #[prost(bool, tag = "2")]
    pub human_readable: bool,
}
/// The response message for
/// \[Execution.Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\],
/// which will be contained in the \[response
/// field\]\[google.longrunning.Operation.response\] of the
/// \[Operation\]\[google.longrunning.Operation\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteResponse {
    /// The result of the action.
    #[prost(message, optional, tag = "1")]
    pub result: ::core::option::Option<ActionResult>,
    /// True if the result was served from cache, false if it was executed.
    #[prost(bool, tag = "2")]
    pub cached_result: bool,
    /// If the status has a code other than `OK`, it indicates that the action did
    /// not finish execution. For example, if the operation times out during
    /// execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST
    /// use this field for errors in execution, rather than the error field on the
    /// `Operation` object.
    ///
    /// If the status code is other than `OK`, then the result MUST NOT be cached.
    /// For an error status, the `result` field is optional; the server may
    /// populate the output-, stdout-, and stderr-related fields if it has any
    /// information available, such as the stdout and stderr of a timed-out action.
    #[prost(message, optional, tag = "3")]
    pub status: ::core::option::Option<
        super::super::super::super::super::google::rpc::Status,
    >,
    /// An optional list of additional log outputs the server wishes to provide. A
    /// server can use this to return execution-specific logs however it wishes.
    /// This is intended primarily to make it easier for users to debug issues that
    /// may be outside of the actual job execution, such as by identifying the
    /// worker executing the action or by providing logs from the worker's setup
    /// phase. The keys SHOULD be human readable so that a client can display them
    /// to a user.
    #[prost(map = "string, message", tag = "4")]
    pub server_logs: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        LogFile,
    >,
    /// Freeform informational message with details on the execution of the action
    /// that may be displayed to the user upon failure or when requested explicitly.
    #[prost(string, tag = "5")]
    pub message: ::prost::alloc::string::String,
}
/// The current stage of action execution.
///
/// Even though these stages are numbered according to the order in which
/// they generally occur, there is no requirement that the remote
/// execution system reports events along this order. For example, an
/// operation MAY transition from the EXECUTING stage back to QUEUED
/// in case the hardware on which the operation executes fails.
///
/// If and only if the remote execution system reports that an operation
/// has reached the COMPLETED stage, it MUST set the \[done
/// field\]\[google.longrunning.Operation.done\] of the
/// \[Operation\]\[google.longrunning.Operation\] and terminate the stream.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionStage {}
/// Nested message and enum types in `ExecutionStage`.
pub mod execution_stage {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Value {
        /// Invalid value.
        Unknown = 0,
        /// Checking the result against the cache.
        CacheCheck = 1,
        /// Currently idle, awaiting a free machine to execute.
        Queued = 2,
        /// Currently being executed by a worker.
        Executing = 3,
        /// Finished execution.
        Completed = 4,
    }
    impl Value {
        /// 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::Unknown => "UNKNOWN",
                Self::CacheCheck => "CACHE_CHECK",
                Self::Queued => "QUEUED",
                Self::Executing => "EXECUTING",
                Self::Completed => "COMPLETED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "CACHE_CHECK" => Some(Self::CacheCheck),
                "QUEUED" => Some(Self::Queued),
                "EXECUTING" => Some(Self::Executing),
                "COMPLETED" => Some(Self::Completed),
                _ => None,
            }
        }
    }
}
/// Metadata about an ongoing
/// \[execution\]\[build.bazel.remote.execution.v2.Execution.Execute\], which
/// will be contained in the \[metadata
/// field\]\[google.longrunning.Operation.metadata\] of the
/// \[Operation\]\[google.longrunning.Operation\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteOperationMetadata {
    /// The current stage of execution.
    #[prost(enumeration = "execution_stage::Value", tag = "1")]
    pub stage: i32,
    /// The digest of the \[Action\]\[build.bazel.remote.execution.v2.Action\]
    /// being executed.
    #[prost(message, optional, tag = "2")]
    pub action_digest: ::core::option::Option<Digest>,
    /// If set, the client can use this resource name with
    /// \[ByteStream.Read\]\[google.bytestream.ByteStream.Read\] to stream the
    /// standard output from the endpoint hosting streamed responses.
    #[prost(string, tag = "3")]
    pub stdout_stream_name: ::prost::alloc::string::String,
    /// If set, the client can use this resource name with
    /// \[ByteStream.Read\]\[google.bytestream.ByteStream.Read\] to stream the
    /// standard error from the endpoint hosting streamed responses.
    #[prost(string, tag = "4")]
    pub stderr_stream_name: ::prost::alloc::string::String,
    /// The client can read this field to view details about the ongoing
    /// execution.
    #[prost(message, optional, tag = "5")]
    pub partial_execution_metadata: ::core::option::Option<ExecutedActionMetadata>,
    /// The digest function that was used to compute the action digest.
    ///
    /// If the digest function used is one of BLAKE3, MD5, MURMUR3, SHA1,
    /// SHA256, SHA256TREE, SHA384, SHA512, or VSO, the server MAY leave
    /// this field unset. In that case the client SHOULD infer the digest
    /// function using the length of the action digest hash and the digest
    /// functions announced in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "6")]
    pub digest_function: i32,
}
/// A request message for
/// \[WaitExecution\]\[build.bazel.remote.execution.v2.Execution.WaitExecution\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitExecutionRequest {
    /// The name of the \[Operation\]\[google.longrunning.Operation\]
    /// returned by \[Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\].
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A request message for
/// \[ActionCache.GetActionResult\]\[build.bazel.remote.execution.v2.ActionCache.GetActionResult\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetActionResultRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The digest of the \[Action\]\[build.bazel.remote.execution.v2.Action\]
    /// whose result is requested.
    #[prost(message, optional, tag = "2")]
    pub action_digest: ::core::option::Option<Digest>,
    /// A hint to the server to request inlining stdout in the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] message.
    #[prost(bool, tag = "3")]
    pub inline_stdout: bool,
    /// A hint to the server to request inlining stderr in the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] message.
    #[prost(bool, tag = "4")]
    pub inline_stderr: bool,
    /// A hint to the server to inline the contents of the listed output files.
    /// Each path needs to exactly match one file path in either `output_paths` or
    /// `output_files` (DEPRECATED since v2.1) in the
    /// \[Command\]\[build.bazel.remote.execution.v2.Command\] message.
    #[prost(string, repeated, tag = "5")]
    pub inline_output_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The digest function that was used to compute the action digest.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the action digest hash and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "6")]
    pub digest_function: i32,
}
/// A request message for
/// \[ActionCache.UpdateActionResult\]\[build.bazel.remote.execution.v2.ActionCache.UpdateActionResult\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateActionResultRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The digest of the \[Action\]\[build.bazel.remote.execution.v2.Action\]
    /// whose result is being uploaded.
    #[prost(message, optional, tag = "2")]
    pub action_digest: ::core::option::Option<Digest>,
    /// The \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\]
    /// to store in the cache.
    #[prost(message, optional, tag = "3")]
    pub action_result: ::core::option::Option<ActionResult>,
    /// An optional policy for the results of this execution in the remote cache.
    /// The server will have a default policy if this is not provided.
    /// This may be applied to both the ActionResult and the associated blobs.
    #[prost(message, optional, tag = "4")]
    pub results_cache_policy: ::core::option::Option<ResultsCachePolicy>,
    /// The digest function that was used to compute the action digest.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the action digest hash and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "5")]
    pub digest_function: i32,
}
/// A request message for
/// \[ContentAddressableStorage.FindMissingBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindMissingBlobsRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// A list of the blobs to check. All digests MUST use the same digest
    /// function.
    #[prost(message, repeated, tag = "2")]
    pub blob_digests: ::prost::alloc::vec::Vec<Digest>,
    /// The digest function of the blobs whose existence is checked.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the blob digest hashes and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "3")]
    pub digest_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.FindMissingBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindMissingBlobsResponse {
    /// A list of the blobs requested *not* present in the storage.
    #[prost(message, repeated, tag = "2")]
    pub missing_blob_digests: ::prost::alloc::vec::Vec<Digest>,
}
/// A request message for
/// \[ContentAddressableStorage.BatchUpdateBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateBlobsRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The individual upload requests.
    #[prost(message, repeated, tag = "2")]
    pub requests: ::prost::alloc::vec::Vec<batch_update_blobs_request::Request>,
    /// The digest function that was used to compute the digests of the
    /// blobs being uploaded.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the blob digest hashes and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "5")]
    pub digest_function: i32,
}
/// Nested message and enum types in `BatchUpdateBlobsRequest`.
pub mod batch_update_blobs_request {
    /// A request corresponding to a single blob that the client wants to upload.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Request {
        /// The digest of the blob. This MUST be the digest of `data`. All
        /// digests MUST use the same digest function.
        #[prost(message, optional, tag = "1")]
        pub digest: ::core::option::Option<super::Digest>,
        /// The raw binary data.
        #[prost(bytes = "vec", tag = "2")]
        pub data: ::prost::alloc::vec::Vec<u8>,
        /// The format of `data`. Must be `IDENTITY`/unspecified, or one of the
        /// compressors advertised by the
        /// \[CacheCapabilities.supported_batch_update_compressors\]\[build.bazel.remote.execution.v2.CacheCapabilities.supported_batch_update_compressors\]
        /// field.
        #[prost(enumeration = "super::compressor::Value", tag = "3")]
        pub compressor: i32,
    }
}
/// A response message for
/// \[ContentAddressableStorage.BatchUpdateBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateBlobsResponse {
    /// The responses to the requests.
    #[prost(message, repeated, tag = "1")]
    pub responses: ::prost::alloc::vec::Vec<batch_update_blobs_response::Response>,
}
/// Nested message and enum types in `BatchUpdateBlobsResponse`.
pub mod batch_update_blobs_response {
    /// A response corresponding to a single blob that the client tried to upload.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Response {
        /// The blob digest to which this response corresponds.
        #[prost(message, optional, tag = "1")]
        pub digest: ::core::option::Option<super::Digest>,
        /// The result of attempting to upload that blob.
        #[prost(message, optional, tag = "2")]
        pub status: ::core::option::Option<
            super::super::super::super::super::super::google::rpc::Status,
        >,
    }
}
/// A request message for
/// \[ContentAddressableStorage.BatchReadBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReadBlobsRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The individual blob digests. All digests MUST use the same digest
    /// function.
    #[prost(message, repeated, tag = "2")]
    pub digests: ::prost::alloc::vec::Vec<Digest>,
    /// A list of acceptable encodings for the returned inlined data, in no
    /// particular order. `IDENTITY` is always allowed even if not specified here.
    #[prost(enumeration = "compressor::Value", repeated, tag = "3")]
    pub acceptable_compressors: ::prost::alloc::vec::Vec<i32>,
    /// The digest function of the blobs being requested.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the blob digest hashes and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "4")]
    pub digest_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.BatchReadBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReadBlobsResponse {
    /// The responses to the requests.
    #[prost(message, repeated, tag = "1")]
    pub responses: ::prost::alloc::vec::Vec<batch_read_blobs_response::Response>,
}
/// Nested message and enum types in `BatchReadBlobsResponse`.
pub mod batch_read_blobs_response {
    /// A response corresponding to a single blob that the client tried to download.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Response {
        /// The digest to which this response corresponds.
        #[prost(message, optional, tag = "1")]
        pub digest: ::core::option::Option<super::Digest>,
        /// The raw binary data.
        #[prost(bytes = "vec", tag = "2")]
        pub data: ::prost::alloc::vec::Vec<u8>,
        /// The format the data is encoded in. MUST be `IDENTITY`/unspecified,
        /// or one of the acceptable compressors specified in the `BatchReadBlobsRequest`.
        #[prost(enumeration = "super::compressor::Value", tag = "4")]
        pub compressor: i32,
        /// The result of attempting to download that blob.
        #[prost(message, optional, tag = "3")]
        pub status: ::core::option::Option<
            super::super::super::super::super::super::google::rpc::Status,
        >,
    }
}
/// A request message for
/// \[ContentAddressableStorage.GetTree\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTreeRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The digest of the root, which must be an encoded
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] message
    /// stored in the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
    #[prost(message, optional, tag = "2")]
    pub root_digest: ::core::option::Option<Digest>,
    /// A maximum page size to request. If present, the server will request no more
    /// than this many items. Regardless of whether a page size is specified, the
    /// server may place its own limit on the number of items to be returned and
    /// require the client to retrieve more items using a subsequent request.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// A page token, which must be a value received in a previous
    /// \[GetTreeResponse\]\[build.bazel.remote.execution.v2.GetTreeResponse\].
    /// If present, the server will use that token as an offset, returning only
    /// that page and the ones that succeed it.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// The digest function that was used to compute the digest of the root
    /// directory.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the root digest hash and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "5")]
    pub digest_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.GetTree\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTreeResponse {
    /// The directories descended from the requested root.
    #[prost(message, repeated, tag = "1")]
    pub directories: ::prost::alloc::vec::Vec<Directory>,
    /// If present, signifies that there are more results which the client can
    /// retrieve by passing this as the page_token in a subsequent
    /// \[request\]\[build.bazel.remote.execution.v2.GetTreeRequest\].
    /// If empty, signifies that this is the last page of results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// A request message for
/// \[ContentAddressableStorage.SplitBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SplitBlobRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The digest of the blob to be split.
    #[prost(message, optional, tag = "2")]
    pub blob_digest: ::core::option::Option<Digest>,
    /// The digest function of the blob to be split.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256,
    /// SHA384, SHA512, or VSO, the client MAY leave this field unset. In
    /// that case the server SHOULD infer the digest function using the
    /// length of the blob digest hashes and the digest functions announced
    /// in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "3")]
    pub digest_function: i32,
    /// The chunking function that the client prefers to use.
    ///
    /// The server MAY use a different chunking function.
    #[prost(enumeration = "chunking_function::Value", tag = "4")]
    pub chunking_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.SplitBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitBlobResponse {
    /// The ordered list of digests of the chunks into which the blob was split.
    /// The original blob is assembled by concatenating the chunk data according to
    /// the order of the digests given by this list.
    ///
    /// The server MUST use the same digest function as the one explicitly or
    /// implicitly (through hash length) specified in the split request.
    #[prost(message, repeated, tag = "1")]
    pub chunk_digests: ::prost::alloc::vec::Vec<Digest>,
    /// The chunking function used to split the blob.
    #[prost(enumeration = "chunking_function::Value", tag = "2")]
    pub chunking_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChunkMappingResponse {
    /// The ordered list of digests of the chunks into which the blob was split.
    /// The original blob is assembled by concatenating the chunk data according to
    /// the order of the digests in this field, across all responses in stream
    /// order.
    ///
    /// Servers SHOULD limit the number of digests in each response to remain below
    /// the maximum message size accepted by the client/server pair.
    ///
    /// An empty list is allowed in any response. It contributes no chunks to the
    /// assembled chunk list; clients MUST continue reading until the stream closes.
    ///
    /// The server MUST use the same digest function as the one explicitly or
    /// implicitly (through hash length) specified in the split request.
    #[prost(message, repeated, tag = "1")]
    pub chunk_digests: ::prost::alloc::vec::Vec<Digest>,
    /// The chunking function used to split the blob. Clients MUST use the value
    /// from the first response and ignore values sent on subsequent responses.
    /// Servers SHOULD omit this field on subsequent responses.
    #[prost(enumeration = "chunking_function::Value", tag = "2")]
    pub chunking_function: i32,
}
/// A request message for
/// \[ContentAddressableStorage.SpliceBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SpliceBlob\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpliceBlobRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// Expected digest of the spliced blob. The client MUST set this field due
    /// to the following reasons:
    ///
    /// 1. It allows the server to perform an early existence check of the blob
    ///    or existing chunks that assemble the blob before spending the splicing
    ///    effort, as described in the \[ContentAddressableStorage.SpliceBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SpliceBlob\]
    ///    documentation.
    /// 1. It allows servers with different storage backends to dispatch the
    ///    request to the correct storage backend based on the size and/or the
    ///    hash of the blob.
    /// 1. If chunking information already exists for the blob, it allows
    ///    the server to keep the existing chunking information or replace it with
    ///    new chunking information.
    #[prost(message, optional, tag = "2")]
    pub blob_digest: ::core::option::Option<Digest>,
    /// The ordered list of digests of the chunks which need to be concatenated to
    /// assemble the original blob.
    #[prost(message, repeated, tag = "3")]
    pub chunk_digests: ::prost::alloc::vec::Vec<Digest>,
    /// The digest function of all chunks to be concatenated and of the blob to be
    /// spliced. The server MUST use the same digest function for both cases.
    ///
    /// If the digest function used is one of MD5, MURMUR3, SHA1, SHA256, SHA384,
    /// SHA512, or VSO, the client MAY leave this field unset. In that case the
    /// server SHOULD infer the digest function using the length of the blob digest
    /// hashes and the digest functions announced in the server's capabilities.
    #[prost(enumeration = "digest_function::Value", tag = "4")]
    pub digest_function: i32,
    /// The chunking function that the client used to split the blob.
    #[prost(enumeration = "chunking_function::Value", tag = "5")]
    pub chunking_function: i32,
}
/// A request message for
/// \[ContentAddressableStorage.RegisterChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.RegisterChunkMapping\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterChunkMappingRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted. Servers MUST use the value from the first request and ignore
    /// values sent on subsequent requests.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// Expected digest of the spliced blob. Clients MUST set this on the first
    /// request. Servers MUST use the value from the first request and ignore values
    /// sent on subsequent requests.
    #[prost(message, optional, tag = "2")]
    pub blob_digest: ::core::option::Option<Digest>,
    /// The ordered list of digests of the chunks which need to be concatenated to
    /// assemble the original blob. Chunk digests may be split across multiple
    /// stream requests. The original blob is assembled by concatenating chunks in
    /// the order of these digests across all requests in stream order.
    ///
    /// Clients SHOULD limit the number of digests in each request to remain below
    /// the maximum message size accepted by the client/server pair.
    ///
    /// An empty list is allowed in any request. It contributes no chunks to the
    /// assembled chunk list.
    #[prost(message, repeated, tag = "3")]
    pub chunk_digests: ::prost::alloc::vec::Vec<Digest>,
    /// The digest function of all chunks to be concatenated and of the blob to be
    /// spliced. The server MUST use the same digest function for both cases.
    /// Clients MUST set this field to a value other than UNKNOWN on the first
    /// request. Servers MUST use the value from the first request and ignore values
    /// sent on subsequent requests.
    #[prost(enumeration = "digest_function::Value", tag = "4")]
    pub digest_function: i32,
    /// The chunking function that the client used to split the blob. Servers MUST
    /// use the value from the first request and ignore values sent on subsequent
    /// requests.
    #[prost(enumeration = "chunking_function::Value", tag = "5")]
    pub chunking_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.SpliceBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SpliceBlob\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SpliceBlobResponse {
    /// Computed digest of the spliced blob.
    ///
    /// The server MUST use the same digest function as the one explicitly or
    /// implicitly (through hash length) specified in the splice request.
    #[prost(message, optional, tag = "1")]
    pub blob_digest: ::core::option::Option<Digest>,
}
/// A request message for
/// \[Capabilities.GetCapabilities\]\[build.bazel.remote.execution.v2.Capabilities.GetCapabilities\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetCapabilitiesRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
}
/// A response message for
/// \[Capabilities.GetCapabilities\]\[build.bazel.remote.execution.v2.Capabilities.GetCapabilities\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerCapabilities {
    /// Capabilities of the remote cache system.
    #[prost(message, optional, tag = "1")]
    pub cache_capabilities: ::core::option::Option<CacheCapabilities>,
    /// Capabilities of the remote execution system.
    #[prost(message, optional, tag = "2")]
    pub execution_capabilities: ::core::option::Option<ExecutionCapabilities>,
    /// Earliest RE API version supported, including deprecated versions.
    #[prost(message, optional, tag = "3")]
    pub deprecated_api_version: ::core::option::Option<
        super::super::super::semver::SemVer,
    >,
    /// Earliest non-deprecated RE API version supported.
    #[prost(message, optional, tag = "4")]
    pub low_api_version: ::core::option::Option<super::super::super::semver::SemVer>,
    /// Latest RE API version supported.
    #[prost(message, optional, tag = "5")]
    pub high_api_version: ::core::option::Option<super::super::super::semver::SemVer>,
}
/// The digest function used for converting values into keys for CAS and Action
/// Cache.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DigestFunction {}
/// Nested message and enum types in `DigestFunction`.
pub mod digest_function {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Value {
        /// It is an error for the server to return this value.
        Unknown = 0,
        /// The SHA-256 digest function.
        Sha256 = 1,
        /// The SHA-1 digest function.
        Sha1 = 2,
        /// The MD5 digest function.
        Md5 = 3,
        /// The Microsoft "VSO-Hash" paged SHA256 digest function.
        /// See <https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md> .
        Vso = 4,
        /// The SHA-384 digest function.
        Sha384 = 5,
        /// The SHA-512 digest function.
        Sha512 = 6,
        /// Murmur3 128-bit digest function, x64 variant. Note that this is not a
        /// cryptographic hash function and its collision properties are not strongly guaranteed.
        /// See <https://github.com/aappleby/smhasher/wiki/MurmurHash3> .
        Murmur3 = 7,
        /// The SHA-256 digest function, modified to use a Merkle tree for
        /// large objects. This permits implementations to store large blobs
        /// as a decomposed sequence of 2^j sized chunks, where j >= 10,
        /// while being able to validate integrity at the chunk level.
        ///
        /// Furthermore, on systems that do not offer dedicated instructions
        /// for computing SHA-256 hashes (e.g., the Intel SHA and ARMv8
        /// cryptographic extensions), SHA256TREE hashes can be computed more
        /// efficiently than plain SHA-256 hashes by using generic SIMD
        /// extensions, such as Intel AVX2 or ARM NEON.
        ///
        /// SHA256TREE hashes are computed as follows:
        ///
        /// * For blobs that are 1024 bytes or smaller, the hash is computed
        ///   using the regular SHA-256 digest function.
        ///
        /// * For blobs that are more than 1024 bytes in size, the hash is
        ///   computed as follows:
        ///
        ///   1. The blob is partitioned into a left (leading) and right
        ///      (trailing) blob. These blobs have lengths m and n
        ///      respectively, where m = 2^k and 0 \< n \<= m.
        ///
        ///   1. Hashes of the left and right blob, Hash(left) and
        ///      Hash(right) respectively, are computed by recursively
        ///      applying the SHA256TREE algorithm.
        ///
        ///   1. A single invocation is made to the SHA-256 block cipher with
        ///      the following parameters:
        ///
        ///      ```text
        ///      M = Hash(left) || Hash(right)
        ///      H = {
        ///          0xcbbb9d5d, 0x629a292a, 0x9159015a, 0x152fecd8,
        ///          0x67332667, 0x8eb44a87, 0xdb0c2e0d, 0x47b5481d,
        ///      }
        ///      ```
        ///
        ///      The values of H are the leading fractional parts of the
        ///      square roots of the 9th to the 16th prime number (23 to 53).
        ///      This differs from plain SHA-256, where the first eight prime
        ///      numbers (2 to 19) are used, thereby preventing trivial hash
        ///      collisions between small and large objects.
        ///
        ///   1. The hash of the full blob can then be obtained by
        ///      concatenating the outputs of the block cipher:
        ///
        ///      ```text
        ///      Hash(blob) = a || b || c || d || e || f || g || h
        ///      ```
        ///
        ///      Addition of the original values of H, as normally done
        ///      through the use of the Davies-Meyer structure, is not
        ///      performed. This isn't necessary, as the block cipher is only
        ///      invoked once.
        ///
        /// Test vectors of this digest function can be found in the
        /// accompanying sha256tree_test_vectors.txt file.
        Sha256tree = 8,
        /// The BLAKE3 hash function.
        /// See <https://github.com/BLAKE3-team/BLAKE3.>
        Blake3 = 9,
        /// Identical to SHA1, except that "blob ${sizeBytes}\0" is prepended to
        /// the blob's contents before hashing, where ${sizeBytes} corresponds to
        /// the decimal size of the original blob. This allows hashes of files to
        /// be converted from and to the ones used by the Git version control
        /// system.
        Gitsha1 = 10,
    }
    impl Value {
        /// 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::Unknown => "UNKNOWN",
                Self::Sha256 => "SHA256",
                Self::Sha1 => "SHA1",
                Self::Md5 => "MD5",
                Self::Vso => "VSO",
                Self::Sha384 => "SHA384",
                Self::Sha512 => "SHA512",
                Self::Murmur3 => "MURMUR3",
                Self::Sha256tree => "SHA256TREE",
                Self::Blake3 => "BLAKE3",
                Self::Gitsha1 => "GITSHA1",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "SHA256" => Some(Self::Sha256),
                "SHA1" => Some(Self::Sha1),
                "MD5" => Some(Self::Md5),
                "VSO" => Some(Self::Vso),
                "SHA384" => Some(Self::Sha384),
                "SHA512" => Some(Self::Sha512),
                "MURMUR3" => Some(Self::Murmur3),
                "SHA256TREE" => Some(Self::Sha256tree),
                "BLAKE3" => Some(Self::Blake3),
                "GITSHA1" => Some(Self::Gitsha1),
                _ => None,
            }
        }
    }
}
/// The chunking function is used to split a blob into chunks.
///
/// The server advertises support for a chunking function by setting the
/// corresponding params field in
/// \[CacheCapabilities\]\[build.bazel.remote.execution.v2.CacheCapabilities\].
/// For example, if fast_cdc_2020_params is set, the server supports FAST_CDC_2020.
///
/// For optimal deduplication, clients SHOULD use an advertised chunking function.
/// When clients use UNKNOWN, the server chooses an algorithm for GetChunkMapping
/// and simply verifies chunk concatenation for RegisterChunkMapping.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChunkingFunction {}
/// Nested message and enum types in `ChunkingFunction`.
pub mod chunking_function {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Value {
        /// No specific algorithm. Servers MUST always accept this value.
        /// For GetChunkMapping, the server chooses the algorithm. For
        /// RegisterChunkMapping, the server only verifies that chunks concatenate to
        /// form the expected blob.
        Unknown = 0,
        /// The FastCDC chunking algorithm as described in the 2020 paper by
        /// Wen Xia, et al. See <https://ieeexplore.ieee.org/document/9055082>
        /// for details.
        FastCdc2020 = 1,
        /// The RepMaxCDC chunking algorithm as implemented by buildbarn/go-cdc.
        /// See <https://github.com/buildbarn/go-cdc> for details.
        RepMaxCdc = 2,
    }
    impl Value {
        /// 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::Unknown => "UNKNOWN",
                Self::FastCdc2020 => "FAST_CDC_2020",
                Self::RepMaxCdc => "REP_MAX_CDC",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "FAST_CDC_2020" => Some(Self::FastCdc2020),
                "REP_MAX_CDC" => Some(Self::RepMaxCdc),
                _ => None,
            }
        }
    }
}
/// Describes the server/instance capabilities for updating the action cache.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ActionCacheUpdateCapabilities {
    #[prost(bool, tag = "1")]
    pub update_enabled: bool,
}
/// Allowed values for priority in
/// \[ResultsCachePolicy\]\[build.bazel.remote.execution.v2.ResultsCachePolicy\] and
/// \[ExecutionPolicy\]\[build.bazel.remote.execution.v2.ExecutionPolicy\]
/// Used for querying both cache and execution valid priority ranges.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PriorityCapabilities {
    #[prost(message, repeated, tag = "1")]
    pub priorities: ::prost::alloc::vec::Vec<priority_capabilities::PriorityRange>,
}
/// Nested message and enum types in `PriorityCapabilities`.
pub mod priority_capabilities {
    /// Supported range of priorities, including boundaries.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct PriorityRange {
        /// The minimum numeric value for this priority range, which represents the
        /// most urgent task or longest retained item.
        #[prost(int32, tag = "1")]
        pub min_priority: i32,
        /// The maximum numeric value for this priority range, which represents the
        /// least urgent task or shortest retained item.
        #[prost(int32, tag = "2")]
        pub max_priority: i32,
    }
}
/// Describes how the server treats absolute symlink targets.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SymlinkAbsolutePathStrategy {}
/// Nested message and enum types in `SymlinkAbsolutePathStrategy`.
pub mod symlink_absolute_path_strategy {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Value {
        /// Invalid value.
        Unknown = 0,
        /// Server will return an `INVALID_ARGUMENT` on input symlinks with absolute
        /// targets.
        /// If an action tries to create an output symlink with an absolute target, a
        /// `FAILED_PRECONDITION` will be returned.
        Disallowed = 1,
        /// Server will allow symlink targets to escape the input root tree, possibly
        /// resulting in non-hermetic builds.
        Allowed = 2,
    }
    impl Value {
        /// 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::Unknown => "UNKNOWN",
                Self::Disallowed => "DISALLOWED",
                Self::Allowed => "ALLOWED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "DISALLOWED" => Some(Self::Disallowed),
                "ALLOWED" => Some(Self::Allowed),
                _ => None,
            }
        }
    }
}
/// Compression formats which may be supported.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Compressor {}
/// Nested message and enum types in `Compressor`.
pub mod compressor {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Value {
        /// No compression. Servers and clients MUST always support this, and do
        /// not need to advertise it.
        Identity = 0,
        /// Zstandard compression.
        Zstd = 1,
        /// RFC 1951 Deflate. This format is identical to what is used by ZIP
        /// files. Headers such as the one generated by gzip are not
        /// included.
        ///
        /// It is advised to use algorithms such as Zstandard instead, as
        /// those are faster and/or provide a better compression ratio.
        Deflate = 2,
        /// Brotli compression.
        Brotli = 3,
    }
    impl Value {
        /// 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::Identity => "IDENTITY",
                Self::Zstd => "ZSTD",
                Self::Deflate => "DEFLATE",
                Self::Brotli => "BROTLI",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "IDENTITY" => Some(Self::Identity),
                "ZSTD" => Some(Self::Zstd),
                "DEFLATE" => Some(Self::Deflate),
                "BROTLI" => Some(Self::Brotli),
                _ => None,
            }
        }
    }
}
/// Capabilities of the remote cache system.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheCapabilities {
    /// All the digest functions supported by the remote cache.
    /// Remote cache may support multiple digest functions simultaneously.
    #[prost(enumeration = "digest_function::Value", repeated, tag = "1")]
    pub digest_functions: ::prost::alloc::vec::Vec<i32>,
    /// Capabilities for updating the action cache.
    #[prost(message, optional, tag = "2")]
    pub action_cache_update_capabilities: ::core::option::Option<
        ActionCacheUpdateCapabilities,
    >,
    /// Supported cache priority range for both CAS and ActionCache.
    #[prost(message, optional, tag = "3")]
    pub cache_priority_capabilities: ::core::option::Option<PriorityCapabilities>,
    /// Maximum total size of blobs to be uploaded/downloaded using
    /// batch methods. A value of 0 means no limit is set, although
    /// in practice there will always be a message size limitation
    /// of the protocol in use, e.g. GRPC.
    #[prost(int64, tag = "4")]
    pub max_batch_total_size_bytes: i64,
    /// Whether absolute symlink targets are supported.
    #[prost(enumeration = "symlink_absolute_path_strategy::Value", tag = "5")]
    pub symlink_absolute_path_strategy: i32,
    /// Compressors supported by the "compressed-blobs" bytestream resources.
    /// Servers MUST support identity/no-compression, even if it is not listed
    /// here.
    ///
    /// Note that this does not imply which if any compressors are supported by
    /// the server at the gRPC level.
    #[prost(enumeration = "compressor::Value", repeated, tag = "6")]
    pub supported_compressors: ::prost::alloc::vec::Vec<i32>,
    /// Compressors supported for inlined data in
    /// \[BatchUpdateBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs\]
    /// requests.
    #[prost(enumeration = "compressor::Value", repeated, tag = "7")]
    pub supported_batch_update_compressors: ::prost::alloc::vec::Vec<i32>,
    /// The maximum blob size that the server will accept for CAS blob uploads.
    ///
    /// * If it is 0, it means there is no limit set. A client may assume
    ///   arbitrarily large blobs may be uploaded to and downloaded from the cache.
    /// * If it is larger than 0, implementations SHOULD NOT attempt to upload
    ///   blobs with size larger than the limit. Servers SHOULD reject blob
    ///   uploads over the `max_cas_blob_size_bytes` limit with response code
    ///   `INVALID_ARGUMENT`
    /// * If the cache implementation returns a given limit, it MAY still serve
    ///   blobs larger than this limit.
    #[prost(int64, tag = "8")]
    pub max_cas_blob_size_bytes: i64,
    /// Whether blob splitting is supported for the particular server/instance. If
    /// yes, the server/instance implements the specified behavior for blob
    /// splitting and a meaningful result can be expected from the
    /// \[ContentAddressableStorage.SplitBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob\]
    /// operation for RE API v2.12 and from the
    /// \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
    /// operation for RE API v2.13 or higher.
    #[prost(bool, tag = "9")]
    pub split_blob_support: bool,
    /// Whether blob splicing is supported for the particular server/instance. If
    /// yes, the server/instance implements the specified behavior for blob
    /// splicing and a meaningful result can be expected from the
    /// \[ContentAddressableStorage.SpliceBlob\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.SpliceBlob\]
    /// operation for RE API v2.12 and from the
    /// \[ContentAddressableStorage.RegisterChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.RegisterChunkMapping\]
    /// operation for RE API v2.13 or higher.
    #[prost(bool, tag = "10")]
    pub splice_blob_support: bool,
    /// The parameters for the FastCDC 2020 chunking algorithm.
    /// If set, the server supports the FastCDC chunking algorithm.
    #[prost(message, optional, tag = "11")]
    pub fast_cdc_2020_params: ::core::option::Option<FastCdc2020Params>,
    /// The parameters for the RepMaxCDC chunking algorithm.
    /// If set, the server supports the RepMaxCDC chunking algorithm.
    #[prost(message, optional, tag = "12")]
    pub rep_max_cdc_params: ::core::option::Option<RepMaxCdcParams>,
}
/// Parameters for the FastCDC content-defined chunking algorithm.
///
/// Implementations MUST follow the FastCDC 2020 paper by Wen Xia, et al.:
/// <https://ieeexplore.ieee.org/document/9055082>
///
/// Supported implementations:
///
/// * Rust: <https://docs.rs/fastcdc/3.2.1/fastcdc/v2020/index.html>
/// * Go: <https://github.com/buildbuddy-io/fastcdc2020>
///
/// Test vectors can be found in the accompanying fastcdc2020_test_vectors.txt file.
///
/// Implementations MUST use normalization level 2, which has been found
/// successful for build artifacts with an average chunk size of 512 KiB.
///
/// Key algorithm components from the paper:
///
/// GEAR table: 256 64-bit integers for the rolling hash, computed as:
/// GEAR\[i\] = high_64_bits(MD5(byte(i))) for i in 0..255
///
/// MASKS table: Bit patterns for chunk boundary detection, derived from
/// the C reference implementation. The mask selection based on average
/// chunk size SHOULD match the paper.
///
/// The minimum and maximum chunk sizes MUST be derived from the average:
///
/// * min_chunk_size = avg_chunk_size_bytes / 4
/// * max_chunk_size = avg_chunk_size_bytes * 4
///
/// Blobs smaller than max_chunk_size (avg_chunk_size_bytes * 4) SHOULD be
/// uploaded without chunking.
///
/// If any of the advertised parameters are not within the expected range,
/// the client SHOULD ignore FastCDC chunking function support.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FastCdc2020Params {
    /// The average (expected) chunk size for the FastCDC chunking algorithm.
    /// The value MUST be between 1 KiB and 8 MiB. The recommended value is
    /// 524288 (512 KiB).
    #[prost(uint64, tag = "1")]
    pub avg_chunk_size_bytes: u64,
    /// The seed for the FastCDC mask generation.
    /// The recommended value is 0.
    ///
    /// All clients sharing a cache SHOULD use the same seed to maximize
    /// chunk reuse.
    #[prost(uint32, tag = "2")]
    pub seed: u32,
}
/// Parameters for the RepMaxCDC content-defined chunking algorithm.
///
/// Supported implementations:
///
/// * Go: <https://github.com/buildbarn/go-cdc>
///
/// Key algorithm components:
///
/// GEAR table: 256 64-bit integers for the rolling hash, computed as:
/// GEAR\[i\] = high_64_bits(MD5(byte(i))) for i in 0..255
///
/// The algorithm repeatedly applies chunking until all chunks are in the
/// range \[min_chunk_size_bytes, 2\*min_chunk_size_bytes). Cutting points are
/// selected where the Gear rolling hash is maximized within a lookahead
/// window of horizon_size_bytes.
///
/// For sufficiently large files, the average chunk size prior to
/// deduplication will approximately be min_chunk_size_bytes divided by
/// Rényi's parking constant (0.7475979203...). More details:
/// <https://mathworld.wolfram.com/RenyisParkingConstants.html>
///
/// If any of the advertised parameters are not within the expected range,
/// the client SHOULD ignore RepMaxCDC chunking function support.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RepMaxCdcParams {
    /// The minimum chunk size for the RepMaxCDC chunking algorithm.
    /// The value MUST be at least 64 bytes (the Gear hash window size).
    /// All chunks will be in the range \[min_chunk_size_bytes, 2\*min_chunk_size_bytes).
    /// The recommended value is 262144 (256 KiB).
    #[prost(uint64, tag = "1")]
    pub min_chunk_size_bytes: u64,
    /// The lookahead window for finding optimal cutting points.
    /// Larger values improve deduplication quality with diminishing returns.
    /// Setting to 0 produces uniform chunks of min_chunk_size_bytes.
    /// The recommended value is 8 * min_chunk_size_bytes.
    #[prost(uint64, tag = "2")]
    pub horizon_size_bytes: u64,
}
/// Capabilities of the remote execution system.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionCapabilities {
    /// Legacy field for indicating which digest function is supported by the
    /// remote execution system. It MUST be set to a value other than UNKNOWN.
    /// Implementations should consider the repeated digest_functions field
    /// first, falling back to this singular field if digest_functions is unset.
    #[prost(enumeration = "digest_function::Value", tag = "1")]
    pub digest_function: i32,
    /// Whether remote execution is enabled for the particular server/instance.
    #[prost(bool, tag = "2")]
    pub exec_enabled: bool,
    /// Supported execution priority range.
    #[prost(message, optional, tag = "3")]
    pub execution_priority_capabilities: ::core::option::Option<PriorityCapabilities>,
    /// Supported node properties.
    #[prost(string, repeated, tag = "4")]
    pub supported_node_properties: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// All the digest functions supported by the remote execution system.
    /// If this field is set, it MUST also contain digest_function.
    ///
    /// Even if the remote execution system announces support for multiple
    /// digest functions, individual execution requests may only reference
    /// CAS objects using a single digest function. For example, it is not
    /// permitted to execute actions having both MD5 and SHA-256 hashed
    /// files in their input root.
    ///
    /// The CAS objects referenced by action results generated by the
    /// remote execution system MUST use the same digest function as the
    /// one used to construct the action.
    #[prost(enumeration = "digest_function::Value", repeated, tag = "5")]
    pub digest_functions: ::prost::alloc::vec::Vec<i32>,
}
/// Details for the tool used to call the API.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ToolDetails {
    /// Name of the tool, e.g. bazel.
    #[prost(string, tag = "1")]
    pub tool_name: ::prost::alloc::string::String,
    /// Version of the tool used for the request, e.g. 5.0.3.
    #[prost(string, tag = "2")]
    pub tool_version: ::prost::alloc::string::String,
}
/// An optional Metadata to attach to any RPC request to tell the server about an
/// external context of the request. The server may use this for logging or other
/// purposes. To use it, the client attaches the header to the call using the
/// canonical proto serialization:
///
/// * name: `build.bazel.remote.execution.v2.requestmetadata-bin`
/// * contents: the base64 encoded binary `RequestMetadata` message.
///   Note: the gRPC library serializes binary headers encoded in base64 by
///   default (<https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests>).
///   Therefore, if the gRPC library is used to pass/retrieve this
///   metadata, the user may ignore the base64 encoding and assume it is simply
///   serialized as a binary message.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RequestMetadata {
    /// The details for the tool invoking the requests.
    #[prost(message, optional, tag = "1")]
    pub tool_details: ::core::option::Option<ToolDetails>,
    /// An identifier that ties multiple requests to the same action.
    /// For example, multiple requests to the CAS, Action Cache, and Execution
    /// API are used in order to compile foo.cc.
    #[prost(string, tag = "2")]
    pub action_id: ::prost::alloc::string::String,
    /// An identifier that ties multiple actions together to a final result.
    /// For example, multiple actions are required to build and run foo_test.
    #[prost(string, tag = "3")]
    pub tool_invocation_id: ::prost::alloc::string::String,
    /// An identifier to tie multiple tool invocations together. For example,
    /// runs of foo_test, bar_test and baz_test on a post-submit of a given patch.
    #[prost(string, tag = "4")]
    pub correlated_invocations_id: ::prost::alloc::string::String,
    /// A brief description of the kind of action, for example, CppCompile or GoLink.
    /// There is no standard agreed set of values for this, and they are expected to vary between different client tools.
    #[prost(string, tag = "5")]
    pub action_mnemonic: ::prost::alloc::string::String,
    /// An identifier for the target which produced this action.
    /// No guarantees are made around how many actions may relate to a single target.
    #[prost(string, tag = "6")]
    pub target_id: ::prost::alloc::string::String,
    /// An identifier for the configuration in which the target was built,
    /// e.g. for differentiating building host tools or different target platforms.
    /// There is no expectation that this value will have any particular structure,
    /// or equality across invocations, though some client tools may offer these guarantees.
    #[prost(string, tag = "7")]
    pub configuration_id: ::prost::alloc::string::String,
}
/// A request message for
/// \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetChunkMappingRequest {
    /// The instance of the execution system to operate against. A server may
    /// support multiple instances of the execution system (with their own workers,
    /// storage, caches, etc.). The server MAY require use of this field to select
    /// between them in an implementation-defined fashion, otherwise it can be
    /// omitted.
    #[prost(string, tag = "1")]
    pub instance_name: ::prost::alloc::string::String,
    /// The digest of the blob to be split.
    #[prost(message, optional, tag = "2")]
    pub blob_digest: ::core::option::Option<Digest>,
    /// The digest function of the blob to be split. Clients MUST set this field to
    /// a value other than UNKNOWN.
    #[prost(enumeration = "digest_function::Value", tag = "3")]
    pub digest_function: i32,
    /// The chunking function that the client prefers to use.
    ///
    /// The server MAY use a different chunking function.
    #[prost(enumeration = "chunking_function::Value", tag = "4")]
    pub chunking_function: i32,
}
/// A response message for
/// \[ContentAddressableStorage.RegisterChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.RegisterChunkMapping\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegisterChunkMappingResponse {
    /// Computed digest of the spliced blob.
    ///
    /// The server MUST use the same digest function as the one explicitly or
    /// implicitly (through hash length) specified in the splice request.
    #[prost(message, optional, tag = "1")]
    pub blob_digest: ::core::option::Option<Digest>,
}
/// Generated client implementations.
pub mod execution_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Remote Execution API is used to execute an
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\] on the remote
    /// workers.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug, Clone)]
    pub struct ExecutionClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ExecutionClient<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> ExecutionClient<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,
        ) -> ExecutionClient<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,
        {
            ExecutionClient::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
        }
        /// Execute an action remotely.
        ///
        /// In order to execute an action, the client must first upload all of the
        /// inputs, the
        /// \[Command\]\[build.bazel.remote.execution.v2.Command\] to run, and the
        /// \[Action\]\[build.bazel.remote.execution.v2.Action\] into the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
        /// It then calls `Execute` with an `action_digest` referring to them. The
        /// server will run the action and eventually return the result.
        ///
        /// The input `Action`'s fields MUST meet the various canonicalization
        /// requirements specified in the documentation for their types so that it has
        /// the same digest as other logically equivalent `Action`s. The server MAY
        /// enforce the requirements and return errors if a non-canonical input is
        /// received. It MAY also proceed without verifying some or all of the
        /// requirements, such as for performance reasons. If the server does not
        /// verify the requirement, then it will treat the `Action` as distinct from
        /// another logically equivalent action if they hash differently.
        ///
        /// Returns a stream of
        /// \[google.longrunning.Operation\]\[google.longrunning.Operation\] messages
        /// describing the resulting execution, with eventual `response`
        /// \[ExecuteResponse\]\[build.bazel.remote.execution.v2.ExecuteResponse\]. The
        /// `metadata` on the operation is of type
        /// \[ExecuteOperationMetadata\]\[build.bazel.remote.execution.v2.ExecuteOperationMetadata\].
        ///
        /// If the client remains connected after the first response is returned after
        /// the server, then updates are streamed as if the client had called
        /// \[WaitExecution\]\[build.bazel.remote.execution.v2.Execution.WaitExecution\]
        /// until the execution completes or the request reaches an error. The
        /// operation can also be queried using \[Operations
        /// API\]\[google.longrunning.Operations.GetOperation\].
        ///
        /// The server NEED NOT implement other methods or functionality of the
        /// Operations API.
        ///
        /// Errors discovered during creation of the `Operation` will be reported
        /// as gRPC Status errors, while errors that occurred while running the
        /// action will be reported in the `status` field of the `ExecuteResponse`. The
        /// server MUST NOT set the `error` field of the `Operation` proto.
        /// The possible errors include:
        ///
        /// * `INVALID_ARGUMENT`: One or more arguments are invalid.
        /// * `FAILED_PRECONDITION`: One or more errors occurred in setting up the
        ///  action requested, such as a missing input or command or no worker being
        ///  available. The client may be able to fix the errors and retry.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run
        ///  the action.
        /// * `UNAVAILABLE`: Due to a transient condition, such as all workers being
        ///  occupied (and the server does not support a queue), the action could not
        ///  be started. The client should retry.
        /// * `INTERNAL`: An internal error occurred in the execution engine or the
        ///  worker.
        /// * `DEADLINE_EXCEEDED`: The execution timed out.
        /// * `CANCELLED`: The operation was cancelled by the client. This status is
        ///  only possible if the server implements the Operations API CancelOperation
        ///  method, and it was called for the current execution.
        ///
        /// In the case of a missing input or command, the server SHOULD additionally
        /// send a \[PreconditionFailure\]\[google.rpc.PreconditionFailure\] error detail
        /// where, for each requested blob not present in the CAS, there is a
        /// `Violation` with a `type` of `MISSING` and a `subject` of
        /// `"blobs/{digest_function/}{hash}/{size}"` indicating the digest of the
        /// missing blob. The `subject` is formatted the same way as the
        /// `resource_name` provided to
        /// \[ByteStream.Read\]\[google.bytestream.ByteStream.Read\], with the leading
        /// instance name omitted. `digest_function` MUST thus be omitted if its value
        /// is one of MD5, MURMUR3, SHA1, SHA256, SHA384, SHA512, or VSO.
        ///
        /// The server does not need to guarantee that a call to this method leads to
        /// at most one execution of the action. The server MAY execute the action
        /// multiple times, potentially in parallel. These redundant executions MAY
        /// continue to run, even if the operation is completed.
        pub async fn execute(
            &mut self,
            request: impl tonic::IntoRequest<super::ExecuteRequest>,
        ) -> std::result::Result<
            tonic::Response<
                tonic::codec::Streaming<
                    super::super::super::super::super::super::google::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(
                "/build.bazel.remote.execution.v2.Execution/Execute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.Execution",
                        "Execute",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Wait for an execution operation to complete. When the client initially
        /// makes the request, the server immediately responds with the current status
        /// of the execution. The server will leave the request stream open until the
        /// operation completes, and then respond with the completed operation. The
        /// server MAY choose to stream additional updates as execution progresses,
        /// such as to provide an update as to the state of the execution.
        ///
        /// In addition to the cases described for Execute, the WaitExecution method
        /// may fail as follows:
        ///
        /// * `NOT_FOUND`: The operation no longer exists due to any of a transient
        ///  condition, an unknown operation name, or if the server implements the
        ///  Operations API DeleteOperation method and it was called for the current
        ///  execution. The client should call `Execute` to retry.
        pub async fn wait_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::WaitExecutionRequest>,
        ) -> std::result::Result<
            tonic::Response<
                tonic::codec::Streaming<
                    super::super::super::super::super::super::google::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(
                "/build.bazel.remote.execution.v2.Execution/WaitExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.Execution",
                        "WaitExecution",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod execution_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with ExecutionServer.
    #[async_trait]
    pub trait Execution: std::marker::Send + std::marker::Sync + 'static {
        /// Server streaming response type for the Execute method.
        type ExecuteStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<
                    super::super::super::super::super::super::google::longrunning::Operation,
                    tonic::Status,
                >,
            >
            + std::marker::Send
            + 'static;
        /// Execute an action remotely.
        ///
        /// In order to execute an action, the client must first upload all of the
        /// inputs, the
        /// \[Command\]\[build.bazel.remote.execution.v2.Command\] to run, and the
        /// \[Action\]\[build.bazel.remote.execution.v2.Action\] into the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\].
        /// It then calls `Execute` with an `action_digest` referring to them. The
        /// server will run the action and eventually return the result.
        ///
        /// The input `Action`'s fields MUST meet the various canonicalization
        /// requirements specified in the documentation for their types so that it has
        /// the same digest as other logically equivalent `Action`s. The server MAY
        /// enforce the requirements and return errors if a non-canonical input is
        /// received. It MAY also proceed without verifying some or all of the
        /// requirements, such as for performance reasons. If the server does not
        /// verify the requirement, then it will treat the `Action` as distinct from
        /// another logically equivalent action if they hash differently.
        ///
        /// Returns a stream of
        /// \[google.longrunning.Operation\]\[google.longrunning.Operation\] messages
        /// describing the resulting execution, with eventual `response`
        /// \[ExecuteResponse\]\[build.bazel.remote.execution.v2.ExecuteResponse\]. The
        /// `metadata` on the operation is of type
        /// \[ExecuteOperationMetadata\]\[build.bazel.remote.execution.v2.ExecuteOperationMetadata\].
        ///
        /// If the client remains connected after the first response is returned after
        /// the server, then updates are streamed as if the client had called
        /// \[WaitExecution\]\[build.bazel.remote.execution.v2.Execution.WaitExecution\]
        /// until the execution completes or the request reaches an error. The
        /// operation can also be queried using \[Operations
        /// API\]\[google.longrunning.Operations.GetOperation\].
        ///
        /// The server NEED NOT implement other methods or functionality of the
        /// Operations API.
        ///
        /// Errors discovered during creation of the `Operation` will be reported
        /// as gRPC Status errors, while errors that occurred while running the
        /// action will be reported in the `status` field of the `ExecuteResponse`. The
        /// server MUST NOT set the `error` field of the `Operation` proto.
        /// The possible errors include:
        ///
        /// * `INVALID_ARGUMENT`: One or more arguments are invalid.
        /// * `FAILED_PRECONDITION`: One or more errors occurred in setting up the
        ///  action requested, such as a missing input or command or no worker being
        ///  available. The client may be able to fix the errors and retry.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run
        ///  the action.
        /// * `UNAVAILABLE`: Due to a transient condition, such as all workers being
        ///  occupied (and the server does not support a queue), the action could not
        ///  be started. The client should retry.
        /// * `INTERNAL`: An internal error occurred in the execution engine or the
        ///  worker.
        /// * `DEADLINE_EXCEEDED`: The execution timed out.
        /// * `CANCELLED`: The operation was cancelled by the client. This status is
        ///  only possible if the server implements the Operations API CancelOperation
        ///  method, and it was called for the current execution.
        ///
        /// In the case of a missing input or command, the server SHOULD additionally
        /// send a \[PreconditionFailure\]\[google.rpc.PreconditionFailure\] error detail
        /// where, for each requested blob not present in the CAS, there is a
        /// `Violation` with a `type` of `MISSING` and a `subject` of
        /// `"blobs/{digest_function/}{hash}/{size}"` indicating the digest of the
        /// missing blob. The `subject` is formatted the same way as the
        /// `resource_name` provided to
        /// \[ByteStream.Read\]\[google.bytestream.ByteStream.Read\], with the leading
        /// instance name omitted. `digest_function` MUST thus be omitted if its value
        /// is one of MD5, MURMUR3, SHA1, SHA256, SHA384, SHA512, or VSO.
        ///
        /// The server does not need to guarantee that a call to this method leads to
        /// at most one execution of the action. The server MAY execute the action
        /// multiple times, potentially in parallel. These redundant executions MAY
        /// continue to run, even if the operation is completed.
        async fn execute(
            &self,
            request: tonic::Request<super::ExecuteRequest>,
        ) -> std::result::Result<tonic::Response<Self::ExecuteStream>, tonic::Status>;
        /// Server streaming response type for the WaitExecution method.
        type WaitExecutionStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<
                    super::super::super::super::super::super::google::longrunning::Operation,
                    tonic::Status,
                >,
            >
            + std::marker::Send
            + 'static;
        /// Wait for an execution operation to complete. When the client initially
        /// makes the request, the server immediately responds with the current status
        /// of the execution. The server will leave the request stream open until the
        /// operation completes, and then respond with the completed operation. The
        /// server MAY choose to stream additional updates as execution progresses,
        /// such as to provide an update as to the state of the execution.
        ///
        /// In addition to the cases described for Execute, the WaitExecution method
        /// may fail as follows:
        ///
        /// * `NOT_FOUND`: The operation no longer exists due to any of a transient
        ///  condition, an unknown operation name, or if the server implements the
        ///  Operations API DeleteOperation method and it was called for the current
        ///  execution. The client should call `Execute` to retry.
        async fn wait_execution(
            &self,
            request: tonic::Request<super::WaitExecutionRequest>,
        ) -> std::result::Result<
            tonic::Response<Self::WaitExecutionStream>,
            tonic::Status,
        >;
    }
    /// The Remote Execution API is used to execute an
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\] on the remote
    /// workers.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug)]
    pub struct ExecutionServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> ExecutionServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for ExecutionServer<T>
    where
        T: Execution,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/build.bazel.remote.execution.v2.Execution/Execute" => {
                    #[allow(non_camel_case_types)]
                    struct ExecuteSvc<T: Execution>(pub Arc<T>);
                    impl<
                        T: Execution,
                    > tonic::server::ServerStreamingService<super::ExecuteRequest>
                    for ExecuteSvc<T> {
                        type Response = super::super::super::super::super::super::google::longrunning::Operation;
                        type ResponseStream = T::ExecuteStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ExecuteRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Execution>::execute(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = ExecuteSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.Execution/WaitExecution" => {
                    #[allow(non_camel_case_types)]
                    struct WaitExecutionSvc<T: Execution>(pub Arc<T>);
                    impl<
                        T: Execution,
                    > tonic::server::ServerStreamingService<super::WaitExecutionRequest>
                    for WaitExecutionSvc<T> {
                        type Response = super::super::super::super::super::super::google::longrunning::Operation;
                        type ResponseStream = T::WaitExecutionStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::WaitExecutionRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Execution>::wait_execution(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = WaitExecutionSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for ExecutionServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "build.bazel.remote.execution.v2.Execution";
    impl<T> tonic::server::NamedService for ExecutionServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
/// Generated client implementations.
pub mod action_cache_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The action cache API is used to query whether a given action has already been
    /// performed and, if so, retrieve its result. Unlike the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\],
    /// which addresses blobs by their own content, the action cache addresses the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] by a
    /// digest of the encoded \[Action\]\[build.bazel.remote.execution.v2.Action\]
    /// which produced them.
    ///
    /// The lifetime of entries in the action cache is implementation-specific, but
    /// the server SHOULD assume that more recently used entries are more likely to
    /// be used again.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug, Clone)]
    pub struct ActionCacheClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ActionCacheClient<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> ActionCacheClient<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,
        ) -> ActionCacheClient<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,
        {
            ActionCacheClient::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
        }
        /// Retrieve a cached execution result.
        ///
        /// Implementations SHOULD ensure that any blobs referenced from the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\]
        /// are available at the time of returning the
        /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] and will be
        /// for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
        /// if necessary and applicable.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
        pub async fn get_action_result(
            &mut self,
            request: impl tonic::IntoRequest<super::GetActionResultRequest>,
        ) -> std::result::Result<tonic::Response<super::ActionResult>, 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(
                "/build.bazel.remote.execution.v2.ActionCache/GetActionResult",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ActionCache",
                        "GetActionResult",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Upload a new execution result.
        ///
        /// In order to allow the server to perform access control based on the type of
        /// action, and to assist with client debugging, the client MUST first upload
        /// the \[Action\]\[build.bazel.remote.execution.v2.Action\] that produced the
        /// result, along with its
        /// \[Command\]\[build.bazel.remote.execution.v2.Command\], into the
        /// `ContentAddressableStorage`.
        ///
        /// Server implementations MAY modify the
        /// `UpdateActionResultRequest.action_result` and return an equivalent value.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: One or more arguments are invalid.
        /// * `FAILED_PRECONDITION`: One or more errors occurred in updating the
        ///  action result, such as a missing command or action.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
        ///  entry to the cache.
        pub async fn update_action_result(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateActionResultRequest>,
        ) -> std::result::Result<tonic::Response<super::ActionResult>, 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(
                "/build.bazel.remote.execution.v2.ActionCache/UpdateActionResult",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ActionCache",
                        "UpdateActionResult",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod action_cache_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with ActionCacheServer.
    #[async_trait]
    pub trait ActionCache: std::marker::Send + std::marker::Sync + 'static {
        /// Retrieve a cached execution result.
        ///
        /// Implementations SHOULD ensure that any blobs referenced from the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\]
        /// are available at the time of returning the
        /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] and will be
        /// for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
        /// if necessary and applicable.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
        async fn get_action_result(
            &self,
            request: tonic::Request<super::GetActionResultRequest>,
        ) -> std::result::Result<tonic::Response<super::ActionResult>, tonic::Status>;
        /// Upload a new execution result.
        ///
        /// In order to allow the server to perform access control based on the type of
        /// action, and to assist with client debugging, the client MUST first upload
        /// the \[Action\]\[build.bazel.remote.execution.v2.Action\] that produced the
        /// result, along with its
        /// \[Command\]\[build.bazel.remote.execution.v2.Command\], into the
        /// `ContentAddressableStorage`.
        ///
        /// Server implementations MAY modify the
        /// `UpdateActionResultRequest.action_result` and return an equivalent value.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: One or more arguments are invalid.
        /// * `FAILED_PRECONDITION`: One or more errors occurred in updating the
        ///  action result, such as a missing command or action.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
        ///  entry to the cache.
        async fn update_action_result(
            &self,
            request: tonic::Request<super::UpdateActionResultRequest>,
        ) -> std::result::Result<tonic::Response<super::ActionResult>, tonic::Status>;
    }
    /// The action cache API is used to query whether a given action has already been
    /// performed and, if so, retrieve its result. Unlike the
    /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\],
    /// which addresses blobs by their own content, the action cache addresses the
    /// \[ActionResult\]\[build.bazel.remote.execution.v2.ActionResult\] by a
    /// digest of the encoded \[Action\]\[build.bazel.remote.execution.v2.Action\]
    /// which produced them.
    ///
    /// The lifetime of entries in the action cache is implementation-specific, but
    /// the server SHOULD assume that more recently used entries are more likely to
    /// be used again.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug)]
    pub struct ActionCacheServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> ActionCacheServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for ActionCacheServer<T>
    where
        T: ActionCache,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/build.bazel.remote.execution.v2.ActionCache/GetActionResult" => {
                    #[allow(non_camel_case_types)]
                    struct GetActionResultSvc<T: ActionCache>(pub Arc<T>);
                    impl<
                        T: ActionCache,
                    > tonic::server::UnaryService<super::GetActionResultRequest>
                    for GetActionResultSvc<T> {
                        type Response = super::ActionResult;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetActionResultRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ActionCache>::get_action_result(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetActionResultSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ActionCache/UpdateActionResult" => {
                    #[allow(non_camel_case_types)]
                    struct UpdateActionResultSvc<T: ActionCache>(pub Arc<T>);
                    impl<
                        T: ActionCache,
                    > tonic::server::UnaryService<super::UpdateActionResultRequest>
                    for UpdateActionResultSvc<T> {
                        type Response = super::ActionResult;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::UpdateActionResultRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ActionCache>::update_action_result(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = UpdateActionResultSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for ActionCacheServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "build.bazel.remote.execution.v2.ActionCache";
    impl<T> tonic::server::NamedService for ActionCacheServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
/// Generated client implementations.
pub mod content_addressable_storage_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The CAS (content-addressable storage) is used to store the inputs to and
    /// outputs from the execution service. Each piece of content is addressed by the
    /// digest of its binary data.
    ///
    /// Most of the binary data stored in the CAS is opaque to the execution engine,
    /// and is only used as a communication medium. In order to build an
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\],
    /// however, the client will need to also upload the
    /// \[Command\]\[build.bazel.remote.execution.v2.Command\] and input root
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] for the Action.
    /// The Command and Directory messages must be marshalled to wire format and then
    /// uploaded under the hash as with any other piece of content. In practice, the
    /// input root directory is likely to refer to other Directories in its
    /// hierarchy, which must also each be uploaded on their own.
    ///
    /// For small file uploads the client should group them together and call
    /// \[BatchUpdateBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs\].
    ///
    /// For large uploads, the client must use the
    /// \[Write method\]\[google.bytestream.ByteStream.Write\] of the ByteStream API.
    ///
    /// For uncompressed data, the `WriteRequest.resource_name` is of the following form:
    /// `{instance_name}/uploads/{uuid}/blobs/{digest_function/}{hash}/{size}{/optional_metadata}`
    ///
    /// Where:
    ///
    /// * `instance_name` is an identifier used to distinguish between the various
    ///  instances on the server. Syntax and semantics of this field are defined
    ///  by the server; Clients must not make any assumptions about it (e.g.,
    ///  whether it spans multiple path segments or not). If it is the empty path,
    ///  the leading slash is omitted, so that the `resource_name` becomes
    ///  `uploads/{uuid}/blobs/{digest_function/}{hash}/{size}{/optional_metadata}`.
    ///  To simplify parsing, a path segment cannot equal any of the following
    ///  keywords: `blobs`, `uploads`, `actions`, `actionResults`, `operations`,
    ///  `capabilities` or `compressed-blobs`.
    /// * `uuid` is a version 4 UUID generated by the client, used to avoid
    ///  collisions between concurrent uploads of the same data. Clients MAY
    ///  reuse the same `uuid` for uploading different blobs.
    /// * `digest_function` is a lowercase string form of a `DigestFunction.Value`
    ///  enum, indicating which digest function was used to compute `hash`. If the
    ///  digest function used is one of MD5, MURMUR3, SHA1, SHA256, SHA384, SHA512,
    ///  or VSO, this component MUST be omitted. In that case the server SHOULD
    ///  infer the digest function using the length of the `hash` and the digest
    ///  functions announced in the server's capabilities.
    /// * `hash` and `size` refer to the \[Digest\]\[build.bazel.remote.execution.v2.Digest\]
    ///  of the data being uploaded.
    /// * `optional_metadata` is implementation specific data, which clients MAY omit.
    ///  Servers MAY ignore this metadata.
    ///
    /// Data can alternatively be uploaded in compressed form, with the following
    /// `WriteRequest.resource_name` form:
    /// `{instance_name}/uploads/{uuid}/compressed-blobs/{compressor}/{digest_function/}{uncompressed_hash}/{uncompressed_size}{/optional_metadata}`
    ///
    /// Where:
    ///
    /// * `instance_name`, `uuid`, `digest_function` and `optional_metadata` are
    ///  defined as above.
    /// * `compressor` is a lowercase string form of a `Compressor.Value` enum
    ///  other than `identity`, which is supported by the server and advertised in
    ///  \[CacheCapabilities.supported_compressors\]\[build.bazel.remote.execution.v2.CacheCapabilities.supported_compressors\].
    /// * `uncompressed_hash` and `uncompressed_size` refer to the
    ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] of the data being
    ///  uploaded, once uncompressed. Servers MUST verify that these match
    ///  the uploaded data once uncompressed, and MUST return an
    ///  `INVALID_ARGUMENT` error in the case of mismatch.
    ///
    /// Note that when writing compressed blobs, the `WriteRequest.write_offset` in
    /// the initial request in a stream refers to the offset in the uncompressed form
    /// of the blob. In subsequent requests, `WriteRequest.write_offset` MUST be the
    /// sum of the first request's 'WriteRequest.write_offset' and the total size of
    /// all the compressed data bundles in the previous requests.
    /// Note that this mixes an uncompressed offset with a compressed byte length,
    /// which is nonsensical, but it is done to fit the semantics of the existing
    /// ByteStream protocol.
    ///
    /// Uploads of the same data MAY occur concurrently in any form, compressed or
    /// uncompressed.
    ///
    /// Clients SHOULD NOT use gRPC-level compression for ByteStream API `Write`
    /// calls of compressed blobs, since this would compress already-compressed data.
    ///
    /// When attempting an upload, if another client has already completed the upload
    /// (which may occur in the middle of a single upload if another client uploads
    /// the same blob concurrently), the request will terminate immediately without
    /// error, and with a response whose `committed_size` is the value `-1` if this
    /// is a compressed upload, or with the full size of the uploaded file if this is
    /// an uncompressed upload (regardless of how much data was transmitted by the
    /// client). If the client completes the upload but the
    /// \[Digest\]\[build.bazel.remote.execution.v2.Digest\] does not match, an
    /// `INVALID_ARGUMENT` error will be returned. In either case, the client should
    /// not attempt to retry the upload.
    ///
    /// Small downloads can be grouped and requested in a batch via
    /// \[BatchReadBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs\].
    ///
    /// For large downloads, the client must use the
    /// \[Read method\]\[google.bytestream.ByteStream.Read\] of the ByteStream API.
    ///
    /// For uncompressed data, the `ReadRequest.resource_name` is of the following form:
    /// `{instance_name}/blobs/{digest_function/}{hash}/{size}`
    /// Where `instance_name`, `digest_function`, `hash` and `size` are defined as
    /// for uploads.
    ///
    /// Data can alternatively be downloaded in compressed form, with the following
    /// `ReadRequest.resource_name` form:
    /// `{instance_name}/compressed-blobs/{compressor}/{digest_function/}{uncompressed_hash}/{uncompressed_size}`
    ///
    /// Where:
    ///
    /// * `instance_name`, `compressor` and `digest_function` are defined as for
    ///  uploads.
    /// * `uncompressed_hash` and `uncompressed_size` refer to the
    ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] of the data being
    ///  downloaded, once uncompressed. Clients MUST verify that these match
    ///  the downloaded data once uncompressed, and take appropriate steps in
    ///  the case of failure such as retrying a limited number of times or
    ///  surfacing an error to the user.
    ///
    /// When downloading compressed blobs:
    ///
    /// * `ReadRequest.read_offset` refers to the offset in the uncompressed form
    ///  of the blob.
    /// * Servers MUST return `INVALID_ARGUMENT` if `ReadRequest.read_limit` is
    ///  non-zero.
    /// * Servers MAY use any compression level they choose, including different
    ///  levels for different blobs (e.g. choosing a level designed for maximum
    ///  speed for data known to be incompressible).
    /// * Clients SHOULD NOT use gRPC-level compression, since this would compress
    ///  already-compressed data.
    ///
    /// Servers MUST be able to provide data for all recently advertised blobs in
    /// each of the compression formats that the server supports, as well as in
    /// uncompressed form.
    ///
    /// Additionally, ByteStream requests MAY come with an additional plain text header
    /// that indicates the `resource_name` of the blob being sent.  The header, if
    /// present, MUST follow the following convention:
    ///
    /// * name: `build.bazel.remote.execution.v2.resource-name`.
    /// * contents: the plain text resource_name of the request message.
    ///  If set, the contents of the header MUST match the `resource_name` of the request
    ///  message.  Servers MAY use this header to assist in routing requests to the
    ///  appropriate backend.
    ///
    /// The lifetime of entries in the CAS is implementation specific, but it SHOULD
    /// be long enough to allow for newly-added and recently looked-up entries to be
    /// used in subsequent calls (e.g. to
    /// \[Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\]).
    ///
    /// Servers MUST behave as though empty blobs are always available, even if they
    /// have not been uploaded. Clients MAY optimize away the uploading or
    /// downloading of empty blobs.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug, Clone)]
    pub struct ContentAddressableStorageClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ContentAddressableStorageClient<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> ContentAddressableStorageClient<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,
        ) -> ContentAddressableStorageClient<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,
        {
            ContentAddressableStorageClient::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
        }
        /// Determine if blobs are present in the CAS.
        ///
        /// Clients can use this API before uploading blobs to determine which ones are
        /// already present in the CAS and do not need to be uploaded again.
        ///
        /// Servers SHOULD increase the lifetimes of the referenced blobs if necessary and
        /// applicable.
        ///
        /// There are no method-specific errors.
        pub async fn find_missing_blobs(
            &mut self,
            request: impl tonic::IntoRequest<super::FindMissingBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FindMissingBlobsResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/FindMissingBlobs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "FindMissingBlobs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Upload many blobs at once.
        ///
        /// The server may enforce a limit of the combined total size of blobs
        /// to be uploaded using this API. This limit may be obtained using the
        /// \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\] API.
        /// Requests exceeding the limit should either be split into smaller
        /// chunks or uploaded using the
        /// \[ByteStream API\]\[google.bytestream.ByteStream\], as appropriate.
        ///
        /// This request is equivalent to calling a Bytestream `Write` request
        /// on each individual blob, in parallel. The requests may succeed or fail
        /// independently.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: The client attempted to upload more than the
        ///  server supported limit.
        ///
        /// Individual requests may return the following errors, additionally:
        ///
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob.
        /// * `INVALID_ARGUMENT`: The
        ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] does not match the
        ///  provided data.
        pub async fn batch_update_blobs(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchUpdateBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchUpdateBlobsResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/BatchUpdateBlobs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "BatchUpdateBlobs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Download many blobs at once.
        ///
        /// The server may enforce a limit of the combined total size of blobs
        /// to be downloaded using this API. This limit may be obtained using the
        /// \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\] API.
        /// Requests exceeding the limit should either be split into smaller
        /// chunks or downloaded using the
        /// \[ByteStream API\]\[google.bytestream.ByteStream\], as appropriate.
        ///
        /// This request is equivalent to calling a Bytestream `Read` request
        /// on each individual blob, in parallel. The requests may succeed or fail
        /// independently.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: The client attempted to read more than the
        ///  server supported limit.
        ///
        /// Every error on individual read will be returned in the corresponding digest
        /// status.
        pub async fn batch_read_blobs(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchReadBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchReadBlobsResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/BatchReadBlobs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "BatchReadBlobs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Fetch the entire directory tree rooted at a node.
        ///
        /// This request must be targeted at a
        /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] stored in the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\]
        /// (CAS). The server will enumerate the `Directory` tree recursively and
        /// return every node descended from the root.
        ///
        /// The GetTreeRequest.page_token parameter can be used to skip ahead in
        /// the stream (e.g. when retrying a partially completed and aborted request),
        /// by setting it to a value taken from GetTreeResponse.next_page_token of the
        /// last successfully processed GetTreeResponse).
        ///
        /// The exact traversal order is unspecified and, unless retrieving subsequent
        /// pages from an earlier request, is not guaranteed to be stable across
        /// multiple invocations of `GetTree`.
        ///
        /// If part of the tree is missing from the CAS, the server will return the
        /// portion present and omit the rest.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested tree root is not present in the CAS.
        pub async fn get_tree(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTreeRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::GetTreeResponse>>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/GetTree",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "GetTree",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// SplitBlob is the deprecated unary version of
        /// \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\].
        /// See that RPC for details.
        ///
        /// New in v2.12 and removed in v2.13.
        pub async fn split_blob(
            &mut self,
            request: impl tonic::IntoRequest<super::SplitBlobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SplitBlobResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/SplitBlob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "SplitBlob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// GetChunkMapping retrieves the ordered chunk-digest mapping for a blob.
        ///
        /// This call returns information about how a blob is split into chunks, and
        /// returns a list of the chunk digests. Using the returned list of chunk digests,
        /// a client can check which chunks are locally available and only fetch the
        /// missing ones. The desired blob can be assembled by concatenating the fetched
        /// chunks in the order of the digests in the list. The chunks SHOULD all be
        /// available in the CAS.
        ///
        /// This API can be used to reduce the required data to download a large blob
        /// from CAS if some chunks from similar blobs are locally available. For this
        /// procedure to work properly, blobs SHOULD be split in a content-defined way,
        /// rather than with fixed-sized chunking.
        ///
        /// If a split request is answered successfully, a client can expect the
        /// following guarantees from the server:
        ///
        /// 1. The blob chunks are stored in CAS.
        /// 1. Concatenating the blob chunks in the order of the digest list returned
        ///   by the server results in the original blob.
        ///
        /// Servers which implement this functionality MUST declare that they support
        /// it by setting the
        /// \[CacheCapabilities.split_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.split_blob_support\]
        /// field accordingly.
        ///
        /// Clients MUST check that the server supports this capability, before using
        /// it.
        ///
        /// Clients SHOULD verify that the digest of the blob assembled by the fetched
        /// chunks is equal to the requested blob digest.
        ///
        /// The list of chunk digests is streamed across response messages
        /// to avoid exceeding protocol message size limits. The complete list of
        /// chunks is the concatenation of `chunk_digests` across all responses in
        /// stream order. The server indicates that there are no more chunks by closing
        /// the response stream.
        ///
        /// The maximum message size is not negotiated by this API. Servers SHOULD limit
        /// the number of chunk digests in each response to remain below the maximum
        /// message size accepted by the client/server pair.
        ///
        /// Starting in RE API v2.13, servers that set
        /// \[CacheCapabilities.split_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.split_blob_support\]
        /// MUST implement this RPC. Clients MUST check that the server supports this
        /// capability and supports RE API v2.13 or newer before using this RPC.
        ///
        /// The lifetimes of the generated chunk blobs MAY be independent of the
        /// lifetime of the original blob. In particular:
        ///
        /// * A blob and any chunk derived from it MAY be evicted from the CAS at
        ///  different times.
        /// * A call to \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///  extends the lifetime of the original blob, and sets the lifetimes of
        ///  the resulting chunks (or extends the lifetimes of already-existing
        ///  chunks).
        /// * Touching a chunk extends its lifetime, but the server MAY choose not
        ///  to extend the lifetime of the original blob.
        /// * Touching the original blob extends its lifetime, but the server MAY
        ///  choose not to extend the lifetimes of chunks derived from it.
        ///
        /// When blob splitting and splicing is used at the same time, the clients and
        /// the server SHOULD agree out-of-band upon a chunking algorithm used by both
        /// parties to benefit from each other's chunk data and avoid unnecessary data
        /// duplication.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested blob is not present in the CAS, OR there is no
        ///  split information available for the blob, OR at least one chunk needed to
        ///  reconstruct the blob is missing from the CAS.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob
        ///  chunks.
        pub async fn get_chunk_mapping(
            &mut self,
            request: impl tonic::IntoRequest<super::GetChunkMappingRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::GetChunkMappingResponse>>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/GetChunkMapping",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "GetChunkMapping",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// SpliceBlob is the deprecated unary version of
        /// \[RegisterChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.RegisterChunkMapping\].
        /// See that RPC for details.
        ///
        /// New in v2.12 and removed in v2.13.
        pub async fn splice_blob(
            &mut self,
            request: impl tonic::IntoRequest<super::SpliceBlobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SpliceBlobResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/SpliceBlob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "SpliceBlob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// RegisterChunkMapping registers an ordered chunk-digest mapping for a blob.
        ///
        /// This is the complementary operation to the
        /// \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        /// function to handle the chunked upload of large blobs to save upload
        /// traffic.
        ///
        /// When uploading a large blob using chunked upload, clients MUST first upload
        /// all chunks to the CAS, then call this RPC to tell the server how those
        /// chunks compose the original blob. The chunks referenced in the
        /// RegisterChunkMapping call SHOULD be available in the CAS before calling this
        /// RPC.
        ///
        /// One example upload workflow is:
        ///
        /// 1. If the full blob digest is already available, the client can call
        ///   \[ContentAddressableStorage.FindMissingBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs\]
        ///   to determine whether the blob is already present in the CAS, or
        ///   \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///   to determine whether a chunk mapping already exists. This preliminary
        ///   lookup can be skipped, for example when computing the digest while
        ///   chunking is faster than a separate hashing pass.
        /// 1. If chunk upload is needed, compute the blob and chunk digests and call
        ///   `FindMissingBlobs` either once with the complete list or in batches as
        ///   digests become available, then upload the missing chunks. Clients SHOULD
        ///   avoid making a separate `FindMissingBlobs` call for each chunk.
        /// 1. After all chunks are available in the CAS, call this RPC and split the
        ///   complete ordered chunk digest list across request messages that remain
        ///   below the maximum message size accepted by the client/server pair.
        ///
        /// The list of chunk digests is streamed across request messages
        /// to avoid exceeding protocol message size limits. Clients MUST set the
        /// expected blob digest on the first request, then close the request stream to
        /// commit the splice. The server MUST use `instance_name`, `blob_digest`,
        /// `digest_function`, and `chunking_function` from the first request and ignore
        /// values for those fields on subsequent requests. Clients SHOULD omit those
        /// fields on subsequent requests.
        ///
        /// The maximum message size is not negotiated by this API. Clients SHOULD limit
        /// the number of chunk digests in each request to remain below the maximum
        /// message size accepted by the client/server pair.
        ///
        /// If a client needs to upload a large blob and is able to split a blob into
        /// chunks in such a way that reusable chunks are obtained, e.g., by means of
        /// content-defined chunking, it can first determine which parts of the blob
        /// are already available in the remote CAS and upload the missing chunks, and
        /// then use this API to store information on how the chunks compose the
        /// original blob.
        ///
        /// Servers which implement this functionality MUST declare that they support
        /// it by setting the
        /// \[CacheCapabilities.splice_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.splice_blob_support\]
        /// field accordingly.
        ///
        /// Clients MUST check that the server supports this capability, before using
        /// it.
        ///
        /// Starting in RE API v2.13, servers that set
        /// \[CacheCapabilities.splice_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.splice_blob_support\]
        /// MUST implement this RPC. Clients MUST check that the server supports this
        /// capability and supports RE API v2.13 or newer before using this RPC.
        ///
        /// In order to ensure data consistency of the CAS, the server MUST only add
        /// blobs to the CAS after verifying their digests. In particular, servers MUST NOT
        /// trust digests provided by the client. The server MAY accept a request as no-op
        /// if the client-specified blob is already in CAS or if information on how to
        /// construct the blob from chunks is available. If the client-specified blob is
        /// not already in the CAS, the server MUST verify that the digest of the newly
        /// created blob assembled from chunks matches the digest specified by the
        /// client, and reject the request if they differ. Servers MAY choose to allow
        /// overwriting existing chunk mappings or to store multiple chunk mappings for
        /// the same blob.
        ///
        /// When blob splitting and splicing is used at the same time, the clients and
        /// the server SHOULD agree out-of-band upon a chunking algorithm used by both
        /// parties to benefit from each other's chunk data and avoid unnecessary data
        /// duplication.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: At least one of the blob chunks is not present in the CAS.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the
        ///  spliced blob.
        /// * `INVALID_ARGUMENT`: The digest of the spliced blob is different from the
        ///  provided expected digest, OR the stream contains an invalid sequence of
        ///  splice requests.
        /// * `ALREADY_EXISTS`: The blob already exists in CAS. Clients can
        ///  call \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///  to check what chunk mapping the server is using.
        pub async fn register_chunk_mapping(
            &mut self,
            request: impl tonic::IntoStreamingRequest<
                Message = super::RegisterChunkMappingRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::RegisterChunkMappingResponse>,
            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(
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/RegisterChunkMapping",
            );
            let mut req = request.into_streaming_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.ContentAddressableStorage",
                        "RegisterChunkMapping",
                    ),
                );
            self.inner.client_streaming(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod content_addressable_storage_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with ContentAddressableStorageServer.
    #[async_trait]
    pub trait ContentAddressableStorage: std::marker::Send + std::marker::Sync + 'static {
        /// Determine if blobs are present in the CAS.
        ///
        /// Clients can use this API before uploading blobs to determine which ones are
        /// already present in the CAS and do not need to be uploaded again.
        ///
        /// Servers SHOULD increase the lifetimes of the referenced blobs if necessary and
        /// applicable.
        ///
        /// There are no method-specific errors.
        async fn find_missing_blobs(
            &self,
            request: tonic::Request<super::FindMissingBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FindMissingBlobsResponse>,
            tonic::Status,
        >;
        /// Upload many blobs at once.
        ///
        /// The server may enforce a limit of the combined total size of blobs
        /// to be uploaded using this API. This limit may be obtained using the
        /// \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\] API.
        /// Requests exceeding the limit should either be split into smaller
        /// chunks or uploaded using the
        /// \[ByteStream API\]\[google.bytestream.ByteStream\], as appropriate.
        ///
        /// This request is equivalent to calling a Bytestream `Write` request
        /// on each individual blob, in parallel. The requests may succeed or fail
        /// independently.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: The client attempted to upload more than the
        ///  server supported limit.
        ///
        /// Individual requests may return the following errors, additionally:
        ///
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob.
        /// * `INVALID_ARGUMENT`: The
        ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] does not match the
        ///  provided data.
        async fn batch_update_blobs(
            &self,
            request: tonic::Request<super::BatchUpdateBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchUpdateBlobsResponse>,
            tonic::Status,
        >;
        /// Download many blobs at once.
        ///
        /// The server may enforce a limit of the combined total size of blobs
        /// to be downloaded using this API. This limit may be obtained using the
        /// \[Capabilities\]\[build.bazel.remote.execution.v2.Capabilities\] API.
        /// Requests exceeding the limit should either be split into smaller
        /// chunks or downloaded using the
        /// \[ByteStream API\]\[google.bytestream.ByteStream\], as appropriate.
        ///
        /// This request is equivalent to calling a Bytestream `Read` request
        /// on each individual blob, in parallel. The requests may succeed or fail
        /// independently.
        ///
        /// Errors:
        ///
        /// * `INVALID_ARGUMENT`: The client attempted to read more than the
        ///  server supported limit.
        ///
        /// Every error on individual read will be returned in the corresponding digest
        /// status.
        async fn batch_read_blobs(
            &self,
            request: tonic::Request<super::BatchReadBlobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchReadBlobsResponse>,
            tonic::Status,
        >;
        /// Server streaming response type for the GetTree method.
        type GetTreeStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<super::GetTreeResponse, tonic::Status>,
            >
            + std::marker::Send
            + 'static;
        /// Fetch the entire directory tree rooted at a node.
        ///
        /// This request must be targeted at a
        /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] stored in the
        /// \[ContentAddressableStorage\]\[build.bazel.remote.execution.v2.ContentAddressableStorage\]
        /// (CAS). The server will enumerate the `Directory` tree recursively and
        /// return every node descended from the root.
        ///
        /// The GetTreeRequest.page_token parameter can be used to skip ahead in
        /// the stream (e.g. when retrying a partially completed and aborted request),
        /// by setting it to a value taken from GetTreeResponse.next_page_token of the
        /// last successfully processed GetTreeResponse).
        ///
        /// The exact traversal order is unspecified and, unless retrieving subsequent
        /// pages from an earlier request, is not guaranteed to be stable across
        /// multiple invocations of `GetTree`.
        ///
        /// If part of the tree is missing from the CAS, the server will return the
        /// portion present and omit the rest.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested tree root is not present in the CAS.
        async fn get_tree(
            &self,
            request: tonic::Request<super::GetTreeRequest>,
        ) -> std::result::Result<tonic::Response<Self::GetTreeStream>, tonic::Status>;
        /// SplitBlob is the deprecated unary version of
        /// \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\].
        /// See that RPC for details.
        ///
        /// New in v2.12 and removed in v2.13.
        async fn split_blob(
            &self,
            request: tonic::Request<super::SplitBlobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SplitBlobResponse>,
            tonic::Status,
        >;
        /// Server streaming response type for the GetChunkMapping method.
        type GetChunkMappingStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<super::GetChunkMappingResponse, tonic::Status>,
            >
            + std::marker::Send
            + 'static;
        /// GetChunkMapping retrieves the ordered chunk-digest mapping for a blob.
        ///
        /// This call returns information about how a blob is split into chunks, and
        /// returns a list of the chunk digests. Using the returned list of chunk digests,
        /// a client can check which chunks are locally available and only fetch the
        /// missing ones. The desired blob can be assembled by concatenating the fetched
        /// chunks in the order of the digests in the list. The chunks SHOULD all be
        /// available in the CAS.
        ///
        /// This API can be used to reduce the required data to download a large blob
        /// from CAS if some chunks from similar blobs are locally available. For this
        /// procedure to work properly, blobs SHOULD be split in a content-defined way,
        /// rather than with fixed-sized chunking.
        ///
        /// If a split request is answered successfully, a client can expect the
        /// following guarantees from the server:
        ///
        /// 1. The blob chunks are stored in CAS.
        /// 1. Concatenating the blob chunks in the order of the digest list returned
        ///   by the server results in the original blob.
        ///
        /// Servers which implement this functionality MUST declare that they support
        /// it by setting the
        /// \[CacheCapabilities.split_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.split_blob_support\]
        /// field accordingly.
        ///
        /// Clients MUST check that the server supports this capability, before using
        /// it.
        ///
        /// Clients SHOULD verify that the digest of the blob assembled by the fetched
        /// chunks is equal to the requested blob digest.
        ///
        /// The list of chunk digests is streamed across response messages
        /// to avoid exceeding protocol message size limits. The complete list of
        /// chunks is the concatenation of `chunk_digests` across all responses in
        /// stream order. The server indicates that there are no more chunks by closing
        /// the response stream.
        ///
        /// The maximum message size is not negotiated by this API. Servers SHOULD limit
        /// the number of chunk digests in each response to remain below the maximum
        /// message size accepted by the client/server pair.
        ///
        /// Starting in RE API v2.13, servers that set
        /// \[CacheCapabilities.split_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.split_blob_support\]
        /// MUST implement this RPC. Clients MUST check that the server supports this
        /// capability and supports RE API v2.13 or newer before using this RPC.
        ///
        /// The lifetimes of the generated chunk blobs MAY be independent of the
        /// lifetime of the original blob. In particular:
        ///
        /// * A blob and any chunk derived from it MAY be evicted from the CAS at
        ///  different times.
        /// * A call to \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///  extends the lifetime of the original blob, and sets the lifetimes of
        ///  the resulting chunks (or extends the lifetimes of already-existing
        ///  chunks).
        /// * Touching a chunk extends its lifetime, but the server MAY choose not
        ///  to extend the lifetime of the original blob.
        /// * Touching the original blob extends its lifetime, but the server MAY
        ///  choose not to extend the lifetimes of chunks derived from it.
        ///
        /// When blob splitting and splicing is used at the same time, the clients and
        /// the server SHOULD agree out-of-band upon a chunking algorithm used by both
        /// parties to benefit from each other's chunk data and avoid unnecessary data
        /// duplication.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: The requested blob is not present in the CAS, OR there is no
        ///  split information available for the blob, OR at least one chunk needed to
        ///  reconstruct the blob is missing from the CAS.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob
        ///  chunks.
        async fn get_chunk_mapping(
            &self,
            request: tonic::Request<super::GetChunkMappingRequest>,
        ) -> std::result::Result<
            tonic::Response<Self::GetChunkMappingStream>,
            tonic::Status,
        >;
        /// SpliceBlob is the deprecated unary version of
        /// \[RegisterChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.RegisterChunkMapping\].
        /// See that RPC for details.
        ///
        /// New in v2.12 and removed in v2.13.
        async fn splice_blob(
            &self,
            request: tonic::Request<super::SpliceBlobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SpliceBlobResponse>,
            tonic::Status,
        >;
        /// RegisterChunkMapping registers an ordered chunk-digest mapping for a blob.
        ///
        /// This is the complementary operation to the
        /// \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        /// function to handle the chunked upload of large blobs to save upload
        /// traffic.
        ///
        /// When uploading a large blob using chunked upload, clients MUST first upload
        /// all chunks to the CAS, then call this RPC to tell the server how those
        /// chunks compose the original blob. The chunks referenced in the
        /// RegisterChunkMapping call SHOULD be available in the CAS before calling this
        /// RPC.
        ///
        /// One example upload workflow is:
        ///
        /// 1. If the full blob digest is already available, the client can call
        ///   \[ContentAddressableStorage.FindMissingBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs\]
        ///   to determine whether the blob is already present in the CAS, or
        ///   \[ContentAddressableStorage.GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///   to determine whether a chunk mapping already exists. This preliminary
        ///   lookup can be skipped, for example when computing the digest while
        ///   chunking is faster than a separate hashing pass.
        /// 1. If chunk upload is needed, compute the blob and chunk digests and call
        ///   `FindMissingBlobs` either once with the complete list or in batches as
        ///   digests become available, then upload the missing chunks. Clients SHOULD
        ///   avoid making a separate `FindMissingBlobs` call for each chunk.
        /// 1. After all chunks are available in the CAS, call this RPC and split the
        ///   complete ordered chunk digest list across request messages that remain
        ///   below the maximum message size accepted by the client/server pair.
        ///
        /// The list of chunk digests is streamed across request messages
        /// to avoid exceeding protocol message size limits. Clients MUST set the
        /// expected blob digest on the first request, then close the request stream to
        /// commit the splice. The server MUST use `instance_name`, `blob_digest`,
        /// `digest_function`, and `chunking_function` from the first request and ignore
        /// values for those fields on subsequent requests. Clients SHOULD omit those
        /// fields on subsequent requests.
        ///
        /// The maximum message size is not negotiated by this API. Clients SHOULD limit
        /// the number of chunk digests in each request to remain below the maximum
        /// message size accepted by the client/server pair.
        ///
        /// If a client needs to upload a large blob and is able to split a blob into
        /// chunks in such a way that reusable chunks are obtained, e.g., by means of
        /// content-defined chunking, it can first determine which parts of the blob
        /// are already available in the remote CAS and upload the missing chunks, and
        /// then use this API to store information on how the chunks compose the
        /// original blob.
        ///
        /// Servers which implement this functionality MUST declare that they support
        /// it by setting the
        /// \[CacheCapabilities.splice_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.splice_blob_support\]
        /// field accordingly.
        ///
        /// Clients MUST check that the server supports this capability, before using
        /// it.
        ///
        /// Starting in RE API v2.13, servers that set
        /// \[CacheCapabilities.splice_blob_support\]\[build.bazel.remote.execution.v2.CacheCapabilities.splice_blob_support\]
        /// MUST implement this RPC. Clients MUST check that the server supports this
        /// capability and supports RE API v2.13 or newer before using this RPC.
        ///
        /// In order to ensure data consistency of the CAS, the server MUST only add
        /// blobs to the CAS after verifying their digests. In particular, servers MUST NOT
        /// trust digests provided by the client. The server MAY accept a request as no-op
        /// if the client-specified blob is already in CAS or if information on how to
        /// construct the blob from chunks is available. If the client-specified blob is
        /// not already in the CAS, the server MUST verify that the digest of the newly
        /// created blob assembled from chunks matches the digest specified by the
        /// client, and reject the request if they differ. Servers MAY choose to allow
        /// overwriting existing chunk mappings or to store multiple chunk mappings for
        /// the same blob.
        ///
        /// When blob splitting and splicing is used at the same time, the clients and
        /// the server SHOULD agree out-of-band upon a chunking algorithm used by both
        /// parties to benefit from each other's chunk data and avoid unnecessary data
        /// duplication.
        ///
        /// Errors:
        ///
        /// * `NOT_FOUND`: At least one of the blob chunks is not present in the CAS.
        /// * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the
        ///  spliced blob.
        /// * `INVALID_ARGUMENT`: The digest of the spliced blob is different from the
        ///  provided expected digest, OR the stream contains an invalid sequence of
        ///  splice requests.
        /// * `ALREADY_EXISTS`: The blob already exists in CAS. Clients can
        ///  call \[GetChunkMapping\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.GetChunkMapping\]
        ///  to check what chunk mapping the server is using.
        async fn register_chunk_mapping(
            &self,
            request: tonic::Request<tonic::Streaming<super::RegisterChunkMappingRequest>>,
        ) -> std::result::Result<
            tonic::Response<super::RegisterChunkMappingResponse>,
            tonic::Status,
        >;
    }
    /// The CAS (content-addressable storage) is used to store the inputs to and
    /// outputs from the execution service. Each piece of content is addressed by the
    /// digest of its binary data.
    ///
    /// Most of the binary data stored in the CAS is opaque to the execution engine,
    /// and is only used as a communication medium. In order to build an
    /// \[Action\]\[build.bazel.remote.execution.v2.Action\],
    /// however, the client will need to also upload the
    /// \[Command\]\[build.bazel.remote.execution.v2.Command\] and input root
    /// \[Directory\]\[build.bazel.remote.execution.v2.Directory\] for the Action.
    /// The Command and Directory messages must be marshalled to wire format and then
    /// uploaded under the hash as with any other piece of content. In practice, the
    /// input root directory is likely to refer to other Directories in its
    /// hierarchy, which must also each be uploaded on their own.
    ///
    /// For small file uploads the client should group them together and call
    /// \[BatchUpdateBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs\].
    ///
    /// For large uploads, the client must use the
    /// \[Write method\]\[google.bytestream.ByteStream.Write\] of the ByteStream API.
    ///
    /// For uncompressed data, the `WriteRequest.resource_name` is of the following form:
    /// `{instance_name}/uploads/{uuid}/blobs/{digest_function/}{hash}/{size}{/optional_metadata}`
    ///
    /// Where:
    ///
    /// * `instance_name` is an identifier used to distinguish between the various
    ///  instances on the server. Syntax and semantics of this field are defined
    ///  by the server; Clients must not make any assumptions about it (e.g.,
    ///  whether it spans multiple path segments or not). If it is the empty path,
    ///  the leading slash is omitted, so that the `resource_name` becomes
    ///  `uploads/{uuid}/blobs/{digest_function/}{hash}/{size}{/optional_metadata}`.
    ///  To simplify parsing, a path segment cannot equal any of the following
    ///  keywords: `blobs`, `uploads`, `actions`, `actionResults`, `operations`,
    ///  `capabilities` or `compressed-blobs`.
    /// * `uuid` is a version 4 UUID generated by the client, used to avoid
    ///  collisions between concurrent uploads of the same data. Clients MAY
    ///  reuse the same `uuid` for uploading different blobs.
    /// * `digest_function` is a lowercase string form of a `DigestFunction.Value`
    ///  enum, indicating which digest function was used to compute `hash`. If the
    ///  digest function used is one of MD5, MURMUR3, SHA1, SHA256, SHA384, SHA512,
    ///  or VSO, this component MUST be omitted. In that case the server SHOULD
    ///  infer the digest function using the length of the `hash` and the digest
    ///  functions announced in the server's capabilities.
    /// * `hash` and `size` refer to the \[Digest\]\[build.bazel.remote.execution.v2.Digest\]
    ///  of the data being uploaded.
    /// * `optional_metadata` is implementation specific data, which clients MAY omit.
    ///  Servers MAY ignore this metadata.
    ///
    /// Data can alternatively be uploaded in compressed form, with the following
    /// `WriteRequest.resource_name` form:
    /// `{instance_name}/uploads/{uuid}/compressed-blobs/{compressor}/{digest_function/}{uncompressed_hash}/{uncompressed_size}{/optional_metadata}`
    ///
    /// Where:
    ///
    /// * `instance_name`, `uuid`, `digest_function` and `optional_metadata` are
    ///  defined as above.
    /// * `compressor` is a lowercase string form of a `Compressor.Value` enum
    ///  other than `identity`, which is supported by the server and advertised in
    ///  \[CacheCapabilities.supported_compressors\]\[build.bazel.remote.execution.v2.CacheCapabilities.supported_compressors\].
    /// * `uncompressed_hash` and `uncompressed_size` refer to the
    ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] of the data being
    ///  uploaded, once uncompressed. Servers MUST verify that these match
    ///  the uploaded data once uncompressed, and MUST return an
    ///  `INVALID_ARGUMENT` error in the case of mismatch.
    ///
    /// Note that when writing compressed blobs, the `WriteRequest.write_offset` in
    /// the initial request in a stream refers to the offset in the uncompressed form
    /// of the blob. In subsequent requests, `WriteRequest.write_offset` MUST be the
    /// sum of the first request's 'WriteRequest.write_offset' and the total size of
    /// all the compressed data bundles in the previous requests.
    /// Note that this mixes an uncompressed offset with a compressed byte length,
    /// which is nonsensical, but it is done to fit the semantics of the existing
    /// ByteStream protocol.
    ///
    /// Uploads of the same data MAY occur concurrently in any form, compressed or
    /// uncompressed.
    ///
    /// Clients SHOULD NOT use gRPC-level compression for ByteStream API `Write`
    /// calls of compressed blobs, since this would compress already-compressed data.
    ///
    /// When attempting an upload, if another client has already completed the upload
    /// (which may occur in the middle of a single upload if another client uploads
    /// the same blob concurrently), the request will terminate immediately without
    /// error, and with a response whose `committed_size` is the value `-1` if this
    /// is a compressed upload, or with the full size of the uploaded file if this is
    /// an uncompressed upload (regardless of how much data was transmitted by the
    /// client). If the client completes the upload but the
    /// \[Digest\]\[build.bazel.remote.execution.v2.Digest\] does not match, an
    /// `INVALID_ARGUMENT` error will be returned. In either case, the client should
    /// not attempt to retry the upload.
    ///
    /// Small downloads can be grouped and requested in a batch via
    /// \[BatchReadBlobs\]\[build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs\].
    ///
    /// For large downloads, the client must use the
    /// \[Read method\]\[google.bytestream.ByteStream.Read\] of the ByteStream API.
    ///
    /// For uncompressed data, the `ReadRequest.resource_name` is of the following form:
    /// `{instance_name}/blobs/{digest_function/}{hash}/{size}`
    /// Where `instance_name`, `digest_function`, `hash` and `size` are defined as
    /// for uploads.
    ///
    /// Data can alternatively be downloaded in compressed form, with the following
    /// `ReadRequest.resource_name` form:
    /// `{instance_name}/compressed-blobs/{compressor}/{digest_function/}{uncompressed_hash}/{uncompressed_size}`
    ///
    /// Where:
    ///
    /// * `instance_name`, `compressor` and `digest_function` are defined as for
    ///  uploads.
    /// * `uncompressed_hash` and `uncompressed_size` refer to the
    ///  \[Digest\]\[build.bazel.remote.execution.v2.Digest\] of the data being
    ///  downloaded, once uncompressed. Clients MUST verify that these match
    ///  the downloaded data once uncompressed, and take appropriate steps in
    ///  the case of failure such as retrying a limited number of times or
    ///  surfacing an error to the user.
    ///
    /// When downloading compressed blobs:
    ///
    /// * `ReadRequest.read_offset` refers to the offset in the uncompressed form
    ///  of the blob.
    /// * Servers MUST return `INVALID_ARGUMENT` if `ReadRequest.read_limit` is
    ///  non-zero.
    /// * Servers MAY use any compression level they choose, including different
    ///  levels for different blobs (e.g. choosing a level designed for maximum
    ///  speed for data known to be incompressible).
    /// * Clients SHOULD NOT use gRPC-level compression, since this would compress
    ///  already-compressed data.
    ///
    /// Servers MUST be able to provide data for all recently advertised blobs in
    /// each of the compression formats that the server supports, as well as in
    /// uncompressed form.
    ///
    /// Additionally, ByteStream requests MAY come with an additional plain text header
    /// that indicates the `resource_name` of the blob being sent.  The header, if
    /// present, MUST follow the following convention:
    ///
    /// * name: `build.bazel.remote.execution.v2.resource-name`.
    /// * contents: the plain text resource_name of the request message.
    ///  If set, the contents of the header MUST match the `resource_name` of the request
    ///  message.  Servers MAY use this header to assist in routing requests to the
    ///  appropriate backend.
    ///
    /// The lifetime of entries in the CAS is implementation specific, but it SHOULD
    /// be long enough to allow for newly-added and recently looked-up entries to be
    /// used in subsequent calls (e.g. to
    /// \[Execute\]\[build.bazel.remote.execution.v2.Execution.Execute\]).
    ///
    /// Servers MUST behave as though empty blobs are always available, even if they
    /// have not been uploaded. Clients MAY optimize away the uploading or
    /// downloading of empty blobs.
    ///
    /// As with other services in the Remote Execution API, any call may return an
    /// error with a \[RetryInfo\]\[google.rpc.RetryInfo\] error detail providing
    /// information about when the client should retry the request; clients SHOULD
    /// respect the information provided.
    #[derive(Debug)]
    pub struct ContentAddressableStorageServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> ContentAddressableStorageServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>>
    for ContentAddressableStorageServer<T>
    where
        T: ContentAddressableStorage,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/FindMissingBlobs" => {
                    #[allow(non_camel_case_types)]
                    struct FindMissingBlobsSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::UnaryService<super::FindMissingBlobsRequest>
                    for FindMissingBlobsSvc<T> {
                        type Response = super::FindMissingBlobsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::FindMissingBlobsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::find_missing_blobs(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = FindMissingBlobsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/BatchUpdateBlobs" => {
                    #[allow(non_camel_case_types)]
                    struct BatchUpdateBlobsSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::UnaryService<super::BatchUpdateBlobsRequest>
                    for BatchUpdateBlobsSvc<T> {
                        type Response = super::BatchUpdateBlobsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::BatchUpdateBlobsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::batch_update_blobs(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = BatchUpdateBlobsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/BatchReadBlobs" => {
                    #[allow(non_camel_case_types)]
                    struct BatchReadBlobsSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::UnaryService<super::BatchReadBlobsRequest>
                    for BatchReadBlobsSvc<T> {
                        type Response = super::BatchReadBlobsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::BatchReadBlobsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::batch_read_blobs(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = BatchReadBlobsSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/GetTree" => {
                    #[allow(non_camel_case_types)]
                    struct GetTreeSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::ServerStreamingService<super::GetTreeRequest>
                    for GetTreeSvc<T> {
                        type Response = super::GetTreeResponse;
                        type ResponseStream = T::GetTreeStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetTreeRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::get_tree(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetTreeSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/SplitBlob" => {
                    #[allow(non_camel_case_types)]
                    struct SplitBlobSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::UnaryService<super::SplitBlobRequest>
                    for SplitBlobSvc<T> {
                        type Response = super::SplitBlobResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SplitBlobRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::split_blob(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SplitBlobSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/GetChunkMapping" => {
                    #[allow(non_camel_case_types)]
                    struct GetChunkMappingSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::ServerStreamingService<
                        super::GetChunkMappingRequest,
                    > for GetChunkMappingSvc<T> {
                        type Response = super::GetChunkMappingResponse;
                        type ResponseStream = T::GetChunkMappingStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetChunkMappingRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::get_chunk_mapping(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetChunkMappingSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/SpliceBlob" => {
                    #[allow(non_camel_case_types)]
                    struct SpliceBlobSvc<T: ContentAddressableStorage>(pub Arc<T>);
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::UnaryService<super::SpliceBlobRequest>
                    for SpliceBlobSvc<T> {
                        type Response = super::SpliceBlobResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SpliceBlobRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::splice_blob(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = SpliceBlobSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/build.bazel.remote.execution.v2.ContentAddressableStorage/RegisterChunkMapping" => {
                    #[allow(non_camel_case_types)]
                    struct RegisterChunkMappingSvc<T: ContentAddressableStorage>(
                        pub Arc<T>,
                    );
                    impl<
                        T: ContentAddressableStorage,
                    > tonic::server::ClientStreamingService<
                        super::RegisterChunkMappingRequest,
                    > for RegisterChunkMappingSvc<T> {
                        type Response = super::RegisterChunkMappingResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                tonic::Streaming<super::RegisterChunkMappingRequest>,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as ContentAddressableStorage>::register_chunk_mapping(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = RegisterChunkMappingSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.client_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for ContentAddressableStorageServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "build.bazel.remote.execution.v2.ContentAddressableStorage";
    impl<T> tonic::server::NamedService for ContentAddressableStorageServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
/// Generated client implementations.
pub mod capabilities_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The Capabilities service may be used by remote execution clients to query
    /// various server properties, in order to self-configure or return meaningful
    /// error messages.
    ///
    /// The query may include a particular `instance_name`, in which case the values
    /// returned will pertain to that instance.
    #[derive(Debug, Clone)]
    pub struct CapabilitiesClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl CapabilitiesClient<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> CapabilitiesClient<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,
        ) -> CapabilitiesClient<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,
        {
            CapabilitiesClient::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
        }
        /// GetCapabilities returns the server capabilities configuration of the
        /// remote endpoint.
        /// Only the capabilities of the services supported by the endpoint will
        /// be returned:
        ///
        /// * Execution + CAS + Action Cache endpoints should return both
        ///  CacheCapabilities and ExecutionCapabilities.
        /// * Execution only endpoints should return ExecutionCapabilities.
        /// * CAS + Action Cache only endpoints should return CacheCapabilities.
        ///
        /// There are no method-specific errors.
        pub async fn get_capabilities(
            &mut self,
            request: impl tonic::IntoRequest<super::GetCapabilitiesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServerCapabilities>,
            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(
                "/build.bazel.remote.execution.v2.Capabilities/GetCapabilities",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "build.bazel.remote.execution.v2.Capabilities",
                        "GetCapabilities",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod capabilities_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with CapabilitiesServer.
    #[async_trait]
    pub trait Capabilities: std::marker::Send + std::marker::Sync + 'static {
        /// GetCapabilities returns the server capabilities configuration of the
        /// remote endpoint.
        /// Only the capabilities of the services supported by the endpoint will
        /// be returned:
        ///
        /// * Execution + CAS + Action Cache endpoints should return both
        ///  CacheCapabilities and ExecutionCapabilities.
        /// * Execution only endpoints should return ExecutionCapabilities.
        /// * CAS + Action Cache only endpoints should return CacheCapabilities.
        ///
        /// There are no method-specific errors.
        async fn get_capabilities(
            &self,
            request: tonic::Request<super::GetCapabilitiesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ServerCapabilities>,
            tonic::Status,
        >;
    }
    /// The Capabilities service may be used by remote execution clients to query
    /// various server properties, in order to self-configure or return meaningful
    /// error messages.
    ///
    /// The query may include a particular `instance_name`, in which case the values
    /// returned will pertain to that instance.
    #[derive(Debug)]
    pub struct CapabilitiesServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> CapabilitiesServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for CapabilitiesServer<T>
    where
        T: Capabilities,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/build.bazel.remote.execution.v2.Capabilities/GetCapabilities" => {
                    #[allow(non_camel_case_types)]
                    struct GetCapabilitiesSvc<T: Capabilities>(pub Arc<T>);
                    impl<
                        T: Capabilities,
                    > tonic::server::UnaryService<super::GetCapabilitiesRequest>
                    for GetCapabilitiesSvc<T> {
                        type Response = super::ServerCapabilities;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetCapabilitiesRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as Capabilities>::get_capabilities(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = GetCapabilitiesSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for CapabilitiesServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "build.bazel.remote.execution.v2.Capabilities";
    impl<T> tonic::server::NamedService for CapabilitiesServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}