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
// This file is @generated by prost-build.
/// A managed metastore service that serves metadata queries.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
    /// Immutable. The relative resource name of the metastore service, in the
    /// following format:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time when the metastore service was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the metastore service was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels for the metastore service.
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Immutable. The relative resource name of the VPC network on which the
    /// instance can be accessed. It is specified in the following form:
    ///
    /// `projects/{project_number}/global/networks/{network_id}`.
    #[prost(string, tag = "7")]
    pub network: ::prost::alloc::string::String,
    /// Output only. The URI of the endpoint used to access the metastore service.
    #[prost(string, tag = "8")]
    pub endpoint_uri: ::prost::alloc::string::String,
    /// The TCP port at which the metastore service is reached. Default: 9083.
    #[prost(int32, tag = "9")]
    pub port: i32,
    /// Output only. The current state of the metastore service.
    #[prost(enumeration = "service::State", tag = "10")]
    pub state: i32,
    /// Output only. Additional information about the current state of the
    /// metastore service, if available.
    #[prost(string, tag = "11")]
    pub state_message: ::prost::alloc::string::String,
    /// Output only. A Cloud Storage URI (starting with `gs://`) that specifies
    /// where artifacts related to the metastore service are stored.
    #[prost(string, tag = "12")]
    pub artifact_gcs_uri: ::prost::alloc::string::String,
    /// The tier of the service.
    #[prost(enumeration = "service::Tier", tag = "13")]
    pub tier: i32,
    /// The setting that defines how metastore metadata should be integrated with
    /// external services and systems.
    #[prost(message, optional, tag = "14")]
    pub metadata_integration: ::core::option::Option<MetadataIntegration>,
    /// The one hour maintenance window of the metastore service. This specifies
    /// when the service can be restarted for maintenance purposes in UTC time.
    /// Maintenance window is not needed for services with the SPANNER
    /// database type.
    #[prost(message, optional, tag = "15")]
    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
    /// Output only. The globally unique resource identifier of the metastore
    /// service.
    #[prost(string, tag = "16")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The metadata management activities of the metastore service.
    #[prost(message, optional, tag = "17")]
    pub metadata_management_activity: ::core::option::Option<MetadataManagementActivity>,
    /// Immutable. The release channel of the service.
    /// If unspecified, defaults to `STABLE`.
    #[prost(enumeration = "service::ReleaseChannel", tag = "19")]
    pub release_channel: i32,
    /// Immutable. Information used to configure the Dataproc Metastore service to
    /// encrypt customer data at rest. Cannot be updated.
    #[prost(message, optional, tag = "20")]
    pub encryption_config: ::core::option::Option<EncryptionConfig>,
    /// The configuration specifying the network settings for the
    /// Dataproc Metastore service.
    #[prost(message, optional, tag = "21")]
    pub network_config: ::core::option::Option<NetworkConfig>,
    /// Immutable. The database type that the Metastore service stores its data.
    #[prost(enumeration = "service::DatabaseType", tag = "22")]
    pub database_type: i32,
    /// The configuration specifying telemetry settings for the Dataproc Metastore
    /// service. If unspecified defaults to `JSON`.
    #[prost(message, optional, tag = "23")]
    pub telemetry_config: ::core::option::Option<TelemetryConfig>,
    /// Scaling configuration of the metastore service.
    #[prost(message, optional, tag = "24")]
    pub scaling_config: ::core::option::Option<ScalingConfig>,
    /// Configuration properties specific to the underlying metastore service
    /// technology (the software that serves metastore queries).
    #[prost(oneof = "service::MetastoreConfig", tags = "5")]
    pub metastore_config: ::core::option::Option<service::MetastoreConfig>,
}
/// Nested message and enum types in `Service`.
pub mod service {
    /// The current state of the metastore service.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the metastore service is unknown.
        Unspecified = 0,
        /// The metastore service is in the process of being created.
        Creating = 1,
        /// The metastore service is running and ready to serve queries.
        Active = 2,
        /// The metastore service is entering suspension. Its query-serving
        /// availability may cease unexpectedly.
        Suspending = 3,
        /// The metastore service is suspended and unable to serve queries.
        Suspended = 4,
        /// The metastore service is being updated. It remains usable but cannot
        /// accept additional update requests or be deleted at this time.
        Updating = 5,
        /// The metastore service is undergoing deletion. It cannot be used.
        Deleting = 6,
        /// The metastore service has encountered an error and cannot be used. The
        /// metastore service should be deleted.
        Error = 7,
    }
    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::Creating => "CREATING",
                State::Active => "ACTIVE",
                State::Suspending => "SUSPENDING",
                State::Suspended => "SUSPENDED",
                State::Updating => "UPDATING",
                State::Deleting => "DELETING",
                State::Error => "ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATING" => Some(Self::Creating),
                "ACTIVE" => Some(Self::Active),
                "SUSPENDING" => Some(Self::Suspending),
                "SUSPENDED" => Some(Self::Suspended),
                "UPDATING" => Some(Self::Updating),
                "DELETING" => Some(Self::Deleting),
                "ERROR" => Some(Self::Error),
                _ => None,
            }
        }
    }
    /// Available service tiers.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Tier {
        /// The tier is not set.
        Unspecified = 0,
        /// The developer tier provides limited scalability and no fault tolerance.
        /// Good for low-cost proof-of-concept.
        Developer = 1,
        /// The enterprise tier provides multi-zone high availability, and sufficient
        /// scalability for enterprise-level Dataproc Metastore workloads.
        Enterprise = 3,
    }
    impl Tier {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Tier::Unspecified => "TIER_UNSPECIFIED",
                Tier::Developer => "DEVELOPER",
                Tier::Enterprise => "ENTERPRISE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TIER_UNSPECIFIED" => Some(Self::Unspecified),
                "DEVELOPER" => Some(Self::Developer),
                "ENTERPRISE" => Some(Self::Enterprise),
                _ => None,
            }
        }
    }
    /// Release channels bundle features of varying levels of stability. Newer
    /// features may be introduced initially into less stable release channels and
    /// can be automatically promoted into more stable release channels.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ReleaseChannel {
        /// Release channel is not specified.
        Unspecified = 0,
        /// The `CANARY` release channel contains the newest features, which may be
        /// unstable and subject to unresolved issues with no known workarounds.
        /// Services using the `CANARY` release channel are not subject to any SLAs.
        Canary = 1,
        /// The `STABLE` release channel contains features that are considered stable
        /// and have been validated for production use.
        Stable = 2,
    }
    impl ReleaseChannel {
        /// 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 {
                ReleaseChannel::Unspecified => "RELEASE_CHANNEL_UNSPECIFIED",
                ReleaseChannel::Canary => "CANARY",
                ReleaseChannel::Stable => "STABLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RELEASE_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
                "CANARY" => Some(Self::Canary),
                "STABLE" => Some(Self::Stable),
                _ => None,
            }
        }
    }
    /// The backend database type for the metastore service.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DatabaseType {
        /// The DATABASE_TYPE is not set.
        Unspecified = 0,
        /// MySQL is used to persist the metastore data.
        Mysql = 1,
        /// Spanner is used to persist the metastore data.
        Spanner = 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::Unspecified => "DATABASE_TYPE_UNSPECIFIED",
                DatabaseType::Mysql => "MYSQL",
                DatabaseType::Spanner => "SPANNER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DATABASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "MYSQL" => Some(Self::Mysql),
                "SPANNER" => Some(Self::Spanner),
                _ => None,
            }
        }
    }
    /// Configuration properties specific to the underlying metastore service
    /// technology (the software that serves metastore queries).
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum MetastoreConfig {
        /// Configuration information specific to running Hive metastore
        /// software as the metastore service.
        #[prost(message, tag = "5")]
        HiveMetastoreConfig(super::HiveMetastoreConfig),
    }
}
/// Specifies how metastore metadata should be integrated with external services.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataIntegration {
    /// The integration config for the Data Catalog service.
    #[prost(message, optional, tag = "1")]
    pub data_catalog_config: ::core::option::Option<DataCatalogConfig>,
    /// The integration config for the Dataplex service.
    #[prost(message, optional, tag = "2")]
    pub dataplex_config: ::core::option::Option<DataplexConfig>,
}
/// Specifies how metastore metadata should be integrated with the Data Catalog
/// service.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DataCatalogConfig {
    /// Defines whether the metastore metadata should be synced to Data Catalog.
    /// The default value is to disable syncing metastore metadata to Data Catalog.
    #[prost(bool, tag = "2")]
    pub enabled: bool,
}
/// Specifies how metastore metadata should be integrated with the Dataplex
/// service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataplexConfig {
    /// A reference to the Lake resources that this metastore service is attached
    /// to. The key is the lake resource name. Example:
    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
    #[prost(btree_map = "string, message", tag = "1")]
    pub lake_resources: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        Lake,
    >,
}
/// Represents a Lake resource
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lake {
    /// The Lake resource name.
    /// Example:
    /// `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Maintenance window. This specifies when Dataproc Metastore
/// may perform system maintenance operation to the service.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
    /// The hour of day (0-23) when the window starts.
    #[prost(message, optional, tag = "1")]
    pub hour_of_day: ::core::option::Option<i32>,
    /// The day of week, when the window starts.
    #[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "2")]
    pub day_of_week: i32,
}
/// Specifies configuration information specific to running Hive metastore
/// software as the metastore service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HiveMetastoreConfig {
    /// Immutable. The Hive metastore schema version.
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    /// A mapping of Hive metastore configuration key-value pairs to apply to the
    /// Hive metastore (configured in `hive-site.xml`). The mappings
    /// override system defaults (some keys cannot be overridden). These
    /// overrides are also applied to auxiliary versions and can be further
    /// customized in the auxiliary version's `AuxiliaryVersionConfig`.
    #[prost(btree_map = "string, string", tag = "2")]
    pub config_overrides: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Information used to configure the Hive metastore service as a service
    /// principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
    /// method and specify this field's path
    /// (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
    /// while omitting this field from the request's `service`.
    #[prost(message, optional, tag = "3")]
    pub kerberos_config: ::core::option::Option<KerberosConfig>,
    /// The protocol to use for the metastore service endpoint. If unspecified,
    /// defaults to `THRIFT`.
    #[prost(enumeration = "hive_metastore_config::EndpointProtocol", tag = "4")]
    pub endpoint_protocol: i32,
    /// A mapping of Hive metastore version to the auxiliary version
    /// configuration. When specified, a secondary Hive metastore service is
    /// created along with the primary service. All auxiliary versions must be less
    /// than the service's primary version. The key is the auxiliary service name
    /// and it must match the regular expression [a-z](\[-a-z0-9\]*[a-z0-9])?. This
    /// means that the first character must be a lowercase letter, and all the
    /// following characters must be hyphens, lowercase letters, or digits, except
    /// the last character, which cannot be a hyphen.
    #[prost(btree_map = "string, message", tag = "5")]
    pub auxiliary_versions: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        AuxiliaryVersionConfig,
    >,
}
/// Nested message and enum types in `HiveMetastoreConfig`.
pub mod hive_metastore_config {
    /// Protocols available for serving the metastore service endpoint.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EndpointProtocol {
        /// The protocol is not set.
        Unspecified = 0,
        /// Use the legacy Apache Thrift protocol for the metastore service endpoint.
        Thrift = 1,
        /// Use the modernized gRPC protocol for the metastore service endpoint.
        Grpc = 2,
    }
    impl EndpointProtocol {
        /// 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 {
                EndpointProtocol::Unspecified => "ENDPOINT_PROTOCOL_UNSPECIFIED",
                EndpointProtocol::Thrift => "THRIFT",
                EndpointProtocol::Grpc => "GRPC",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ENDPOINT_PROTOCOL_UNSPECIFIED" => Some(Self::Unspecified),
                "THRIFT" => Some(Self::Thrift),
                "GRPC" => Some(Self::Grpc),
                _ => None,
            }
        }
    }
}
/// Configuration information for a Kerberos principal.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KerberosConfig {
    /// A Kerberos keytab file that can be used to authenticate a service principal
    /// with a Kerberos Key Distribution Center (KDC).
    #[prost(message, optional, tag = "1")]
    pub keytab: ::core::option::Option<Secret>,
    /// A Kerberos principal that exists in the both the keytab the KDC
    /// to authenticate as. A typical principal is of the form
    /// `primary/instance@REALM`, but there is no exact format.
    #[prost(string, tag = "2")]
    pub principal: ::prost::alloc::string::String,
    /// A Cloud Storage URI that specifies the path to a
    /// krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
    /// although the file does not need to be named krb5.conf explicitly.
    #[prost(string, tag = "3")]
    pub krb5_config_gcs_uri: ::prost::alloc::string::String,
}
/// A securely stored value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Secret {
    #[prost(oneof = "secret::Value", tags = "2")]
    pub value: ::core::option::Option<secret::Value>,
}
/// Nested message and enum types in `Secret`.
pub mod secret {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        /// The relative resource name of a Secret Manager secret version, in the
        /// following form:
        ///
        /// `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
        #[prost(string, tag = "2")]
        CloudSecret(::prost::alloc::string::String),
    }
}
/// Encryption settings for the service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EncryptionConfig {
    /// The fully qualified customer provided Cloud KMS key name to use for
    /// customer data encryption, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
    #[prost(string, tag = "1")]
    pub kms_key: ::prost::alloc::string::String,
}
/// Configuration information for the auxiliary service versions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuxiliaryVersionConfig {
    /// The Hive metastore version of the auxiliary service. It must be less
    /// than the primary Hive metastore service's version.
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    /// A mapping of Hive metastore configuration key-value pairs to apply to the
    /// auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
    /// the primary version's overrides. If keys are present in both the auxiliary
    /// version's overrides and the primary version's overrides, the value from
    /// the auxiliary version's overrides takes precedence.
    #[prost(btree_map = "string, string", tag = "2")]
    pub config_overrides: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The network configuration contains the endpoint URI(s) of the
    /// auxiliary Hive metastore service.
    #[prost(message, optional, tag = "3")]
    pub network_config: ::core::option::Option<NetworkConfig>,
}
/// Network configuration for the Dataproc Metastore service.
///
/// Next available ID: 4
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkConfig {
    /// Immutable. The consumer-side network configuration for the Dataproc
    /// Metastore instance.
    #[prost(message, repeated, tag = "1")]
    pub consumers: ::prost::alloc::vec::Vec<network_config::Consumer>,
    /// Enables custom routes to be imported and exported for the Dataproc
    /// Metastore service's peered VPC network.
    #[prost(bool, tag = "2")]
    pub custom_routes_enabled: bool,
}
/// Nested message and enum types in `NetworkConfig`.
pub mod network_config {
    /// Contains information of the customer's network configurations.
    ///
    /// Next available ID: 5
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Consumer {
        /// Output only. The URI of the endpoint used to access the metastore
        /// service.
        #[prost(string, tag = "3")]
        pub endpoint_uri: ::prost::alloc::string::String,
        /// Output only. The location of the endpoint URI. Format:
        /// `projects/{project}/locations/{location}`.
        #[prost(string, tag = "4")]
        pub endpoint_location: ::prost::alloc::string::String,
        #[prost(oneof = "consumer::VpcResource", tags = "1")]
        pub vpc_resource: ::core::option::Option<consumer::VpcResource>,
    }
    /// Nested message and enum types in `Consumer`.
    pub mod consumer {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum VpcResource {
            /// Immutable. The subnetwork of the customer project from which an IP
            /// address is reserved and used as the Dataproc Metastore service's
            /// endpoint. It is accessible to hosts in the subnet and to all
            /// hosts in a subnet in the same region and same network. There must
            /// be at least one IP address available in the subnet's primary range. The
            /// subnet is specified in the following form:
            ///
            /// `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
            #[prost(string, tag = "1")]
            Subnetwork(::prost::alloc::string::String),
        }
    }
}
/// Telemetry Configuration for the Dataproc Metastore service.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TelemetryConfig {
    /// The output format of the Dataproc Metastore service's logs.
    #[prost(enumeration = "telemetry_config::LogFormat", tag = "1")]
    pub log_format: i32,
}
/// Nested message and enum types in `TelemetryConfig`.
pub mod telemetry_config {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LogFormat {
        /// The LOG_FORMAT is not set.
        Unspecified = 0,
        /// Logging output uses the legacy `textPayload` format.
        Legacy = 1,
        /// Logging output uses the `jsonPayload` format.
        Json = 2,
    }
    impl LogFormat {
        /// 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 {
                LogFormat::Unspecified => "LOG_FORMAT_UNSPECIFIED",
                LogFormat::Legacy => "LEGACY",
                LogFormat::Json => "JSON",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOG_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
                "LEGACY" => Some(Self::Legacy),
                "JSON" => Some(Self::Json),
                _ => None,
            }
        }
    }
}
/// The metadata management activities of the metastore service.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataManagementActivity {
    /// Output only. The latest metadata exports of the metastore service.
    #[prost(message, repeated, tag = "1")]
    pub metadata_exports: ::prost::alloc::vec::Vec<MetadataExport>,
    /// Output only. The latest restores of the metastore service.
    #[prost(message, repeated, tag = "2")]
    pub restores: ::prost::alloc::vec::Vec<Restore>,
}
/// A metastore resource that imports metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataImport {
    /// Immutable. The relative resource name of the metadata import, of the form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The description of the metadata import.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The time when the metadata import was started.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the metadata import was last updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the metadata import finished.
    #[prost(message, optional, tag = "7")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The current state of the metadata import.
    #[prost(enumeration = "metadata_import::State", tag = "5")]
    pub state: i32,
    /// The metadata to be imported.
    #[prost(oneof = "metadata_import::Metadata", tags = "6")]
    pub metadata: ::core::option::Option<metadata_import::Metadata>,
}
/// Nested message and enum types in `MetadataImport`.
pub mod metadata_import {
    /// A specification of the location of and metadata about a database dump from
    /// a relational database management system.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DatabaseDump {
        /// The type of the database.
        #[deprecated]
        #[prost(enumeration = "database_dump::DatabaseType", tag = "1")]
        pub database_type: i32,
        /// A Cloud Storage object or folder URI that specifies the source from which
        /// to import metadata. It must begin with `gs://`.
        #[prost(string, tag = "2")]
        pub gcs_uri: ::prost::alloc::string::String,
        /// The name of the source database.
        #[deprecated]
        #[prost(string, tag = "3")]
        pub source_database: ::prost::alloc::string::String,
        /// Optional. The type of the database dump. If unspecified, defaults to
        /// `MYSQL`.
        #[prost(enumeration = "super::database_dump_spec::Type", tag = "4")]
        pub r#type: i32,
    }
    /// Nested message and enum types in `DatabaseDump`.
    pub mod database_dump {
        /// The type of the database.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum DatabaseType {
            /// The type of the source database is unknown.
            Unspecified = 0,
            /// The type of the source database is MySQL.
            Mysql = 1,
        }
        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::Unspecified => "DATABASE_TYPE_UNSPECIFIED",
                    DatabaseType::Mysql => "MYSQL",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "DATABASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "MYSQL" => Some(Self::Mysql),
                    _ => None,
                }
            }
        }
    }
    /// The current state of the metadata import.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the metadata import is unknown.
        Unspecified = 0,
        /// The metadata import is running.
        Running = 1,
        /// The metadata import completed successfully.
        Succeeded = 2,
        /// The metadata import is being updated.
        Updating = 3,
        /// The metadata import failed, and attempted metadata changes were rolled
        /// back.
        Failed = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Running => "RUNNING",
                State::Succeeded => "SUCCEEDED",
                State::Updating => "UPDATING",
                State::Failed => "FAILED",
            }
        }
        /// 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),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "UPDATING" => Some(Self::Updating),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
    /// The metadata to be imported.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Metadata {
        /// Immutable. A database dump from a pre-existing metastore's database.
        #[prost(message, tag = "6")]
        DatabaseDump(DatabaseDump),
    }
}
/// The details of a metadata export operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataExport {
    /// Output only. The time when the export started.
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the export ended.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The current state of the export.
    #[prost(enumeration = "metadata_export::State", tag = "3")]
    pub state: i32,
    /// Output only. The type of the database dump.
    #[prost(enumeration = "database_dump_spec::Type", tag = "5")]
    pub database_dump_type: i32,
    #[prost(oneof = "metadata_export::Destination", tags = "4")]
    pub destination: ::core::option::Option<metadata_export::Destination>,
}
/// Nested message and enum types in `MetadataExport`.
pub mod metadata_export {
    /// The current state of the metadata export.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the metadata export is unknown.
        Unspecified = 0,
        /// The metadata export is running.
        Running = 1,
        /// The metadata export completed successfully.
        Succeeded = 2,
        /// The metadata export failed.
        Failed = 3,
        /// The metadata export is cancelled.
        Cancelled = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Running => "RUNNING",
                State::Succeeded => "SUCCEEDED",
                State::Failed => "FAILED",
                State::Cancelled => "CANCELLED",
            }
        }
        /// 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),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                "CANCELLED" => Some(Self::Cancelled),
                _ => None,
            }
        }
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Destination {
        /// Output only. A Cloud Storage URI of a folder that metadata are exported
        /// to, in the form of
        /// `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
        /// `<export_folder>` is automatically generated.
        #[prost(string, tag = "4")]
        DestinationGcsUri(::prost::alloc::string::String),
    }
}
/// The details of a backup resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
    /// Immutable. The relative resource name of the backup, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time when the backup was started.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the backup finished creating.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The current state of the backup.
    #[prost(enumeration = "backup::State", tag = "4")]
    pub state: i32,
    /// Output only. The revision of the service at the time of backup.
    #[prost(message, optional, tag = "5")]
    pub service_revision: ::core::option::Option<Service>,
    /// The description of the backup.
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    /// Output only. Services that are restoring from the backup.
    #[prost(string, repeated, tag = "7")]
    pub restoring_services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Nested message and enum types in `Backup`.
