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
// This file is @generated by prost-build.
/// Exception detail.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExceptionDetail {
    /// The type of exception that occurred. Required.
    #[prost(enumeration = "ExceptionType", tag = "1")]
    pub error_type: i32,
}
/// Every ExceptionType maps to one and only one Exception class. This allows
/// internal clients to identify the exact server exception that caused the
/// error for debugging and logging purposes.
/// Add new ExceptionTypes to EXCEPTION_TYPE_TO_ERROR_CODE_MAP in
/// j/c/g/apps/boq/metadata/model/service/exceptions/CategoryExceptionHelper
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExceptionType {
    /// Unknown ExceptionType.
    Unspecified = 0,
    /// The required field is missing.
    FieldRequired = 1,
    /// Unable to create a metamodel with the given ID because it already exists.
    MetamodelAlreadyExists = 2,
    /// Metamodel was not found
    MetamodelNotFound = 3,
    /// Metamodel state transition isn't allowed.
    IllegalMetamodelStateTransition = 4,
    /// Metamodel deprecation policy is invalid.
    InvalidMetamodelDeprecationPolicy = 5,
    /// Cannot delete a metamodel due to the pending deprecation policy.
    MetamodelDeletionDeniedUntil = 6,
    /// A Field value is invalid.
    InvalidField = 7,
    /// Precondition failed when updating a metamodel
    MetamodelPreconditionFailed = 8,
    /// Multiple fields had the same key.
    DuplicateFieldKey = 9,
    /// Removing a field from a Metamodel (e.g. a published Metamodel) is not
    /// permitted.
    IllegalFieldRemoval = 10,
    /// Cannot specify field options for a different field type.
    IllegalFieldOptionsForField = 11,
    /// Some changes are not supported
    UnsupportedChangeToPublishedMetamodel = 12,
    /// Cannot change the metamodel state in an update
    IllegalMetamodelStateTransitionInUpdate = 13,
    /// The page token is expired
    PageTokenExpired = 14,
    /// The user is not authorized to make the request.
    NotAuthorized = 15,
    /// Illegal field state transition
    IllegalFieldStateTransition = 16,
    /// Illegal choice set option state transition
    IllegalChoiceSetOptionStateTransition = 17,
    /// Invalid choice set options
    InvalidChoiceSetOptions = 18,
    /// Invalid field key
    InvalidFieldKey = 19,
    /// A specified property on a field is outside the allowed range.
    InvalidFieldPropertyRange = 20,
    /// A localized string wasn't valid. This may be because the locale is invalid,
    /// its missing a default value, or the translation is empty for a set locale.
    InvalidLocalizedString = 21,
    /// cannot change a property on a published field
    IllegalChangeToPublishedField = 22,
    /// A field update is not inclusive of the previous value
    InvalidFieldUpdateNotInclusive = 23,
    /// A field update is not inclusive of the previous value
    InvalidChoiceSetState = 24,
    /// An unknown error occurred
    InternalServerError = 500,
}
impl ExceptionType {
    /// 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 {
            ExceptionType::Unspecified => "EXCEPTION_TYPE_UNSPECIFIED",
            ExceptionType::FieldRequired => "FIELD_REQUIRED",
            ExceptionType::MetamodelAlreadyExists => "METAMODEL_ALREADY_EXISTS",
            ExceptionType::MetamodelNotFound => "METAMODEL_NOT_FOUND",
            ExceptionType::IllegalMetamodelStateTransition => {
                "ILLEGAL_METAMODEL_STATE_TRANSITION"
            }
            ExceptionType::InvalidMetamodelDeprecationPolicy => {
                "INVALID_METAMODEL_DEPRECATION_POLICY"
            }
            ExceptionType::MetamodelDeletionDeniedUntil => {
                "METAMODEL_DELETION_DENIED_UNTIL"
            }
            ExceptionType::InvalidField => "INVALID_FIELD",
            ExceptionType::MetamodelPreconditionFailed => "METAMODEL_PRECONDITION_FAILED",
            ExceptionType::DuplicateFieldKey => "DUPLICATE_FIELD_KEY",
            ExceptionType::IllegalFieldRemoval => "ILLEGAL_FIELD_REMOVAL",
            ExceptionType::IllegalFieldOptionsForField => {
                "ILLEGAL_FIELD_OPTIONS_FOR_FIELD"
            }
            ExceptionType::UnsupportedChangeToPublishedMetamodel => {
                "UNSUPPORTED_CHANGE_TO_PUBLISHED_METAMODEL"
            }
            ExceptionType::IllegalMetamodelStateTransitionInUpdate => {
                "ILLEGAL_METAMODEL_STATE_TRANSITION_IN_UPDATE"
            }
            ExceptionType::PageTokenExpired => "PAGE_TOKEN_EXPIRED",
            ExceptionType::NotAuthorized => "NOT_AUTHORIZED",
            ExceptionType::IllegalFieldStateTransition => {
                "ILLEGAL_FIELD_STATE_TRANSITION"
            }
            ExceptionType::IllegalChoiceSetOptionStateTransition => {
                "ILLEGAL_CHOICE_SET_OPTION_STATE_TRANSITION"
            }
            ExceptionType::InvalidChoiceSetOptions => "INVALID_CHOICE_SET_OPTIONS",
            ExceptionType::InvalidFieldKey => "INVALID_FIELD_KEY",
            ExceptionType::InvalidFieldPropertyRange => "INVALID_FIELD_PROPERTY_RANGE",
            ExceptionType::InvalidLocalizedString => "INVALID_LOCALIZED_STRING",
            ExceptionType::IllegalChangeToPublishedField => {
                "ILLEGAL_CHANGE_TO_PUBLISHED_FIELD"
            }
            ExceptionType::InvalidFieldUpdateNotInclusive => {
                "INVALID_FIELD_UPDATE_NOT_INCLUSIVE"
            }
            ExceptionType::InvalidChoiceSetState => "INVALID_CHOICE_SET_STATE",
            ExceptionType::InternalServerError => "INTERNAL_SERVER_ERROR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXCEPTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "FIELD_REQUIRED" => Some(Self::FieldRequired),
            "METAMODEL_ALREADY_EXISTS" => Some(Self::MetamodelAlreadyExists),
            "METAMODEL_NOT_FOUND" => Some(Self::MetamodelNotFound),
            "ILLEGAL_METAMODEL_STATE_TRANSITION" => {
                Some(Self::IllegalMetamodelStateTransition)
            }
            "INVALID_METAMODEL_DEPRECATION_POLICY" => {
                Some(Self::InvalidMetamodelDeprecationPolicy)
            }
            "METAMODEL_DELETION_DENIED_UNTIL" => Some(Self::MetamodelDeletionDeniedUntil),
            "INVALID_FIELD" => Some(Self::InvalidField),
            "METAMODEL_PRECONDITION_FAILED" => Some(Self::MetamodelPreconditionFailed),
            "DUPLICATE_FIELD_KEY" => Some(Self::DuplicateFieldKey),
            "ILLEGAL_FIELD_REMOVAL" => Some(Self::IllegalFieldRemoval),
            "ILLEGAL_FIELD_OPTIONS_FOR_FIELD" => Some(Self::IllegalFieldOptionsForField),
            "UNSUPPORTED_CHANGE_TO_PUBLISHED_METAMODEL" => {
                Some(Self::UnsupportedChangeToPublishedMetamodel)
            }
            "ILLEGAL_METAMODEL_STATE_TRANSITION_IN_UPDATE" => {
                Some(Self::IllegalMetamodelStateTransitionInUpdate)
            }
            "PAGE_TOKEN_EXPIRED" => Some(Self::PageTokenExpired),
            "NOT_AUTHORIZED" => Some(Self::NotAuthorized),
            "ILLEGAL_FIELD_STATE_TRANSITION" => Some(Self::IllegalFieldStateTransition),
            "ILLEGAL_CHOICE_SET_OPTION_STATE_TRANSITION" => {
                Some(Self::IllegalChoiceSetOptionStateTransition)
            }
            "INVALID_CHOICE_SET_OPTIONS" => Some(Self::InvalidChoiceSetOptions),
            "INVALID_FIELD_KEY" => Some(Self::InvalidFieldKey),
            "INVALID_FIELD_PROPERTY_RANGE" => Some(Self::InvalidFieldPropertyRange),
            "INVALID_LOCALIZED_STRING" => Some(Self::InvalidLocalizedString),
            "ILLEGAL_CHANGE_TO_PUBLISHED_FIELD" => {
                Some(Self::IllegalChangeToPublishedField)
            }
            "INVALID_FIELD_UPDATE_NOT_INCLUSIVE" => {
                Some(Self::InvalidFieldUpdateNotInclusive)
            }
            "INVALID_CHOICE_SET_STATE" => Some(Self::InvalidChoiceSetState),
            "INTERNAL_SERVER_ERROR" => Some(Self::InternalServerError),
            _ => None,
        }
    }
}
/// The lifecycle state of an object, such as label, field, or choice. The
/// lifecycle enforces the following transitions:
///
/// * `UNPUBLISHED_DRAFT` (starting state)
/// * `UNPUBLISHED_DRAFT` -> `PUBLISHED`
/// * `UNPUBLISHED_DRAFT` -> (Deleted)
/// * `PUBLISHED` -> `DISABLED`
/// * `DISABLED` -> `PUBLISHED`
/// * `DISABLED` -> (Deleted)
///
/// The published and disabled states have some distinct characteristics:
///
/// * Published—Some kinds of changes might be made to an object in this state,
///    in which case `has_unpublished_changes` will be true. Also, some kinds of
///    changes are not permitted. Generally, any change that would invalidate or
///    cause new restrictions on existing metadata related to the label are
///    rejected.
/// * Disabled—When disabled, the configured `DisabledPolicy` takes effect.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lifecycle {
    /// Output only. The state of the object associated with this lifecycle.
    #[prost(enumeration = "lifecycle::State", tag = "1")]
    pub state: i32,
    /// Output only. Whether the object associated with this lifecycle has
    /// unpublished changes.
    #[prost(bool, tag = "2")]
    pub has_unpublished_changes: bool,
    /// The policy that governs how to show a disabled label, field, or selection
    /// choice.
    #[prost(message, optional, tag = "3")]
    pub disabled_policy: ::core::option::Option<lifecycle::DisabledPolicy>,
}
/// Nested message and enum types in `Lifecycle`.
pub mod lifecycle {
    /// The policy that governs how to treat a disabled label, field, or selection
    /// choice in different contexts.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisabledPolicy {
        /// Whether to hide this disabled object in the search menu for Drive items.
        ///
        /// * When `false`, the object is generally shown in the UI as disabled but
        /// it appears in the search results when searching for Drive items.
        /// * When `true`, the object is generally hidden in the UI when
        ///    searching for Drive items.
        #[prost(bool, tag = "1")]
        pub hide_in_search: bool,
        /// Whether to show this disabled object in the apply menu on Drive items.
        ///
        /// * When `true`, the object is generally shown in the UI as disabled
        ///    and is unselectable.
        /// * When `false`, the object is generally hidden in the UI.
        #[prost(bool, tag = "2")]
        pub show_in_apply: bool,
    }
    /// The state of the object associated with this lifecycle.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unknown State.
        Unspecified = 0,
        /// The initial state of an object. Once published, the object can never
        /// return to this state. Once an object is published, certain kinds of
        /// changes are no longer permitted.
        UnpublishedDraft = 1,
        /// The object has been published. The object might have unpublished draft
        /// changes as indicated by `has_unpublished_changes`.
        Published = 2,
        /// The object has been published and has since been disabled. The object
        /// might have unpublished draft changes as indicated by
        /// `has_unpublished_changes`.
        Disabled = 3,
        /// The object has been deleted.
        Deleted = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::UnpublishedDraft => "UNPUBLISHED_DRAFT",
                State::Published => "PUBLISHED",
                State::Disabled => "DISABLED",
                State::Deleted => "DELETED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "UNPUBLISHED_DRAFT" => Some(Self::UnpublishedDraft),
                "PUBLISHED" => Some(Self::Published),
                "DISABLED" => Some(Self::Disabled),
                "DELETED" => Some(Self::Deleted),
                _ => None,
            }
        }
    }
}
/// Information about a user.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserInfo {
    /// The identifier for this user that can be used with the People API to get
    /// more information.
    /// For example, people/12345678.
    #[prost(string, tag = "1")]
    pub person: ::prost::alloc::string::String,
}
/// Badge status of the label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BadgeConfig {
    /// The color of the badge. When not specified, no badge is rendered.
    /// The background, foreground, and solo (light and dark mode) colors set here
    /// are changed in the Drive UI into the closest recommended supported color.
    #[prost(message, optional, tag = "1")]
    pub color: ::core::option::Option<super::super::super::super::r#type::Color>,
    /// Override the default global priority of this badge.
    /// When set to 0, the default priority heuristic is used.
    #[prost(int64, tag = "2")]
    pub priority_override: i64,
}
/// The color derived from BadgeConfig and changed to the closest recommended
/// supported color.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BadgeColors {
    /// Output only. Badge background that pairs with the foreground.
    #[prost(message, optional, tag = "1")]
    pub background_color: ::core::option::Option<
        super::super::super::super::r#type::Color,
    >,
    /// Output only. Badge foreground that pairs with the background.
    #[prost(message, optional, tag = "2")]
    pub foreground_color: ::core::option::Option<
        super::super::super::super::r#type::Color,
    >,
    /// Output only. Color that can be used for text without a background.
    #[prost(message, optional, tag = "3")]
    pub solo_color: ::core::option::Option<super::super::super::super::r#type::Color>,
}
/// Contains information about whether a label component should be considered
/// locked.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LockStatus {
    /// Output only. Indicates whether this label component is the (direct) target
    /// of a LabelLock.  A label component can be implicitly locked even if it's
    /// not the direct target of a LabelLock, in which case this field is set to
    /// false.
    #[prost(bool, tag = "1")]
    pub locked: bool,
}
/// Defines a field that has a display name, data type, and other
/// configuration options. This field defines the kind of metadata that may be
/// set on a Drive item.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Field {
    /// Output only. The key of a field, unique within a label or library.
    ///
    /// This value is autogenerated. Matches the regex: `(\[a-zA-Z0-9\])+`
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Output only. The key to use when constructing Drive search queries to find
    /// files based on values defined for this field on files.
    /// For example, "`{query_key}` > 2001-01-01".
    #[prost(string, tag = "2")]
    pub query_key: ::prost::alloc::string::String,
    /// The basic properties of the field.
    #[prost(message, optional, tag = "3")]
    pub properties: ::core::option::Option<field::Properties>,
    /// Output only. The lifecycle of this field.
    #[prost(message, optional, tag = "4")]
    pub lifecycle: ::core::option::Option<Lifecycle>,
    /// Output only. UI display hints for rendering a field.
    #[prost(message, optional, tag = "5")]
    pub display_hints: ::core::option::Option<field::DisplayHints>,
    /// Output only. The capabilities this user has when editing this field.
    #[prost(message, optional, tag = "6")]
    pub schema_capabilities: ::core::option::Option<field::SchemaCapabilities>,
    /// Output only. The capabilities this user has on this field and its value
    /// when the label is applied on Drive items.
    #[prost(message, optional, tag = "7")]
    pub applied_capabilities: ::core::option::Option<field::AppliedCapabilities>,
    /// Output only. The user who created this field.
    #[prost(message, optional, tag = "8")]
    pub creator: ::core::option::Option<UserInfo>,
    /// Output only. The time this field was created.
    #[prost(message, optional, tag = "9")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user who modified this field.
    #[prost(message, optional, tag = "10")]
    pub updater: ::core::option::Option<UserInfo>,
    /// Output only. The time this field was updated.
    #[prost(message, optional, tag = "11")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user who published this field. This value has no meaning
    /// when the field is not published.
    #[prost(message, optional, tag = "12")]
    pub publisher: ::core::option::Option<UserInfo>,
    /// Output only. The user who disabled this field. This value has no meaning
    /// when the field is not disabled.
    #[prost(message, optional, tag = "13")]
    pub disabler: ::core::option::Option<UserInfo>,
    /// Output only. The time this field was disabled. This value has no meaning
    /// when the field is not disabled.
    #[prost(message, optional, tag = "14")]
    pub disable_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The LockStatus of this field.
    #[prost(message, optional, tag = "15")]
    pub lock_status: ::core::option::Option<LockStatus>,
    /// The data type and options of this field.
    /// Once published, the data type cannot be changed.
    #[prost(oneof = "field::Type", tags = "16, 18, 19, 20, 21")]
    pub r#type: ::core::option::Option<field::Type>,
}
/// Nested message and enum types in `Field`.
pub mod field {
    /// The basic properties of the field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Properties {
        /// Required. The display text to show in the UI identifying this field.
        #[prost(string, tag = "1")]
        pub display_name: ::prost::alloc::string::String,
        /// Whether the field should be marked as required.
        #[prost(bool, tag = "2")]
        pub required: bool,
        /// Input only. Insert or move this field before the indicated field. If
        /// empty, the field is placed at the end of the list.
        #[prost(string, tag = "3")]
        pub insert_before_field: ::prost::alloc::string::String,
    }
    /// UI display hints for rendering a field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisplayHints {
        /// Whether the field should be shown as required in the UI.
        #[prost(bool, tag = "1")]
        pub required: bool,
        /// Whether the field should be shown in the UI as disabled.
        #[prost(bool, tag = "2")]
        pub disabled: bool,
        /// This field should be hidden in the search menu when searching for Drive
        /// items.
        #[prost(bool, tag = "3")]
        pub hidden_in_search: bool,
        /// This field should be shown in the apply menu when applying values to a
        /// Drive item.
        #[prost(bool, tag = "4")]
        pub shown_in_apply: bool,
    }
    /// The capabilities related to this field when editing the field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SchemaCapabilities {
        /// Whether the user can change this field.
        #[prost(bool, tag = "1")]
        pub can_update: bool,
        /// Whether the user can delete this field.
        /// The user must have permission and the field must be deprecated.
        #[prost(bool, tag = "2")]
        pub can_delete: bool,
        /// Whether the user can disable this field.
        /// The user must have permission and this field must not already be
        /// disabled.
        #[prost(bool, tag = "3")]
        pub can_disable: bool,
        /// Whether the user can enable this field.
        /// The user must have permission and this field must be disabled.
        #[prost(bool, tag = "4")]
        pub can_enable: bool,
    }
    /// The capabilities related to this field on applied metadata.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AppliedCapabilities {
        /// Whether the user can read related applied metadata on items.
        #[prost(bool, tag = "1")]
        pub can_read: bool,
        /// Whether the user can search for Drive items referencing this field.
        #[prost(bool, tag = "2")]
        pub can_search: bool,
        /// Whether the user can set this field on Drive items.
        #[prost(bool, tag = "3")]
        pub can_write: bool,
    }
    /// Options for a multi-valued variant of an associated field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ListOptions {
        /// Maximum number of entries permitted.
        #[prost(int32, tag = "1")]
        pub max_entries: i32,
    }
    /// Options for the Text field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TextOptions {
        /// Output only. The minimum valid length of values for the text field.
        #[prost(int32, tag = "1")]
        pub min_length: i32,
        /// Output only. The maximum valid length of values for the text field.
        #[prost(int32, tag = "2")]
        pub max_length: i32,
    }
    /// Options for the Integer field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct IntegerOptions {
        /// Output only. The minimum valid value for the integer field.
        #[prost(int64, tag = "1")]
        pub min_value: i64,
        /// Output only. The maximum valid value for the integer field.
        #[prost(int64, tag = "2")]
        pub max_value: i64,
    }
    /// Options for the date field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DateOptions {
        /// Localized date formatting option. Field values are rendered in
        /// this format according to their locale.
        #[prost(enumeration = "date_options::DateFormat", tag = "1")]
        pub date_format_type: i32,
        /// Output only. ICU date format.
        #[prost(string, tag = "2")]
        pub date_format: ::prost::alloc::string::String,
        /// Output only. Minimum valid value (year, month, day).
        #[prost(message, optional, tag = "3")]
        pub min_value: ::core::option::Option<
            super::super::super::super::super::r#type::Date,
        >,
        /// Output only. Maximum valid value (year, month, day).
        #[prost(message, optional, tag = "4")]
        pub max_value: ::core::option::Option<
            super::super::super::super::super::r#type::Date,
        >,
    }
    /// Nested message and enum types in `DateOptions`.
    pub mod date_options {
        /// Localized date format options.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum DateFormat {
            /// Date format unspecified.
            Unspecified = 0,
            /// Includes full month name.
            /// For example, January 12, 1999
            /// (MMMM d, y)
            LongDate = 1,
            /// Short, numeric, representation.
            /// For example, 12/13/99
            /// (M/d/yy)
            ShortDate = 2,
        }
        impl DateFormat {
            /// 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 {
                    DateFormat::Unspecified => "DATE_FORMAT_UNSPECIFIED",
                    DateFormat::LongDate => "LONG_DATE",
                    DateFormat::ShortDate => "SHORT_DATE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "DATE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
                    "LONG_DATE" => Some(Self::LongDate),
                    "SHORT_DATE" => Some(Self::ShortDate),
                    _ => None,
                }
            }
        }
    }
    /// Options for the selection field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SelectionOptions {
        /// When specified, indicates this field supports a list of values.
        /// Once the field is published, this cannot be changed.
        #[prost(message, optional, tag = "1")]
        pub list_options: ::core::option::Option<ListOptions>,
        /// The options available for this selection field.
        /// The list order is consistent, and modified with `insert_before_choice`.
        #[prost(message, repeated, tag = "2")]
        pub choices: ::prost::alloc::vec::Vec<selection_options::Choice>,
    }
    /// Nested message and enum types in `SelectionOptions`.
    pub mod selection_options {
        /// Selection field choice.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct Choice {
            /// The unique value of the choice.
            /// This ID is autogenerated. Matches the regex: `(\[a-zA-Z0-9_\])+`.
            #[prost(string, tag = "1")]
            pub id: ::prost::alloc::string::String,
            /// Basic properties of the choice.
            #[prost(message, optional, tag = "2")]
            pub properties: ::core::option::Option<choice::Properties>,
            /// Output only. Lifecycle of the choice.
            #[prost(message, optional, tag = "3")]
            pub lifecycle: ::core::option::Option<super::super::Lifecycle>,
            /// Output only. UI display hints for rendering a choice.
            #[prost(message, optional, tag = "4")]
            pub display_hints: ::core::option::Option<choice::DisplayHints>,
            /// Output only. The capabilities related to this option when editing the
            /// option.
            #[prost(message, optional, tag = "5")]
            pub schema_capabilities: ::core::option::Option<choice::SchemaCapabilities>,
            /// Output only. The capabilities related to this choice on applied
            /// metadata.
            #[prost(message, optional, tag = "6")]
            pub applied_capabilities: ::core::option::Option<
                choice::AppliedCapabilities,
            >,
            /// Output only. The user who created this choice.
            #[prost(message, optional, tag = "7")]
            pub creator: ::core::option::Option<super::super::UserInfo>,
            /// Output only. The time this choice was created.
            #[prost(message, optional, tag = "8")]
            pub create_time: ::core::option::Option<::prost_types::Timestamp>,
            /// Output only. The user who updated this choice last.
            #[prost(message, optional, tag = "9")]
            pub updater: ::core::option::Option<super::super::UserInfo>,
            /// Output only. The time this choice was updated last.
            #[prost(message, optional, tag = "10")]
            pub update_time: ::core::option::Option<::prost_types::Timestamp>,
            /// Output only. The user who published this choice. This value has no
            /// meaning when the choice is not published.
            #[prost(message, optional, tag = "11")]
            pub publisher: ::core::option::Option<super::super::UserInfo>,
            /// Output only. The time this choice was published. This value has no
            /// meaning when the choice is not published.
            #[prost(message, optional, tag = "12")]
            pub publish_time: ::core::option::Option<::prost_types::Timestamp>,
            /// Output only. The user who disabled this choice. This value has no
            /// meaning when the option is not disabled.
            #[prost(message, optional, tag = "13")]
            pub disabler: ::core::option::Option<super::super::UserInfo>,
            /// Output only. The time this choice was disabled. This value has no
            /// meaning when the choice is not disabled.
            #[prost(message, optional, tag = "14")]
            pub disable_time: ::core::option::Option<::prost_types::Timestamp>,
            /// Output only. The LockStatus of this choice.
            #[prost(message, optional, tag = "15")]
            pub lock_status: ::core::option::Option<super::super::LockStatus>,
        }
        /// Nested message and enum types in `Choice`.
        pub mod choice {
            /// Basic properties of the choice.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct Properties {
                /// Required. The display text to show in the UI identifying this field.
                #[prost(string, tag = "1")]
                pub display_name: ::prost::alloc::string::String,
                /// The description of this label.
                #[prost(string, tag = "2")]
                pub description: ::prost::alloc::string::String,
                /// The badge configuration for this choice. When set, the
                /// label that owns this choice is considered a "badged label".
                #[prost(message, optional, tag = "3")]
                pub badge_config: ::core::option::Option<
                    super::super::super::BadgeConfig,
                >,
                /// Input only. Insert or move this choice before the indicated choice.
                /// If empty, the choice is placed at the end of the list.
                #[prost(string, tag = "4")]
                pub insert_before_choice: ::prost::alloc::string::String,
            }
            /// UI display hints for rendering an option.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct DisplayHints {
                /// Whether the option should be shown in the UI as disabled.
                #[prost(bool, tag = "1")]
                pub disabled: bool,
                /// This option should be hidden in the search menu when searching for
                /// Drive items.
                #[prost(bool, tag = "2")]
                pub hidden_in_search: bool,
                /// This option should be shown in the apply menu when applying values to
                /// a Drive item.
                #[prost(bool, tag = "3")]
                pub shown_in_apply: bool,
                /// The colors to use for the badge. Changed to Google Material colors
                /// based on the chosen `properties.badge_config.color`.
                #[prost(message, optional, tag = "4")]
                pub badge_colors: ::core::option::Option<
                    super::super::super::BadgeColors,
                >,
                /// The dark-mode color to use for the badge. Changed to Google Material
                /// colors based on the chosen `properties.badge_config.color`.
                #[prost(message, optional, tag = "5")]
                pub dark_badge_colors: ::core::option::Option<
                    super::super::super::BadgeColors,
                >,
                /// The priority of this badge. Used to compare and sort between multiple
                /// badges. A lower number means the badge should be shown first.
                /// When a badging configuration is not present, this will be 0.
                /// Otherwise, this will be set to `BadgeConfig.priority_override` or the
                /// default heuristic which prefers creation date of the label, and field
                /// and option priority.
                #[prost(int64, tag = "6")]
                pub badge_priority: i64,
            }
            /// The capabilities related to this choice when editing the choice.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct SchemaCapabilities {
                /// Whether the user can update this choice.
                #[prost(bool, tag = "1")]
                pub can_update: bool,
                /// Whether the user can delete this choice.
                #[prost(bool, tag = "2")]
                pub can_delete: bool,
                /// Whether the user can disable this choice.
                #[prost(bool, tag = "3")]
                pub can_disable: bool,
                /// Whether the user can enable this choice.
                #[prost(bool, tag = "4")]
                pub can_enable: bool,
            }
            /// The capabilities related to this choice on applied metadata.
            #[allow(clippy::derive_partial_eq_without_eq)]
            #[derive(Clone, PartialEq, ::prost::Message)]
            pub struct AppliedCapabilities {
                /// Whether the user can read related applied metadata on items.
                #[prost(bool, tag = "1")]
                pub can_read: bool,
                /// Whether the user can use this choice in search queries.
                #[prost(bool, tag = "2")]
                pub can_search: bool,
                /// Whether the user can select this choice on an item.
                #[prost(bool, tag = "3")]
                pub can_select: bool,
            }
        }
    }
    /// Options for the user field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UserOptions {
        /// When specified, indicates that this field supports a list of values.
        /// Once the field is published, this cannot be changed.
        #[prost(message, optional, tag = "1")]
        pub list_options: ::core::option::Option<ListOptions>,
    }
    /// The data type and options of this field.
    /// Once published, the data type cannot be changed.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Type {
        /// Text field options.
        #[prost(message, tag = "16")]
        TextOptions(TextOptions),
        /// Integer field options.
        #[prost(message, tag = "18")]
        IntegerOptions(IntegerOptions),
        /// Date field options.
        #[prost(message, tag = "19")]
        DateOptions(DateOptions),
        /// Selection field options.
        #[prost(message, tag = "20")]
        SelectionOptions(SelectionOptions),
        /// User field options.
        #[prost(message, tag = "21")]
        UserOptions(UserOptions),
    }
}
/// A label defines a taxonomy that can be applied to Drive items in order to
/// organize and search across items. Labels can be simple strings, or can
/// contain fields that describe additional metadata that can be further used to
/// organize and search Drive items.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Label {
    /// Output only. Resource name of the label. Will be in the form of either:
    /// `labels/{id}` or `labels/{id}@{revision_id}` depending on the request.
    /// See `id` and `revision_id` below.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Globally unique identifier of this label. ID makes up part of
    /// the label `name`, but unlike `name`, ID is consistent between revisions.
    /// Matches the regex: `(\[a-zA-Z0-9\])+`
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    /// Output only. Revision ID of the label. Revision ID might be part of the
    /// label `name` depending on the request issued. A new revision is created
    /// whenever revisioned properties of a label are changed. Matches the regex:
    /// `(\[a-zA-Z0-9\])+`
    #[prost(string, tag = "3")]
    pub revision_id: ::prost::alloc::string::String,
    /// Required. The type of label.
    #[prost(enumeration = "label::LabelType", tag = "4")]
    pub label_type: i32,
    /// Output only. The user who created this label.
    #[prost(message, optional, tag = "5")]
    pub creator: ::core::option::Option<UserInfo>,
    /// Output only. The time this label was created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user who created this label revision.
    #[prost(message, optional, tag = "7")]
    pub revision_creator: ::core::option::Option<UserInfo>,
    /// Output only. The time this label revision was created.
    #[prost(message, optional, tag = "8")]
    pub revision_create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user who published this label.  This value has no meaning
    /// when the label is not published.
    #[prost(message, optional, tag = "9")]
    pub publisher: ::core::option::Option<UserInfo>,
    /// Output only. The time this label was published. This value has no meaning
    /// when the label is not published.
    #[prost(message, optional, tag = "10")]
    pub publish_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user who disabled this label. This value has no meaning
    /// when the label is not disabled.
    #[prost(message, optional, tag = "11")]
    pub disabler: ::core::option::Option<UserInfo>,
    /// Output only. The time this label was disabled. This value has no meaning
    /// when the label is not disabled.
    #[prost(message, optional, tag = "12")]
    pub disable_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The customer this label belongs to.
    /// For example: "customers/123abc789."
    #[prost(string, tag = "13")]
    pub customer: ::prost::alloc::string::String,
    /// Required. The basic properties of the label.
    #[prost(message, optional, tag = "14")]
    pub properties: ::core::option::Option<label::Properties>,
    /// Output only. The lifecycle state of the label including whether it's
    /// published, deprecated, and has draft changes.
    #[prost(message, optional, tag = "15")]
    pub lifecycle: ::core::option::Option<Lifecycle>,
    /// Output only. UI display hints for rendering the label.
    #[prost(message, optional, tag = "16")]
    pub display_hints: ::core::option::Option<label::DisplayHints>,
    /// Output only. The capabilities related to this label on applied metadata.
    #[prost(message, optional, tag = "17")]
    pub applied_capabilities: ::core::option::Option<label::AppliedCapabilities>,
    /// Output only. The capabilities the user has on this label.
    #[prost(message, optional, tag = "18")]
    pub schema_capabilities: ::core::option::Option<label::SchemaCapabilities>,
    /// Output only. Behavior of this label when it's applied to Drive items.
    #[prost(message, optional, tag = "19")]
    pub applied_label_policy: ::core::option::Option<label::AppliedLabelPolicy>,
    /// List of fields in descending priority order.
    #[prost(message, repeated, tag = "20")]
    pub fields: ::prost::alloc::vec::Vec<Field>,
    /// Custom URL to present to users to allow them to learn more about this label
    /// and how it should be used.
    #[prost(string, tag = "21")]
    pub learn_more_uri: ::prost::alloc::string::String,
    /// Output only. The LockStatus of this label.
    #[prost(message, optional, tag = "22")]
    pub lock_status: ::core::option::Option<LockStatus>,
}
/// Nested message and enum types in `Label`.
pub mod label {
    /// Basic properties of the label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Properties {
        /// Required. Title of the label.
        #[prost(string, tag = "1")]
        pub title: ::prost::alloc::string::String,
        /// The description of the label.
        #[prost(string, tag = "2")]
        pub description: ::prost::alloc::string::String,
    }
    /// UI display hints for rendering the label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisplayHints {
        /// Whether the label should be shown in the UI as disabled.
        #[prost(bool, tag = "1")]
        pub disabled: bool,
        /// This label should be hidden in the search menu when searching for Drive
        /// items.
        #[prost(bool, tag = "2")]
        pub hidden_in_search: bool,
        /// This label should be shown in the apply menu when applying values to a
        /// Drive item.
        #[prost(bool, tag = "3")]
        pub shown_in_apply: bool,
        /// Order to display label in a list.
        #[prost(int64, tag = "4")]
        pub priority: i64,
    }
    /// The capabilities a user has on this label's applied metadata.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AppliedCapabilities {
        /// Whether the user can read applied metadata related to this label.
        #[prost(bool, tag = "1")]
        pub can_read: bool,
        /// Whether the user can apply this label to items.
        #[prost(bool, tag = "2")]
        pub can_apply: bool,
        /// Whether the user can remove this label from items.
        #[prost(bool, tag = "3")]
        pub can_remove: bool,
    }
    /// The capabilities related to this label when editing the label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SchemaCapabilities {
        /// Whether the user can change this label.
        #[prost(bool, tag = "1")]
        pub can_update: bool,
        /// Whether the user can delete this label.
        /// The user must have permission and the label must be disabled.
        #[prost(bool, tag = "2")]
        pub can_delete: bool,
        /// Whether the user can disable this label.
        /// The user must have permission and this label must not already be
        /// disabled.
        #[prost(bool, tag = "3")]
        pub can_disable: bool,
        /// Whether the user can enable this label.
        /// The user must have permission and this label must be disabled.
        #[prost(bool, tag = "4")]
        pub can_enable: bool,
    }
    /// Behavior of this label when it's applied to Drive items.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AppliedLabelPolicy {
        /// Indicates how the applied label and field values should be copied when
        /// a Drive item is copied.
        #[prost(enumeration = "applied_label_policy::CopyMode", tag = "1")]
        pub copy_mode: i32,
    }
    /// Nested message and enum types in `AppliedLabelPolicy`.
    pub mod applied_label_policy {
        /// Indicates how the applied label and field values should be copied when
        /// a Drive item is copied.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum CopyMode {
            /// Copy mode unspecified.
            Unspecified = 0,
            /// The applied label and field values are not copied by default when
            /// the Drive item it's applied to is copied.
            DoNotCopy = 1,
            /// The applied label and field values are always copied when the
            /// Drive item it's applied to is copied.
            /// Only admins can use this mode.
            AlwaysCopy = 2,
            /// The applied label and field values are copied if the
            /// label is appliable by the user making the copy.
            CopyAppliable = 3,
        }
        impl CopyMode {
            /// 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 {
                    CopyMode::Unspecified => "COPY_MODE_UNSPECIFIED",
                    CopyMode::DoNotCopy => "DO_NOT_COPY",
                    CopyMode::AlwaysCopy => "ALWAYS_COPY",
                    CopyMode::CopyAppliable => "COPY_APPLIABLE",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "COPY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                    "DO_NOT_COPY" => Some(Self::DoNotCopy),
                    "ALWAYS_COPY" => Some(Self::AlwaysCopy),
                    "COPY_APPLIABLE" => Some(Self::CopyAppliable),
                    _ => None,
                }
            }
        }
    }
    /// The type of this label.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LabelType {
        /// Unknown label type.
        Unspecified = 0,
        /// Shared labels may be shared with users to apply to Drive items.
        Shared = 1,
        /// Admin-owned label. Only creatable and editable by admins. Supports some
        /// additional admin-only features.
        Admin = 2,
        /// A label owned by an internal Google application rather than a customer.
        /// These labels are read-only.
        GoogleApp = 3,
    }
    impl LabelType {
        /// 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 {
                LabelType::Unspecified => "LABEL_TYPE_UNSPECIFIED",
                LabelType::Shared => "SHARED",
                LabelType::Admin => "ADMIN",
                LabelType::GoogleApp => "GOOGLE_APP",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LABEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SHARED" => Some(Self::Shared),
                "ADMIN" => Some(Self::Admin),
                "GOOGLE_APP" => Some(Self::GoogleApp),
                _ => None,
            }
        }
    }
}
/// A Lock that can be applied to a Label, Field, or Choice.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelLock {
    /// Output only. Resource name of this LabelLock.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The ID of the Field that should be locked.  Empty if the whole
    /// Label should be locked.
    #[prost(string, tag = "2")]
    pub field_id: ::prost::alloc::string::String,
    /// The ID of the Selection Field Choice that should be locked.  If present,
    /// `field_id` must also be present.
    #[prost(string, tag = "3")]
    pub choice_id: ::prost::alloc::string::String,
    /// Output only. The time this LabelLock was created.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user whose credentials were used to create the LabelLock.
    /// This will not be present if no user was responsible for creating the
    /// LabelLock.
    #[prost(message, optional, tag = "5")]
    pub creator: ::core::option::Option<UserInfo>,
    /// Output only. A timestamp indicating when this LabelLock was scheduled for
    /// deletion. This will be present only if this LabelLock is in the DELETING
    /// state.
    #[prost(message, optional, tag = "6")]
    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The user's capabilities on this LabelLock.
    #[prost(message, optional, tag = "8")]
    pub capabilities: ::core::option::Option<label_lock::Capabilities>,
    /// Output only. This LabelLock's state.
    #[prost(enumeration = "label_lock::State", tag = "9")]
    pub state: i32,
}
/// Nested message and enum types in `LabelLock`.
pub mod label_lock {
    /// A description of a user's capabilities on a LabelLock.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Capabilities {
        /// True if the user is authorized to view the policy.
        #[prost(bool, tag = "1")]
        pub can_view_policy: bool,
    }
    /// A description of a LabelLock's state.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unknown state.
        Unspecified = 0,
        /// The LabelLock is active and is being enforced by the server.
        Active = 1,
        /// The LabelLock is being deleted.  The LabelLock will continue to be
        /// enforced by the server until it has been fully removed.
        Deleting = 2,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Active => "ACTIVE",
                State::Deleting => "DELETING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "DELETING" => Some(Self::Deleting),
                _ => None,
            }
        }
    }
}
/// The permission that applies to a principal (user, group, audience) on a
/// label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelPermission {
    /// Resource name of this permission.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Specifies the email address for a user or group pricinpal. Not populated
    /// for audience principals. User and Group permissions may only be inserted
    /// using email address. On update requests, if email address is specified,
    /// no principal should be specified.
    #[prost(string, tag = "2")]
    pub email: ::prost::alloc::string::String,
    /// The role the principal should have.
    #[prost(enumeration = "label_permission::LabelRole", tag = "6")]
    pub role: i32,
    /// The principal this permission applies to. Must be either an email, user,
    /// group, or audience.
    /// Example:
    /// * people/12345
    /// * groups/45678
    /// * audiences/default
    #[prost(oneof = "label_permission::Principal", tags = "3, 4, 5")]
    pub principal: ::core::option::Option<label_permission::Principal>,
}
/// Nested message and enum types in `LabelPermission`.
pub mod label_permission {
    /// Roles are concentric with subsequent role.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LabelRole {
        /// Unknown role.
        Unspecified = 0,
        /// A reader can read the label and associated metadata applied to Drive
        /// items.
        Reader = 1,
        /// An applier can write associated metadata on Drive items in which they
        /// also have write access to. Implies `READER`.
        Applier = 2,
        /// An organizer can pin this label in shared drives they manage
        /// and add new appliers to the label.
        Organizer = 3,
        /// Editors can make any update including deleting the label which
        /// also deletes the associated Drive item metadata. Implies `APPLIER`.
        Editor = 4,
    }
    impl LabelRole {
        /// 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 {
                LabelRole::Unspecified => "LABEL_ROLE_UNSPECIFIED",
                LabelRole::Reader => "READER",
                LabelRole::Applier => "APPLIER",
                LabelRole::Organizer => "ORGANIZER",
                LabelRole::Editor => "EDITOR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LABEL_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
                "READER" => Some(Self::Reader),
                "APPLIER" => Some(Self::Applier),
                "ORGANIZER" => Some(Self::Organizer),
                "EDITOR" => Some(Self::Editor),
                _ => None,
            }
        }
    }
    /// The principal this permission applies to. Must be either an email, user,
    /// group, or audience.
    /// Example:
    /// * people/12345
    /// * groups/45678
    /// * audiences/default
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Principal {
        /// Person resource name.
        #[prost(string, tag = "3")]
        Person(::prost::alloc::string::String),
        /// Group resource name.
        #[prost(string, tag = "4")]
        Group(::prost::alloc::string::String),
        /// Audience to grant a role to. The magic value of `audiences/default` may
        /// be used to apply the role to the default audience in the context of the
        /// organization that owns the Label.
        #[prost(string, tag = "5")]
        Audience(::prost::alloc::string::String),
    }
}
/// Provides control over how write requests are executed. When not specified,
/// the last write wins.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteControl {
    /// Determines the revision of the label to write to and how the request
    /// should behave if that revision is not the current revision of the
    /// label.
    #[prost(oneof = "write_control::Control", tags = "1")]
    pub control: ::core::option::Option<write_control::Control>,
}
/// Nested message and enum types in `WriteControl`.
pub mod write_control {
    /// Determines the revision of the label to write to and how the request
    /// should behave if that revision is not the current revision of the
    /// label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Control {
        /// The [revision_id][google.apps.drive.labels.v1.Label.revision_id] of the
        /// label that the write request will be applied to. If this is not the
        /// latest revision of the label, the request will not be processed and will
        /// return a 400 Bad Request error.
        #[prost(string, tag = "1")]
        RequiredRevisionId(::prost::alloc::string::String),
    }
}
/// Request to get the capabilities for a user.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserCapabilitiesRequest {
    /// Required. The resource name of the user. Only "users/me/capabilities" is
    /// supported.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The customer to scope this request to.
    /// For example: "customers/abcd1234".
    /// If unset, will return settings within the current customer.
    #[prost(string, tag = "2")]
    pub customer: ::prost::alloc::string::String,
}
/// Request to create a Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateLabelRequest {
    /// Required. The label to create.
    #[prost(message, optional, tag = "1")]
    pub label: ::core::option::Option<Label>,
    /// Set to `true` in order to use the user's admin privileges. The server
    /// will verify the user is an admin before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// The BCP-47 language code to use for evaluating localized Field labels in
    /// response. When not specified, values in the default configured language
    /// will be used.
    #[prost(string, tag = "3")]
    pub language_code: ::prost::alloc::string::String,
}
/// Request to get a label by resource name.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLabelRequest {
    /// Required. Label resource name.
    ///
    /// May be any of:
    ///
    /// * `labels/{id}` (equivalent to labels/{id}@latest)
    /// * `labels/{id}@latest`
    /// * `labels/{id}@published`
    /// * `labels/{id}@{revision_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// verifies that the user is an admin for the label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language are used.
    #[prost(string, tag = "3")]
    pub language_code: ::prost::alloc::string::String,
    /// When specified, only certain fields belonging to the indicated view are
    /// returned.
    #[prost(enumeration = "LabelView", tag = "4")]
    pub view: i32,
}
/// The set of requests for updating aspects of a Label. If any request is not
/// valid, no requests will be applied.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeltaUpdateLabelRequest {
    /// Required. The resource name of the Label to update.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Provides control over how write requests are executed.
    #[prost(message, optional, tag = "2")]
    pub write_control: ::core::option::Option<WriteControl>,
    /// A list of updates to apply to the Label.
    /// Requests will be applied in the order they are specified.
    #[prost(message, repeated, tag = "3")]
    pub requests: ::prost::alloc::vec::Vec<delta_update_label_request::Request>,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "4")]
    pub use_admin_access: bool,
    /// When specified, only certain fields belonging to the indicated view will be
    /// returned.
    #[prost(enumeration = "LabelView", tag = "5")]
    pub view: i32,
    /// The BCP-47 language code to use for evaluating localized Field labels when
    /// `include_label_in_response` is `true`.
    #[prost(string, tag = "6")]
    pub language_code: ::prost::alloc::string::String,
}
/// Nested message and enum types in `DeltaUpdateLabelRequest`.
pub mod delta_update_label_request {
    /// A single kind of update to apply to a Label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Request {
        /// The kind of update. Exactly one Field is required.
        #[prost(oneof = "request::Kind", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
        pub kind: ::core::option::Option<request::Kind>,
    }
    /// Nested message and enum types in `Request`.
    pub mod request {
        /// The kind of update. Exactly one Field is required.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Kind {
            /// Updates the Label properties.
            #[prost(message, tag = "1")]
            UpdateLabel(super::UpdateLabelPropertiesRequest),
            /// Creates a new Field.
            #[prost(message, tag = "2")]
            CreateField(super::CreateFieldRequest),
            /// Updates basic properties of a Field.
            #[prost(message, tag = "3")]
            UpdateField(super::UpdateFieldPropertiesRequest),
            /// Update Field type and/or type options.
            #[prost(message, tag = "4")]
            UpdateFieldType(super::UpdateFieldTypeRequest),
            /// Enables the Field.
            #[prost(message, tag = "5")]
            EnableField(super::EnableFieldRequest),
            /// Disables the Field.
            #[prost(message, tag = "6")]
            DisableField(super::DisableFieldRequest),
            /// Deletes a Field from the label.
            #[prost(message, tag = "7")]
            DeleteField(super::DeleteFieldRequest),
            /// Creates Choice within a Selection field.
            #[prost(message, tag = "8")]
            CreateSelectionChoice(super::CreateSelectionChoiceRequest),
            /// Update a Choice properties within a Selection Field.
            #[prost(message, tag = "9")]
            UpdateSelectionChoiceProperties(
                super::UpdateSelectionChoicePropertiesRequest,
            ),
            /// Enable a Choice within a Selection Field.
            #[prost(message, tag = "10")]
            EnableSelectionChoice(super::EnableSelectionChoiceRequest),
            /// Disable a Choice within a Selection Field.
            #[prost(message, tag = "11")]
            DisableSelectionChoice(super::DisableSelectionChoiceRequest),
            /// Delete a Choice within a Selection Field.
            #[prost(message, tag = "12")]
            DeleteSelectionChoice(super::DeleteSelectionChoiceRequest),
        }
    }
    /// Updates basic properties of a Label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateLabelPropertiesRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root `label_properties` is implied and should not be specified. A
        /// single `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. Label properties to update.
        #[prost(message, optional, tag = "2")]
        pub properties: ::core::option::Option<super::label::Properties>,
    }
    /// Request to disable the Field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisableFieldRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root `disabled_policy` is implied and should not be specified. A
        /// single `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. Key of the Field to disable.
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
        /// Required. Field Disabled Policy.
        #[prost(message, optional, tag = "3")]
        pub disabled_policy: ::core::option::Option<super::lifecycle::DisabledPolicy>,
    }
    /// Request to enable the Field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EnableFieldRequest {
        /// Required. ID of the Field to enable.
        #[prost(string, tag = "1")]
        pub id: ::prost::alloc::string::String,
    }
    /// Request to delete the Field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DeleteFieldRequest {
        /// Required. ID of the Field to delete.
        #[prost(string, tag = "1")]
        pub id: ::prost::alloc::string::String,
    }
    /// Request to create a Field within a Label.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateFieldRequest {
        /// Required. Field to create.
        #[prost(message, optional, tag = "1")]
        pub field: ::core::option::Option<super::Field>,
    }
    /// Request to update Field properties.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateFieldPropertiesRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root `properties` is implied and should not be specified. A single
        /// `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. The Field to update.
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
        /// Required. Basic Field properties.
        #[prost(message, optional, tag = "3")]
        pub properties: ::core::option::Option<super::field::Properties>,
    }
    /// Request to change the type of a Field.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateFieldTypeRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root of `type_options` is implied and should not be specified. A
        /// single `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. The Field to update.
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
        #[prost(
            oneof = "update_field_type_request::TypeOptions",
            tags = "3, 5, 6, 7, 8"
        )]
        pub type_options: ::core::option::Option<update_field_type_request::TypeOptions>,
    }
    /// Nested message and enum types in `UpdateFieldTypeRequest`.
    pub mod update_field_type_request {
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum TypeOptions {
            /// Update field to Text.
            #[prost(message, tag = "3")]
            TextOptions(super::super::field::TextOptions),
            /// Update field to Integer.
            #[prost(message, tag = "5")]
            IntegerOptions(super::super::field::IntegerOptions),
            /// Update field to Date.
            #[prost(message, tag = "6")]
            DateOptions(super::super::field::DateOptions),
            /// Update field to Selection.
            #[prost(message, tag = "7")]
            SelectionOptions(super::super::field::SelectionOptions),
            /// Update field to User.
            #[prost(message, tag = "8")]
            UserOptions(super::super::field::UserOptions),
        }
    }
    /// Request to create a Selection Choice.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateSelectionChoiceRequest {
        /// Required. The Selection Field in which a Choice will be created.
        #[prost(string, tag = "1")]
        pub field_id: ::prost::alloc::string::String,
        /// Required. The Choice to create.
        #[prost(message, optional, tag = "2")]
        pub choice: ::core::option::Option<super::field::selection_options::Choice>,
    }
    /// Request to update a Choice properties.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateSelectionChoicePropertiesRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root `properties` is implied and should not be specified. A single
        /// `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. The Selection Field to update.
        #[prost(string, tag = "2")]
        pub field_id: ::prost::alloc::string::String,
        /// Required. The Choice to update.
        #[prost(string, tag = "3")]
        pub id: ::prost::alloc::string::String,
        /// Required. The Choice properties to update.
        #[prost(message, optional, tag = "4")]
        pub properties: ::core::option::Option<
            super::field::selection_options::choice::Properties,
        >,
    }
    /// Request to delete a Choice.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DeleteSelectionChoiceRequest {
        /// Required. The Selection Field from which a Choice will be deleted.
        #[prost(string, tag = "1")]
        pub field_id: ::prost::alloc::string::String,
        /// Required. Choice to delete.
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
    }
    /// Request to disable a Choice.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisableSelectionChoiceRequest {
        /// The fields that should be updated. At least one field must be specified.
        /// The root `disabled_policy` is implied and should not be specified. A
        /// single `*` can be used as short-hand for updating every field.
        #[prost(message, optional, tag = "1")]
        pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
        /// Required. The Selection Field in which a Choice will be disabled.
        #[prost(string, tag = "2")]
        pub field_id: ::prost::alloc::string::String,
        /// Required. Choice to disable.
        #[prost(string, tag = "3")]
        pub id: ::prost::alloc::string::String,
        /// Required. The disabled policy to update.
        #[prost(message, optional, tag = "4")]
        pub disabled_policy: ::core::option::Option<super::lifecycle::DisabledPolicy>,
    }
    /// Request to enable a Choice.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EnableSelectionChoiceRequest {
        /// Required. The Selection Field in which a Choice will be enabled.
        #[prost(string, tag = "1")]
        pub field_id: ::prost::alloc::string::String,
        /// Required. Choice to enable.
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
    }
}
/// Response for Label update.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeltaUpdateLabelResponse {
    /// The reply of the updates. This maps 1:1 with the updates, although
    /// responses to some requests may be empty.
    #[prost(message, repeated, tag = "1")]
    pub responses: ::prost::alloc::vec::Vec<delta_update_label_response::Response>,
    /// The label after updates were applied. This is only set if
    /// \[BatchUpdateLabelResponse2.include_label_in_response\] is `true` and there
    /// were no errors.
    #[prost(message, optional, tag = "6")]
    pub updated_label: ::core::option::Option<Label>,
}
/// Nested message and enum types in `DeltaUpdateLabelResponse`.
pub mod delta_update_label_response {
    /// A single response from an update.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Response {
        /// The response for the corresponding request.
        #[prost(
            oneof = "response::Response",
            tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
        )]
        pub response: ::core::option::Option<response::Response>,
    }
    /// Nested message and enum types in `Response`.
    pub mod response {
        /// The response for the corresponding request.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Response {
            /// Updated basic properties of a Label.
            #[prost(message, tag = "1")]
            UpdateLabel(super::UpdateLabelPropertiesResponse),
            /// Creates a new Field.
            #[prost(message, tag = "2")]
            CreateField(super::CreateFieldResponse),
            /// Updates basic properties of a Field.
            #[prost(message, tag = "3")]
            UpdateField(super::UpdateFieldPropertiesResponse),
            /// Update Field type and/or type options.
            #[prost(message, tag = "4")]
            UpdateFieldType(super::UpdateFieldTypeResponse),
            /// Enables Field.
            #[prost(message, tag = "5")]
            EnableField(super::EnableFieldResponse),
            /// Disables Field.
            #[prost(message, tag = "6")]
            DisableField(super::DisableFieldResponse),
            /// Deletes a Field from the label.
            #[prost(message, tag = "7")]
            DeleteField(super::DeleteFieldResponse),
            /// Creates a new selection list option to add to a Selection Field.
            #[prost(message, tag = "8")]
            CreateSelectionChoice(super::CreateSelectionChoiceResponse),
            /// Updates a Choice within a Selection Field.
            #[prost(message, tag = "9")]
            UpdateSelectionChoiceProperties(
                super::UpdateSelectionChoicePropertiesResponse,
            ),
            /// Enables a Choice within a Selection Field.
            #[prost(message, tag = "10")]
            EnableSelectionChoice(super::EnableSelectionChoiceResponse),
            /// Disables a Choice within a Selection Field.
            #[prost(message, tag = "11")]
            DisableSelectionChoice(super::DisableSelectionChoiceResponse),
            /// Deletes a Choice from a Selection Field.
            #[prost(message, tag = "12")]
            DeleteSelectionChoice(super::DeleteSelectionChoiceResponse),
        }
    }
    /// Response following update to Label properties.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateLabelPropertiesResponse {}
    /// Response following Field create.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateFieldResponse {
        /// The field of the created field. When left blank in a create request,
        /// a key will be autogenerated and can be identified here.
        #[prost(string, tag = "1")]
        pub id: ::prost::alloc::string::String,
        /// The priority of the created field. The priority may change from what
        /// was specified to assure contiguous priorities between fields (1-n).
        #[prost(int32, tag = "2")]
        pub priority: i32,
    }
    /// Response following update to Field properties.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateFieldPropertiesResponse {
        /// The priority of the updated field. The priority may change from what
        /// was specified to assure contiguous priorities between fields (1-n).
        #[prost(int32, tag = "1")]
        pub priority: i32,
    }
    /// Response following update to Field type.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateFieldTypeResponse {}
    /// Response following Field enable.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EnableFieldResponse {}
    /// Response following Field disable.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisableFieldResponse {}
    /// Response following Field delete.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DeleteFieldResponse {}
    /// Response following Selection Choice create.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct CreateSelectionChoiceResponse {
        /// The server-generated id of the field.
        #[prost(string, tag = "1")]
        pub field_id: ::prost::alloc::string::String,
        /// The server-generated ID of the created choice within the Field
        #[prost(string, tag = "2")]
        pub id: ::prost::alloc::string::String,
    }
    /// Response following update to Selection Choice properties.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateSelectionChoicePropertiesResponse {
        /// The priority of the updated choice. The priority may change from what
        /// was specified to assure contiguous priorities between choices (1-n).
        #[prost(int32, tag = "1")]
        pub priority: i32,
    }
    /// Response following Choice enable.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct EnableSelectionChoiceResponse {}
    /// Response following Choice disable.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DisableSelectionChoiceResponse {}
    /// Response following Choice delete.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DeleteSelectionChoiceResponse {}
}
/// Request to update the `CopyMode` of the given Label. Changes to this policy
/// are not revisioned, do not require publishing, and take effect immediately.
/// \
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLabelCopyModeRequest {
    /// Required. The resource name of the Label to update.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Indicates how the applied Label, and Field values should be copied
    /// when a Drive item is copied.
    #[prost(enumeration = "label::applied_label_policy::CopyMode", tag = "2")]
    pub copy_mode: i32,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language will be used.
    #[prost(string, tag = "4")]
    pub language_code: ::prost::alloc::string::String,
    /// When specified, only certain fields belonging to the indicated view will be
    /// returned.
    #[prost(enumeration = "LabelView", tag = "5")]
    pub view: i32,
}
/// Request to get the limits for a Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLabelLimitsRequest {
    /// Required. Label revision resource name
    /// Must be: "limits/label"
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request to list labels available to the current user.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelsRequest {
    /// Whether to include only published labels in the results.
    ///
    /// * When `true`, only the current published label revisions are returned.
    ///    Disabled labels are included. Returned label resource names
    ///    reference the published revision (`labels/{id}/{revision_id}`).
    /// * When `false`, the current label revisions are returned, which might not
    ///    be published. Returned label resource names don't reference a specific
    ///    revision (`labels/{id}`).
    #[prost(bool, tag = "1")]
    pub published_only: bool,
    /// The customer to scope this list request to.
    /// For example: "customers/abcd1234".
    /// If unset, will return all labels within the current customer.
    #[prost(string, tag = "2")]
    pub customer: ::prost::alloc::string::String,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language are used.
    #[prost(string, tag = "5")]
    pub language_code: ::prost::alloc::string::String,
    /// Maximum number of labels to return per page. Default: 50. Max: 200.
    #[prost(int32, tag = "6")]
    pub page_size: i32,
    /// The token of the page to return.
    #[prost(string, tag = "7")]
    pub page_token: ::prost::alloc::string::String,
    /// When specified, only certain fields belonging to the indicated view are
    /// returned.
    #[prost(enumeration = "LabelView", tag = "8")]
    pub view: i32,
    #[prost(oneof = "list_labels_request::Access", tags = "3, 4")]
    pub access: ::core::option::Option<list_labels_request::Access>,
}
/// Nested message and enum types in `ListLabelsRequest`.
pub mod list_labels_request {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Access {
        /// Set to `true` in order to use the user's admin credentials. This will
        /// return all Labels within the customer.
        #[prost(bool, tag = "3")]
        UseAdminAccess(bool),
        /// Specifies the level of access the user must have on the returned Labels.
        /// The minimum role a user must have on a label.
        /// Defaults to `READER`.
        #[prost(enumeration = "super::label_permission::LabelRole", tag = "4")]
        MinimumRole(i32),
    }
}
/// Response for listing Labels.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelsResponse {
    /// Labels.
    #[prost(message, repeated, tag = "1")]
    pub labels: ::prost::alloc::vec::Vec<Label>,
    /// The token of the next page in the response.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Creates or updates a permission on the Label. Permissions affect the Label
