1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
// This file is @generated by prost-build.
/// Meta information is used to improve the performance of the service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestMetadata {
    /// Provides user unique identification and groups information.
    #[prost(message, optional, tag = "1")]
    pub user_info: ::core::option::Option<UserInfo>,
}
/// Additional information returned to client, such as debugging information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseMetadata {
    /// A unique id associated with this call. This id is logged for tracking
    /// purpose.
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
}
/// The user information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserInfo {
    /// A unique user identification string, as determined by the client.
    /// The maximum number of allowed characters is 255.
    /// Allowed characters include numbers 0 to 9, uppercase and lowercase letters,
    /// and restricted special symbols (:, @, +, -, _, ~)
    /// The format is "user:xxxx@example.com";
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The unique group identifications which the user is belong to.
    /// The format is "group:yyyy@example.com";
    #[prost(string, repeated, tag = "2")]
    pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Options for Update operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateOptions {
    /// Type for update.
    #[prost(enumeration = "UpdateType", tag = "1")]
    pub update_type: i32,
    /// Field mask for merging Document fields.
    /// For the `FieldMask` definition,
    /// see
    /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask>
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Options for merging.
    #[prost(message, optional, tag = "3")]
    pub merge_fields_options: ::core::option::Option<MergeFieldsOptions>,
}
/// Options for merging updated fields.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MergeFieldsOptions {
    /// When merging message fields, the default behavior is to merge
    /// the content of two message fields together. If you instead want to use
    /// the field from the source message to replace the corresponding field in
    /// the destination message, set this flag to true. When this flag is set,
    /// specified submessage fields that are missing in source will be cleared in
    /// destination.
    #[prost(bool, optional, tag = "1")]
    pub replace_message_fields: ::core::option::Option<bool>,
    /// When merging repeated fields, the default behavior is to append
    /// entries from the source repeated field to the destination repeated field.
    /// If you instead want to keep only the entries from the source repeated
    /// field, set this flag to true.
    ///
    /// If you want to replace a repeated field within a message field on the
    /// destination message, you must set both replace_repeated_fields and
    /// replace_message_fields to true, otherwise the repeated fields will be
    /// appended.
    #[prost(bool, optional, tag = "2")]
    pub replace_repeated_fields: ::core::option::Option<bool>,
}
/// Update type of the requests.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum UpdateType {
    /// Defaults to full replace behavior, ie. FULL_REPLACE.
    Unspecified = 0,
    /// Fully replace all the fields (including previously linked raw document).
    /// Any field masks will be ignored.
    Replace = 1,
    /// Merge the fields into the existing entities.
    Merge = 2,
    /// Inserts the properties by names.
    InsertPropertiesByNames = 3,
    /// Replace the properties by names.
    ReplacePropertiesByNames = 4,
    /// Delete the properties by names.
    DeletePropertiesByNames = 5,
    /// For each of the property, replaces the property if the it exists, otherwise
    /// inserts a new property. And for the rest of the fields, merge them based on
    /// update mask and merge fields options.
    MergeAndReplaceOrInsertPropertiesByNames = 6,
}
impl UpdateType {
    /// 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 {
            UpdateType::Unspecified => "UPDATE_TYPE_UNSPECIFIED",
            UpdateType::Replace => "UPDATE_TYPE_REPLACE",
            UpdateType::Merge => "UPDATE_TYPE_MERGE",
            UpdateType::InsertPropertiesByNames => {
                "UPDATE_TYPE_INSERT_PROPERTIES_BY_NAMES"
            }
            UpdateType::ReplacePropertiesByNames => {
                "UPDATE_TYPE_REPLACE_PROPERTIES_BY_NAMES"
            }
            UpdateType::DeletePropertiesByNames => {
                "UPDATE_TYPE_DELETE_PROPERTIES_BY_NAMES"
            }
            UpdateType::MergeAndReplaceOrInsertPropertiesByNames => {
                "UPDATE_TYPE_MERGE_AND_REPLACE_OR_INSERT_PROPERTIES_BY_NAMES"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UPDATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "UPDATE_TYPE_REPLACE" => Some(Self::Replace),
            "UPDATE_TYPE_MERGE" => Some(Self::Merge),
            "UPDATE_TYPE_INSERT_PROPERTIES_BY_NAMES" => {
                Some(Self::InsertPropertiesByNames)
            }
            "UPDATE_TYPE_REPLACE_PROPERTIES_BY_NAMES" => {
                Some(Self::ReplacePropertiesByNames)
            }
            "UPDATE_TYPE_DELETE_PROPERTIES_BY_NAMES" => {
                Some(Self::DeletePropertiesByNames)
            }
            "UPDATE_TYPE_MERGE_AND_REPLACE_OR_INSERT_PROPERTIES_BY_NAMES" => {
                Some(Self::MergeAndReplaceOrInsertPropertiesByNames)
            }
            _ => None,
        }
    }
}
/// Type of database used by the customer
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DatabaseType {
    /// This value is required by protobuf best practices
    DbUnknown = 0,
    /// Internal Spanner
    DbInfraSpanner = 1,
    /// Cloud Sql with a Postgres Sql instance
    DbCloudSqlPostgres = 2,
}
impl DatabaseType {
    /// 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 {
            DatabaseType::DbUnknown => "DB_UNKNOWN",
            DatabaseType::DbInfraSpanner => "DB_INFRA_SPANNER",
            DatabaseType::DbCloudSqlPostgres => "DB_CLOUD_SQL_POSTGRES",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DB_UNKNOWN" => Some(Self::DbUnknown),
            "DB_INFRA_SPANNER" => Some(Self::DbInfraSpanner),
            "DB_CLOUD_SQL_POSTGRES" => Some(Self::DbCloudSqlPostgres),
            _ => None,
        }
    }
}
/// Access Control Mode.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AccessControlMode {
    /// This value is required by protobuf best practices
    AclModeUnknown = 0,
    /// Universal Access: No document level access control.
    AclModeUniversalAccess = 1,
    /// Document level access control with customer own Identity Service.
    AclModeDocumentLevelAccessControlByoid = 2,
    /// Document level access control using Google Cloud Identity.
    AclModeDocumentLevelAccessControlGci = 3,
}
impl AccessControlMode {
    /// 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 {
            AccessControlMode::AclModeUnknown => "ACL_MODE_UNKNOWN",
            AccessControlMode::AclModeUniversalAccess => "ACL_MODE_UNIVERSAL_ACCESS",
            AccessControlMode::AclModeDocumentLevelAccessControlByoid => {
                "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_BYOID"
            }
            AccessControlMode::AclModeDocumentLevelAccessControlGci => {
                "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_GCI"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ACL_MODE_UNKNOWN" => Some(Self::AclModeUnknown),
            "ACL_MODE_UNIVERSAL_ACCESS" => Some(Self::AclModeUniversalAccess),
            "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_BYOID" => {
                Some(Self::AclModeDocumentLevelAccessControlByoid)
            }
            "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_GCI" => {
                Some(Self::AclModeDocumentLevelAccessControlGci)
            }
            _ => None,
        }
    }
}
/// The default role of the document creator.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DocumentCreatorDefaultRole {
    /// Unspecified, will be default to document admin role.
    Unspecified = 0,
    /// Document Admin, same as contentwarehouse.googleapis.com/documentAdmin.
    DocumentAdmin = 1,
    /// Document Editor, same as contentwarehouse.googleapis.com/documentEditor.
    DocumentEditor = 2,
    /// Document Viewer, same as contentwarehouse.googleapis.com/documentViewer.
    DocumentViewer = 3,
}
impl DocumentCreatorDefaultRole {
    /// 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 {
            DocumentCreatorDefaultRole::Unspecified => {
                "DOCUMENT_CREATOR_DEFAULT_ROLE_UNSPECIFIED"
            }
            DocumentCreatorDefaultRole::DocumentAdmin => "DOCUMENT_ADMIN",
            DocumentCreatorDefaultRole::DocumentEditor => "DOCUMENT_EDITOR",
            DocumentCreatorDefaultRole::DocumentViewer => "DOCUMENT_VIEWER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DOCUMENT_CREATOR_DEFAULT_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
            "DOCUMENT_ADMIN" => Some(Self::DocumentAdmin),
            "DOCUMENT_EDITOR" => Some(Self::DocumentEditor),
            "DOCUMENT_VIEWER" => Some(Self::DocumentViewer),
            _ => None,
        }
    }
}
/// Response message of RunPipeline method.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RunPipelineResponse {}
/// Metadata message of RunPipeline method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunPipelineMetadata {
    /// Number of files that were processed by the pipeline.
    #[prost(int32, tag = "1")]
    pub total_file_count: i32,
    /// Number of files that have failed at some point in the pipeline.
    #[prost(int32, tag = "2")]
    pub failed_file_count: i32,
    /// User unique identification and groups information.
    #[prost(message, optional, tag = "3")]
    pub user_info: ::core::option::Option<UserInfo>,
    /// The list of response details of each document.
    #[prost(message, repeated, tag = "5")]
    pub individual_document_statuses: ::prost::alloc::vec::Vec<
        run_pipeline_metadata::IndividualDocumentStatus,
    >,
    /// The pipeline metadata.
    #[prost(oneof = "run_pipeline_metadata::PipelineMetadata", tags = "4, 6, 7")]
    pub pipeline_metadata: ::core::option::Option<
        run_pipeline_metadata::PipelineMetadata,
    >,
}
/// Nested message and enum types in `RunPipelineMetadata`.
pub mod run_pipeline_metadata {
    /// The metadata message for GcsIngest pipeline.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct GcsIngestPipelineMetadata {
        /// The input Cloud Storage folder in this pipeline.
        /// Format: `gs://<bucket-name>/<folder-name>`.
        #[prost(string, tag = "1")]
        pub input_path: ::prost::alloc::string::String,
    }
    /// The metadata message for Export-to-CDW pipeline.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ExportToCdwPipelineMetadata {
        /// The input list of all the resource names of the documents to be exported.
        #[prost(string, repeated, tag = "1")]
        pub documents: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The output CDW dataset resource name.
        #[prost(string, tag = "2")]
        pub doc_ai_dataset: ::prost::alloc::string::String,
        /// The output Cloud Storage folder in this pipeline.
        #[prost(string, tag = "3")]
        pub output_path: ::prost::alloc::string::String,
    }
    /// The metadata message for Process-with-DocAi pipeline.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ProcessWithDocAiPipelineMetadata {
        /// The input list of all the resource names of the documents to be
        /// processed.
        #[prost(string, repeated, tag = "1")]
        pub documents: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The DocAI processor to process the documents with.
        #[prost(message, optional, tag = "2")]
        pub processor_info: ::core::option::Option<super::ProcessorInfo>,
    }
    /// The status of processing a document.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct IndividualDocumentStatus {
        /// Document identifier of an existing document.
        #[prost(string, tag = "1")]
        pub document_id: ::prost::alloc::string::String,
        /// The status processing the document.
        #[prost(message, optional, tag = "2")]
        pub status: ::core::option::Option<super::super::super::super::rpc::Status>,
    }
    /// The pipeline metadata.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PipelineMetadata {
        /// The pipeline metadata for GcsIngest pipeline.
        #[prost(message, tag = "4")]
        GcsIngestPipelineMetadata(GcsIngestPipelineMetadata),
        /// The pipeline metadata for Export-to-CDW pipeline.
        #[prost(message, tag = "6")]
        ExportToCdwPipelineMetadata(ExportToCdwPipelineMetadata),
        /// The pipeline metadata for Process-with-DocAi pipeline.
        #[prost(message, tag = "7")]
        ProcessWithDocAiPipelineMetadata(ProcessWithDocAiPipelineMetadata),
    }
}
/// The DocAI processor information.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessorInfo {
    /// The processor resource name.
    /// Format is `projects/{project}/locations/{location}/processors/{processor}`,
    /// or
    /// `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
    #[prost(string, tag = "1")]
    pub processor_name: ::prost::alloc::string::String,
    /// The processor will process the documents with this document type.
    #[prost(string, tag = "2")]
    pub document_type: ::prost::alloc::string::String,
    /// The Document schema resource name. All documents processed by this
    /// processor will use this schema.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, tag = "3")]
    pub schema_name: ::prost::alloc::string::String,
}
/// The ingestion pipeline config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IngestPipelineConfig {
    /// The document level acl policy config.
    /// This refers to an Identity and Access (IAM) policy, which specifies access
    /// controls for all documents ingested by the pipeline. The
    /// [role][google.iam.v1.Binding.role] and
    /// [members][google.iam.v1.Binding.role] under the policy needs to be
    /// specified.
    ///
    /// The following roles are supported for document level acl control:
    /// * roles/contentwarehouse.documentAdmin
    /// * roles/contentwarehouse.documentEditor
    /// * roles/contentwarehouse.documentViewer
    ///
    /// The following members are supported for document level acl control:
    /// * user:user-email@example.com
    /// * group:group-email@example.com
    /// Note that for documents searched with LLM, only single level user or group
    /// acl check is supported.
    #[prost(message, optional, tag = "1")]
    pub document_acl_policy: ::core::option::Option<
        super::super::super::iam::v1::Policy,
    >,
    /// The document text extraction enabled flag.
    /// If the flag is set to true, DWH will perform text extraction on the raw
    /// document.
    #[prost(bool, tag = "2")]
    pub enable_document_text_extraction: bool,
    /// Optional. The name of the folder to which all ingested documents will be
    /// linked during ingestion process. Format is
    /// `projects/{project}/locations/{location}/documents/{folder_id}`
    #[prost(string, tag = "3")]
    pub folder: ::prost::alloc::string::String,
    /// The Cloud Function resource name. The Cloud Function needs to live inside
    /// consumer project and is accessible to Document AI Warehouse P4SA.
    /// Only Cloud Functions V2 is supported. Cloud function execution should
    /// complete within 5 minutes or this file ingestion may fail due to timeout.
    /// Format: `<https://{region}-{project_id}.cloudfunctions.net/{cloud_function}`>
    /// The following keys are available the request json payload.
    /// * display_name
    /// * properties
    /// * plain_text
    /// * reference_id
    /// * document_schema_name
    /// * raw_document_path
    /// * raw_document_file_type
    ///
    /// The following keys from the cloud function json response payload will be
    /// ingested to the Document AI Warehouse as part of Document proto content
    /// and/or related information. The original values will be overridden if any
    /// key is present in the response.
    /// * display_name
    /// * properties
    /// * plain_text
    /// * document_acl_policy
    /// * folder
    #[prost(string, tag = "4")]
    pub cloud_function: ::prost::alloc::string::String,
}
/// The configuration of the Cloud Storage Ingestion pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsIngestPipeline {
    /// The input Cloud Storage folder. All files under this folder will be
    /// imported to Document Warehouse.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "1")]
    pub input_path: ::prost::alloc::string::String,
    /// The Document Warehouse schema resource name. All documents processed by
    /// this pipeline will use this schema.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, tag = "2")]
    pub schema_name: ::prost::alloc::string::String,
    /// The Doc AI processor type name. Only used when the format of ingested
    /// files is Doc AI Document proto format.
    #[prost(string, tag = "3")]
    pub processor_type: ::prost::alloc::string::String,
    /// The flag whether to skip ingested documents.
    /// If it is set to true, documents in Cloud Storage contains key "status" with
    /// value "status=ingested" in custom metadata will be skipped to ingest.
    #[prost(bool, tag = "4")]
    pub skip_ingested_documents: bool,
    /// Optional. The config for the Cloud Storage Ingestion pipeline.
    /// It provides additional customization options to run the pipeline and can be
    /// skipped if it is not applicable.
    #[prost(message, optional, tag = "5")]
    pub pipeline_config: ::core::option::Option<IngestPipelineConfig>,
}
/// The configuration of the Cloud Storage Ingestion with DocAI Processors
/// pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsIngestWithDocAiProcessorsPipeline {
    /// The input Cloud Storage folder. All files under this folder will be
    /// imported to Document Warehouse.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "1")]
    pub input_path: ::prost::alloc::string::String,
    /// The split and classify processor information.
    /// The split and classify result will be used to find a matched extract
    /// processor.
    #[prost(message, optional, tag = "2")]
    pub split_classify_processor_info: ::core::option::Option<ProcessorInfo>,
    /// The extract processors information.
    /// One matched extract processor will be used to process documents based on
    /// the classify processor result. If no classify processor is specified, the
    /// first extract processor will be used.
    #[prost(message, repeated, tag = "3")]
    pub extract_processor_infos: ::prost::alloc::vec::Vec<ProcessorInfo>,
    /// The Cloud Storage folder path used to store the raw results from
    /// processors.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "4")]
    pub processor_results_folder_path: ::prost::alloc::string::String,
    /// The flag whether to skip ingested documents.
    /// If it is set to true, documents in Cloud Storage contains key "status" with
    /// value "status=ingested" in custom metadata will be skipped to ingest.
    #[prost(bool, tag = "5")]
    pub skip_ingested_documents: bool,
    /// Optional. The config for the Cloud Storage Ingestion with DocAI Processors
    /// pipeline. It provides additional customization options to run the pipeline
    /// and can be skipped if it is not applicable.
    #[prost(message, optional, tag = "6")]
    pub pipeline_config: ::core::option::Option<IngestPipelineConfig>,
}
/// The configuration of exporting documents from the Document Warehouse to CDW
/// pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportToCdwPipeline {
    /// The list of all the resource names of the documents to be processed.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, repeated, tag = "1")]
    pub documents: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The Cloud Storage folder path used to store the exported documents before
    /// being sent to CDW.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "2")]
    pub export_folder_path: ::prost::alloc::string::String,
    /// Optional. The CDW dataset resource name. This field is optional. If not
    /// set, the documents will be exported to Cloud Storage only. Format:
    /// projects/{project}/locations/{location}/processors/{processor}/dataset
    #[prost(string, tag = "3")]
    pub doc_ai_dataset: ::prost::alloc::string::String,
    /// Ratio of training dataset split. When importing into Document AI Workbench,
    /// documents will be automatically split into training and test split category
    /// with the specified ratio. This field is required if doc_ai_dataset is set.
    #[prost(float, tag = "4")]
    pub training_split_ratio: f32,
}
/// The configuration of processing documents in Document Warehouse with DocAi
/// processors pipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessWithDocAiPipeline {
    /// The list of all the resource names of the documents to be processed.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, repeated, tag = "1")]
    pub documents: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The Cloud Storage folder path used to store the exported documents before
    /// being sent to CDW.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "2")]
    pub export_folder_path: ::prost::alloc::string::String,
    /// The CDW processor information.
    #[prost(message, optional, tag = "3")]
    pub processor_info: ::core::option::Option<ProcessorInfo>,
    /// The Cloud Storage folder path used to store the raw results from
    /// processors.
    /// Format: `gs://<bucket-name>/<folder-name>`.
    #[prost(string, tag = "4")]
    pub processor_results_folder_path: ::prost::alloc::string::String,
}
/// Defines the structure for content warehouse document proto.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Document {
    /// The resource name of the document.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    ///
    /// The name is ignored when creating a document.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The reference ID set by customers. Must be unique per project and location.
    #[prost(string, tag = "11")]
    pub reference_id: ::prost::alloc::string::String,
    /// Required. Display name of the document given by the user. This name will be
    /// displayed in the UI. Customer can populate this field with the name of the
    /// document. This differs from the 'title' field as 'title' is optional and
    /// stores the top heading in the document.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Title that describes the document.
    /// This can be the top heading or text that describes the document.
    #[prost(string, tag = "18")]
    pub title: ::prost::alloc::string::String,
    /// Uri to display the document, for example, in the UI.
    #[prost(string, tag = "17")]
    pub display_uri: ::prost::alloc::string::String,
    /// The Document schema name.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, tag = "3")]
    pub document_schema_name: ::prost::alloc::string::String,
    /// A path linked to structured content file.
    #[deprecated]
    #[prost(string, tag = "16")]
    pub structured_content_uri: ::prost::alloc::string::String,
    /// List of values that are user supplied metadata.
    #[prost(message, repeated, tag = "7")]
    pub properties: ::prost::alloc::vec::Vec<Property>,
    /// Output only. The time when the document is last updated.
    #[prost(message, optional, tag = "8")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the document is created.
    #[prost(message, optional, tag = "9")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// This is used when DocAI was not used to load the document and parsing/
    /// extracting is needed for the inline_raw_document.  For example, if
    /// inline_raw_document is the byte representation of a PDF file, then
    /// this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
    #[prost(enumeration = "RawDocumentFileType", tag = "10")]
    pub raw_document_file_type: i32,
    /// If true, makes the document visible to asynchronous policies and rules.
    #[deprecated]
    #[prost(bool, tag = "12")]
    pub async_enabled: bool,
    /// Indicates the category (image, audio, video etc.) of the original content.
    #[prost(enumeration = "ContentCategory", tag = "20")]
    pub content_category: i32,
    /// If true, text extraction will not be performed.
    #[deprecated]
    #[prost(bool, tag = "19")]
    pub text_extraction_disabled: bool,
    /// If true, text extraction will be performed.
    #[prost(bool, tag = "21")]
    pub text_extraction_enabled: bool,
    /// The user who creates the document.
    #[prost(string, tag = "13")]
    pub creator: ::prost::alloc::string::String,
    /// The user who lastly updates the document.
    #[prost(string, tag = "14")]
    pub updater: ::prost::alloc::string::String,
    /// Output only. If linked to a Collection with RetentionPolicy, the date when
    /// the document becomes mutable.
    #[prost(message, optional, tag = "22")]
    pub disposition_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Indicates if the document has a legal hold on it.
    #[prost(bool, tag = "23")]
    pub legal_hold: bool,
    #[prost(oneof = "document::StructuredContent", tags = "15, 4")]
    pub structured_content: ::core::option::Option<document::StructuredContent>,
    /// Raw document file.
    #[prost(oneof = "document::RawDocument", tags = "5, 6")]
    pub raw_document: ::core::option::Option<document::RawDocument>,
}
/// Nested message and enum types in `Document`.
pub mod document {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum StructuredContent {
        /// Other document format, such as PPTX, XLXS
        #[prost(string, tag = "15")]
        PlainText(::prost::alloc::string::String),
        /// Document AI format to save the structured content, including OCR.
        #[prost(message, tag = "4")]
        CloudAiDocument(super::super::super::documentai::v1::Document),
    }
    /// Raw document file.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum RawDocument {
        /// Raw document file in Cloud Storage path.
        #[prost(string, tag = "5")]
        RawDocumentPath(::prost::alloc::string::String),
        /// Raw document content.
        #[prost(bytes, tag = "6")]
        InlineRawDocument(::prost::bytes::Bytes),
    }
}
/// References to the documents.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentReference {
    /// Required. Name of the referenced document.
    #[prost(string, tag = "1")]
    pub document_name: ::prost::alloc::string::String,
    /// display_name of the referenced document; this name does not need to be
    /// consistent to the display_name in the Document proto, depending on the ACL
    /// constraint.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Stores the subset of the referenced document's content.
    /// This is useful to allow user peek the information of the referenced
    /// document.
    #[prost(string, tag = "3")]
    pub snippet: ::prost::alloc::string::String,
    /// The document type of the document being referenced.
    #[prost(bool, tag = "4")]
    pub document_is_folder: bool,
    /// Output only. The time when the document is last updated.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the document is created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the document is deleted.
    #[prost(message, optional, tag = "7")]
    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Document is a folder with retention policy.
    #[prost(bool, tag = "8")]
    pub document_is_retention_folder: bool,
    /// Document is a folder with legal hold.
    #[prost(bool, tag = "9")]
    pub document_is_legal_hold_folder: bool,
}
/// Property of a document.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Property {
    /// Required. Must match the name of a PropertyDefinition in the
    /// DocumentSchema.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Type of the property.
    /// Must match the property_options type of the matching PropertyDefinition.
    /// Value of the Property parsed into a specific data type.
    /// Specific type value(s) obtained from Document AIs Property.mention_text
    /// field.
    #[prost(oneof = "property::Values", tags = "2, 3, 4, 5, 6, 7, 8, 9")]
    pub values: ::core::option::Option<property::Values>,
}
/// Nested message and enum types in `Property`.
pub mod property {
    /// Type of the property.
    /// Must match the property_options type of the matching PropertyDefinition.
    /// Value of the Property parsed into a specific data type.
    /// Specific type value(s) obtained from Document AIs Property.mention_text
    /// field.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Values {
        /// Integer property values.
        #[prost(message, tag = "2")]
        IntegerValues(super::IntegerArray),
        /// Float property values.
        #[prost(message, tag = "3")]
        FloatValues(super::FloatArray),
        /// String/text property values.
        #[prost(message, tag = "4")]
        TextValues(super::TextArray),
        /// Enum property values.
        #[prost(message, tag = "5")]
        EnumValues(super::EnumArray),
        /// Nested structured data property values.
        #[prost(message, tag = "6")]
        PropertyValues(super::PropertyArray),
        /// Date time property values.
        /// It is not supported by CMEK compliant deployment.
        #[prost(message, tag = "7")]
        DateTimeValues(super::DateTimeArray),
        /// Map property values.
        #[prost(message, tag = "8")]
        MapProperty(super::MapProperty),
        /// Timestamp property values.
        /// It is not supported by CMEK compliant deployment.
        #[prost(message, tag = "9")]
        TimestampValues(super::TimestampArray),
    }
}
/// Integer values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntegerArray {
    /// List of integer values.
    #[prost(int32, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<i32>,
}
/// Float values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatArray {
    /// List of float values.
    #[prost(float, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<f32>,
}
/// String/text values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextArray {
    /// List of text values.
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Enum values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnumArray {
    /// List of enum values.
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// DateTime values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DateTimeArray {
    /// List of datetime values.
    /// Both OffsetDateTime and ZonedDateTime are supported.
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<super::super::super::r#type::DateTime>,
}
/// Timestamp values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampArray {
    /// List of timestamp values.
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<TimestampValue>,
}
/// Timestamp value type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampValue {
    #[prost(oneof = "timestamp_value::Value", tags = "1, 2")]
    pub value: ::core::option::Option<timestamp_value::Value>,
}
/// Nested message and enum types in `TimestampValue`.
pub mod timestamp_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        /// Timestamp value
        #[prost(message, tag = "1")]
        TimestampValue(::prost_types::Timestamp),
        /// The string must represent a valid instant in UTC and is parsed using
        /// java.time.format.DateTimeFormatter.ISO_INSTANT.
        /// e.g. "2013-09-29T18:46:19Z"
        #[prost(string, tag = "2")]
        TextValue(::prost::alloc::string::String),
    }
}
/// Property values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PropertyArray {
    /// List of property values.
    #[prost(message, repeated, tag = "1")]
    pub properties: ::prost::alloc::vec::Vec<Property>,
}
/// Map property value.
/// Represents a structured entries of key value pairs, consisting of field names
/// which map to dynamically typed values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MapProperty {
    /// Unordered map of dynamically typed values.
    #[prost(btree_map = "string, message", tag = "1")]
    pub fields: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        Value,
    >,
}
/// `Value` represents a dynamically typed value which can be either be
/// a float, a integer, a string, or a datetime value. A producer of value is
/// expected to set one of these variants. Absence of any variant indicates an
/// error.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
    /// The kind of value.
    #[prost(oneof = "value::Kind", tags = "1, 2, 3, 4, 5, 6, 7")]
    pub kind: ::core::option::Option<value::Kind>,
}
/// Nested message and enum types in `Value`.
pub mod value {
    /// The kind of value.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        /// Represents a float value.
        #[prost(float, tag = "1")]
        FloatValue(f32),
        /// Represents a integer value.
        #[prost(int32, tag = "2")]
        IntValue(i32),
        /// Represents a string value.
        #[prost(string, tag = "3")]
        StringValue(::prost::alloc::string::String),
        /// Represents an enum value.
        #[prost(message, tag = "4")]
        EnumValue(super::EnumValue),
        /// Represents a datetime value.
        #[prost(message, tag = "5")]
        DatetimeValue(super::super::super::super::r#type::DateTime),
        /// Represents a timestamp value.
        #[prost(message, tag = "6")]
        TimestampValue(super::TimestampValue),
        /// Represents a boolean value.
        #[prost(bool, tag = "7")]
        BooleanValue(bool),
    }
}
/// Represents the string value of the enum field.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnumValue {
    /// String value of the enum field. This must match defined set of enums
    /// in document schema using EnumTypeOptions.
    #[prost(string, tag = "1")]
    pub value: ::prost::alloc::string::String,
}
/// When a raw document is supplied, this indicates the file format
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RawDocumentFileType {
    /// No raw document specified or it is non-parsable
    Unspecified = 0,
    /// Adobe PDF format
    Pdf = 1,
    /// Microsoft Word format
    Docx = 2,
    /// Microsoft Excel format
    Xlsx = 3,
    /// Microsoft Powerpoint format
    Pptx = 4,
    /// UTF-8 encoded text format
    Text = 5,
    /// TIFF or TIF image file format
    Tiff = 6,
}
impl RawDocumentFileType {
    /// 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 {
            RawDocumentFileType::Unspecified => "RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED",
            RawDocumentFileType::Pdf => "RAW_DOCUMENT_FILE_TYPE_PDF",
            RawDocumentFileType::Docx => "RAW_DOCUMENT_FILE_TYPE_DOCX",
            RawDocumentFileType::Xlsx => "RAW_DOCUMENT_FILE_TYPE_XLSX",
            RawDocumentFileType::Pptx => "RAW_DOCUMENT_FILE_TYPE_PPTX",
            RawDocumentFileType::Text => "RAW_DOCUMENT_FILE_TYPE_TEXT",
            RawDocumentFileType::Tiff => "RAW_DOCUMENT_FILE_TYPE_TIFF",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "RAW_DOCUMENT_FILE_TYPE_PDF" => Some(Self::Pdf),
            "RAW_DOCUMENT_FILE_TYPE_DOCX" => Some(Self::Docx),
            "RAW_DOCUMENT_FILE_TYPE_XLSX" => Some(Self::Xlsx),
            "RAW_DOCUMENT_FILE_TYPE_PPTX" => Some(Self::Pptx),
            "RAW_DOCUMENT_FILE_TYPE_TEXT" => Some(Self::Text),
            "RAW_DOCUMENT_FILE_TYPE_TIFF" => Some(Self::Tiff),
            _ => None,
        }
    }
}
/// When a raw document or structured content is supplied, this stores the
/// content category.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContentCategory {
    /// No category is specified.
    Unspecified = 0,
    /// Content is of image type.
    Image = 1,
    /// Content is of audio type.
    Audio = 2,
    /// Content is of video type.
    Video = 3,
}
impl ContentCategory {
    /// 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 {
            ContentCategory::Unspecified => "CONTENT_CATEGORY_UNSPECIFIED",
            ContentCategory::Image => "CONTENT_CATEGORY_IMAGE",
            ContentCategory::Audio => "CONTENT_CATEGORY_AUDIO",
            ContentCategory::Video => "CONTENT_CATEGORY_VIDEO",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONTENT_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
            "CONTENT_CATEGORY_IMAGE" => Some(Self::Image),
            "CONTENT_CATEGORY_AUDIO" => Some(Self::Audio),
            "CONTENT_CATEGORY_VIDEO" => Some(Self::Video),
            _ => None,
        }
    }
}
/// Response message for DocumentLinkService.ListLinkedTargets.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLinkedTargetsResponse {
    /// Target document-links.
    #[prost(message, repeated, tag = "1")]
    pub document_links: ::prost::alloc::vec::Vec<DocumentLink>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for DocumentLinkService.ListLinkedTargets.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLinkedTargetsRequest {
    /// Required. The name of the document, for which all target links are
    /// returned. Format:
    /// projects/{project_number}/locations/{location}/documents/{target_document_id}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The meta information collected about the document creator, used to enforce
    /// access control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// Response message for DocumentLinkService.ListLinkedSources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLinkedSourcesResponse {
    /// Source document-links.
    #[prost(message, repeated, tag = "1")]
    pub document_links: ::prost::alloc::vec::Vec<DocumentLink>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Response message for DocumentLinkService.ListLinkedSources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLinkedSourcesRequest {
    /// Required. The name of the document, for which all source links are
    /// returned. Format:
    /// projects/{project_number}/locations/{location}/documents/{source_document_id}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of document-links to return. The service may return
    /// fewer than this value.
    ///
    /// If unspecified, at most 50 document-links will be returned.
    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// A page token, received from a previous `ListLinkedSources` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListLinkedSources`
    /// must match the call that provided the page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// The meta information collected about the document creator, used to enforce
    /// access control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// A document-link between source and target document.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentLink {
    /// Name of this document-link.
    /// It is required that the parent derived form the name to be consistent with
    /// the source document reference. Otherwise an exception will be thrown.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Document references of the source document.
    #[prost(message, optional, tag = "2")]
    pub source_document_reference: ::core::option::Option<DocumentReference>,
    /// Document references of the target document.
    #[prost(message, optional, tag = "3")]
    pub target_document_reference: ::core::option::Option<DocumentReference>,
    /// Description of this document-link.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The time when the documentLink is last updated.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the documentLink is created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The state of the documentlink. If target node has been deleted, the
    /// link is marked as invalid. Removing a source node will result in removal
    /// of all associated links.
    #[prost(enumeration = "document_link::State", tag = "7")]
    pub state: i32,
}
/// Nested message and enum types in `DocumentLink`.
pub mod document_link {
    /// The state of a document-link.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unknown state of documentlink.
        Unspecified = 0,
        /// The documentlink has both source and target documents detected.
        Active = 1,
        /// Target document is deleted, and mark the documentlink as soft-deleted.
        SoftDeleted = 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::SoftDeleted => "SOFT_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),
                "ACTIVE" => Some(Self::Active),
                "SOFT_DELETED" => Some(Self::SoftDeleted),
                _ => None,
            }
        }
    }
}
/// Request message for DocumentLinkService.CreateDocumentLink.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDocumentLinkRequest {
    /// Required. Parent of the document-link to be created.
    /// parent of document-link should be a document.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{source_document_id}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Document links associated with the source documents
    /// (source_document_id).
    #[prost(message, optional, tag = "2")]
    pub document_link: ::core::option::Option<DocumentLink>,
    /// The meta information collected about the document creator, used to enforce
    /// access control for the service.
    #[prost(message, optional, tag = "3")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// Request message for DocumentLinkService.DeleteDocumentLink.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDocumentLinkRequest {
    /// Required. The name of the document-link to be deleted.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The meta information collected about the document creator, used to enforce
    /// access control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// Generated client implementations.