pub mod backup {
    /// The current state of the backup.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the backup is unknown.
        Unspecified = 0,
        /// The backup is being created.
        Creating = 1,
        /// The backup is being deleted.
        Deleting = 2,
        /// The backup is active and ready to use.
        Active = 3,
        /// The backup failed.
        Failed = 4,
        /// The backup is being restored.
        Restoring = 5,
    }
    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::Creating => "CREATING",
                State::Deleting => "DELETING",
                State::Active => "ACTIVE",
                State::Failed => "FAILED",
                State::Restoring => "RESTORING",
            }
        }
        /// 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),
                "CREATING" => Some(Self::Creating),
                "DELETING" => Some(Self::Deleting),
                "ACTIVE" => Some(Self::Active),
                "FAILED" => Some(Self::Failed),
                "RESTORING" => Some(Self::Restoring),
                _ => None,
            }
        }
    }
}
/// The details of a metadata restore operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Restore {
    /// Output only. The time when the restore started.
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the restore ended.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The current state of the restore.
    #[prost(enumeration = "restore::State", tag = "3")]
    pub state: i32,
    /// Output only. The relative resource name of the metastore service backup to
    /// restore from, in the following form:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
    #[prost(string, tag = "4")]
    pub backup: ::prost::alloc::string::String,
    /// Output only. The type of restore.
    #[prost(enumeration = "restore::RestoreType", tag = "5")]
    pub r#type: i32,
    /// Output only. The restore details containing the revision of the service to
    /// be restored to, in format of JSON.
    #[prost(string, tag = "6")]
    pub details: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Restore`.
pub mod restore {
    /// The current state of the restore.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the metadata restore is unknown.
        Unspecified = 0,
        /// The metadata restore is running.
        Running = 1,
        /// The metadata restore completed successfully.
        Succeeded = 2,
        /// The metadata restore failed.
        Failed = 3,
        /// The metadata restore is cancelled.
        Cancelled = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Running => "RUNNING",
                State::Succeeded => "SUCCEEDED",
                State::Failed => "FAILED",
                State::Cancelled => "CANCELLED",
            }
        }
        /// 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),
                "RUNNING" => Some(Self::Running),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                "CANCELLED" => Some(Self::Cancelled),
                _ => None,
            }
        }
    }
    /// The type of restore. If unspecified, defaults to `METADATA_ONLY`.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RestoreType {
        /// The restore type is unknown.
        Unspecified = 0,
        /// The service's metadata and configuration are restored.
        Full = 1,
        /// Only the service's metadata is restored.
        MetadataOnly = 2,
    }
    impl RestoreType {
        /// 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 {
                RestoreType::Unspecified => "RESTORE_TYPE_UNSPECIFIED",
                RestoreType::Full => "FULL",
                RestoreType::MetadataOnly => "METADATA_ONLY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RESTORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "FULL" => Some(Self::Full),
                "METADATA_ONLY" => Some(Self::MetadataOnly),
                _ => None,
            }
        }
    }
}
/// Represents the scaling configuration of a metastore service.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScalingConfig {
    /// Represents either a predetermined instance size or a numeric
    /// scaling factor.
    #[prost(oneof = "scaling_config::ScalingModel", tags = "1, 2")]
    pub scaling_model: ::core::option::Option<scaling_config::ScalingModel>,
}
/// Nested message and enum types in `ScalingConfig`.
pub mod scaling_config {
    /// Metastore instance sizes.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum InstanceSize {
        /// Unspecified instance size
        Unspecified = 0,
        /// Extra small instance size, maps to a scaling factor of 0.1.
        ExtraSmall = 1,
        /// Small instance size, maps to a scaling factor of 0.5.
        Small = 2,
        /// Medium instance size, maps to a scaling factor of 1.0.
        Medium = 3,
        /// Large instance size, maps to a scaling factor of 3.0.
        Large = 4,
        /// Extra large instance size, maps to a scaling factor of 6.0.
        ExtraLarge = 5,
    }
    impl InstanceSize {
        /// 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 {
                InstanceSize::Unspecified => "INSTANCE_SIZE_UNSPECIFIED",
                InstanceSize::ExtraSmall => "EXTRA_SMALL",
                InstanceSize::Small => "SMALL",
                InstanceSize::Medium => "MEDIUM",
                InstanceSize::Large => "LARGE",
                InstanceSize::ExtraLarge => "EXTRA_LARGE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "INSTANCE_SIZE_UNSPECIFIED" => Some(Self::Unspecified),
                "EXTRA_SMALL" => Some(Self::ExtraSmall),
                "SMALL" => Some(Self::Small),
                "MEDIUM" => Some(Self::Medium),
                "LARGE" => Some(Self::Large),
                "EXTRA_LARGE" => Some(Self::ExtraLarge),
                _ => None,
            }
        }
    }
    /// Represents either a predetermined instance size or a numeric
    /// scaling factor.
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum ScalingModel {
        /// An enum of readable instance sizes, with each instance size mapping to a
        /// float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
        #[prost(enumeration = "InstanceSize", tag = "1")]
        InstanceSize(i32),
        /// Scaling factor, increments of 0.1 for values less than 1.0, and
        /// increments of 1.0 for values greater than 1.0.
        #[prost(float, tag = "2")]
        ScalingFactor(f32),
    }
}
/// Request message for
/// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesRequest {
    /// Required. The relative resource name of the location of metastore services
    /// to list, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of services to return. The response may
    /// contain less than the maximum number. If unspecified, no more than 500
    /// services are returned. The maximum value is 1000; values above 1000 are
    /// changed to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
    /// call. Provide this token to retrieve the subsequent page.
    ///
    /// To retrieve the first page, supply an empty page token.
    ///
    /// When paginating, other parameters provided to
    /// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. The filter to apply to list results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Specify the ordering of results as described in [Sorting
    /// Order](<https://cloud.google.com/apis/design/design_patterns#sorting_order>).
    /// If not specified, the results will be sorted in the default order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListServicesResponse {
    /// The services in the specified location.
    #[prost(message, repeated, tag = "1")]
    pub services: ::prost::alloc::vec::Vec<Service>,
    /// A token that 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,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [DataprocMetastore.GetService][google.cloud.metastore.v1beta.DataprocMetastore.GetService].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServiceRequest {
    /// Required. The relative resource name of the metastore service to retrieve,
    /// in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.CreateService][google.cloud.metastore.v1beta.DataprocMetastore.CreateService].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateServiceRequest {
    /// Required. The relative resource name of the location in which to create a
    /// metastore service, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID of the metastore service, which is used as the final
    /// component of the metastore service's name.
    ///
    /// This value must be between 2 and 63 characters long inclusive, begin with a
    /// letter, end with a letter or number, and consist of alpha-numeric
    /// ASCII characters or hyphens.
    #[prost(string, tag = "2")]
    pub service_id: ::prost::alloc::string::String,
    /// Required. The Metastore service to create. The `name` field is
    /// ignored. The ID of the created metastore service must be provided in
    /// the request's `service_id` field.
    #[prost(message, optional, tag = "3")]
    pub service: ::core::option::Option<Service>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.UpdateService][google.cloud.metastore.v1beta.DataprocMetastore.UpdateService].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateServiceRequest {
    /// Required. A field mask used to specify the fields to be overwritten in the
    /// metastore service resource by the update.
    /// Fields specified in the `update_mask` are relative to the resource (not
    /// to the full request). A field is overwritten if it is in the mask.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The metastore service to update. The server only merges fields
    /// in the service if they are specified in `update_mask`.
    ///
    /// The metastore service's `name` field is used to identify the metastore
    /// service to be updated.
    #[prost(message, optional, tag = "2")]
    pub service: ::core::option::Option<Service>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.DeleteService][google.cloud.metastore.v1beta.DataprocMetastore.DeleteService].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteServiceRequest {
    /// Required. The relative resource name of the metastore service to delete, in
    /// the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMetadataImportsRequest {
    /// Required. The relative resource name of the service whose metadata imports
    /// to list, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of imports to return. The response may contain
    /// less than the maximum number. If unspecified, no more than 500 imports are
    /// returned. The maximum value is 1000; values above 1000 are changed to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
    /// call. Provide this token to retrieve the subsequent page.
    ///
    /// To retrieve the first page, supply an empty page token.
    ///
    /// When paginating, other parameters provided to
    /// [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. The filter to apply to list results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Specify the ordering of results as described in [Sorting
    /// Order](<https://cloud.google.com/apis/design/design_patterns#sorting_order>).
    /// If not specified, the results will be sorted in the default order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1beta.DataprocMetastore.ListMetadataImports].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMetadataImportsResponse {
    /// The imports in the specified service.
    #[prost(message, repeated, tag = "1")]
    pub metadata_imports: ::prost::alloc::vec::Vec<MetadataImport>,
    /// A token that 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,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.GetMetadataImport].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetadataImportRequest {
    /// Required. The relative resource name of the metadata import to retrieve, in
    /// the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.CreateMetadataImport].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMetadataImportRequest {
    /// Required. The relative resource name of the service in which to create a
    /// metastore import, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID of the metadata import, which is used as the final
    /// component of the metadata import's name.
    ///
    /// This value must be between 1 and 64 characters long, begin with a letter,
    /// end with a letter or number, and consist of alpha-numeric ASCII characters
    /// or hyphens.
    #[prost(string, tag = "2")]
    pub metadata_import_id: ::prost::alloc::string::String,
    /// Required. The metadata import to create. The `name` field is ignored. The
    /// ID of the created metadata import must be provided in the request's
    /// `metadata_import_id` field.
    #[prost(message, optional, tag = "3")]
    pub metadata_import: ::core::option::Option<MetadataImport>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1beta.DataprocMetastore.UpdateMetadataImport].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMetadataImportRequest {
    /// Required. A field mask used to specify the fields to be overwritten in the
    /// metadata import resource by the update.
    /// Fields specified in the `update_mask` are relative to the resource (not
    /// to the full request). A field is overwritten if it is in the mask.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The metadata import to update. The server only merges fields
    /// in the import if they are specified in `update_mask`.
    ///
    /// The metadata import's `name` field is used to identify the metastore
    /// import to be updated.
    #[prost(message, optional, tag = "2")]
    pub metadata_import: ::core::option::Option<MetadataImport>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
    /// Required. The relative resource name of the service whose backups to
    /// list, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of backups to return. The response may contain
    /// less than the maximum number. If unspecified, no more than 500 backups are
    /// returned. The maximum value is 1000; values above 1000 are changed to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
    /// call. Provide this token to retrieve the subsequent page.
    ///
    /// To retrieve the first page, supply an empty page token.
    ///
    /// When paginating, other parameters provided to
    /// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
    /// must match the call that provided the page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. The filter to apply to list results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Specify the ordering of results as described in [Sorting
    /// Order](<https://cloud.google.com/apis/design/design_patterns#sorting_order>).
    /// If not specified, the results will be sorted in the default order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
    /// The backups of the specified service.
    #[prost(message, repeated, tag = "1")]
    pub backups: ::prost::alloc::vec::Vec<Backup>,
    /// A token that 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,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for
/// [DataprocMetastore.GetBackup][google.cloud.metastore.v1beta.DataprocMetastore.GetBackup].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
    /// Required. The relative resource name of the backup to retrieve, in the
    /// following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.CreateBackup][google.cloud.metastore.v1beta.DataprocMetastore.CreateBackup].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupRequest {
    /// Required. The relative resource name of the service in which to create a
    /// backup of the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID of the backup, which is used as the final component of the
    /// backup's name.
    ///
    /// This value must be between 1 and 64 characters long, begin with a letter,
    /// end with a letter or number, and consist of alpha-numeric ASCII characters
    /// or hyphens.
    #[prost(string, tag = "2")]
    pub backup_id: ::prost::alloc::string::String,
    /// Required. The backup to create. The `name` field is ignored. The ID of the
    /// created backup must be provided in the request's `backup_id` field.
    #[prost(message, optional, tag = "3")]
    pub backup: ::core::option::Option<Backup>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1beta.DataprocMetastore.DeleteBackup].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupRequest {
    /// Required. The relative resource name of the backup to delete, in the
    /// following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for
/// [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1beta.DataprocMetastore.ExportMetadata].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportMetadataRequest {
    /// Required. The relative resource name of the metastore service to run
    /// export, in the following form:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub service: ::prost::alloc::string::String,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>).
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
    /// Optional. The type of the database dump. If unspecified, defaults to
    /// `MYSQL`.
    #[prost(enumeration = "database_dump_spec::Type", tag = "4")]
    pub database_dump_type: i32,
    /// Required. Destination that metadata is exported to.
    #[prost(oneof = "export_metadata_request::Destination", tags = "2")]
    pub destination: ::core::option::Option<export_metadata_request::Destination>,
}
/// Nested message and enum types in `ExportMetadataRequest`.
pub mod export_metadata_request {
    /// Required. Destination that metadata is exported to.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Destination {
        /// A Cloud Storage URI of a folder, in the format
        /// `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
        /// `<export_folder>` containing exported files will be created below it.
        #[prost(string, tag = "2")]
        DestinationGcsFolder(::prost::alloc::string::String),
    }
}
/// Request message for [DataprocMetastore.Restore][].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreServiceRequest {
    /// Required. The relative resource name of the metastore service to run
    /// restore, in the following form:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub service: ::prost::alloc::string::String,
    /// Required. The relative resource name of the metastore service backup to
    /// restore from, in the following form:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
    #[prost(string, tag = "2")]
    pub backup: ::prost::alloc::string::String,
    /// Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
    #[prost(enumeration = "restore::RestoreType", tag = "3")]
    pub restore_type: i32,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>).
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Represents the metadata of a long-running operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Output only. Identifies whether the caller has requested cancellation
    /// of the operation. Operations that have successfully been cancelled
    /// have [Operation.error][] value with a
    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
    /// `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// Metadata about the service in a location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationMetadata {
    /// The versions of Hive Metastore that can be used when creating a new
    /// metastore service in this location. The server guarantees that exactly one
    /// `HiveMetastoreVersion` in the list will set `is_default`.
    #[prost(message, repeated, tag = "1")]
    pub supported_hive_metastore_versions: ::prost::alloc::vec::Vec<
        location_metadata::HiveMetastoreVersion,
    >,
}
/// Nested message and enum types in `LocationMetadata`.
pub mod location_metadata {
    /// A specification of a supported version of the Hive Metastore software.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct HiveMetastoreVersion {
        /// The semantic version of the Hive Metastore software.
        #[prost(string, tag = "1")]
        pub version: ::prost::alloc::string::String,
        /// Whether `version` will be chosen by the server if a metastore service is
        /// created with a `HiveMetastoreConfig` that omits the `version`.
        #[prost(bool, tag = "2")]
        pub is_default: bool,
    }
}
/// The specification of database dump to import from or export to.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DatabaseDumpSpec {}
/// Nested message and enum types in `DatabaseDumpSpec`.
pub mod database_dump_spec {
    /// The type of the database dump.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// The type of the database dump is unknown.
        Unspecified = 0,
        /// Database dump is a MySQL dump file.
        Mysql = 1,
        /// Database dump contains Avro files.
        Avro = 2,
    }
    impl Type {
        /// 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 {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Mysql => "MYSQL",
                Type::Avro => "AVRO",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "MYSQL" => Some(Self::Mysql),
                "AVRO" => Some(Self::Avro),
                _ => None,
            }
        }
    }
}
/// Request message for
/// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveIamPolicyRequest {
    /// Required. The relative resource name of the dataplane resource to remove
    /// IAM policy, in the following form:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
    /// or
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    /// Optional. Removes IAM policy attached to database or table asynchronously
    /// when it is set. The default is false.
    #[prost(bool, tag = "2")]
    pub asynchronous: bool,
}
/// Response message for
/// [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1beta.DataprocMetastore.RemoveIamPolicy].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RemoveIamPolicyResponse {
    /// True if the policy is successfully removed.
    #[prost(bool, tag = "1")]
    pub success: bool,
}
/// Request message for
/// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryMetadataRequest {
    /// Required. The relative resource name of the metastore service to query
    /// metadata, in the following format:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub service: ::prost::alloc::string::String,
    /// Required. A read-only SQL query to execute against the metadata database.
    /// The query cannot change or mutate the data.
    #[prost(string, tag = "2")]
    pub query: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryMetadataResponse {
    /// The manifest URI  is link to a JSON instance in Cloud Storage.
    /// This instance manifests immediately along with QueryMetadataResponse. The
    /// content of the URI is not retriable until the long-running operation query
    /// against the metadata finishes.
    #[prost(string, tag = "1")]
    pub result_manifest_uri: ::prost::alloc::string::String,
}
/// Error details in public error message for
/// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorDetails {
    /// Additional structured details about this error.
    ///
    /// Keys define the failure items.
    /// Value describes the exception or details of the item.
    #[prost(btree_map = "string, string", tag = "1")]
    pub details: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Request message for
/// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveTableToDatabaseRequest {
    /// Required. The relative resource name of the metastore service to mutate
    /// metadata, in the following format:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub service: ::prost::alloc::string::String,
    /// Required. The name of the table to be moved.
    #[prost(string, tag = "2")]
    pub table_name: ::prost::alloc::string::String,
    /// Required. The name of the database where the table resides.
    #[prost(string, tag = "3")]
    pub db_name: ::prost::alloc::string::String,
    /// Required. The name of the database where the table should be moved.
    #[prost(string, tag = "4")]
    pub destination_db_name: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MoveTableToDatabaseResponse {}
/// Request message for
/// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterMetadataResourceLocationRequest {
    /// Required. The relative resource name of the metastore service to mutate
    /// metadata, in the following format:
    ///
    /// `projects/{project_id}/locations/{location_id}/services/{service_id}`.
    #[prost(string, tag = "1")]
    pub service: ::prost::alloc::string::String,
    /// Required. The relative metadata resource name in the following format.
    ///
    /// `databases/{database_id}`
    /// or
    /// `databases/{database_id}/tables/{table_id}`
    /// or
    /// `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
    #[prost(string, tag = "2")]
    pub resource_name: ::prost::alloc::string::String,
    /// Required. The new location URI for the metadata resource.
    #[prost(string, tag = "3")]
    pub location_uri: ::prost::alloc::string::String,
}
/// Response message for
/// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1beta.DataprocMetastore.AlterMetadataResourceLocation].
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterMetadataResourceLocationResponse {}
/// Generated client implementations.
pub mod dataproc_metastore_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Configures and manages metastore services.
    /// Metastore services are fully managed, highly available, autoscaled,
    /// autohealing, OSS-native deployments of technical metadata management
    /// software. Each metastore service exposes a network endpoint through which
    /// metadata queries are served. Metadata queries can originate from a variety
    /// of sources, including Apache Hive, Apache Presto, and Apache Spark.
    ///
    /// The Dataproc Metastore API defines the following resource model:
    ///
    /// * The service works with a collection of Google Cloud projects, named:
    /// `/projects/*`
    /// * Each project has a collection of available locations, named: `/locations/*`
    ///   (a location must refer to a Google Cloud `region`)
    /// * Each location has a collection of services, named: `/services/*`
    /// * Dataproc Metastore services are resources with names of the form:
    ///
    ///   `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
    #[derive(Debug, Clone)]
    pub struct DataprocMetastoreClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DataprocMetastoreClient<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,
        ) -> DataprocMetastoreClient<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,
        {
            DataprocMetastoreClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists services in a project and location.
        pub async fn list_services(
            &mut self,
            request: impl tonic::IntoRequest<super::ListServicesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListServicesResponse>,
            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.metastore.v1beta.DataprocMetastore/ListServices",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "ListServices",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a single service.
        pub async fn get_service(
            &mut self,
            request: impl tonic::IntoRequest<super::GetServiceRequest>,
        ) -> std::result::Result<tonic::Response<super::Service>, 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.metastore.v1beta.DataprocMetastore/GetService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "GetService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a metastore service in a project and location.
        pub async fn create_service(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateServiceRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/CreateService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "CreateService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single service.
        pub async fn update_service(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateServiceRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/UpdateService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "UpdateService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single service.
        pub async fn delete_service(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteServiceRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/DeleteService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "DeleteService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists imports in a service.
        pub async fn list_metadata_imports(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMetadataImportsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMetadataImportsResponse>,
            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.metastore.v1beta.DataprocMetastore/ListMetadataImports",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "ListMetadataImports",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single import.
        pub async fn get_metadata_import(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMetadataImportRequest>,
        ) -> std::result::Result<tonic::Response<super::MetadataImport>, 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.metastore.v1beta.DataprocMetastore/GetMetadataImport",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "GetMetadataImport",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new MetadataImport in a given project and location.
        pub async fn create_metadata_import(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMetadataImportRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/CreateMetadataImport",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "CreateMetadataImport",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a single import.
        /// Only the description field of MetadataImport is supported to be updated.
        pub async fn update_metadata_import(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMetadataImportRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/UpdateMetadataImport",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "UpdateMetadataImport",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Exports metadata from a service.
        pub async fn export_metadata(
            &mut self,
            request: impl tonic::IntoRequest<super::ExportMetadataRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/ExportMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "ExportMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Restores a service from a backup.
        pub async fn restore_service(
            &mut self,
            request: impl tonic::IntoRequest<super::RestoreServiceRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/RestoreService",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "RestoreService",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists backups in a service.
        pub async fn list_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBackupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBackupsResponse>,
            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.metastore.v1beta.DataprocMetastore/ListBackups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "ListBackups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single backup.
        pub async fn get_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBackupRequest>,
        ) -> std::result::Result<tonic::Response<super::Backup>, 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.metastore.v1beta.DataprocMetastore/GetBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "GetBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new backup in a given project and location.
        pub async fn create_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateBackupRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/CreateBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "CreateBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single backup.
        pub async fn delete_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/DeleteBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "DeleteBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Removes the attached IAM policies for a resource
        pub async fn remove_iam_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::RemoveIamPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RemoveIamPolicyResponse>,
            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.metastore.v1beta.DataprocMetastore/RemoveIamPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "RemoveIamPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Query DPMS metadata.
        pub async fn query_metadata(
            &mut self,
            request: impl tonic::IntoRequest<super::QueryMetadataRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/QueryMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "QueryMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Move a table to another database.
        pub async fn move_table_to_database(
            &mut self,
            request: impl tonic::IntoRequest<super::MoveTableToDatabaseRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/MoveTableToDatabase",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "MoveTableToDatabase",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Alter metadata resource location. The metadata resource can be a database,
        /// table, or partition. This functionality only updates the parent directory
        /// for the respective metadata resource and does not transfer any existing
        /// data to the new location.
        pub async fn alter_metadata_resource_location(
            &mut self,
            request: impl tonic::IntoRequest<super::AlterMetadataResourceLocationRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastore",
                        "AlterMetadataResourceLocation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Represents a federation of multiple backend metastores.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Federation {
    /// Immutable. The relative resource name of the federation, of the
    /// form:
    /// projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time when the metastore federation was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the metastore federation was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels for the metastore federation.
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Immutable. The Apache Hive metastore version of the federation. All backend
    /// metastore versions must be compatible with the federation version.
    #[prost(string, tag = "5")]
    pub version: ::prost::alloc::string::String,
    /// A map from `BackendMetastore` rank to `BackendMetastore`s from which the
    /// federation service serves metadata at query time. The map key represents
    /// the order in which `BackendMetastore`s should be evaluated to resolve
    /// database names at query time and should be greater than or equal to zero. A
    /// `BackendMetastore` with a lower number will be evaluated before a
    /// `BackendMetastore` with a higher number.
    #[prost(btree_map = "int32, message", tag = "6")]
    pub backend_metastores: ::prost::alloc::collections::BTreeMap<i32, BackendMetastore>,
    /// Output only. The federation endpoint.
    #[prost(string, tag = "7")]
    pub endpoint_uri: ::prost::alloc::string::String,
    /// Output only. The current state of the federation.
    #[prost(enumeration = "federation::State", tag = "8")]
    pub state: i32,
    /// Output only. Additional information about the current state of the
    /// metastore federation, if available.
    #[prost(string, tag = "9")]
    pub state_message: ::prost::alloc::string::String,
    /// Output only. The globally unique resource identifier of the metastore
    /// federation.
    #[prost(string, tag = "10")]
    pub uid: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Federation`.
pub mod federation {
    /// The current state of the federation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The state of the metastore federation is unknown.
        Unspecified = 0,
        /// The metastore federation is in the process of being created.
        Creating = 1,
        /// The metastore federation is running and ready to serve queries.
        Active = 2,
        /// The metastore federation is being updated. It remains usable but cannot
        /// accept additional update requests or be deleted at this time.
        Updating = 3,
        /// The metastore federation is undergoing deletion. It cannot be used.
        Deleting = 4,
        /// The metastore federation has encountered an error and cannot be used. The
        /// metastore federation should be deleted.
        Error = 5,
    }
    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::Creating => "CREATING",
                State::Active => "ACTIVE",
                State::Updating => "UPDATING",
                State::Deleting => "DELETING",
                State::Error => "ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATING" => Some(Self::Creating),
                "ACTIVE" => Some(Self::Active),
                "UPDATING" => Some(Self::Updating),
                "DELETING" => Some(Self::Deleting),
                "ERROR" => Some(Self::Error),
                _ => None,
            }
        }
    }
}
/// Represents a backend metastore for the federation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackendMetastore {
    /// The relative resource name of the metastore that is being federated.
    /// The formats of the relative resource names for the currently supported
    /// metastores are listed below:
    ///
    /// * BigQuery
    ///      * `projects/{project_id}`
    /// * Dataproc Metastore
    ///      * `projects/{project_id}/locations/{location}/services/{service_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The type of the backend metastore.
    #[prost(enumeration = "backend_metastore::MetastoreType", tag = "2")]
    pub metastore_type: i32,
}
/// Nested message and enum types in `BackendMetastore`.
pub mod backend_metastore {
    /// The type of the backend metastore.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MetastoreType {
        /// The metastore type is not set.
        Unspecified = 0,
        /// The backend metastore is Dataplex.
        Dataplex = 1,
        /// The backend metastore is BigQuery.
        Bigquery = 2,
        /// The backend metastore is Dataproc Metastore.
        DataprocMetastore = 3,
    }
    impl MetastoreType {
        /// 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 {
                MetastoreType::Unspecified => "METASTORE_TYPE_UNSPECIFIED",
                MetastoreType::Dataplex => "DATAPLEX",
                MetastoreType::Bigquery => "BIGQUERY",
                MetastoreType::DataprocMetastore => "DATAPROC_METASTORE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "METASTORE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "DATAPLEX" => Some(Self::Dataplex),
                "BIGQUERY" => Some(Self::Bigquery),
                "DATAPROC_METASTORE" => Some(Self::DataprocMetastore),
                _ => None,
            }
        }
    }
}
/// Request message for ListFederations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFederationsRequest {
    /// Required. The relative resource name of the location of metastore
    /// federations to list, in the following form:
    /// `projects/{project_number}/locations/{location_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of federations to return. The response may
    /// contain less than the maximum number. If unspecified, no more than 500
    /// services are returned. The maximum value is 1000; values above 1000 are
    /// changed to 1000.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous ListFederationServices
    /// call. Provide this token to retrieve the subsequent page.
    ///
    /// To retrieve the first page, supply an empty page token.
    ///
    /// When paginating, other parameters provided to
    /// ListFederationServices must match the call that provided the
    /// page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. The filter to apply to list results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Specify the ordering of results as described in [Sorting
    /// Order](<https://cloud.google.com/apis/design/design_patterns#sorting_order>).
    /// If not specified, the results will be sorted in the default order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for ListFederations
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFederationsResponse {
    /// The services in the specified location.
    #[prost(message, repeated, tag = "1")]
    pub federations: ::prost::alloc::vec::Vec<Federation>,
    /// A token that 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,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request message for GetFederation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFederationRequest {
    /// Required. The relative resource name of the metastore federation to
    /// retrieve, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for CreateFederation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFederationRequest {
    /// Required. The relative resource name of the location in which to create a
    /// federation service, in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID of the metastore federation, which is used as the final
    /// component of the metastore federation's name.
    ///
    /// This value must be between 2 and 63 characters long inclusive, begin with a
    /// letter, end with a letter or number, and consist of alpha-numeric
    /// ASCII characters or hyphens.
    #[prost(string, tag = "2")]
    pub federation_id: ::prost::alloc::string::String,
    /// Required. The Metastore Federation to create. The `name` field is
    /// ignored. The ID of the created metastore federation must be
    /// provided in the request's `federation_id` field.
    #[prost(message, optional, tag = "3")]
    pub federation: ::core::option::Option<Federation>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for UpdateFederation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFederationRequest {
    /// Required. A field mask used to specify the fields to be overwritten in the
    /// metastore federation resource by the update.
    /// Fields specified in the `update_mask` are relative to the resource (not
    /// to the full request). A field is overwritten if it is in the mask.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The metastore federation to update. The server only merges fields
    /// in the service if they are specified in `update_mask`.
    ///
    /// The metastore federation's `name` field is used to identify the
    /// metastore service to be updated.
    #[prost(message, optional, tag = "2")]
    pub federation: ::core::option::Option<Federation>,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for DeleteFederation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFederationRequest {
    /// Required. The relative resource name of the metastore federation to delete,
    /// in the following form:
    ///
    /// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID. Specify a unique request ID to allow the server to
    /// ignore the request if it has completed. The server will ignore subsequent
    /// requests that provide a duplicate request ID for at least 60 minutes after
    /// the first request.
    ///
    /// For example, if an initial request times out, followed by another request
    /// with the same request ID, the server ignores the second request to prevent
    /// the creation of duplicate commitments.
    ///
    /// The request ID must be a valid
    /// [UUID](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>)
    /// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod dataproc_metastore_federation_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Configures and manages metastore federation services.
    /// Dataproc Metastore Federation Service allows federating a collection of
    /// backend metastores like BigQuery, Dataplex Lakes, and other Dataproc
    /// Metastores. The Federation Service exposes a gRPC URL through which metadata
    /// from the backend metastores are served at query time.
    ///
    /// The Dataproc Metastore Federation API defines the following resource model:
    /// * The service works with a collection of Google Cloud projects.
    /// * Each project has a collection of available locations.
    /// * Each location has a collection of federations.
    /// * Dataproc Metastore Federations are resources with names of the
    /// form:
    /// `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
    #[derive(Debug, Clone)]
    pub struct DataprocMetastoreFederationClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> DataprocMetastoreFederationClient<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,
        ) -> DataprocMetastoreFederationClient<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,
        {
            DataprocMetastoreFederationClient::new(
                InterceptedService::new(inner, interceptor),
            )
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists federations in a project and location.
        pub async fn list_federations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListFederationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListFederationsResponse>,
            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.metastore.v1beta.DataprocMetastoreFederation/ListFederations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastoreFederation",
                        "ListFederations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a single federation.
        pub async fn get_federation(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFederationRequest>,
        ) -> std::result::Result<tonic::Response<super::Federation>, 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.metastore.v1beta.DataprocMetastoreFederation/GetFederation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastoreFederation",
                        "GetFederation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a metastore federation in a project and location.
        pub async fn create_federation(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateFederationRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastoreFederation/CreateFederation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastoreFederation",
                        "CreateFederation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the fields of a federation.
        pub async fn update_federation(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateFederationRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastoreFederation",
                        "UpdateFederation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single federation.
        pub async fn delete_federation(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteFederationRequest>,
        ) -> 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.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.metastore.v1beta.DataprocMetastoreFederation",
                        "DeleteFederation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}