/// resource as a whole, are not revisioned, and do not require publishing.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateLabelPermissionRequest {
    /// Required. The parent Label resource name on the Label Permission is
    /// created. Format: labels/{label}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The permission to create or update on the Label.
    #[prost(message, optional, tag = "2")]
    pub label_permission: ::core::option::Option<LabelPermission>,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Request to list the permissions on a Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelPermissionsRequest {
    /// Required. The parent Label resource name on which Label Permission are
    /// listed. Format: labels/{label}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server will
    /// verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// Maximum number of permissions to return per page. Default: 50. Max: 200.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// The token of the page to return.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for listing the permissions on a Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelPermissionsResponse {
    /// Label permissions.
    #[prost(message, repeated, tag = "1")]
    pub label_permissions: ::prost::alloc::vec::Vec<LabelPermission>,
    /// The token of the next page in the response.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Updates a Label Permission. Permissions affect the Label resource as a whole,
/// are not revisioned, and do not require publishing.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateLabelPermissionRequest {
    /// Required. The parent Label resource name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The permission to create or update on the Label.
    #[prost(message, optional, tag = "2")]
    pub label_permission: ::core::option::Option<LabelPermission>,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Deletes a Label Permission. Permissions affect the Label resource as a whole,
/// are not revisioned, and do not require publishing.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteLabelPermissionRequest {
    /// Required. Label Permission resource name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
}
/// Updates one or more Label Permissions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateLabelPermissionsRequest {
    /// Required. The parent Label resource name shared by all permissions being
    /// updated. Format: labels/{label} If this is set, the parent field in the
    /// UpdateLabelPermissionRequest messages must either be empty or match this
    /// field.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The request message specifying the resources to update.
    #[prost(message, repeated, tag = "2")]
    pub requests: ::prost::alloc::vec::Vec<UpdateLabelPermissionRequest>,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    /// If this is set, the use_admin_access field in the
    /// UpdateLabelPermissionRequest messages must either be empty or match this
    /// field.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
}
/// Response for updating one or more Label Permissions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchUpdateLabelPermissionsResponse {
    /// Required. Permissions updated.
    #[prost(message, repeated, tag = "1")]
    pub permissions: ::prost::alloc::vec::Vec<LabelPermission>,
}
/// Deletes one of more Label Permissions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteLabelPermissionsRequest {
    /// Required. The request message specifying the resources to update.
    #[prost(message, repeated, tag = "1")]
    pub requests: ::prost::alloc::vec::Vec<DeleteLabelPermissionRequest>,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    /// If this is set, the use_admin_access field in the
    /// DeleteLabelPermissionRequest messages must either be empty or match this
    /// field.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// Required. The parent Label resource name shared by all permissions being
    /// deleted. Format: labels/{label} If this is set, the parent field in the
    /// UpdateLabelPermissionRequest messages must either be empty or match this
    /// field.
    #[prost(string, tag = "3")]
    pub parent: ::prost::alloc::string::String,
}
/// Request to deprecate a published Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisableLabelRequest {
    /// The fields that should be updated. At least one field must be specified.
    /// The root `disabled_policy` is implied and should not be specified. A
    /// single `*` can be used as short-hand for updating every field.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Label resource name.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "3")]
    pub use_admin_access: bool,
    /// Provides control over how write requests are executed. Defaults to unset,
    /// which means last write wins.
    #[prost(message, optional, tag = "4")]
    pub write_control: ::core::option::Option<WriteControl>,
    /// Disabled policy to use.
    #[prost(message, optional, tag = "5")]
    pub disabled_policy: ::core::option::Option<lifecycle::DisabledPolicy>,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language will be used.
    #[prost(string, tag = "6")]
    pub language_code: ::prost::alloc::string::String,
}
/// Request to publish a label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishLabelRequest {
    /// Required. Label resource name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// Provides control over how write requests are executed. Defaults to unset,
    /// which means last write wins.
    #[prost(message, optional, tag = "3")]
    pub write_control: ::core::option::Option<WriteControl>,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language will be used.
    #[prost(string, tag = "4")]
    pub language_code: ::prost::alloc::string::String,
}
/// Request to enable a label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnableLabelRequest {
    /// Required. Label resource name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// Provides control over how write requests are executed. Defaults to unset,
    /// which means last write wins.
    #[prost(message, optional, tag = "3")]
    pub write_control: ::core::option::Option<WriteControl>,
    /// The BCP-47 language code to use for evaluating localized field labels.
    /// When not specified, values in the default configured language will be used.
    #[prost(string, tag = "4")]
    pub language_code: ::prost::alloc::string::String,
}
/// Request to delete a label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteLabelRequest {
    /// Required. Label resource name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Set to `true` in order to use the user's admin credentials. The server
    /// will verify the user is an admin for the Label before allowing access.
    #[prost(bool, tag = "2")]
    pub use_admin_access: bool,
    /// Provides control over how write requests are executed. Defaults to unset,
    /// which means last write wins.
    #[prost(message, optional, tag = "3")]
    pub write_control: ::core::option::Option<WriteControl>,
}
/// A request to list the LabelLocks on a Label.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelLocksRequest {
    /// Required. Label on which Locks are applied.
    /// Format: labels/{label}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Maximum number of Locks to return per page. Default: 100. Max: 200.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The token of the page to return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// The response to a ListLabelLocksRequest.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLabelLocksResponse {
    /// LabelLocks.
    #[prost(message, repeated, tag = "1")]
    pub label_locks: ::prost::alloc::vec::Vec<LabelLock>,
    /// The token of the next page in the response.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Resource view that can be applied to label responses. The default value