pub mod document_link_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service lets you manage document-links.
    /// Document-Links are treated as sub-resources under source documents.
    #[derive(Debug, Clone)]
    pub struct DocumentLinkServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DocumentLinkServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DocumentLinkServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            DocumentLinkServiceClient::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
        }
        /// Return all target document-links from the document.
        pub async fn list_linked_targets(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLinkedTargetsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLinkedTargetsResponse>,
            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.cloud.contentwarehouse.v1.DocumentLinkService/ListLinkedTargets",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentLinkService",
                        "ListLinkedTargets",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Return all source document-links from the document.
        pub async fn list_linked_sources(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLinkedSourcesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLinkedSourcesResponse>,
            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.cloud.contentwarehouse.v1.DocumentLinkService/ListLinkedSources",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentLinkService",
                        "ListLinkedSources",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Create a link between a source document and a target document.
        pub async fn create_document_link(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDocumentLinkRequest>,
        ) -> std::result::Result<tonic::Response<super::DocumentLink>, 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.cloud.contentwarehouse.v1.DocumentLinkService/CreateDocumentLink",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentLinkService",
                        "CreateDocumentLink",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Remove the link between the source and target documents.
        pub async fn delete_document_link(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteDocumentLinkRequest>,
        ) -> 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.cloud.contentwarehouse.v1.DocumentLinkService/DeleteDocumentLink",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentLinkService",
                        "DeleteDocumentLink",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Represents a set of rules from a single customer.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleSet {
    /// The resource name of the rule set. Managed internally.
    /// Format:
    /// projects/{project_number}/locations/{location}/ruleSet/{rule_set_id}.
    ///
    /// The name is ignored when creating a rule set.
    #[prost(string, tag = "6")]
    pub name: ::prost::alloc::string::String,
    /// Short description of the rule-set.
    #[prost(string, tag = "1")]
    pub description: ::prost::alloc::string::String,
    /// Source of the rules i.e., customer name.
    #[prost(string, tag = "2")]
    pub source: ::prost::alloc::string::String,
    /// List of rules given by the customer.
    #[prost(message, repeated, tag = "3")]
    pub rules: ::prost::alloc::vec::Vec<Rule>,
}
/// Represents the rule for a content warehouse trigger.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rule {
    /// Short description of the rule and its context.
    #[prost(string, tag = "1")]
    pub description: ::prost::alloc::string::String,
    /// ID of the rule. It has to be unique across all the examples.
    /// This is managed internally.
    #[prost(string, tag = "2")]
    pub rule_id: ::prost::alloc::string::String,
    /// Identifies the trigger type for running the policy.
    #[prost(enumeration = "rule::TriggerType", tag = "3")]
    pub trigger_type: i32,
    /// Represents the conditional expression to be evaluated.
    /// Expression should evaluate to a boolean result.
    /// When the condition is true actions are executed.
    /// Example: user_role = "hsbc_role_1" AND doc.salary > 20000
    #[prost(string, tag = "4")]
    pub condition: ::prost::alloc::string::String,
    /// List of actions that are executed when the rule is satisfied.
    #[prost(message, repeated, tag = "5")]
    pub actions: ::prost::alloc::vec::Vec<Action>,
}
/// Nested message and enum types in `Rule`.
pub mod rule {
    /// The trigger types for actions.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TriggerType {
        /// Trigger for unknown action.
        Unknown = 0,
        /// Trigger for create document action.
        OnCreate = 1,
        /// Trigger for update document action.
        OnUpdate = 4,
        /// Trigger for create link action.
        OnCreateLink = 7,
        /// Trigger for delete link action.
        OnDeleteLink = 8,
    }
    impl TriggerType {
        /// 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 {
                TriggerType::Unknown => "UNKNOWN",
                TriggerType::OnCreate => "ON_CREATE",
                TriggerType::OnUpdate => "ON_UPDATE",
                TriggerType::OnCreateLink => "ON_CREATE_LINK",
                TriggerType::OnDeleteLink => "ON_DELETE_LINK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ON_CREATE" => Some(Self::OnCreate),
                "ON_UPDATE" => Some(Self::OnUpdate),
                "ON_CREATE_LINK" => Some(Self::OnCreateLink),
                "ON_DELETE_LINK" => Some(Self::OnDeleteLink),
                _ => None,
            }
        }
    }
}
/// Represents the action triggered by Rule Engine when the rule is true.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
    /// ID of the action. Managed internally.
    #[prost(string, tag = "1")]
    pub action_id: ::prost::alloc::string::String,
    #[prost(oneof = "action::Action", tags = "2, 3, 4, 5, 6, 9, 10")]
    pub action: ::core::option::Option<action::Action>,
}
/// Nested message and enum types in `Action`.
pub mod action {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// Action triggering access control operations.
        #[prost(message, tag = "2")]
        AccessControl(super::AccessControlAction),
        /// Action triggering data validation operations.
        #[prost(message, tag = "3")]
        DataValidation(super::DataValidationAction),
        /// Action triggering data update operations.
        #[prost(message, tag = "4")]
        DataUpdate(super::DataUpdateAction),
        /// Action triggering create document link operation.
        #[prost(message, tag = "5")]
        AddToFolder(super::AddToFolderAction),
        /// Action publish to Pub/Sub operation.
        #[prost(message, tag = "6")]
        PublishToPubSub(super::PublishAction),
        /// Action removing a document from a folder.
        #[prost(message, tag = "9")]
        RemoveFromFolderAction(super::RemoveFromFolderAction),
        /// Action deleting the document.
        #[prost(message, tag = "10")]
        DeleteDocumentAction(super::DeleteDocumentAction),
    }
}
/// Represents the action responsible for access control list management
/// operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessControlAction {
    /// Identifies the type of operation.
    #[prost(enumeration = "access_control_action::OperationType", tag = "1")]
    pub operation_type: i32,
    /// Represents the new policy from which bindings are added, removed or
    /// replaced based on the type of the operation. the policy is limited to a few
    /// 10s of KB.
    #[prost(message, optional, tag = "2")]
    pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
}
/// Nested message and enum types in `AccessControlAction`.
pub mod access_control_action {
    /// Type of ACL modification operation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OperationType {
        /// The unknown operation type.
        Unknown = 0,
        /// Adds newly given policy bindings in the existing bindings list.
        AddPolicyBinding = 1,
        /// Removes newly given policy bindings from the existing bindings list.
        RemovePolicyBinding = 2,
        /// Replaces existing policy bindings with the given policy binding list
        ReplacePolicyBinding = 3,
    }
    impl OperationType {
        /// 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 {
                OperationType::Unknown => "UNKNOWN",
                OperationType::AddPolicyBinding => "ADD_POLICY_BINDING",
                OperationType::RemovePolicyBinding => "REMOVE_POLICY_BINDING",
                OperationType::ReplacePolicyBinding => "REPLACE_POLICY_BINDING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ADD_POLICY_BINDING" => Some(Self::AddPolicyBinding),
                "REMOVE_POLICY_BINDING" => Some(Self::RemovePolicyBinding),
                "REPLACE_POLICY_BINDING" => Some(Self::ReplacePolicyBinding),
                _ => None,
            }
        }
    }
}
/// Represents the action responsible for data validation operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataValidationAction {
    /// Map of (K, V) -> (field, string condition to be evaluated on the field)
    /// E.g., ("age", "age > 18  && age < 60") entry triggers validation of field
    /// age with the given condition. Map entries will be ANDed during validation.
    #[prost(btree_map = "string, string", tag = "1")]
    pub conditions: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Represents the action responsible for properties update operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataUpdateAction {
    /// Map of (K, V) -> (valid name of the field, new value of the field)
    /// E.g., ("age", "60") entry triggers update of field age with a value of 60.
    /// If the field is not present then new entry is added.
    /// During update action execution, value strings will be casted to
    /// appropriate types.
    #[prost(btree_map = "string, string", tag = "1")]
    pub entries: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Represents the action responsible for adding document under a folder.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddToFolderAction {
    /// Names of the folder under which new document is to be added.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, repeated, tag = "1")]
    pub folders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Represents the action responsible for remove a document from a specific
/// folder.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveFromFolderAction {
    /// Condition of the action to be executed.
    #[prost(string, tag = "1")]
    pub condition: ::prost::alloc::string::String,
    /// Name of the folder under which new document is to be added.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, tag = "2")]
    pub folder: ::prost::alloc::string::String,
}
/// Represents the action responsible for publishing messages to a Pub/Sub topic.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishAction {
    /// The topic id in the Pub/Sub service for which messages will be published
    /// to.
    #[prost(string, tag = "1")]
    pub topic_id: ::prost::alloc::string::String,
    /// Messages to be published.
    #[prost(string, repeated, tag = "2")]
    pub messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Represents the action responsible for deleting the document.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteDocumentAction {
    /// Boolean field to select between hard vs soft delete options.
    /// Set 'true' for 'hard delete' and 'false' for 'soft delete'.
    #[prost(bool, tag = "1")]
    pub enable_hard_delete: bool,
}
/// Records the output of Rule Engine including rule evaluation and actions
/// result.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleEngineOutput {
    /// Name of the document against which the rules and actions were evaluated.
    #[prost(string, tag = "3")]
    pub document_name: ::prost::alloc::string::String,
    /// Output from Rule Evaluator containing matched, unmatched and invalid rules.
    #[prost(message, optional, tag = "1")]
    pub rule_evaluator_output: ::core::option::Option<RuleEvaluatorOutput>,
    /// Output from Action Executor containing rule and corresponding actions
    /// execution result.
    #[prost(message, optional, tag = "2")]
    pub action_executor_output: ::core::option::Option<ActionExecutorOutput>,
}
/// Represents the output of the Rule Evaluator.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleEvaluatorOutput {
    /// List of rules fetched from database for the given request trigger type.
    #[prost(message, repeated, tag = "1")]
    pub triggered_rules: ::prost::alloc::vec::Vec<Rule>,
    /// A subset of triggered rules that are evaluated true for a given request.
    #[prost(message, repeated, tag = "2")]
    pub matched_rules: ::prost::alloc::vec::Vec<Rule>,
    /// A subset of triggered rules that failed the validation check(s) after
    /// parsing.
    #[prost(message, repeated, tag = "3")]
    pub invalid_rules: ::prost::alloc::vec::Vec<InvalidRule>,
}
/// A triggered rule that failed the validation check(s) after parsing.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvalidRule {
    /// Triggered rule.
    #[prost(message, optional, tag = "1")]
    pub rule: ::core::option::Option<Rule>,
    /// Validation error on a parsed expression.
    #[prost(string, tag = "2")]
    pub error: ::prost::alloc::string::String,
}
/// Represents the output of the Action Executor.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionExecutorOutput {
    /// List of rule and corresponding actions result.
    #[prost(message, repeated, tag = "1")]
    pub rule_actions_pairs: ::prost::alloc::vec::Vec<RuleActionsPair>,
}
/// Represents a rule and outputs of associated actions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleActionsPair {
    /// Represents the rule.
    #[prost(message, optional, tag = "1")]
    pub rule: ::core::option::Option<Rule>,
    /// Outputs of executing the actions associated with the above rule.
    #[prost(message, repeated, tag = "2")]
    pub action_outputs: ::prost::alloc::vec::Vec<ActionOutput>,
}
/// Represents the result of executing an action.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionOutput {
    /// ID of the action.
    #[prost(string, tag = "1")]
    pub action_id: ::prost::alloc::string::String,
    /// State of an action.
    #[prost(enumeration = "action_output::State", tag = "2")]
    pub action_state: i32,
    /// Action execution output message.
    #[prost(string, tag = "3")]
    pub output_message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ActionOutput`.
pub mod action_output {
    /// Represents execution state of the action.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The unknown state.
        Unknown = 0,
        /// State indicating action executed successfully.
        ActionSucceeded = 1,
        /// State indicating action failed.
        ActionFailed = 2,
        /// State indicating action timed out.
        ActionTimedOut = 3,
        /// State indicating action is pending.
        ActionPending = 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::Unknown => "UNKNOWN",
                State::ActionSucceeded => "ACTION_SUCCEEDED",
                State::ActionFailed => "ACTION_FAILED",
                State::ActionTimedOut => "ACTION_TIMED_OUT",
                State::ActionPending => "ACTION_PENDING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ACTION_SUCCEEDED" => Some(Self::ActionSucceeded),
                "ACTION_FAILED" => Some(Self::ActionFailed),
                "ACTION_TIMED_OUT" => Some(Self::ActionTimedOut),
                "ACTION_PENDING" => Some(Self::ActionPending),
                _ => None,
            }
        }
    }
}
/// Request message for DocumentService.RunPipeline.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunPipelineRequest {
    /// Required. The resource name which owns the resources of the pipeline.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "6")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// The predefined pipelines.
    #[prost(oneof = "run_pipeline_request::Pipeline", tags = "2, 3, 4, 5")]
    pub pipeline: ::core::option::Option<run_pipeline_request::Pipeline>,
}
/// Nested message and enum types in `RunPipelineRequest`.
pub mod run_pipeline_request {
    /// The predefined pipelines.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Pipeline {
        /// Cloud Storage ingestion pipeline.
        #[prost(message, tag = "2")]
        GcsIngestPipeline(super::GcsIngestPipeline),
        /// Use DocAI processors to process documents in Cloud Storage and ingest
        /// them to Document Warehouse.
        #[prost(message, tag = "3")]
        GcsIngestWithDocAiProcessorsPipeline(
            super::GcsIngestWithDocAiProcessorsPipeline,
        ),
        /// Export docuemnts from Document Warehouse to CDW for training purpose.
        #[prost(message, tag = "4")]
        ExportCdwPipeline(super::ExportToCdwPipeline),
        /// Use a DocAI processor to process documents in Document Warehouse, and
        /// re-ingest the updated results into Document Warehouse.
        #[prost(message, tag = "5")]
        ProcessWithDocAiPipeline(super::ProcessWithDocAiPipeline),
    }
}
/// Generated client implementations.
pub mod pipeline_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service lets you manage pipelines.
    #[derive(Debug, Clone)]
    pub struct PipelineServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> PipelineServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> PipelineServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            PipelineServiceClient::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
        }
        /// Run a predefined pipeline.
        pub async fn run_pipeline(
            &mut self,
            request: impl tonic::IntoRequest<super::RunPipelineRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            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.cloud.contentwarehouse.v1.PipelineService/RunPipeline",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.PipelineService",
                        "RunPipeline",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Metadata object for CreateDocument request (currently empty).
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateDocumentMetadata {}
/// Metadata object for UpdateDocument request (currently empty).
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateDocumentMetadata {}
/// Request message for RuleSetService.CreateRuleSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuleSetRequest {
    /// Required. The parent name.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The rule set to create.
    #[prost(message, optional, tag = "2")]
    pub rule_set: ::core::option::Option<RuleSet>,
}
/// Request message for RuleSetService.GetRuleSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuleSetRequest {
    /// Required. The name of the rule set to retrieve.
    /// Format:
    /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for RuleSetService.UpdateRuleSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRuleSetRequest {
    /// Required. The name of the rule set to update.
    /// Format:
    /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The rule set to update.
    #[prost(message, optional, tag = "2")]
    pub rule_set: ::core::option::Option<RuleSet>,
}
/// Request message for RuleSetService.DeleteRuleSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRuleSetRequest {
    /// Required. The name of the rule set to delete.
    /// Format:
    /// projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for RuleSetService.ListRuleSets.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuleSetsRequest {
    /// Required. The parent, which owns this collection of document.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of rule sets to return. The service may return
    /// fewer than this value.
    /// If unspecified, at most 50 rule sets will be returned.
    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A page token, received from a previous `ListRuleSets` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListRuleSets`
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for RuleSetService.ListRuleSets.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuleSetsResponse {
    /// The rule sets from the specified parent.
    #[prost(message, repeated, tag = "1")]
    pub rule_sets: ::prost::alloc::vec::Vec<RuleSet>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod rule_set_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service to manage customer specific RuleSets.
    #[derive(Debug, Clone)]
    pub struct RuleSetServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> RuleSetServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> RuleSetServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            RuleSetServiceClient::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
        }
        /// Creates a ruleset.
        pub async fn create_rule_set(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateRuleSetRequest>,
        ) -> std::result::Result<tonic::Response<super::RuleSet>, 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.cloud.contentwarehouse.v1.RuleSetService/CreateRuleSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.RuleSetService",
                        "CreateRuleSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist.
        pub async fn get_rule_set(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRuleSetRequest>,
        ) -> std::result::Result<tonic::Response<super::RuleSet>, 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.cloud.contentwarehouse.v1.RuleSetService/GetRuleSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.RuleSetService",
                        "GetRuleSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a ruleset. Returns INVALID_ARGUMENT if the name of the ruleset
        /// is non-empty and does not equal the existing name.
        pub async fn update_rule_set(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateRuleSetRequest>,
        ) -> std::result::Result<tonic::Response<super::RuleSet>, 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.cloud.contentwarehouse.v1.RuleSetService/UpdateRuleSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.RuleSetService",
                        "UpdateRuleSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a ruleset. Returns NOT_FOUND if the document does not exist.
        pub async fn delete_rule_set(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteRuleSetRequest>,
        ) -> 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.cloud.contentwarehouse.v1.RuleSetService/DeleteRuleSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.RuleSetService",
                        "DeleteRuleSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists rulesets.
        pub async fn list_rule_sets(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRuleSetsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRuleSetsResponse>,
            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.cloud.contentwarehouse.v1.RuleSetService/ListRuleSets",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.RuleSetService",
                        "ListRuleSets",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Represents a list of synonyms for a given context.
/// For example a context "sales" could contain:
/// Synonym 1: sale, invoice, bill, order
/// Synonym 2: money, credit, finance, payment
/// Synonym 3: shipping, freight, transport
/// Each SynonymSets should be disjoint
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SynonymSet {
    /// The resource name of the SynonymSet
    /// This is mandatory for google.api.resource.
    /// Format:
    /// projects/{project_number}/locations/{location}/synonymSets/{context}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// This is a freeform field. Example contexts can be "sales," "engineering,"
    /// "real estate," "accounting," etc.
    /// The context can be supplied during search requests.
    #[prost(string, tag = "2")]
    pub context: ::prost::alloc::string::String,
    /// List of Synonyms for the context.
    #[prost(message, repeated, tag = "3")]
    pub synonyms: ::prost::alloc::vec::Vec<synonym_set::Synonym>,
}
/// Nested message and enum types in `SynonymSet`.
pub mod synonym_set {
    /// Represents a list of words given by the customer
    /// All these words are synonyms of each other.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Synonym {
        /// For example: sale, invoice, bill, order
        #[prost(string, repeated, tag = "1")]
        pub words: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
}
/// A document schema used to define document structure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentSchema {
    /// The resource name of the document schema.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    ///
    /// The name is ignored when creating a document schema.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Name of the schema given by the user. Must be unique per project.
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    /// Document details.
    #[prost(message, repeated, tag = "3")]
    pub property_definitions: ::prost::alloc::vec::Vec<PropertyDefinition>,
    /// Document Type, true refers the document is a folder, otherwise it is
    /// a typical document.
    #[prost(bool, tag = "4")]
    pub document_is_folder: bool,
    /// Output only. The time when the document schema is last updated.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the document schema is created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Schema description.
    #[prost(string, tag = "7")]
    pub description: ::prost::alloc::string::String,
}
/// Defines the metadata for a schema property.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PropertyDefinition {
    /// Required. The name of the metadata property.
    /// Must be unique within a document schema and is case insensitive.
    /// Names must be non-blank, start with a letter, and can contain alphanumeric
    /// characters and: /, :, -, _, and .
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The display-name for the property, used for front-end.
    #[prost(string, tag = "12")]
    pub display_name: ::prost::alloc::string::String,
    /// Whether the property can have multiple values.
    #[prost(bool, tag = "2")]
    pub is_repeatable: bool,
    /// Whether the property can be filtered. If this is a sub-property, all the
    /// parent properties must be marked filterable.
    #[prost(bool, tag = "3")]
    pub is_filterable: bool,
    /// Indicates that the property should be included in a global search.
    #[prost(bool, tag = "4")]
    pub is_searchable: bool,
    /// Whether the property is user supplied metadata.
    /// This out-of-the box placeholder setting can be used to tag derived
    /// properties. Its value and interpretation logic should be implemented by API
    /// user.
    #[prost(bool, tag = "5")]
    pub is_metadata: bool,
    /// Whether the property is mandatory.
    /// Default is 'false', i.e. populating property value can be skipped.
    /// If 'true' then user must populate the value for this property.
    #[prost(bool, tag = "14")]
    pub is_required: bool,
    /// The retrieval importance of the property during search.
    #[prost(enumeration = "property_definition::RetrievalImportance", tag = "18")]
    pub retrieval_importance: i32,
    /// The mapping information between this property to another schema source.
    #[prost(message, repeated, tag = "19")]
    pub schema_sources: ::prost::alloc::vec::Vec<property_definition::SchemaSource>,
    /// Type of the property.
    #[prost(
        oneof = "property_definition::ValueTypeOptions",
        tags = "7, 8, 9, 10, 11, 13, 15, 16"
    )]
    pub value_type_options: ::core::option::Option<
        property_definition::ValueTypeOptions,
    >,
}
/// Nested message and enum types in `PropertyDefinition`.
pub mod property_definition {
    /// The schema source information.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SchemaSource {
        /// The schema name in the source.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// The Doc AI processor type name.
        #[prost(string, tag = "2")]
        pub processor_type: ::prost::alloc::string::String,
    }
    /// Stores the retrieval importance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RetrievalImportance {
        /// No importance specified. Default medium importance.
        Unspecified = 0,
        /// Highest importance.
        Highest = 1,
        /// Higher importance.
        Higher = 2,
        /// High importance.
        High = 3,
        /// Medium importance.
        Medium = 4,
        /// Low importance (negative).
        Low = 5,
        /// Lowest importance (negative).
        Lowest = 6,
    }
    impl RetrievalImportance {
        /// 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 {
                RetrievalImportance::Unspecified => "RETRIEVAL_IMPORTANCE_UNSPECIFIED",
                RetrievalImportance::Highest => "HIGHEST",
                RetrievalImportance::Higher => "HIGHER",
                RetrievalImportance::High => "HIGH",
                RetrievalImportance::Medium => "MEDIUM",
                RetrievalImportance::Low => "LOW",
                RetrievalImportance::Lowest => "LOWEST",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RETRIEVAL_IMPORTANCE_UNSPECIFIED" => Some(Self::Unspecified),
                "HIGHEST" => Some(Self::Highest),
                "HIGHER" => Some(Self::Higher),
                "HIGH" => Some(Self::High),
                "MEDIUM" => Some(Self::Medium),
                "LOW" => Some(Self::Low),
                "LOWEST" => Some(Self::Lowest),
                _ => None,
            }
        }
    }
    /// Type of the property.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ValueTypeOptions {
        /// Integer property.
        #[prost(message, tag = "7")]
        IntegerTypeOptions(super::IntegerTypeOptions),
        /// Float property.
        #[prost(message, tag = "8")]
        FloatTypeOptions(super::FloatTypeOptions),
        /// Text/string property.
        #[prost(message, tag = "9")]
        TextTypeOptions(super::TextTypeOptions),
        /// Nested structured data property.
        #[prost(message, tag = "10")]
        PropertyTypeOptions(super::PropertyTypeOptions),
        /// Enum/categorical property.
        #[prost(message, tag = "11")]
        EnumTypeOptions(super::EnumTypeOptions),
        /// Date time property.
        /// It is not supported by CMEK compliant deployment.
        #[prost(message, tag = "13")]
        DateTimeTypeOptions(super::DateTimeTypeOptions),
        /// Map property.
        #[prost(message, tag = "15")]
        MapTypeOptions(super::MapTypeOptions),
        /// Timestamp property.
        /// It is not supported by CMEK compliant deployment.
        #[prost(message, tag = "16")]
        TimestampTypeOptions(super::TimestampTypeOptions),
    }
}
/// Configurations for an integer property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IntegerTypeOptions {}
/// Configurations for a float property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FloatTypeOptions {}
/// Configurations for a text property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TextTypeOptions {}
/// Configurations for a date time property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DateTimeTypeOptions {}
/// Configurations for a Map property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MapTypeOptions {}
/// Configurations for a timestamp property.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimestampTypeOptions {}
/// Configurations for a nested structured data property.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PropertyTypeOptions {
    /// Required. List of property definitions.
    #[prost(message, repeated, tag = "1")]
    pub property_definitions: ::prost::alloc::vec::Vec<PropertyDefinition>,
}
/// Configurations for an enum/categorical property.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EnumTypeOptions {
    /// Required. List of possible enum values.
    #[prost(string, repeated, tag = "1")]
    pub possible_values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Make sure the Enum property value provided in the document is in the
    /// possile value list during document creation. The validation check runs by
    /// default.
    #[prost(bool, tag = "2")]
    pub validation_check_disabled: bool,
}
/// Request message for DocumentSchemaService.CreateDocumentSchema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDocumentSchemaRequest {
    /// Required. The parent name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The document schema to create.
    #[prost(message, optional, tag = "2")]
    pub document_schema: ::core::option::Option<DocumentSchema>,
}
/// Request message for DocumentSchemaService.GetDocumentSchema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDocumentSchemaRequest {
    /// Required. The name of the document schema to retrieve.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for DocumentSchemaService.UpdateDocumentSchema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDocumentSchemaRequest {
    /// Required. The name of the document schema to update.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The document schema to update with.
    #[prost(message, optional, tag = "2")]
    pub document_schema: ::core::option::Option<DocumentSchema>,
}
/// Request message for DocumentSchemaService.DeleteDocumentSchema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDocumentSchemaRequest {
    /// Required. The name of the document schema to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for DocumentSchemaService.ListDocumentSchemas.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDocumentSchemasRequest {
    /// Required. The parent, which owns this collection of document schemas.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of document schemas to return. The service may return
    /// fewer than this value.
    /// If unspecified, at most 50 document schemas will be returned.
    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A page token, received from a previous `ListDocumentSchemas` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListDocumentSchemas`
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for DocumentSchemaService.ListDocumentSchemas.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDocumentSchemasResponse {
    /// The document schemas from the specified parent.
    #[prost(message, repeated, tag = "1")]
    pub document_schemas: ::prost::alloc::vec::Vec<DocumentSchema>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod document_schema_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service lets you manage document schema.
    #[derive(Debug, Clone)]
    pub struct DocumentSchemaServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DocumentSchemaServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DocumentSchemaServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            DocumentSchemaServiceClient::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
        }
        /// Creates a document schema.
        pub async fn create_document_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDocumentSchemaRequest>,
        ) -> std::result::Result<tonic::Response<super::DocumentSchema>, 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.cloud.contentwarehouse.v1.DocumentSchemaService/CreateDocumentSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentSchemaService",
                        "CreateDocumentSchema",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a Document Schema. Returns INVALID_ARGUMENT if the name of the
        /// Document Schema is non-empty and does not equal the existing name.
        /// Supports only appending new properties, adding new ENUM possible values,
        /// and updating the
        /// [EnumTypeOptions.validation_check_disabled][google.cloud.contentwarehouse.v1.EnumTypeOptions.validation_check_disabled]
        /// flag for ENUM possible values. Updating existing properties will result
        /// into INVALID_ARGUMENT.
        pub async fn update_document_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateDocumentSchemaRequest>,
        ) -> std::result::Result<tonic::Response<super::DocumentSchema>, 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.cloud.contentwarehouse.v1.DocumentSchemaService/UpdateDocumentSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentSchemaService",
                        "UpdateDocumentSchema",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a document schema. Returns NOT_FOUND if the document schema does not
        /// exist.
        pub async fn get_document_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::GetDocumentSchemaRequest>,
        ) -> std::result::Result<tonic::Response<super::DocumentSchema>, 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.cloud.contentwarehouse.v1.DocumentSchemaService/GetDocumentSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentSchemaService",
                        "GetDocumentSchema",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a document schema. Returns NOT_FOUND if the document schema does
        /// not exist. Returns BAD_REQUEST if the document schema has documents
        /// depending on it.
        pub async fn delete_document_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteDocumentSchemaRequest>,
        ) -> 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.cloud.contentwarehouse.v1.DocumentSchemaService/DeleteDocumentSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentSchemaService",
                        "DeleteDocumentSchema",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists document schemas.
        pub async fn list_document_schemas(
            &mut self,
            request: impl tonic::IntoRequest<super::ListDocumentSchemasRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListDocumentSchemasResponse>,
            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.cloud.contentwarehouse.v1.DocumentSchemaService/ListDocumentSchemas",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentSchemaService",
                        "ListDocumentSchemas",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Request message for SynonymSetService.CreateSynonymSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSynonymSetRequest {
    /// Required. The parent name.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The synonymSet to be created for a context
    #[prost(message, optional, tag = "2")]
    pub synonym_set: ::core::option::Option<SynonymSet>,
}
/// Request message for SynonymSetService.GetSynonymSet.
/// Will return synonymSet for a certain context.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSynonymSetRequest {
    /// Required. The name of the synonymSet to retrieve
    /// Format:
    /// projects/{project_number}/locations/{location}/synonymSets/{context}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for SynonymSetService.ListSynonymSets.
/// Will return all synonymSets belonging to the customer project.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSynonymSetsRequest {
    /// Required. The parent name.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of synonymSets to return. The service may return
    /// fewer than this value.
    /// If unspecified, at most 50 rule sets will be returned.
    /// The maximum value is 1000; values above 1000 will be coerced to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A page token, received from a previous `ListSynonymSets` call.
    /// Provide this to retrieve the subsequent page.
    ///
    /// When paginating, all other parameters provided to `ListSynonymSets`
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for SynonymSetService.ListSynonymSets.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSynonymSetsResponse {
    /// The synonymSets from the specified parent.
    #[prost(message, repeated, tag = "1")]
    pub synonym_sets: ::prost::alloc::vec::Vec<SynonymSet>,
    /// A page token, received from a previous `ListSynonymSets` call.
    /// Provide this to retrieve the subsequent page.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for SynonymSetService.UpdateSynonymSet.
/// Removes the SynonymSet for the specified context and replaces
/// it with the SynonymSet in this request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSynonymSetRequest {
    /// Required. The name of the synonymSet to update
    /// Format:
    /// projects/{project_number}/locations/{location}/synonymSets/{context}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The synonymSet to be updated for the customer
    #[prost(message, optional, tag = "2")]
    pub synonym_set: ::core::option::Option<SynonymSet>,
}
/// Request message for SynonymSetService.DeleteSynonymSet.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSynonymSetRequest {
    /// Required. The name of the synonymSet to delete
    /// Format:
    /// projects/{project_number}/locations/{location}/synonymSets/{context}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod synonym_set_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A Service that manage/custom customer specified SynonymSets.
    #[derive(Debug, Clone)]
    pub struct SynonymSetServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> SynonymSetServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> SynonymSetServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            SynonymSetServiceClient::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
        }
        /// Creates a SynonymSet for a single context.
        /// Throws an ALREADY_EXISTS exception if a synonymset already exists
        /// for the context.
        pub async fn create_synonym_set(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateSynonymSetRequest>,
        ) -> std::result::Result<tonic::Response<super::SynonymSet>, 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.cloud.contentwarehouse.v1.SynonymSetService/CreateSynonymSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.SynonymSetService",
                        "CreateSynonymSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a SynonymSet for a particular context.
        /// Throws a NOT_FOUND exception if the Synonymset
        /// does not exist
        pub async fn get_synonym_set(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSynonymSetRequest>,
        ) -> std::result::Result<tonic::Response<super::SynonymSet>, 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.cloud.contentwarehouse.v1.SynonymSetService/GetSynonymSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.SynonymSetService",
                        "GetSynonymSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Remove the existing SynonymSet for the context and replaces it
        /// with a new one.
        /// Throws a NOT_FOUND exception if the SynonymSet is not found.
        pub async fn update_synonym_set(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateSynonymSetRequest>,
        ) -> std::result::Result<tonic::Response<super::SynonymSet>, 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.cloud.contentwarehouse.v1.SynonymSetService/UpdateSynonymSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.SynonymSetService",
                        "UpdateSynonymSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a SynonymSet for a given context.
        /// Throws a NOT_FOUND exception if the SynonymSet is not found.
        pub async fn delete_synonym_set(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteSynonymSetRequest>,
        ) -> 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.cloud.contentwarehouse.v1.SynonymSetService/DeleteSynonymSet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.SynonymSetService",
                        "DeleteSynonymSet",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns all SynonymSets (for all contexts) for the specified location.
        pub async fn list_synonym_sets(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSynonymSetsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListSynonymSetsResponse>,
            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.cloud.contentwarehouse.v1.SynonymSetService/ListSynonymSets",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.SynonymSetService",
                        "ListSynonymSets",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DocumentQuery {
    /// The query string that matches against the full text of the document and
    /// the searchable properties.
    ///
    /// The query partially supports [Google AIP style
    /// syntax](<https://google.aip.dev/160>). Specifically, the query supports
    /// literals, logical operators, negation operators, comparison operators, and
    /// functions.
    ///
    /// Literals: A bare literal value (examples: "42", "Hugo") is a value to be
    /// matched against. It searches over the full text of the document and the
    /// searchable properties.
    ///
    /// Logical operators: "AND", "and", "OR", and "or" are binary logical
    /// operators (example: "engineer OR developer").
    ///
    /// Negation operators: "NOT" and "!" are negation operators (example: "NOT
    /// software").
    ///
    /// Comparison operators: support the binary comparison operators =, !=, <, >,
    /// <= and >= for string, numeric, enum, boolean. Also support like operator
    /// `~~` for string. It provides semantic search functionality by parsing,
    /// stemming and doing synonyms expansion against the input query.
    ///
    /// To specify a property in the query, the left hand side expression in the
    /// comparison must be the property ID including the parent. The right hand
    /// side must be literals. For example:
    /// "\"projects/123/locations/us\".property_a < 1" matches results whose
    /// "property_a" is less than 1 in project 123 and us location.
    /// The literals and comparison expression can be connected in a single query
    /// (example: "software engineer \"projects/123/locations/us\".salary > 100").
    ///
    /// Functions: supported functions are `LOWER(\[property_name\])` to perform a
    /// case insensitive match and `EMPTY(\[property_name\])` to filter on the
    /// existence of a key.
    ///
    /// Support nested expressions connected using parenthesis and logical
    /// operators. The default logical operators is `AND` if there is no operators
    /// between expressions.
    ///
    /// The query can be used with other filters e.g. `time_filters` and
    /// `folder_name_filter`. They are connected with `AND` operator under the
    /// hood.
    ///
    /// The maximum number of allowed characters is 255.
    #[prost(string, tag = "1")]
    pub query: ::prost::alloc::string::String,
    /// Experimental, do not use.
    /// If the query is a natural language question. False by default. If true,
    /// then the question-answering feature will be used instead of search, and
    /// `result_count` in
    /// [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest]
    /// must be set. In addition, all other input fields related to search
    /// (pagination, histograms, etc.) will be ignored.
    #[prost(bool, tag = "12")]
    pub is_nl_query: bool,
    /// This filter specifies a structured syntax to match against the
    /// \[PropertyDefinition\].[is_filterable][] marked as `true`. The syntax for
    /// this expression is a subset of SQL syntax.
    ///
    /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left
    /// of the operator is a property name and the right of the operator is a
    /// number or a quoted string. You must escape backslash (\\) and quote (\")
    /// characters. Supported functions are `LOWER(\[property_name\])` to perform a
    /// case insensitive match and `EMPTY(\[property_name\])` to filter on the
    /// existence of a key.
    ///
    /// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting
    /// (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
    /// comparisons or functions are allowed in the expression. The expression must
    /// be < 6000 bytes in length.
    ///
    /// Sample Query:
    /// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
    /// driving_years > 10`
    #[deprecated]
    #[prost(string, tag = "4")]
    pub custom_property_filter: ::prost::alloc::string::String,
    /// Documents created/updated within a range specified by this filter are
    /// searched against.
    #[prost(message, repeated, tag = "5")]
    pub time_filters: ::prost::alloc::vec::Vec<TimeFilter>,
    /// This filter specifies the exact document schema
    /// [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
    /// of the documents to search against.
    ///
    /// If a value isn't specified, documents within the search results are
    /// associated with any schema. If multiple values are specified, documents
    /// within the search results may be associated with any of the specified
    /// schemas.
    ///
    /// At most 20 document schema names are allowed.
    #[prost(string, repeated, tag = "6")]
    pub document_schema_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// This filter specifies a structured syntax to match against the
    /// [PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]
    /// marked as `true`. The relationship between the PropertyFilters is OR.
    #[prost(message, repeated, tag = "7")]
    pub property_filter: ::prost::alloc::vec::Vec<PropertyFilter>,
    /// This filter specifies the types of files to return: ALL, FOLDER, or FILE.
    /// If FOLDER or FILE is specified, then only either folders or files will be
    /// returned, respectively. If ALL is specified, both folders and files will be
    /// returned.
    ///
    /// If no value is specified, ALL files will be returned.
    #[prost(message, optional, tag = "8")]
    pub file_type_filter: ::core::option::Option<FileTypeFilter>,
    /// Search all the documents under this specified folder.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, tag = "9")]
    pub folder_name_filter: ::prost::alloc::string::String,
    /// Search the documents in the list.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    #[prost(string, repeated, tag = "14")]
    pub document_name_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// For custom synonyms.
    /// Customers provide the synonyms based on context. One customer can provide
    /// multiple set of synonyms based on different context. The search query will
    /// be expanded based on the custom synonyms of the query context set.
    /// By default, no custom synonyms wll be applied if no query context is
    /// provided.
    /// It is not supported for CMEK compliant deployment.
    #[prost(string, repeated, tag = "10")]
    pub query_context: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The exact creator(s) of the documents to search against.
    ///
    /// If a value isn't specified, documents within the search results are
    /// associated with any creator. If multiple values are specified, documents
    /// within the search results may be associated with any of the specified
    /// creators.
    #[prost(string, repeated, tag = "11")]
    pub document_creator_filter: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// To support the custom weighting across document schemas, customers need to
    /// provide the properties to be used to boost the ranking in the search
    /// request. For a search query with CustomWeightsMetadata specified, only the
    /// RetrievalImportance for the properties in the CustomWeightsMetadata will
    /// be honored.
    #[prost(message, optional, tag = "13")]
    pub custom_weights_metadata: ::core::option::Option<CustomWeightsMetadata>,
}
/// Filter on create timestamp or update timestamp of documents.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeFilter {
    #[prost(message, optional, tag = "1")]
    pub time_range: ::core::option::Option<super::super::super::r#type::Interval>,
    /// Specifies which time field to filter documents on.
    ///
    /// Defaults to [TimeField.UPLOAD_TIME][].
    #[prost(enumeration = "time_filter::TimeField", tag = "2")]
    pub time_field: i32,
}
/// Nested message and enum types in `TimeFilter`.
pub mod time_filter {
    /// Time field used in TimeFilter.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TimeField {
        /// Default value.
        Unspecified = 0,
        /// Earliest document create time.
        CreateTime = 1,
        /// Latest document update time.
        UpdateTime = 2,
        /// Time when document becomes mutable again.
        DispositionTime = 3,
    }
    impl TimeField {
        /// 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 {
                TimeField::Unspecified => "TIME_FIELD_UNSPECIFIED",
                TimeField::CreateTime => "CREATE_TIME",
                TimeField::UpdateTime => "UPDATE_TIME",
                TimeField::DispositionTime => "DISPOSITION_TIME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TIME_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATE_TIME" => Some(Self::CreateTime),
                "UPDATE_TIME" => Some(Self::UpdateTime),
                "DISPOSITION_TIME" => Some(Self::DispositionTime),
                _ => None,
            }
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PropertyFilter {
    /// The Document schema name
    /// [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name].
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, tag = "1")]
    pub document_schema_name: ::prost::alloc::string::String,
    /// The filter condition.
    /// The syntax for this expression is a subset of SQL syntax.
    ///
    /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, `>=`, and `~~` where
    /// the left of the operator is a property name and the right of the operator
    /// is a number or a quoted string. You must escape backslash (\\) and quote
    /// (\") characters.
    ///
    /// `~~` is the LIKE operator. The right of the operator must be a string. The
    /// only supported property data type for LIKE is text_values. It provides
    /// semantic search functionality by parsing, stemming and doing synonyms
    /// expansion against the input query. It matches if the property contains
    /// semantic similar content to the query. It is not regex matching or wildcard
    /// matching. For example, "property.company ~~ \"google\"" will match records
    /// whose property `property.compnay` have values like "Google Inc.", "Google
    /// LLC" or "Google Company".
    ///
    /// Supported functions are `LOWER(\[property_name\])` to perform a
    /// case insensitive match and `EMPTY(\[property_name\])` to filter on the
    /// existence of a key.
    ///
    /// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting
    /// (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
    /// comparisons or functions are allowed in the expression. The expression must
    /// be < 6000 bytes in length.
    ///
    /// Only properties that are marked filterable are allowed
    /// ([PropertyDefinition.is_filterable][google.cloud.contentwarehouse.v1.PropertyDefinition.is_filterable]).
    /// Property names do not need to be prefixed by the document schema id (as is
    /// the case with histograms), however property names will need to be prefixed
    /// by its parent hierarchy, if any.  For example:
    /// top_property_name.sub_property_name.
    ///
    /// Sample Query:
    /// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
    /// driving_years > 10`
    ///
    ///
    /// CMEK compliant deployment only supports:
    ///
    /// * Operators: `=`, `<`, `<=`, `>`, and `>=`.
    /// * Boolean expressions: AND and OR.
    #[prost(string, tag = "2")]
    pub condition: ::prost::alloc::string::String,
}
/// Filter for the specific types of documents returned.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FileTypeFilter {
    /// The type of files to return.
    #[prost(enumeration = "file_type_filter::FileType", tag = "1")]
    pub file_type: i32,
}
/// Nested message and enum types in `FileTypeFilter`.
pub mod file_type_filter {
    /// Representation of the types of files.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum FileType {
        /// Default document type. If set, disables the filter.
        Unspecified = 0,
        /// Returns all document types, including folders.
        All = 1,
        /// Returns only folders.
        Folder = 2,
        /// Returns only non-folder documents.
        Document = 3,
        /// Returns only root folders
        RootFolder = 4,
    }
    impl FileType {
        /// 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 {
                FileType::Unspecified => "FILE_TYPE_UNSPECIFIED",
                FileType::All => "ALL",
                FileType::Folder => "FOLDER",
                FileType::Document => "DOCUMENT",
                FileType::RootFolder => "ROOT_FOLDER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "FILE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ALL" => Some(Self::All),
                "FOLDER" => Some(Self::Folder),
                "DOCUMENT" => Some(Self::Document),
                "ROOT_FOLDER" => Some(Self::RootFolder),
                _ => None,
            }
        }
    }
}
/// To support the custom weighting across document schemas.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomWeightsMetadata {
    /// List of schema and property name. Allows a maximum of 10 schemas to be
    /// specified for relevance boosting.
    #[prost(message, repeated, tag = "1")]
    pub weighted_schema_properties: ::prost::alloc::vec::Vec<WeightedSchemaProperty>,
}
/// Specifies the schema property name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeightedSchemaProperty {
    /// The document schema name.
    #[prost(string, tag = "1")]
    pub document_schema_name: ::prost::alloc::string::String,
    /// The property definition names in the schema.
    #[prost(string, repeated, tag = "2")]
    pub property_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The histogram request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramQuery {
    /// An expression specifies a histogram request against matching documents for
    /// searches.
    ///
    /// See
    /// [SearchDocumentsRequest.histogram_queries][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.histogram_queries]
    /// for details about syntax.
    #[prost(string, tag = "1")]
    pub histogram_query: ::prost::alloc::string::String,
    /// Controls if the histogram query requires the return of a precise count.
    /// Enable this flag may adversely impact performance.
    ///
    /// Defaults to true.
    #[prost(bool, tag = "2")]
    pub require_precise_result_size: bool,
    /// Optional. Filter the result of histogram query by the property names. It
    /// only works with histogram query count('FilterableProperties'). It is an
    /// optional. It will perform histogram on all the property names for all the
    /// document schemas. Setting this field will have a better performance.
    #[prost(message, optional, tag = "3")]
    pub filters: ::core::option::Option<HistogramQueryPropertyNameFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramQueryPropertyNameFilter {
    /// This filter specifies the exact document schema(s)
    /// [Document.document_schema_name][google.cloud.contentwarehouse.v1.Document.document_schema_name]
    /// to run histogram query against. It is optional. It will perform histogram
    /// for property names for all the document schemas if it is not set.
    ///
    /// At most 10 document schema names are allowed.
    /// Format:
    /// projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
    #[prost(string, repeated, tag = "1")]
    pub document_schemas: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// It is optional. It will perform histogram for all the property names if it
    /// is not set.
    /// The properties need to be defined with the is_filterable flag set to
    /// true and the name of the property should be in the format:
    /// "schemaId.propertyName". The property needs to be defined in the schema.
    /// Example: the schema id is abc. Then the name of property for property
    /// MORTGAGE_TYPE will be "abc.MORTGAGE_TYPE".
    #[prost(string, repeated, tag = "2")]
    pub property_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// By default, the y_axis is HISTOGRAM_YAXIS_DOCUMENT if this field is not
    /// set.
    #[prost(
        enumeration = "histogram_query_property_name_filter::HistogramYAxis",
        tag = "3"
    )]
    pub y_axis: i32,
}
/// Nested message and enum types in `HistogramQueryPropertyNameFilter`.
pub mod histogram_query_property_name_filter {
    /// The result of the histogram query count('FilterableProperties') using
    /// HISTOGRAM_YAXIS_DOCUMENT will be:
    /// invoice_id: 2
    /// address: 1
    /// payment_method: 2
    /// line_item_description: 1
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum HistogramYAxis {
        /// Count the documents per property name.
        HistogramYaxisDocument = 0,
        /// Count the properties per property name.
        HistogramYaxisProperty = 1,
    }
    impl HistogramYAxis {
        /// 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 {
                HistogramYAxis::HistogramYaxisDocument => "HISTOGRAM_YAXIS_DOCUMENT",
                HistogramYAxis::HistogramYaxisProperty => "HISTOGRAM_YAXIS_PROPERTY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "HISTOGRAM_YAXIS_DOCUMENT" => Some(Self::HistogramYaxisDocument),
                "HISTOGRAM_YAXIS_PROPERTY" => Some(Self::HistogramYaxisProperty),
                _ => None,
            }
        }
    }
}
/// Histogram result that matches
/// [HistogramQuery][google.cloud.contentwarehouse.v1.HistogramQuery] specified
/// in searches.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramQueryResult {
    /// Requested histogram expression.
    #[prost(string, tag = "1")]
    pub histogram_query: ::prost::alloc::string::String,
    /// A map from the values of the facet associated with distinct values to the
    /// number of matching entries with corresponding value.
    ///
    /// The key format is:
    ///
    /// * (for string histogram) string values stored in the field.
    #[prost(btree_map = "string, int64", tag = "2")]
    pub histogram: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        i64,
    >,
}
/// Request Option for processing Cloud AI Document in CW Document.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudAiDocumentOption {
    /// Whether to convert all the entities to properties.
    #[prost(bool, tag = "1")]
    pub enable_entities_conversions: bool,
    /// If set, only selected entities will be converted to properties.
    #[prost(btree_map = "string, string", tag = "2")]
    pub customized_entities_properties_conversions: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Request message for DocumentService.CreateDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDocumentRequest {
    /// Required. The parent name.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The document to create.
    #[prost(message, optional, tag = "2")]
    pub document: ::core::option::Option<Document>,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "3")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// Default document policy during creation.
    /// This refers to an Identity and Access (IAM) policy, which specifies access
    /// controls for the Document.
    /// Conditions defined in the policy will be ignored.
    #[prost(message, optional, tag = "4")]
    pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
    /// Request Option for processing Cloud AI Document in Document Warehouse.
    /// This field offers limited support for mapping entities from Cloud AI
    /// Document to Warehouse Document. Please consult with product team before
    /// using this field and other available options.
    #[prost(message, optional, tag = "5")]
    pub cloud_ai_document_option: ::core::option::Option<CloudAiDocumentOption>,
    /// Field mask for creating Document fields. If mask path is empty,
    /// it means all fields are masked.
    /// For the `FieldMask` definition,
    /// see
    /// <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.>
    #[prost(message, optional, tag = "6")]
    pub create_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request message for DocumentService.GetDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDocumentRequest {
    /// Required. The name of the document to retrieve.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id} or
    /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// Request message for DocumentService.UpdateDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDocumentRequest {
    /// Required. The name of the document to update.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}
    /// or
    /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The document to update.
    #[prost(message, optional, tag = "2")]
    pub document: ::core::option::Option<Document>,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "3")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// Request Option for processing Cloud AI Document in Document Warehouse.
    /// This field offers limited support for mapping entities from Cloud AI
    /// Document to Warehouse Document. Please consult with product team before
    /// using this field and other available options.
    #[prost(message, optional, tag = "5")]
    pub cloud_ai_document_option: ::core::option::Option<CloudAiDocumentOption>,
    /// Options for the update operation.
    #[prost(message, optional, tag = "6")]
    pub update_options: ::core::option::Option<UpdateOptions>,
}
/// Request message for DocumentService.DeleteDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDocumentRequest {
    /// Required. The name of the document to delete.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document_id}
    /// or
    /// projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
}
/// Request message for DocumentService.SearchDocuments.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDocumentsRequest {
    /// Required. The parent, which owns this collection of documents.
    /// Format: projects/{project_number}/locations/{location}.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The meta information collected about the end user, used to enforce access
    /// control and improve the search quality of the service.
    #[prost(message, optional, tag = "3")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// Query used to search against documents (keyword, filters, etc.).
    #[prost(message, optional, tag = "4")]
    pub document_query: ::core::option::Option<DocumentQuery>,
    /// An integer that specifies the current offset (that is, starting result
    /// location, amongst the documents deemed by the API as relevant) in search
    /// results. This field is only considered if
    /// [page_token][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.page_token]
    /// is unset.
    ///
    /// The maximum allowed value is 5000. Otherwise an error is thrown.
    ///
    /// For example, 0 means to  return results starting from the first matching
    /// document, and 10 means to return from the 11th document. This can be used
    /// for pagination, (for example, pageSize = 10 and offset = 10 means to return
    /// from the second page).
    #[prost(int32, tag = "5")]
    pub offset: i32,
    /// A limit on the number of documents returned in the search results.
    /// Increasing this value above the default value of 10 can increase search
    /// response time. The value can be between 1 and 100.
    #[prost(int32, tag = "6")]
    pub page_size: i32,
    /// The token specifying the current offset within search results.
    /// See
    /// [SearchDocumentsResponse.next_page_token][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.next_page_token]
    /// for an explanation of how to obtain the next set of query results.
    #[prost(string, tag = "7")]
    pub page_token: ::prost::alloc::string::String,
    /// The criteria determining how search results are sorted. For non-empty
    /// query, default is `"relevance desc"`. For empty query, default is
    /// `"upload_date desc"`.
    ///
    /// Supported options are:
    ///
    /// * `"relevance desc"`: By relevance descending, as determined by the API
    ///    algorithms.
    /// * `"upload_date desc"`: By upload date descending.
    /// * `"upload_date"`: By upload date ascending.
    /// * `"update_date desc"`: By last updated date descending.
    /// * `"update_date"`: By last updated date ascending.
    /// * `"retrieval_importance desc"`: By retrieval importance of properties
    ///    descending. This feature is still under development, please do not use
    ///    unless otherwise instructed to do so.
    #[prost(string, tag = "8")]
    pub order_by: ::prost::alloc::string::String,
    /// An expression specifying a histogram request against matching
    /// documents. Expression syntax is an aggregation function call with
    /// histogram facets and other options.
    ///
    /// The following aggregation functions are supported:
    ///
    /// * `count(string_histogram_facet)`: Count the number of matching entities
    /// for each distinct attribute value.
    ///
    /// Data types:
    ///
    /// * Histogram facet (aka filterable properties): Facet names with format
    /// &lt;schema id&gt;.&lt;facet&gt;. Facets will have the
    /// format of: `[a-zA-Z][a-zA-Z0-9_:/-.]`. If the facet is a child
    /// facet, then the parent hierarchy needs to be specified separated by
    /// dots in the prefix after the schema id. Thus, the format for a multi-
    /// level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;.
    /// &lt;child facet name&gt;. Example:
    /// schema123.root_parent_facet.middle_facet.child_facet
    /// * DocumentSchemaId: (with no schema id prefix) to get
    /// histograms for each document type (returns the schema id path, e.g.
    /// projects/12345/locations/us-west/documentSchemas/abc123).
    ///
    /// Example expression:
    ///
    /// * Document type counts:
    ///    count('DocumentSchemaId')
    ///
    /// * For schema id, abc123, get the counts for MORTGAGE_TYPE:
    ///    count('abc123.MORTGAGE_TYPE')
    #[prost(message, repeated, tag = "9")]
    pub histogram_queries: ::prost::alloc::vec::Vec<HistogramQuery>,
    /// Controls if the search document request requires the return of a total size
    /// of matched documents. See
    /// [SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size].
    ///
    /// Enabling this flag may adversely impact performance. Hint: If this is
    /// used with pagination, set this flag on the initial query but set this
    /// to false on subsequent page calls (keep the total count locally).
    ///
    /// Defaults to false.
    #[prost(bool, tag = "10")]
    pub require_total_size: bool,
    /// Controls if the search document request requires the return of a total size
    /// of matched documents. See
    /// [SearchDocumentsResponse.total_size][google.cloud.contentwarehouse.v1.SearchDocumentsResponse.total_size].
    #[prost(enumeration = "search_documents_request::TotalResultSize", tag = "12")]
    pub total_result_size: i32,
    /// Experimental, do not use.
    /// The limit on the number of documents returned for the question-answering
    /// feature. To enable the question-answering feature, set
    /// \[DocumentQuery\].[is_nl_query][] to true.
    #[prost(int32, tag = "11")]
    pub qa_size_limit: i32,
}
/// Nested message and enum types in `SearchDocumentsRequest`.
pub mod search_documents_request {
    /// The total number of matching documents.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TotalResultSize {
        /// Total number calculation will be skipped.
        Unspecified = 0,
        /// Estimate total number. The total result size will be accurated up to
        /// 10,000. This option will add cost and latency to your request.
        EstimatedSize = 1,
        /// It may adversely impact performance. The limit is 1000,000.
        ActualSize = 2,
    }
    impl TotalResultSize {
        /// 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 {
                TotalResultSize::Unspecified => "TOTAL_RESULT_SIZE_UNSPECIFIED",
                TotalResultSize::EstimatedSize => "ESTIMATED_SIZE",
                TotalResultSize::ActualSize => "ACTUAL_SIZE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TOTAL_RESULT_SIZE_UNSPECIFIED" => Some(Self::Unspecified),
                "ESTIMATED_SIZE" => Some(Self::EstimatedSize),
                "ACTUAL_SIZE" => Some(Self::ActualSize),
                _ => None,
            }
        }
    }
}
/// Request message for DocumentService.LockDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LockDocumentRequest {
    /// Required. The name of the document to lock.
    /// Format:
    /// projects/{project_number}/locations/{location}/documents/{document}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The collection the document connects to.
    #[prost(string, tag = "2")]
    pub collection_id: ::prost::alloc::string::String,
    /// The user information who locks the document.
    #[prost(message, optional, tag = "3")]
    pub locking_user: ::core::option::Option<UserInfo>,
}
/// Request message for DocumentService.FetchAcl
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchAclRequest {
    /// Required. REQUIRED: The resource for which the policy is being requested.
    /// Format for document:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    /// Format for collection:
    /// projects/{project_number}/locations/{location}/collections/{collection_id}.
    /// Format for project: projects/{project_number}.
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "2")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// For Get Project ACL only. Authorization check for end user will be ignored
    /// when project_owner=true.
    #[prost(bool, tag = "3")]
    pub project_owner: bool,
}
/// Request message for DocumentService.SetAcl.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAclRequest {
    /// Required. REQUIRED: The resource for which the policy is being requested.
    /// Format for document:
    /// projects/{project_number}/locations/{location}/documents/{document_id}.
    /// Format for collection:
    /// projects/{project_number}/locations/{location}/collections/{collection_id}.
    /// Format for project: projects/{project_number}.
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    /// Required. REQUIRED: The complete policy to be applied to the `resource`.
    /// The size of the policy is limited to a few 10s of KB. This refers to an
    /// Identity and Access (IAM) policy, which specifies access controls for the
    /// Document.
    ///
    /// You can set ACL with condition for projects only.
    ///
    /// Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where
    /// the left of the operator is `DocumentSchemaId` or property name and the
    /// right of the operator is a number or a quoted string. You must escape
    /// backslash (\\) and quote (\") characters.
    ///
    /// Boolean expressions (AND/OR) are supported up to 3 levels of nesting (for
    /// example, "((A AND B AND C) OR D) AND E"), a maximum of 10 comparisons are
    /// allowed in the expression. The expression must be < 6000 bytes in length.
    ///
    /// Sample condition:
    ///      `"DocumentSchemaId = \"some schema id\" OR SchemaId.floatPropertyName
    ///      >= 10"`
    #[prost(message, optional, tag = "2")]
    pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
    /// The meta information collected about the end user, used to enforce access
    /// control for the service.
    #[prost(message, optional, tag = "3")]
    pub request_metadata: ::core::option::Option<RequestMetadata>,
    /// For Set Project ACL only. Authorization check for end user will be ignored
    /// when project_owner=true.
    #[prost(bool, tag = "4")]
    pub project_owner: bool,
}
/// Response message for DocumentService.CreateDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDocumentResponse {
    /// Document created after executing create request.
    #[prost(message, optional, tag = "1")]
    pub document: ::core::option::Option<Document>,
    /// Output from Rule Engine recording the rule evaluator and action executor's
    /// output.
    ///
    /// Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto
    #[prost(message, optional, tag = "2")]
    pub rule_engine_output: ::core::option::Option<RuleEngineOutput>,
    /// Additional information for the API invocation, such as the request tracking
    /// id.
    #[prost(message, optional, tag = "3")]
    pub metadata: ::core::option::Option<ResponseMetadata>,
    /// post-processing LROs
    #[prost(message, repeated, tag = "4")]
    pub long_running_operations: ::prost::alloc::vec::Vec<
        super::super::super::longrunning::Operation,
    >,
}
/// Response message for DocumentService.UpdateDocument.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDocumentResponse {
    /// Updated document after executing update request.
    #[prost(message, optional, tag = "1")]
    pub document: ::core::option::Option<Document>,
    /// Output from Rule Engine recording the rule evaluator and action executor's
    /// output.
    ///
    /// Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto
    #[prost(message, optional, tag = "2")]
    pub rule_engine_output: ::core::option::Option<RuleEngineOutput>,
    /// Additional information for the API invocation, such as the request tracking
    /// id.
    #[prost(message, optional, tag = "3")]
    pub metadata: ::core::option::Option<ResponseMetadata>,
}
/// Additional result info for the question-answering feature.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QaResult {
    /// Highlighted sections in the snippet.
    #[prost(message, repeated, tag = "1")]
    pub highlights: ::prost::alloc::vec::Vec<qa_result::Highlight>,
    /// The calibrated confidence score for this document, in the range
    /// \[0., 1.\]. This represents the confidence level for whether the returned
    /// document and snippet answers the user's query.
    #[prost(float, tag = "2")]
    pub confidence_score: f32,
}
/// Nested message and enum types in `QAResult`.
pub mod qa_result {
    /// A text span in the search text snippet that represents a highlighted
    /// section (answer context, highly relevant sentence, etc.).
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Highlight {
        /// Start index of the highlight.
        #[prost(int32, tag = "1")]
        pub start_index: i32,
        /// End index of the highlight, exclusive.
        #[prost(int32, tag = "2")]
        pub end_index: i32,
    }
}
/// Response message for DocumentService.SearchDocuments.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDocumentsResponse {
    /// The document entities that match the specified
    /// [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest].
    #[prost(message, repeated, tag = "1")]
    pub matching_documents: ::prost::alloc::vec::Vec<
        search_documents_response::MatchingDocument,
    >,
    /// The token that specifies the starting position of the next page of results.
    /// This field is empty if there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// The total number of matched documents which is available only if the client
    /// set
    /// [SearchDocumentsRequest.require_total_size][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.require_total_size]
    /// to `true` or set
    /// [SearchDocumentsRequest.total_result_size][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.total_result_size]
    /// to `ESTIMATED_SIZE` or `ACTUAL_SIZE`. Otherwise, the value will be `-1`.
    /// Typically a UI would handle this condition by displaying &quot;of
    /// many&quot;, for example: &quot;Displaying 10 of many&quot;.
    #[prost(int32, tag = "3")]
    pub total_size: i32,
    /// Additional information for the API invocation, such as the request tracking
    /// id.
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<ResponseMetadata>,
    /// The histogram results that match with the specified
    /// [SearchDocumentsRequest.histogram_queries][google.cloud.contentwarehouse.v1.SearchDocumentsRequest.histogram_queries].
    #[prost(message, repeated, tag = "6")]
    pub histogram_query_results: ::prost::alloc::vec::Vec<HistogramQueryResult>,
    /// Experimental.
    /// Question answer from the query against the document.
    #[prost(string, tag = "7")]
    pub question_answer: ::prost::alloc::string::String,
}
/// Nested message and enum types in `SearchDocumentsResponse`.
pub mod search_documents_response {
    /// Document entry with metadata inside
    /// [SearchDocumentsResponse][google.cloud.contentwarehouse.v1.SearchDocumentsResponse]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MatchingDocument {
        /// Document that matches the specified
        /// [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest].
        /// This document only contains indexed metadata information.
        #[prost(message, optional, tag = "1")]
        pub document: ::core::option::Option<super::Document>,
        /// Contains snippets of text from the document full raw text that most
        /// closely match a search query's keywords, if available. All HTML tags in
        /// the original fields are stripped when returned in this field, and
        /// matching query keywords are enclosed in HTML bold tags.
        ///
        /// If the question-answering feature is enabled, this field will instead
        /// contain a snippet that answers the user's natural-language query. No HTML
        /// bold tags will be present, and highlights in the answer snippet can be
        /// found in
        /// [QAResult.highlights][google.cloud.contentwarehouse.v1.QAResult.highlights].
        #[prost(string, tag = "2")]
        pub search_text_snippet: ::prost::alloc::string::String,
        /// Experimental.
        /// Additional result info if the question-answering feature is enabled.
        #[prost(message, optional, tag = "3")]
        pub qa_result: ::core::option::Option<super::QaResult>,
        /// Return the 1-based page indices where those pages have one or more
        /// matched tokens.
        #[prost(int64, repeated, tag = "4")]
        pub matched_token_page_indices: ::prost::alloc::vec::Vec<i64>,
    }
}
/// Response message for DocumentService.FetchAcl.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchAclResponse {
    /// The IAM policy.
    #[prost(message, optional, tag = "1")]
    pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
    /// Additional information for the API invocation, such as the request tracking
    /// id.
    #[prost(message, optional, tag = "2")]
    pub metadata: ::core::option::Option<ResponseMetadata>,
}
/// Response message for DocumentService.SetAcl.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAclResponse {
    /// The policy will be attached to a resource (e.g. projecct, document).
    #[prost(message, optional, tag = "1")]
    pub policy: ::core::option::Option<super::super::super::iam::v1::Policy>,
    /// Additional information for the API invocation, such as the request tracking
    /// id.
    #[prost(message, optional, tag = "2")]
    pub metadata: ::core::option::Option<ResponseMetadata>,
}
/// Generated client implementations.
pub mod document_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service lets you manage document.
    #[derive(Debug, Clone)]
    pub struct DocumentServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DocumentServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DocumentServiceClient<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> + std::marker::Send + std::marker::Sync,
        {
            DocumentServiceClient::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
        }
        /// Creates a document.
        pub async fn create_document(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDocumentRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateDocumentResponse>,
            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.cloud.contentwarehouse.v1.DocumentService/CreateDocument",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "CreateDocument",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a document. Returns NOT_FOUND if the document does not exist.
        pub async fn get_document(
            &mut self,
            request: impl tonic::IntoRequest<super::GetDocumentRequest>,
        ) -> std::result::Result<tonic::Response<super::Document>, 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.cloud.contentwarehouse.v1.DocumentService/GetDocument",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "GetDocument",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a document. Returns INVALID_ARGUMENT if the name of the document
        /// is non-empty and does not equal the existing name.
        pub async fn update_document(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateDocumentRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateDocumentResponse>,
            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.cloud.contentwarehouse.v1.DocumentService/UpdateDocument",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "UpdateDocument",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a document. Returns NOT_FOUND if the document does not exist.
        pub async fn delete_document(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteDocumentRequest>,
        ) -> 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.cloud.contentwarehouse.v1.DocumentService/DeleteDocument",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "DeleteDocument",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Searches for documents using provided
        /// [SearchDocumentsRequest][google.cloud.contentwarehouse.v1.SearchDocumentsRequest].
        /// This call only returns documents that the caller has permission to search
        /// against.
        pub async fn search_documents(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchDocumentsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchDocumentsResponse>,
            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.cloud.contentwarehouse.v1.DocumentService/SearchDocuments",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "SearchDocuments",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lock the document so the document cannot be updated by other users.
        pub async fn lock_document(
            &mut self,
            request: impl tonic::IntoRequest<super::LockDocumentRequest>,
        ) -> std::result::Result<tonic::Response<super::Document>, 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.cloud.contentwarehouse.v1.DocumentService/LockDocument",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "LockDocument",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the access control policy for a resource. Returns NOT_FOUND error if
        /// the resource does not exist. Returns an empty policy if the resource exists
        /// but does not have a policy set.
        pub async fn fetch_acl(
            &mut self,
            request: impl tonic::IntoRequest<super::FetchAclRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FetchAclResponse>,
            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.cloud.contentwarehouse.v1.DocumentService/FetchAcl",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "FetchAcl",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Sets the access control policy for a resource. Replaces any existing
        /// policy.
        pub async fn set_acl(
            &mut self,
            request: impl tonic::IntoRequest<super::SetAclRequest>,
        ) -> std::result::Result<tonic::Response<super::SetAclResponse>, 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.cloud.contentwarehouse.v1.DocumentService/SetAcl",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.contentwarehouse.v1.DocumentService",
                        "SetAcl",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}