/// `LABEL_VIEW_BASIC` implies the field mask:
/// `name,id,revision_id,label_type,properties.*`\
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LabelView {
    /// Implies the field mask:
    /// `name,id,revision_id,label_type,properties.*`
    Basic = 0,
    /// All possible fields.
    Full = 1,
}
impl LabelView {
    /// 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 {
            LabelView::Basic => "LABEL_VIEW_BASIC",
            LabelView::Full => "LABEL_VIEW_FULL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LABEL_VIEW_BASIC" => Some(Self::Basic),
            "LABEL_VIEW_FULL" => Some(Self::Full),
            _ => None,
        }
    }
}
/// Describes violations in a request to create or update a Label or its
/// Fields.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvalidArgument {
    /// Describes all violations in a client request.
    #[prost(message, repeated, tag = "1")]
    pub field_violations: ::prost::alloc::vec::Vec<invalid_argument::FieldViolation>,
}
/// Nested message and enum types in `InvalidArgument`.
pub mod invalid_argument {
    /// Describes the Field in which the violation occurred.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct FieldViolation {
        /// The path to the field where this violation occurred. This path is
        /// specified using `FieldMask` format:
        /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
        #[prost(string, tag = "1")]
        pub field: ::prost::alloc::string::String,
        /// The detailed reason for this FieldViolation.
        #[prost(enumeration = "field_violation::Reason", tag = "2")]
        pub reason: i32,
        /// A message that describes the violation. This message is intended to
        /// be shown to end users, and is localized into the requesting user's
        /// preferred language.
        #[prost(string, tag = "3")]
        pub display_message: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `FieldViolation`.
    pub mod field_violation {
        /// Possible reasons a field is invalid.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown reason.
            Unspecified = 0,
            /// The referenced field is required.
            FieldRequired = 1,
            /// The referenced value was invalid.
            InvalidValue = 2,
            /// The specified numeric value is out of the allowed range.
            ValueOutOfRange = 3,
            /// The specified string value was too long.
            StringValueTooLong = 4,
            /// The number of entries exceeded the maximum.
            MaxEntriesExceeded = 5,
            /// The specified field is not found in the Label.
            FieldNotFound = 6,
            /// The specified choice is not found in the Field.
            ChoiceNotFound = 7,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::FieldRequired => "FIELD_REQUIRED",
                    Reason::InvalidValue => "INVALID_VALUE",
                    Reason::ValueOutOfRange => "VALUE_OUT_OF_RANGE",
                    Reason::StringValueTooLong => "STRING_VALUE_TOO_LONG",
                    Reason::MaxEntriesExceeded => "MAX_ENTRIES_EXCEEDED",
                    Reason::FieldNotFound => "FIELD_NOT_FOUND",
                    Reason::ChoiceNotFound => "CHOICE_NOT_FOUND",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "FIELD_REQUIRED" => Some(Self::FieldRequired),
                    "INVALID_VALUE" => Some(Self::InvalidValue),
                    "VALUE_OUT_OF_RANGE" => Some(Self::ValueOutOfRange),
                    "STRING_VALUE_TOO_LONG" => Some(Self::StringValueTooLong),
                    "MAX_ENTRIES_EXCEEDED" => Some(Self::MaxEntriesExceeded),
                    "FIELD_NOT_FOUND" => Some(Self::FieldNotFound),
                    "CHOICE_NOT_FOUND" => Some(Self::ChoiceNotFound),
                    _ => None,
                }
            }
        }
    }
}
/// Describes what preconditions have failed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreconditionFailure {
    /// Describes all violations in a client request.
    #[prost(message, repeated, tag = "1")]
    pub violation: ::prost::alloc::vec::Vec<precondition_failure::Violation>,
}
/// Nested message and enum types in `PreconditionFailure`.
pub mod precondition_failure {
    /// Specific failure reason.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Violation {
        /// The path to the field where this violation occurred. This path is
        /// specified using `FieldMask` format:
        /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
        #[prost(string, tag = "1")]
        pub field: ::prost::alloc::string::String,
        /// The type of this violation.
        #[prost(enumeration = "violation::Reason", tag = "2")]
        pub reason: i32,
        /// A message that describes the violation. This message is intended to
        /// be shown to end users, and is localized into the requesting user's
        /// preferred language.
        #[prost(string, tag = "3")]
        pub display_message: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Violation`.
    pub mod violation {
        /// The possible reasons a the violation occurred.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Reason {
            /// Unknown violation type.
            Unspecified = 0,
            /// This Resource cannot be Disabled. Only Published resources can be
            /// Disabled.
            CannotDisable = 1,
            /// This Resource cannot be Enabled. Only Disabled resources can be
            /// Enabled.
            CannotEnable = 2,
            /// This Resource cannot be Published. Only Draft or Disabled resources
            /// can be Published.
            CannotPublish = 3,
            /// This Resource cannot be Unpublished. Once published, resources may
            /// not be set in "Draft" state.
            CannotUnpublish = 4,
            /// This Resource cannot be Deleted. Only Disabled resources
            /// can be Deleted.
            CannotDelete = 5,
            /// The request modified a range in a Field, but the new range does
            /// not include the previous range. When this error happens, `field` points
            /// at the Field where the violation occurred.
            CannotRestrictRange = 6,
            /// The specified change cannot be made to published Resources.
            CannotChangePublishedField = 7,
            /// The customer cannot create new labels because the maximum number
            /// of labels for the customer has been reached.
            CannotCreateMoreLabels = 8,
            /// The Field type cannot be changed because the Field has been published.
            CannotChangePublishedFieldType = 9,
            /// The Label component is locked and cannot be modified
            CannotModifyLockedComponent = 10,
        }
        impl Reason {
            /// 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 {
                    Reason::Unspecified => "REASON_UNSPECIFIED",
                    Reason::CannotDisable => "CANNOT_DISABLE",
                    Reason::CannotEnable => "CANNOT_ENABLE",
                    Reason::CannotPublish => "CANNOT_PUBLISH",
                    Reason::CannotUnpublish => "CANNOT_UNPUBLISH",
                    Reason::CannotDelete => "CANNOT_DELETE",
                    Reason::CannotRestrictRange => "CANNOT_RESTRICT_RANGE",
                    Reason::CannotChangePublishedField => "CANNOT_CHANGE_PUBLISHED_FIELD",
                    Reason::CannotCreateMoreLabels => "CANNOT_CREATE_MORE_LABELS",
                    Reason::CannotChangePublishedFieldType => {
                        "CANNOT_CHANGE_PUBLISHED_FIELD_TYPE"
                    }
                    Reason::CannotModifyLockedComponent => {
                        "CANNOT_MODIFY_LOCKED_COMPONENT"
                    }
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "REASON_UNSPECIFIED" => Some(Self::Unspecified),
                    "CANNOT_DISABLE" => Some(Self::CannotDisable),
                    "CANNOT_ENABLE" => Some(Self::CannotEnable),
                    "CANNOT_PUBLISH" => Some(Self::CannotPublish),
                    "CANNOT_UNPUBLISH" => Some(Self::CannotUnpublish),
                    "CANNOT_DELETE" => Some(Self::CannotDelete),
                    "CANNOT_RESTRICT_RANGE" => Some(Self::CannotRestrictRange),
                    "CANNOT_CHANGE_PUBLISHED_FIELD" => {
                        Some(Self::CannotChangePublishedField)
                    }
                    "CANNOT_CREATE_MORE_LABELS" => Some(Self::CannotCreateMoreLabels),
                    "CANNOT_CHANGE_PUBLISHED_FIELD_TYPE" => {
                        Some(Self::CannotChangePublishedFieldType)
                    }
                    "CANNOT_MODIFY_LOCKED_COMPONENT" => {
                        Some(Self::CannotModifyLockedComponent)
                    }
                    _ => None,
                }
            }
        }
    }
}
/// The capabilities of a user.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserCapabilities {
    /// Output only. Resource name for the user capabilities.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Whether the user is allowed access to the label manager.
    #[prost(bool, tag = "2")]
    pub can_access_label_manager: bool,
    /// Output only. Whether the user is an administrator for the shared labels
    /// feature.
    #[prost(bool, tag = "3")]
    pub can_administrate_labels: bool,
    /// Output only. Whether the user is allowed to create new shared labels.
    #[prost(bool, tag = "4")]
    pub can_create_shared_labels: bool,
    /// Output only. Whether the user is allowed to create new admin labels.
    #[prost(bool, tag = "5")]
    pub can_create_admin_labels: bool,
}
/// Label constraints governing the structure of a Label; such as, the maximum
/// number of Fields allowed and maximum length of the label title.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelLimits {
    /// Resource name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The maximum number of characters allowed for the title.
    #[prost(int32, tag = "2")]
    pub max_title_length: i32,
    /// The maximum number of characters allowed for the description.
    #[prost(int32, tag = "3")]
    pub max_description_length: i32,
    /// The maximum number of Fields allowed within the label.
    #[prost(int32, tag = "4")]
    pub max_fields: i32,
    /// The maximum number of published Fields that can be deleted.
    #[prost(int32, tag = "5")]
    pub max_deleted_fields: i32,
    /// The maximum number of draft revisions that will be kept before deleting
    /// old drafts.
    #[prost(int32, tag = "6")]
    pub max_draft_revisions: i32,
    /// The limits for Fields.
    #[prost(message, optional, tag = "7")]
    pub field_limits: ::core::option::Option<FieldLimits>,
}
/// Field constants governing the structure of a Field; such as, the maximum
/// title length, minimum and maximum field values or length, etc.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldLimits {
    /// Max length for the id.
    #[prost(int32, tag = "1")]
    pub max_id_length: i32,
    /// Limits for Field title.
    #[prost(int32, tag = "2")]
    pub max_display_name_length: i32,
    /// Limits for Field description, also called help text.
    #[prost(int32, tag = "3")]
    pub max_description_length: i32,
    /// The relevant limits for the specified Field.Type.
    /// Text Field limits.
    #[prost(message, optional, tag = "4")]
    pub text_limits: ::core::option::Option<TextLimits>,
    /// Long text Field limits.
    #[prost(message, optional, tag = "5")]
    pub long_text_limits: ::core::option::Option<LongTextLimits>,
    /// Integer Field limits.
    #[prost(message, optional, tag = "6")]
    pub integer_limits: ::core::option::Option<IntegerLimits>,
    /// Date Field limits.
    #[prost(message, optional, tag = "7")]
    pub date_limits: ::core::option::Option<DateLimits>,
    /// User Field limits.
    #[prost(message, optional, tag = "8")]
    pub user_limits: ::core::option::Option<UserLimits>,
    /// Selection Field limits.
    #[prost(message, optional, tag = "9")]
    pub selection_limits: ::core::option::Option<SelectionLimits>,
}
/// Limits for list-variant of a Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLimits {
    /// Maximum number of values allowed for the Field type.
    #[prost(int32, tag = "1")]
    pub max_entries: i32,
}
/// Limits for text Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextLimits {
    /// Minimum length allowed for a text Field type.
    #[prost(int32, tag = "1")]
    pub min_length: i32,
    /// Maximum length allowed for a text Field type.
    #[prost(int32, tag = "2")]
    pub max_length: i32,
}
/// Limits for long text Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LongTextLimits {
    /// Minimum length allowed for a long text Field type.
    #[prost(int32, tag = "1")]
    pub min_length: i32,
    /// Maximum length allowed for a long text Field type.
    #[prost(int32, tag = "2")]
    pub max_length: i32,
}
/// Limits for integer Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntegerLimits {
    /// Minimum value for an integer Field type.
    #[prost(int64, tag = "1")]
    pub min_value: i64,
    /// Maximum value for an integer Field type.
    #[prost(int64, tag = "2")]
    pub max_value: i64,
}
/// Limits for date Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DateLimits {
    /// Minimum value for the date Field type.
    #[prost(message, optional, tag = "1")]
    pub min_value: ::core::option::Option<super::super::super::super::r#type::Date>,
    /// Maximum value for the date Field type.
    #[prost(message, optional, tag = "2")]
    pub max_value: ::core::option::Option<super::super::super::super::r#type::Date>,
}
/// Limits for selection Field type.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SelectionLimits {
    /// Limits for list-variant of a Field type.
    #[prost(message, optional, tag = "1")]
    pub list_limits: ::core::option::Option<ListLimits>,
    /// Maximum ID length for a selection options.
    #[prost(int32, tag = "2")]
    pub max_id_length: i32,
    /// Maximum length for display name.
    #[prost(int32, tag = "3")]
    pub max_display_name_length: i32,
    /// The max number of choices.
    #[prost(int32, tag = "4")]
    pub max_choices: i32,
    /// Maximum number of deleted choices.
    #[prost(int32, tag = "5")]
    pub max_deleted_choices: i32,
}
/// Limits for Field.Type.USER.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserLimits {
    /// Limits for list-variant of a Field type.
    #[prost(message, optional, tag = "1")]
    pub list_limits: ::core::option::Option<ListLimits>,
}
/// Generated client implementations.
pub mod label_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Manage metadata taxonomies based on Labels and Fields that may be used within
    /// Google Drive to organize and find files using custom metadata.
    #[derive(Debug, Clone)]
    pub struct LabelServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> LabelServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + 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,
        ) -> LabelServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            LabelServiceClient::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
        }
        /// Gets the user capabilities.
        pub async fn get_user_capabilities(
            &mut self,
            request: impl tonic::IntoRequest<super::GetUserCapabilitiesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UserCapabilities>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/GetUserCapabilities",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "GetUserCapabilities",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List labels.
        pub async fn list_labels(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLabelsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLabelsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/ListLabels",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "ListLabels",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a label by its resource name.
        /// Resource name may be any of:
        ///
        /// * `labels/{id}` - See `labels/{id}@latest`
        /// * `labels/{id}@latest` - Gets the latest revision of the label.
        /// * `labels/{id}@published` - Gets the current published revision of the
        ///   label.
        /// * `labels/{id}@{revision_id}` - Gets the label at the specified revision
        ///   ID.
        pub async fn get_label(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLabelRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/GetLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "GetLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get the constraints on the structure of a Label; such as, the maximum
        /// number of Fields allowed and maximum length of the label title.
        pub async fn get_label_limits(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLabelLimitsRequest>,
        ) -> std::result::Result<tonic::Response<super::LabelLimits>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/GetLabelLimits",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "GetLabelLimits",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Label.
        pub async fn create_label(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateLabelRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/CreateLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "CreateLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a single Label by applying a set of update requests resulting in a
        /// new draft revision. The batch update is all-or-nothing: If any of the
        /// update requests are invalid, no changes are applied. The resulting draft
        /// revision must be published before the changes may be used with Drive Items.
        pub async fn delta_update_label(
            &mut self,
            request: impl tonic::IntoRequest<super::DeltaUpdateLabelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeltaUpdateLabelResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/DeltaUpdateLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "DeltaUpdateLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do
        /// not require publishing, and take effect immediately.
        pub async fn update_label_copy_mode(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateLabelCopyModeRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/UpdateLabelCopyMode",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "UpdateLabelCopyMode",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Publish all draft changes to the Label. Once published, the Label may not
        /// return to its draft state. See
        /// `google.apps.drive.labels.v2.Lifecycle` for more information.
        ///
        /// Publishing a Label will result in a new published revision. All previous
        /// draft revisions will be deleted. Previous published revisions will be kept
        /// but are subject to automated deletion as needed.
        ///
        /// Once published, some changes are no longer permitted. Generally, any change
        /// that would invalidate or cause new restrictions on existing metadata
        /// related to the Label will be rejected. For example, the following changes
        /// to a Label will be rejected after the Label is published:
        /// * The label cannot be directly deleted. It must be disabled first, then
        ///   deleted.
        /// * Field.FieldType cannot be changed.
        /// * Changes to Field validation options cannot reject something that was
        ///   previously accepted.
        /// * Reducing the max entries.
        pub async fn publish_label(
            &mut self,
            request: impl tonic::IntoRequest<super::PublishLabelRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/PublishLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "PublishLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Disable a published Label.
        /// Disabling a Label will result in a new disabled published revision based on
        /// the current published revision. If there is a draft revision, a new
        /// disabled draft revision will be created based on the latest draft revision.
        /// Older draft revisions will be deleted.
        ///
        /// Once disabled, a label may be deleted with `DeleteLabel`.
        pub async fn disable_label(
            &mut self,
            request: impl tonic::IntoRequest<super::DisableLabelRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/DisableLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "DisableLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Enable a disabled Label and restore it to its published state.
        /// This will result in a new published revision based on the current disabled
        /// published revision. If there is an existing disabled draft revision, a new
        /// revision will be created based on that draft and will be enabled.
        pub async fn enable_label(
            &mut self,
            request: impl tonic::IntoRequest<super::EnableLabelRequest>,
        ) -> std::result::Result<tonic::Response<super::Label>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/EnableLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "EnableLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Permanently deletes a Label and related metadata on Drive Items.
        ///
        /// Once deleted, the Label and related Drive item metadata will be deleted.
        /// Only draft Labels, and disabled Labels may be deleted.
        pub async fn delete_label(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteLabelRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/DeleteLabel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "DeleteLabel",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists a Label's permissions.
        pub async fn list_label_permissions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLabelPermissionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLabelPermissionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/ListLabelPermissions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "ListLabelPermissions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a Label's permissions. If a permission for the indicated principal
        /// doesn't exist, a new Label Permission is created, otherwise the existing
        /// permission is updated. Permissions affect the Label resource as a whole,
        /// are not revisioned, and do not require publishing.
        pub async fn create_label_permission(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateLabelPermissionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::LabelPermission>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/CreateLabelPermission",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "CreateLabelPermission",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a Label's permissions. If a permission for the indicated principal
        /// doesn't exist, a new Label Permission is created, otherwise the existing
        /// permission is updated. Permissions affect the Label resource as a whole,
        /// are not revisioned, and do not require publishing.
        pub async fn update_label_permission(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateLabelPermissionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::LabelPermission>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/UpdateLabelPermission",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "UpdateLabelPermission",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a Label's permission. Permissions affect the Label resource as a
        /// whole, are not revisioned, and do not require publishing.
        pub async fn delete_label_permission(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteLabelPermissionRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/DeleteLabelPermission",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "DeleteLabelPermission",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates Label permissions. If a permission for the
        /// indicated principal doesn't exist, a new Label Permission is created,
        /// otherwise the existing permission is updated. Permissions affect the Label
        /// resource as a whole, are not revisioned, and do not require publishing.
        pub async fn batch_update_label_permissions(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchUpdateLabelPermissionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchUpdateLabelPermissionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/BatchUpdateLabelPermissions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "BatchUpdateLabelPermissions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes Label permissions. Permissions affect the Label resource as a
        /// whole, are not revisioned, and do not require publishing.
        pub async fn batch_delete_label_permissions(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchDeleteLabelPermissionsRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/BatchDeleteLabelPermissions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "BatchDeleteLabelPermissions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the LabelLocks on a Label.
        pub async fn list_label_locks(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLabelLocksRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLabelLocksResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.apps.drive.labels.v2.LabelService/ListLabelLocks",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.apps.drive.labels.v2.LabelService",
                        "ListLabelLocks",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}