yandex-cloud 2025.4.14

Generated gRPC clients for the Yandex Cloud API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
/// A ClickHouse Backup resource. See the [Developer's Guide](/docs/managed-clickhouse/concepts)
/// for more information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
    /// ID of the backup.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the folder that the backup belongs to.
    #[prost(string, tag = "2")]
    pub folder_id: ::prost::alloc::string::String,
    /// Creation timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format
    /// (i.e. when the backup operation was completed).
    #[prost(message, optional, tag = "3")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// ID of the ClickHouse cluster that the backup was created for.
    #[prost(string, tag = "4")]
    pub source_cluster_id: ::prost::alloc::string::String,
    /// Names of the shards included in the backup.
    #[prost(string, repeated, tag = "6")]
    pub source_shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Time when the backup operation was started.
    #[prost(message, optional, tag = "5")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Size of backup in bytes.
    #[prost(int64, tag = "7")]
    pub size: i64,
    /// How this backup was created (manual/automatic/etc...).
    #[prost(enumeration = "backup::BackupType", tag = "8")]
    pub r#type: i32,
}
/// Nested message and enum types in `Backup`.
pub mod backup {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum BackupType {
        Unspecified = 0,
        /// Backup created by automated daily schedule.
        Automated = 1,
        /// Backup created by user request.
        Manual = 2,
    }
    impl BackupType {
        /// 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 {
                BackupType::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
                BackupType::Automated => "AUTOMATED",
                BackupType::Manual => "MANUAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "AUTOMATED" => Some(Self::Automated),
                "MANUAL" => Some(Self::Manual),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
    /// ID of the backup to return information about.
    /// To get the backup ID, use a \[ClusterService.ListBackups\] request.
    #[prost(string, tag = "1")]
    pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
    /// ID of the folder to list backups in.
    /// To get the folder ID, use a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
    #[prost(string, tag = "1")]
    pub folder_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListBackupsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set \[page_token\] to the \[ListBackupsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
    /// List of Backup resources.
    #[prost(message, repeated, tag = "1")]
    pub backups: ::prost::alloc::vec::Vec<Backup>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListBackupsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListBackupsRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupRequest {
    /// Required. ID of the backup to delete.
    #[prost(string, tag = "1")]
    pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupMetadata {
    /// Required. ID of the ClickHouse backup that is currently being deleted.
    #[prost(string, tag = "1")]
    pub backup_id: ::prost::alloc::string::String,
    /// ID of the ClickHouse backup that is being deleted.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod backup_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ClickHouse Backup resources.
    #[derive(Debug, Clone)]
    pub struct BackupServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl BackupServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> BackupServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> BackupServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            BackupServiceClient::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
        }
        /// Returns the specified ClickHouse Backup resource.
        ///
        /// To get the list of available ClickHouse Backup resources, make a [List] request.
        pub async fn get(
            &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(
                "/yandex.cloud.mdb.clickhouse.v1.BackupService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.BackupService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of Backup resources available for the specified folder.
        pub async fn list(
            &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(
                "/yandex.cloud.mdb.clickhouse.v1.BackupService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.BackupService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified ClickHouse Backup.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.BackupService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.BackupService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// A maintenance window settings.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
    /// The maintenance policy in effect.
    #[prost(oneof = "maintenance_window::Policy", tags = "1, 2")]
    pub policy: ::core::option::Option<maintenance_window::Policy>,
}
/// Nested message and enum types in `MaintenanceWindow`.
pub mod maintenance_window {
    /// The maintenance policy in effect.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Policy {
        /// Maintenance operation can be scheduled anytime.
        #[prost(message, tag = "1")]
        Anytime(super::AnytimeMaintenanceWindow),
        /// Maintenance operation can be scheduled on a weekly basis.
        #[prost(message, tag = "2")]
        WeeklyMaintenanceWindow(super::WeeklyMaintenanceWindow),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnytimeMaintenanceWindow {}
/// Weelky maintenance window settings.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeeklyMaintenanceWindow {
    /// Day of the week (in `DDD` format).
    #[prost(enumeration = "weekly_maintenance_window::WeekDay", tag = "1")]
    pub day: i32,
    /// Hour of the day in UTC (in `HH` format).
    #[prost(int64, tag = "2")]
    pub hour: i64,
}
/// Nested message and enum types in `WeeklyMaintenanceWindow`.
pub mod weekly_maintenance_window {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum WeekDay {
        Unspecified = 0,
        Mon = 1,
        Tue = 2,
        Wed = 3,
        Thu = 4,
        Fri = 5,
        Sat = 6,
        Sun = 7,
    }
    impl WeekDay {
        /// 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 {
                WeekDay::Unspecified => "WEEK_DAY_UNSPECIFIED",
                WeekDay::Mon => "MON",
                WeekDay::Tue => "TUE",
                WeekDay::Wed => "WED",
                WeekDay::Thu => "THU",
                WeekDay::Fri => "FRI",
                WeekDay::Sat => "SAT",
                WeekDay::Sun => "SUN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "WEEK_DAY_UNSPECIFIED" => Some(Self::Unspecified),
                "MON" => Some(Self::Mon),
                "TUE" => Some(Self::Tue),
                "WED" => Some(Self::Wed),
                "THU" => Some(Self::Thu),
                "FRI" => Some(Self::Fri),
                "SAT" => Some(Self::Sat),
                "SUN" => Some(Self::Sun),
                _ => None,
            }
        }
    }
}
/// A planned maintenance operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceOperation {
    /// Information about this maintenance operation.
    #[prost(string, tag = "1")]
    pub info: ::prost::alloc::string::String,
    /// Time until which this maintenance operation is delayed.
    #[prost(message, optional, tag = "2")]
    pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
/// A ClickHouse Cluster resource. For more information, see the
/// \[Cluster\](/docs/managed-clickhouse/concepts) section in the Developer's Guide.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
    /// ID of the ClickHouse cluster.
    /// This ID is assigned by MDB at creation time.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the folder that the ClickHouse cluster belongs to.
    #[prost(string, tag = "2")]
    pub folder_id: ::prost::alloc::string::String,
    /// Creation timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
    #[prost(message, optional, tag = "3")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Name of the ClickHouse cluster.
    /// The name is unique within the folder. 1-63 characters long.
    #[prost(string, tag = "4")]
    pub name: ::prost::alloc::string::String,
    /// Description of the ClickHouse cluster. 0-256 characters long.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
    #[prost(map = "string, string", tag = "6")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Deployment environment of the ClickHouse cluster.
    #[prost(enumeration = "cluster::Environment", tag = "7")]
    pub environment: i32,
    /// Description of monitoring systems relevant to the ClickHouse cluster.
    #[prost(message, repeated, tag = "8")]
    pub monitoring: ::prost::alloc::vec::Vec<Monitoring>,
    /// Configuration of the ClickHouse cluster.
    #[prost(message, optional, tag = "9")]
    pub config: ::core::option::Option<ClusterConfig>,
    /// ID of the network that the cluster belongs to.
    #[prost(string, tag = "10")]
    pub network_id: ::prost::alloc::string::String,
    /// Aggregated cluster health.
    #[prost(enumeration = "cluster::Health", tag = "11")]
    pub health: i32,
    /// Current state of the cluster.
    #[prost(enumeration = "cluster::Status", tag = "12")]
    pub status: i32,
    /// ID of the service account used for access to Object Storage.
    #[prost(string, tag = "13")]
    pub service_account_id: ::prost::alloc::string::String,
    /// Maintenance window for the cluster.
    #[prost(message, optional, tag = "14")]
    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
    /// Planned maintenance operation to be started for the cluster within the nearest \[maintenance_window\].
    #[prost(message, optional, tag = "15")]
    pub planned_operation: ::core::option::Option<MaintenanceOperation>,
    /// User security groups
    #[prost(string, repeated, tag = "16")]
    pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Deletion Protection inhibits deletion of the cluster
    #[prost(bool, tag = "17")]
    pub deletion_protection: bool,
}
/// Nested message and enum types in `Cluster`.
pub mod cluster {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Environment {
        Unspecified = 0,
        /// Stable environment with a conservative update policy:
        /// only hotfixes are applied during regular maintenance.
        Production = 1,
        /// Environment with more aggressive update policy: new versions
        /// are rolled out irrespective of backward compatibility.
        Prestable = 2,
    }
    impl Environment {
        /// 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 {
                Environment::Unspecified => "ENVIRONMENT_UNSPECIFIED",
                Environment::Production => "PRODUCTION",
                Environment::Prestable => "PRESTABLE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
                "PRODUCTION" => Some(Self::Production),
                "PRESTABLE" => Some(Self::Prestable),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Health {
        /// State of the cluster is unknown (\[Host.health\] for every host in the cluster is UNKNOWN).
        Unknown = 0,
        /// Cluster is alive and well (\[Host.health\] for every host in the cluster is ALIVE).
        Alive = 1,
        /// Cluster is inoperable (\[Host.health\] for every host in the cluster is DEAD).
        Dead = 2,
        /// Cluster is working below capacity (\[Host.health\] for at least one host in the cluster is not ALIVE).
        Degraded = 3,
    }
    impl Health {
        /// 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 {
                Health::Unknown => "HEALTH_UNKNOWN",
                Health::Alive => "ALIVE",
                Health::Dead => "DEAD",
                Health::Degraded => "DEGRADED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "HEALTH_UNKNOWN" => Some(Self::Unknown),
                "ALIVE" => Some(Self::Alive),
                "DEAD" => Some(Self::Dead),
                "DEGRADED" => Some(Self::Degraded),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Status {
        /// Cluster state is unknown.
        Unknown = 0,
        /// Cluster is being created.
        Creating = 1,
        /// Cluster is running normally.
        Running = 2,
        /// Cluster encountered a problem and cannot operate.
        Error = 3,
        /// Cluster is being updated.
        Updating = 4,
        /// Cluster is stopping.
        Stopping = 5,
        /// Cluster stopped.
        Stopped = 6,
        /// Cluster is starting.
        Starting = 7,
    }
    impl Status {
        /// 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 {
                Status::Unknown => "STATUS_UNKNOWN",
                Status::Creating => "CREATING",
                Status::Running => "RUNNING",
                Status::Error => "ERROR",
                Status::Updating => "UPDATING",
                Status::Stopping => "STOPPING",
                Status::Stopped => "STOPPED",
                Status::Starting => "STARTING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATUS_UNKNOWN" => Some(Self::Unknown),
                "CREATING" => Some(Self::Creating),
                "RUNNING" => Some(Self::Running),
                "ERROR" => Some(Self::Error),
                "UPDATING" => Some(Self::Updating),
                "STOPPING" => Some(Self::Stopping),
                "STOPPED" => Some(Self::Stopped),
                "STARTING" => Some(Self::Starting),
                _ => None,
            }
        }
    }
}
/// Monitoring system metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Monitoring {
    /// Name of the monitoring system.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Description of the monitoring system.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Link to the monitoring system charts for the ClickHouse cluster.
    #[prost(string, tag = "3")]
    pub link: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterConfig {
    /// Version of the ClickHouse server software.
    #[prost(string, tag = "1")]
    pub version: ::prost::alloc::string::String,
    /// Configuration and resource allocation for ClickHouse hosts.
    #[prost(message, optional, tag = "2")]
    pub clickhouse: ::core::option::Option<cluster_config::Clickhouse>,
    /// Configuration and resource allocation for ZooKeeper hosts.
    #[prost(message, optional, tag = "3")]
    pub zookeeper: ::core::option::Option<cluster_config::Zookeeper>,
    /// Time to start the daily backup, in the UTC timezone.
    #[prost(message, optional, tag = "4")]
    pub backup_window_start: ::core::option::Option<
        super::super::super::super::super::google::r#type::TimeOfDay,
    >,
    /// Access policy for external services.
    #[prost(message, optional, tag = "5")]
    pub access: ::core::option::Option<Access>,
    #[prost(message, optional, tag = "6")]
    pub cloud_storage: ::core::option::Option<CloudStorage>,
    /// Whether database management through SQL commands is enabled.
    #[prost(message, optional, tag = "7")]
    pub sql_database_management: ::core::option::Option<bool>,
    /// Whether user management through SQL commands is enabled.
    #[prost(message, optional, tag = "8")]
    pub sql_user_management: ::core::option::Option<bool>,
    /// Whether cluster should use embedded Keeper instead of Zookeeper.
    #[prost(message, optional, tag = "9")]
    pub embedded_keeper: ::core::option::Option<bool>,
    /// Retain period of automatically created backup in days
    #[prost(message, optional, tag = "10")]
    pub backup_retain_period_days: ::core::option::Option<i64>,
}
/// Nested message and enum types in `ClusterConfig`.
pub mod cluster_config {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Clickhouse {
        /// Configuration settings of a ClickHouse server.
        #[prost(message, optional, tag = "1")]
        pub config: ::core::option::Option<super::config::ClickhouseConfigSet>,
        /// Resources allocated to ClickHouse hosts.
        #[prost(message, optional, tag = "2")]
        pub resources: ::core::option::Option<super::Resources>,
    }
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Zookeeper {
        /// Resources allocated to ZooKeeper hosts.
        #[prost(message, optional, tag = "1")]
        pub resources: ::core::option::Option<super::Resources>,
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shard {
    /// Name of the shard.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the cluster that the shard belongs to.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Configuration of the shard.
    #[prost(message, optional, tag = "3")]
    pub config: ::core::option::Option<ShardConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shards {
    #[prost(message, repeated, tag = "1")]
    pub shards: ::prost::alloc::vec::Vec<Shard>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardGroup {
    /// Name of the shard group.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the ClickHouse cluster that the shard group belongs to.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Description of the shard group. 0-256 characters long.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// List of shard names contained in the shard group.
    #[prost(string, repeated, tag = "4")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardConfig {
    /// ClickHouse configuration for a shard.
    #[prost(message, optional, tag = "1")]
    pub clickhouse: ::core::option::Option<shard_config::Clickhouse>,
}
/// Nested message and enum types in `ShardConfig`.
pub mod shard_config {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Clickhouse {
        /// ClickHouse settings for a shard.
        #[prost(message, optional, tag = "1")]
        pub config: ::core::option::Option<super::config::ClickhouseConfigSet>,
        /// Computational resources for a shard.
        #[prost(message, optional, tag = "2")]
        pub resources: ::core::option::Option<super::Resources>,
        /// Relative weight of a shard considered when writing data to the cluster.
        /// For details, see [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/table_engines/distributed/>).
        #[prost(message, optional, tag = "3")]
        pub weight: ::core::option::Option<i64>,
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Host {
    /// Name of the ClickHouse host. The host name is assigned by MDB at creation time, and cannot be changed.
    /// 1-63 characters long.
    ///
    /// The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the ClickHouse host. The ID is assigned by MDB at creation time.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// ID of the availability zone where the ClickHouse host resides.
    #[prost(string, tag = "3")]
    pub zone_id: ::prost::alloc::string::String,
    /// Type of the host. If the field has default value, it is not returned in the response.
    #[prost(enumeration = "host::Type", tag = "4")]
    pub r#type: i32,
    /// Resources allocated to the ClickHouse host.
    #[prost(message, optional, tag = "5")]
    pub resources: ::core::option::Option<Resources>,
    /// Aggregated health of the host. If the field has default value, it is not returned in the response.
    #[prost(enumeration = "host::Health", tag = "6")]
    pub health: i32,
    /// Services provided by the host.
    #[prost(message, repeated, tag = "7")]
    pub services: ::prost::alloc::vec::Vec<Service>,
    /// ID of the subnet that the host belongs to.
    #[prost(string, tag = "8")]
    pub subnet_id: ::prost::alloc::string::String,
    /// Flag showing public IP assignment status to this host.
    #[prost(bool, tag = "9")]
    pub assign_public_ip: bool,
    #[prost(string, tag = "10")]
    pub shard_name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Host`.
pub mod host {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Host type is unspecified. Default value.
        Unspecified = 0,
        /// ClickHouse host.
        Clickhouse = 1,
        /// ZooKeeper host.
        Zookeeper = 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::Clickhouse => "CLICKHOUSE",
                Type::Zookeeper => "ZOOKEEPER",
            }
        }
        /// 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),
                "CLICKHOUSE" => Some(Self::Clickhouse),
                "ZOOKEEPER" => Some(Self::Zookeeper),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Health {
        /// Health of the host is unknown.
        Unknown = 0,
        /// The host is performing all its functions normally.
        Alive = 1,
        /// The host is inoperable, and cannot perform any of its essential functions.
        Dead = 2,
        /// The host is degraded, and can perform only some of its essential functions.
        Degraded = 3,
    }
    impl Health {
        /// 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 {
                Health::Unknown => "UNKNOWN",
                Health::Alive => "ALIVE",
                Health::Dead => "DEAD",
                Health::Degraded => "DEGRADED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ALIVE" => Some(Self::Alive),
                "DEAD" => Some(Self::Dead),
                "DEGRADED" => Some(Self::Degraded),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
    /// Type of the service provided by the host. If the field has default value, it is not returned in the response.
    #[prost(enumeration = "service::Type", tag = "1")]
    pub r#type: i32,
    /// Aggregated health of the service. If the field has default value, it is not returned in the response.
    #[prost(enumeration = "service::Health", tag = "2")]
    pub health: i32,
}
/// Nested message and enum types in `Service`.
pub mod service {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Service type of the host is unspecified. Default value.
        Unspecified = 0,
        /// The host is a ClickHouse server.
        Clickhouse = 1,
        /// The host is a ZooKeeper server.
        Zookeeper = 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::Clickhouse => "CLICKHOUSE",
                Type::Zookeeper => "ZOOKEEPER",
            }
        }
        /// 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),
                "CLICKHOUSE" => Some(Self::Clickhouse),
                "ZOOKEEPER" => Some(Self::Zookeeper),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Health {
        /// Health of the server is unknown. Default value.
        Unknown = 0,
        /// The server is working normally.
        Alive = 1,
        /// The server is dead or unresponsive.
        Dead = 2,
    }
    impl Health {
        /// 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 {
                Health::Unknown => "UNKNOWN",
                Health::Alive => "ALIVE",
                Health::Dead => "DEAD",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UNKNOWN" => Some(Self::Unknown),
                "ALIVE" => Some(Self::Alive),
                "DEAD" => Some(Self::Dead),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resources {
    /// ID of the preset for computational resources available to a host (CPU, memory etc.).
    /// All available presets are listed in the \[documentation\](/docs/managed-clickhouse/concepts/instance-types)
    #[prost(string, tag = "1")]
    pub resource_preset_id: ::prost::alloc::string::String,
    /// Volume of the storage available to a host, in bytes.
    #[prost(int64, tag = "2")]
    pub disk_size: i64,
    /// Type of the storage environment for the host.
    /// Possible values:
    /// * network-hdd - network HDD drive,
    /// * network-ssd - network SSD drive,
    /// * local-ssd - local SSD storage.
    #[prost(string, tag = "3")]
    pub disk_type_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Access {
    /// Allow to export data from the cluster to DataLens.
    #[prost(bool, tag = "1")]
    pub data_lens: bool,
    /// Allow SQL queries to the cluster databases from the management console.
    ///
    /// See [SQL queries in the management console](/docs/managed-clickhouse/operations/web-sql-query) for more details.
    #[prost(bool, tag = "2")]
    pub web_sql: bool,
    /// Allow to import data from Yandex Metrica and AppMetrica to the cluster.
    ///
    /// See [AppMetrica documentation](<https://appmetrica.yandex.com/docs/cloud/index.html>) for more details.
    #[prost(bool, tag = "3")]
    pub metrika: bool,
    /// Allow access to cluster for Serverless.
    #[prost(bool, tag = "4")]
    pub serverless: bool,
    /// Allow access for DataTransfer
    #[prost(bool, tag = "5")]
    pub data_transfer: bool,
    /// Allow access for Query
    #[prost(bool, tag = "6")]
    pub yandex_query: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudStorage {
    /// Whether to use Object Storage for storing ClickHouse data.
    #[prost(bool, tag = "1")]
    pub enabled: bool,
    #[prost(message, optional, tag = "2")]
    pub move_factor: ::core::option::Option<f64>,
    #[prost(message, optional, tag = "3")]
    pub data_cache_enabled: ::core::option::Option<bool>,
    #[prost(message, optional, tag = "4")]
    pub data_cache_max_size: ::core::option::Option<i64>,
    #[prost(message, optional, tag = "5")]
    pub prefer_not_to_merge: ::core::option::Option<bool>,
}
/// A ClickHouse Database resource. For more information, see the
/// [Developer's Guide](/docs/managed-clickhouse/concepts).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
    /// Name of the database.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the ClickHouse cluster that the database belongs to.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseSpec {
    /// Name of the ClickHouse database. 1-63 characters long.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A ClickHouse User resource. For more information, see
/// the [Developer's guide](/docs/managed-clickhouse/concepts).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
    /// Name of the ClickHouse user.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the ClickHouse cluster the user belongs to.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Set of permissions granted to the user.
    #[prost(message, repeated, tag = "3")]
    pub permissions: ::prost::alloc::vec::Vec<Permission>,
    #[prost(message, optional, tag = "4")]
    pub settings: ::core::option::Option<UserSettings>,
    /// Set of quotas assigned to the user.
    #[prost(message, repeated, tag = "5")]
    pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
    /// Connection Manager connection configuration. Read only field.
    #[prost(message, optional, tag = "6")]
    pub connection_manager: ::core::option::Option<ConnectionManager>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Permission {
    /// Name of the database that the permission grants access to.
    #[prost(string, tag = "1")]
    pub database_name: ::prost::alloc::string::String,
}
/// Connection Manager connection configuration.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionManager {
    /// ID of Connection Manager connection.
    #[prost(string, tag = "1")]
    pub connection_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserSpec {
    /// Name of the ClickHouse user.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Password of the ClickHouse user.
    #[prost(string, tag = "2")]
    pub password: ::prost::alloc::string::String,
    /// Set of permissions to grant to the user. If not set, it's granted permissions to access all databases.
    #[prost(message, repeated, tag = "3")]
    pub permissions: ::prost::alloc::vec::Vec<Permission>,
    #[prost(message, optional, tag = "4")]
    pub settings: ::core::option::Option<UserSettings>,
    /// Set of quotas assigned to the user.
    #[prost(message, repeated, tag = "5")]
    pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
    /// Generate password using Connection Manager.
    #[prost(message, optional, tag = "6")]
    pub generate_password: ::core::option::Option<bool>,
}
/// ClickHouse user settings. Supported settings are a limited subset of all settings
/// described in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserSettings {
    /// Restricts permissions for non-DDL queries. To restrict permissions for DDL queries, use \[allow_ddl\] instead.
    /// * **0** (default)-no restrictions.
    /// * **1**-only read data queries are allowed.
    /// * **2**-read data and change settings queries are allowed.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/permissions-for-queries/#settings_readonly>).
    #[prost(message, optional, tag = "1")]
    pub readonly: ::core::option::Option<i64>,
    /// Determines whether DDL queries are allowed (e.g., **CREATE**, **ALTER**, **RENAME**, etc).
    ///
    /// Default value: **true**.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/permissions-for-queries/#settings_allow_ddl>).
    #[prost(message, optional, tag = "2")]
    pub allow_ddl: ::core::option::Option<bool>,
    /// Enables [introspections functions](<https://clickhouse.com/docs/en/sql-reference/functions/introspection>) for query profiling.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-allow_introspection_functions>).
    #[prost(message, optional, tag = "96")]
    pub allow_introspection_functions: ::core::option::Option<bool>,
    /// Connection timeout in milliseconds.
    ///
    /// Value must be greater than **0** (default: **10000**, 10 seconds).
    #[prost(message, optional, tag = "39")]
    pub connect_timeout: ::core::option::Option<i64>,
    /// The timeout in milliseconds for connecting to a remote server for a Distributed table engine. Applies only if the cluster uses sharding and replication. If unsuccessful, several attempts are made to connect to various replicas.
    ///
    /// Default value: **50**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#connect-timeout-with-failover-ms>).
    #[prost(message, optional, tag = "97")]
    pub connect_timeout_with_failover: ::core::option::Option<i64>,
    /// Receive timeout in milliseconds.
    ///
    /// Value must be greater than **0** (default: **300000**, 300 seconds or 5 minutes).
    #[prost(message, optional, tag = "40")]
    pub receive_timeout: ::core::option::Option<i64>,
    /// Send timeout in milliseconds.
    ///
    /// Value must be greater than **0** (default: **300000**, 300 seconds or 5 minutes).
    #[prost(message, optional, tag = "41")]
    pub send_timeout: ::core::option::Option<i64>,
    /// Timeout (in seconds) between checks of execution speed. It is checked that execution speed is not less that specified in \[min_execution_speed\] parameter.
    ///
    /// Default value: **10**.
    #[prost(message, optional, tag = "98")]
    pub timeout_before_checking_execution_speed: ::core::option::Option<i64>,
    /// Enables or disables write quorum for ClickHouse cluster.
    /// If the value is less than **2**, then write quorum is disabled, otherwise it is enabled.
    ///
    /// When used, write quorum guarantees that ClickHouse has written data to the quorum of **insert_quorum** replicas with no errors until the \[insert_quorum_timeout\] expires.
    /// All replicas in the quorum are in the consistent state, meaning that they contain linearized data from the previous **INSERT** queries.
    /// Employ write quorum, if you need the guarantees that the written data would not be lost in case of one or more replicas failure.
    ///
    /// You can use \[select_sequential_consistency\] setting to read the data written with write quorum.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-insert_quorum>).
    #[prost(message, optional, tag = "3")]
    pub insert_quorum: ::core::option::Option<i64>,
    /// Quorum write timeout in milliseconds.
    ///
    /// If the write quorum is enabled in the cluster, this timeout expires and some data is not written to the \[insert_quorum\] replicas, then ClickHouse will abort the execution of **INSERT** query and return an error.
    /// In this case, the client must send the query again to write the data block into the same or another replica.
    ///
    /// Minimum value: **1000**, 1 second (default: **60000**, 1 minute).
    #[prost(message, optional, tag = "4")]
    pub insert_quorum_timeout: ::core::option::Option<i64>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-insert_quorum_parallel>).
    #[prost(message, optional, tag = "99")]
    pub insert_quorum_parallel: ::core::option::Option<bool>,
    /// Enables the insertion of default values instead of NULL into columns with not nullable data type.
    ///
    /// Default value: **true**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#insert_null_as_default>).
    #[prost(message, optional, tag = "100")]
    pub insert_null_as_default: ::core::option::Option<bool>,
    /// Determines the behavior of **SELECT** queries from the replicated table: if enabled, ClickHouse will terminate a query with error message in case the replica does not have a chunk written with the quorum and will not read the parts that have not yet been written with the quorum.
    ///
    /// Default value: **false** (sequential consistency is disabled).
    #[prost(message, optional, tag = "5")]
    pub select_sequential_consistency: ::core::option::Option<bool>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-deduplicate-blocks-in-dependent-materialized-views>).
    #[prost(message, optional, tag = "101")]
    pub deduplicate_blocks_in_dependent_materialized_views: ::core::option::Option<bool>,
    /// Wait mode for asynchronous actions in **ALTER** queries on replicated tables:
    ///
    /// * **0**-do not wait for replicas.
    /// * **1**-only wait for own execution (default).
    /// * **2**-wait for all replicas.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/alter/#synchronicity-of-alter-queries>).
    #[prost(message, optional, tag = "42")]
    pub replication_alter_partitions_sync: ::core::option::Option<i64>,
    /// Max replica delay in milliseconds. If a replica lags more than the set value, this replica is not used and becomes a stale one.
    ///
    /// Minimum value: **1000**, 1 second (default: **300000**, 300 seconds or 5 minutes).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_replica_delay_for_distributed_queries>).
    #[prost(message, optional, tag = "6")]
    pub max_replica_delay_for_distributed_queries: ::core::option::Option<i64>,
    /// Enables or disables query forcing to a stale replica in case the actual data is unavailable.
    /// If enabled, ClickHouse will choose the most up-to-date replica and force the query to use the data in this replica.
    /// This setting can be used when doing **SELECT** query from a distributed table that points to replicated tables.
    ///
    /// Default value: **true** (query forcing is enabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-fallback_to_stale_replicas_for_distributed_queries>).
    #[prost(message, optional, tag = "7")]
    pub fallback_to_stale_replicas_for_distributed_queries: ::core::option::Option<bool>,
    /// Determine the behavior of distributed subqueries.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#distributed-product-mode>).
    #[prost(enumeration = "user_settings::DistributedProductMode", tag = "43")]
    pub distributed_product_mode: i32,
    /// Enables of disables memory saving mode when doing distributed aggregation.
    ///
    /// When ClickHouse works with a distributed query, external aggregation is done on remote servers.
    /// Enable this setting to achieve a smaller memory footprint on the server that sourced such a distributed query.
    ///
    /// Default value: **false** (memory saving mode is disabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/select/group-by/#select-group-by-in-external-memory>).
    #[prost(message, optional, tag = "72")]
    pub distributed_aggregation_memory_efficient: ::core::option::Option<bool>,
    /// Timeout for DDL queries, in milliseconds.
    #[prost(message, optional, tag = "73")]
    pub distributed_ddl_task_timeout: ::core::option::Option<i64>,
    /// Enables or disables silent skipping of unavailable shards.
    ///
    /// A shard is considered unavailable if all its replicas are also unavailable.
    ///
    /// Default value: **false** (silent skipping is disabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-skip_unavailable_shards>).
    #[prost(message, optional, tag = "81")]
    pub skip_unavailable_shards: ::core::option::Option<bool>,
    /// Enables or disables expression compilation.
    /// If you execute a lot of queries that contain identical expressions, then enable this setting.
    /// As a result, such queries may be executed faster due to use of compiled expressions.
    ///
    /// Use this setting in combination with \[min_count_to_compile_expression\] setting.
    ///
    /// Default value: **false** (expression compilation is disabled).
    #[prost(message, optional, tag = "46")]
    pub compile_expressions: ::core::option::Option<bool>,
    /// How many identical expressions ClickHouse has to encounter before they are compiled.
    ///
    /// Minimum value: **0** (default: **3**).
    ///
    /// For the **0** value compilation is synchronous: a query waits for expression compilation process to complete prior to continuing execution.
    /// It is recommended to set this value only for testing purposes.
    ///
    /// For all other values, compilation is asynchronous: the compilation process executes in a separate thread.
    /// When a compiled expression is ready, it will be used by ClickHouse for eligible queries, including the ones that are currently running.
    #[prost(message, optional, tag = "47")]
    pub min_count_to_compile_expression: ::core::option::Option<i64>,
    /// The maximum block size for reading.
    ///
    /// Data in ClickHouse is organized and processed by blocks (block is a set of columns' parts).
    /// The internal processing cycles for a single block are efficient enough, but there are noticeable expenditures on each block.
    ///
    /// This setting is a recommendation for size of block (in a count of rows) that should be loaded from tables.
    ///
    /// Value must be greater than **0** (default: **65536**).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-max_block_size>).
    #[prost(message, optional, tag = "9")]
    pub max_block_size: ::core::option::Option<i64>,
    /// Limits the minimum number of rows in a block to be inserted in a table by **INSERT** query.
    /// Blocks that are smaller than the specified value, will be squashed together into the bigger blocks.
    ///
    /// Minimal value: **0**, block squashing is disabled (default: **1048576**).
    #[prost(message, optional, tag = "48")]
    pub min_insert_block_size_rows: ::core::option::Option<i64>,
    /// Limits the minimum number of bytes in a block to be inserted in a table by **INSERT** query.
    /// Blocks that are smaller than the specified value, will be squashed together into the bigger blocks.
    ///
    /// Minimal value: **0**, block squashing is disabled (default: **268435456**, 256 MB).
    #[prost(message, optional, tag = "49")]
    pub min_insert_block_size_bytes: ::core::option::Option<i64>,
    /// Allows to form blocks of the specified size (in bytes) when inserting data in a table.
    /// This setting has effect only if server is creating such blocks by itself.
    ///
    /// Value must be greater than **0** (default: **1048576**).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_insert_block_size>).
    #[prost(message, optional, tag = "10")]
    pub max_insert_block_size: ::core::option::Option<i64>,
    /// Limits the minimum number of bytes to enable unbuffered direct reads from disk (Direct I/O).
    ///
    /// By default, ClickHouse does not read data directly from disk, but relies on the filesystem and its cache instead.
    /// Such reading strategy is effective when the data volume is small.
    /// If the amount of the data to read is huge, it is more effective to read directly from the disk, bypassing the filesystem cache.
    ///
    /// If the total amount of the data to read is greater than the value of this setting, then ClickHouse will fetch this data directly from the disk.
    ///
    /// Minimal value and default value: **0**, Direct I/O is disabled.
    #[prost(message, optional, tag = "50")]
    pub min_bytes_to_use_direct_io: ::core::option::Option<i64>,
    /// Determines whether to use the cache of uncompressed blocks, or not.
    /// Using this cache can significantly reduce latency and increase the throughput when a huge amount of small queries is to be processed.
    /// Enable this setting for the users who instantiates small queries frequently.
    ///
    /// This setting has effect only for tables of the MergeTree family.
    ///
    /// Default value: **false** (uncompressed cache is disabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-use_uncompressed_cache>).
    #[prost(message, optional, tag = "51")]
    pub use_uncompressed_cache: ::core::option::Option<bool>,
    /// Limits the maximum size in rows of the request that can use the cache of uncompressed data. The cache is not used for requests larger
    /// than the specified value.
    ///
    /// Use this setting in combination with \[use_uncompressed_cache\] setting.
    ///
    /// Value must be greater than **0** (default: **128x8192**).
    #[prost(message, optional, tag = "52")]
    pub merge_tree_max_rows_to_use_cache: ::core::option::Option<i64>,
    /// Limits the maximum size in bytes of the request that can use the cache of uncompressed data. The cache is not used for requests larger
    /// than the specified value.
    ///
    /// Use this setting in combination with \[use_uncompressed_cache\] setting.
    ///
    /// Value must be greater than **0** (default: **192x10x1024x1024**).
    #[prost(message, optional, tag = "53")]
    pub merge_tree_max_bytes_to_use_cache: ::core::option::Option<i64>,
    /// Limits the minimum number of rows to be read from a file to enable concurrent read.
    /// If the number of rows to be read exceeds this value, then ClickHouse will try to use a few threads to read from a file concurrently.
    ///
    /// This setting has effect only for tables of the MergeTree family.
    ///
    /// Value must be greater than **0** (default: **20x8192**).
    #[prost(message, optional, tag = "54")]
    pub merge_tree_min_rows_for_concurrent_read: ::core::option::Option<i64>,
    /// Limits the number of bytes to be read from a file to enable concurrent read.
    /// If the number of bytes to be read exceeds this value, then ClickHouse will try to use a few threads to read from a file concurrently.
    ///
    /// This setting has effect only for tables of the MergeTree family.
    ///
    /// Value must be greater than **0** (default: **24x10x1024x1024**).
    #[prost(message, optional, tag = "55")]
    pub merge_tree_min_bytes_for_concurrent_read: ::core::option::Option<i64>,
    /// Sets the threshold of RAM consumption (in bytes) after that the temporary data, collected during the **GROUP BY** operation, should be flushed to disk to limit the RAM comsumption.
    ///
    /// By default, aggregation is done by employing hash table that resides in RAM.
    /// A query can result in aggregation of huge data volumes that can lead to memory exhaustion and abortion of the query (see the \[max_memory_usage\] setting).
    /// For such queries, you can use this setting to force ClickHouse to do flushing and complete aggregation successfully.
    ///
    /// Minimal value and default value: **0**, **GROUP BY** in the external memory is disabled.
    ///
    /// When using aggregation in external memory, it is recommended to set the value of this setting twice as low as the \[max_memory_usage\] setting value (by default, the maximum memory usage is limited to ten gigabytes).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/select/group-by/#select-group-by-in-external-memory>).
    ///
    /// See also: the \[distributed_aggregation_memory_efficient\] setting.
    #[prost(message, optional, tag = "74")]
    pub max_bytes_before_external_group_by: ::core::option::Option<i64>,
    /// This setting is equivalent of the \[max_bytes_before_external_group_by\] setting, except for it is for sort operation (**ORDER BY**), not aggregation.
    #[prost(message, optional, tag = "75")]
    pub max_bytes_before_external_sort: ::core::option::Option<i64>,
    /// Sets the threshold of the number of keys, after that the two-level aggregation should be used.
    ///
    /// Minimal value: **0**, threshold is not set (default: **10000**).
    #[prost(message, optional, tag = "76")]
    pub group_by_two_level_threshold: ::core::option::Option<i64>,
    /// Sets the threshold of the number of bytes, after that the two-level aggregation should be used.
    ///
    /// Minimal value: **0**, threshold is not set (default: **100000000**).
    #[prost(message, optional, tag = "77")]
    pub group_by_two_level_threshold_bytes: ::core::option::Option<i64>,
    /// Sets the priority of a query.
    ///
    /// * **0**-priority is not used.
    /// * **1**-the highest priority.
    /// * and so on. The higher the number, the lower a query's priority.
    ///
    /// This setting should be set up for each query individually.
    ///
    /// If ClickHouse is working with the high-priority queries, and a low-priority query enters, then the low-priority query is paused until higher-priority queries are completed.
    ///
    /// Minimal value and default value: **0**, priority is not used.
    #[prost(message, optional, tag = "56")]
    pub priority: ::core::option::Option<i64>,
    /// Limits the maximum number of threads to process the request (setting does not take threads that read data from remote servers into account).
    ///
    /// This setting applies to threads that perform the same stages of the query processing pipeline in parallel.
    ///
    /// Minimal value and default value: **0** (the thread number is calculated automatically based on the number of physical CPU cores, no HyperThreading cores are taken into account).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_threads>).
    #[prost(message, optional, tag = "8")]
    pub max_threads: ::core::option::Option<i64>,
    /// Limits the maximum memory usage (in bytes) for processing of a single user's query on a single server.
    /// This setting does not take server's free RAM amount or total RAM amount into account.
    ///
    /// This limitation is enforced for any user's single query on a single server.
    ///
    /// Minimal value: **0**, no limitation is set.
    /// Value that is set in the ClickHouse default config file: **10737418240** (10 GB).
    ///
    /// If you use \[max_bytes_before_external_group_by\] or \[max_bytes_before_external_sort\] setting, then it is recommended to set their values twice as low as \[max_memory_usage\] setting value.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#settings_max_memory_usage>).
    #[prost(message, optional, tag = "11")]
    pub max_memory_usage: ::core::option::Option<i64>,
    /// Limits the maximum memory usage (in bytes) for processing of user's queries on a single server.
    /// This setting does not take server's free RAM amount or total RAM amount into account.
    ///
    /// This limitation is enforced for all queries that belong to one user and run simultaneously on a single server.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "12")]
    pub max_memory_usage_for_user: ::core::option::Option<i64>,
    /// The maximum speed of data exchange over the network in bytes per second for a query.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "57")]
    pub max_network_bandwidth: ::core::option::Option<i64>,
    /// The maximum speed of data exchange over the network in bytes per second for all concurrently running user queries.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "58")]
    pub max_network_bandwidth_for_user: ::core::option::Option<i64>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/ru/operations/settings/query-complexity/#max-partitions-per-insert-block>).
    #[prost(message, optional, tag = "102")]
    pub max_partitions_per_insert_block: ::core::option::Option<i64>,
    /// The maximum number of concurrent requests per user.
    /// Default value: 0 (no limit).
    #[prost(message, optional, tag = "103")]
    pub max_concurrent_queries_for_user: ::core::option::Option<i64>,
    /// If enabled, query is not executed if the ClickHouse can't use index by date.
    /// This setting has effect only for tables of the MergeTree family.
    ///
    /// Default value: **false** (setting is disabled, query executes even if ClickHouse can't use index by date).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-force_index_by_date>).
    #[prost(message, optional, tag = "59")]
    pub force_index_by_date: ::core::option::Option<bool>,
    /// If enabled, query is not executed if the ClickHouse can't use index by primary key.
    /// This setting has effect only for tables of the MergeTree family.
    ///
    /// Default value: **false** (setting is disabled, query executes even if ClickHouse can't use index by primary key).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#force-primary-key>).
    #[prost(message, optional, tag = "60")]
    pub force_primary_key: ::core::option::Option<bool>,
    /// Limits the maximum number of rows that can be read from a table when running a query.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-rows-to-read>).
    #[prost(message, optional, tag = "13")]
    pub max_rows_to_read: ::core::option::Option<i64>,
    /// Limits the maximum number of bytes (uncompressed data) that can be read from a table when running a query.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "14")]
    pub max_bytes_to_read: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while reading the data.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "15")]
    pub read_overflow_mode: i32,
    /// Limits the maximum number of unique keys received from aggregation function.
    /// This setting helps to reduce RAM consumption while doing aggregation.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "16")]
    pub max_rows_to_group_by: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing aggregation.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    /// * **any**-perform approximate **GROUP BY** operation by continuing aggregation for the keys that got into the set, but don't add new keys to the set.
    #[prost(enumeration = "user_settings::GroupByOverflowMode", tag = "17")]
    pub group_by_overflow_mode: i32,
    /// Limits the maximum number of rows that can be read from a table for sorting.
    /// This setting helps to reduce RAM consumption.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "18")]
    pub max_rows_to_sort: ::core::option::Option<i64>,
    /// Limits the maximum number of bytes (uncompressed data) that can be read from a table for sorting.
    /// This setting helps to reduce RAM consumption.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "19")]
    pub max_bytes_to_sort: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while sorting.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "20")]
    pub sort_overflow_mode: i32,
    /// Limits the number of rows in the result.
    /// This limitation is also checked for subqueries and parts of distributed queries that run on remote servers.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "21")]
    pub max_result_rows: ::core::option::Option<i64>,
    /// Limits the number of bytes in the result.
    /// This limitation is also checked for subqueries and parts of distributed queries that run on remote servers.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "22")]
    pub max_result_bytes: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while forming result.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "23")]
    pub result_overflow_mode: i32,
    /// Limits the maximum number of different rows when using **DISTINCT**.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "24")]
    pub max_rows_in_distinct: ::core::option::Option<i64>,
    /// Limits the maximum size of a hash table in bytes (uncompressed data) when using **DISTINCT**.
    #[prost(message, optional, tag = "25")]
    pub max_bytes_in_distinct: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing **DISCTINCT**.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "26")]
    pub distinct_overflow_mode: i32,
    /// Limits the maximum number of rows that can be passed to a remote server or saved in a temporary table when using **GLOBAL IN**.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "27")]
    pub max_rows_to_transfer: ::core::option::Option<i64>,
    /// Limits the maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary
    /// table when using **GLOBAL IN**.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "28")]
    pub max_bytes_to_transfer: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing transfers.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "29")]
    pub transfer_overflow_mode: i32,
    /// Limits the maximum query execution time in milliseconds.
    /// At this moment, this limitation is not checked when passing one of the sorting stages, as well as merging and finalizing aggregation funictions.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "30")]
    pub max_execution_time: ::core::option::Option<i64>,
    /// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) of execution time.
    ///
    /// * **throw**-abort query execution, return an error.
    /// * **break**-stop query execution, return partial result.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "31")]
    pub timeout_overflow_mode: i32,
    /// Limit on the number of rows in the set resulting from the execution of the IN section.
    #[prost(message, optional, tag = "87")]
    pub max_rows_in_set: ::core::option::Option<i64>,
    /// Limit on the number of bytes in the set resulting from the execution of the IN section.
    #[prost(message, optional, tag = "88")]
    pub max_bytes_in_set: ::core::option::Option<i64>,
    /// Determine the behavior on exceeding max_rows_in_set or max_bytes_in_set limit.
    /// Possible values: OVERFLOW_MODE_THROW, OVERFLOW_MODE_BREAK.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "89")]
    pub set_overflow_mode: i32,
    /// Limit on maximum size of the hash table for JOIN, in rows.
    #[prost(message, optional, tag = "90")]
    pub max_rows_in_join: ::core::option::Option<i64>,
    /// Limit on maximum size of the hash table for JOIN, in bytes.
    #[prost(message, optional, tag = "91")]
    pub max_bytes_in_join: ::core::option::Option<i64>,
    /// Determine the behavior on exceeding max_rows_in_join or max_bytes_in_join limit.
    /// Possible values: OVERFLOW_MODE_THROW, OVERFLOW_MODE_BREAK.
    #[prost(enumeration = "user_settings::OverflowMode", tag = "92")]
    pub join_overflow_mode: i32,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-join_algorithm>).
    #[prost(enumeration = "user_settings::JoinAlgorithm", repeated, tag = "104")]
    pub join_algorithm: ::prost::alloc::vec::Vec<i32>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#any_join_distinct_right_table_keys>).
    #[prost(message, optional, tag = "105")]
    pub any_join_distinct_right_table_keys: ::core::option::Option<bool>,
    /// Limits the maximum number of columns that can be read from a table in a single query.
    /// If the query requires to read more columns to complete, then it will be aborted.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "32")]
    pub max_columns_to_read: ::core::option::Option<i64>,
    /// Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, including constant columns.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "33")]
    pub max_temporary_columns: ::core::option::Option<i64>,
    /// Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, excluding constant columns.
    ///
    /// Minimal value and default value: **0**, no limitation is set.
    #[prost(message, optional, tag = "34")]
    pub max_temporary_non_const_columns: ::core::option::Option<i64>,
    /// Limits the size of the part of a query that can be transferred to RAM for parsing with the SQL parser, in bytes.
    ///
    /// Value must be greater than **0** (default: **262144**).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_query_size>).
    #[prost(message, optional, tag = "35")]
    pub max_query_size: ::core::option::Option<i64>,
    /// Limits the maximum depth of query syntax tree.
    ///
    /// Executing a big and complex query may result in building a syntax tree of enormous depth.
    /// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
    ///
    /// For example, the **SELECT *** query may result in more complex and deeper syntax tree, compared to the **SELECT ... WHERE ...** query, containing constraints and conditions, in the most cases.
    /// A user can be forced to construct more optimized queries, if this setting is used.
    ///
    /// Value must be greater than **0** (default: **1000**).
    /// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-ast-depth>).
    #[prost(message, optional, tag = "36")]
    pub max_ast_depth: ::core::option::Option<i64>,
    /// Limits the maximum size of query syntax tree in number of nodes.
    ///
    /// Executing a big and complex query may result in building a syntax tree of enormous size.
    /// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
    ///
    /// Value must be greater than **0** (default: **50000**).
    /// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-ast-elements>).
    #[prost(message, optional, tag = "37")]
    pub max_ast_elements: ::core::option::Option<i64>,
    /// Limits the maximum size of query syntax tree in number of nodes after expansion of aliases and the asterisk values.
    ///
    /// Executing a big and complex query may result in building a syntax tree of enormous size.
    /// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
    ///
    /// Value must be greater than **0** (default: **500000**).
    /// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
    #[prost(message, optional, tag = "38")]
    pub max_expanded_ast_elements: ::core::option::Option<i64>,
    /// Minimal execution speed in rows per second.
    #[prost(message, optional, tag = "84")]
    pub min_execution_speed: ::core::option::Option<i64>,
    /// Minimal execution speed in bytes per second.
    #[prost(message, optional, tag = "85")]
    pub min_execution_speed_bytes: ::core::option::Option<i64>,
    /// Aggregate function to use for implementation of count(DISTINCT ...).
    #[prost(enumeration = "user_settings::CountDistinctImplementation", tag = "86")]
    pub count_distinct_implementation: i32,
    /// Enables or disables SQL parser if the fast stream parser cannot parse the data.
    ///
    /// Enable this setting, if the data that you want to insert into a table contains SQL expressions.
    ///
    /// For example, the stream parser is unable to parse a value that contains **now()** expression; therefore an **INSERT** query for this value will fail and no data will be inserted into a table.
    /// With enabled SQL parser, this expression is parsed correctly: the **now()** expression will be parsed as SQL function, interpreted, and the current date and time will be inserted into the table as a result.
    ///
    /// This setting has effect only if you use \[Values\](<https://clickhouse.com/docs/en/interfaces/formats/#data-format-values>) format when inserting data.
    ///
    /// Default value: **true** (SQL parser is enabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-input_format_values_interpret_expressions>).
    #[prost(message, optional, tag = "61")]
    pub input_format_values_interpret_expressions: ::core::option::Option<bool>,
    /// Enables or disables replacing omitted input values with default values of the respective columns when performing **INSERT** queries.
    ///
    /// Default value: **true** (replacing is enabled).
    #[prost(message, optional, tag = "62")]
    pub input_format_defaults_for_omitted_fields: ::core::option::Option<bool>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#input_format_null_as_default>).
    #[prost(message, optional, tag = "106")]
    pub input_format_null_as_default: ::core::option::Option<bool>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#date_time_input_format>).
    #[prost(enumeration = "user_settings::DateTimeInputFormat", tag = "107")]
    pub date_time_input_format: i32,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#input_format_with_names_use_header>).
    #[prost(message, optional, tag = "108")]
    pub input_format_with_names_use_header: ::core::option::Option<bool>,
    /// Enables quoting of 64-bit integers in JSON output format.
    ///
    /// If this setting is enabled, then 64-bit integers (**UInt64** and **Int64**) will be quoted when written to JSON output in order to maintain compatibility with the most of the JavaScript engines.
    /// Otherwise, such integers will not be quoted.
    ///
    /// Default value: **false** (quoting 64-bit integers is disabled).
    #[prost(message, optional, tag = "63")]
    pub output_format_json_quote_64bit_integers: ::core::option::Option<bool>,
    /// Enables special floating-point values (**+nan**, **-nan**, **+inf** and **-inf**) in JSON output format.
    ///
    /// Default value: **false** (special values do not present in output).
    #[prost(message, optional, tag = "64")]
    pub output_format_json_quote_denormals: ::core::option::Option<bool>,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#date_time_output_format>).
    #[prost(enumeration = "user_settings::DateTimeOutputFormat", tag = "109")]
    pub date_time_output_format: i32,
    /// Determines whether to use LowCardinality type in Native format.
    ///
    /// * **true** (default)-yes, use.
    /// * **false**-convert LowCardinality columns to regular columns when doing **SELECT**, and convert regular columns to LowCardinality when doing **INSERT**.
    ///
    /// LowCardinality columns (aka sparse columns) store data in more effective way, compared to regular columns, by using hash tables.
    /// If data to insert suits this storage format, ClickHouse will place them into LowCardinality column.
    ///
    /// If you use a third-party ClickHouse client that can't work with LowCardinality columns, then this client will not be able to correctly interpret the result of the query that asks for data stored in LowCardinality column.
    /// Disable this setting to convert LowCardinality column to regular column when creating the result, so such clients will be able to process the result.
    ///
    /// Official ClickHouse client works with LowCardinality columns out-of-the-box.
    ///
    /// Default value: **true** (LowCardinality columns are used in Native format).
    #[prost(message, optional, tag = "78")]
    pub low_cardinality_allow_in_native_format: ::core::option::Option<bool>,
    /// Allows specifying **LowCardinality** modifier for types of small fixed size (8 or less) in CREATE TABLE statements. Enabling this may increase merge times and memory consumption.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#allow_suspicious_low_cardinality_types>).
    #[prost(message, optional, tag = "110")]
    pub allow_suspicious_low_cardinality_types: ::core::option::Option<bool>,
    /// Enables returning of empty result when aggregating without keys (with **GROUP BY** operation absent) on empty set (e.g., **SELECT count(*) FROM table WHERE 0**).
    ///
    /// * **true**-ClickHouse will return an empty result for such queries.
    /// * **false** (default)-ClickHouse will return a single-line result consisting of **NULL** values for aggregation functions, in accordance with SQL standard.
    #[prost(message, optional, tag = "79")]
    pub empty_result_for_aggregation_by_empty_set: ::core::option::Option<bool>,
    /// HTTP connection timeout, in milliseconds.
    ///
    /// Value must be greater than **0** (default: **1000**, 1 second).
    #[prost(message, optional, tag = "65")]
    pub http_connection_timeout: ::core::option::Option<i64>,
    /// HTTP receive timeout, in milliseconds.
    ///
    /// Value must be greater than **0** (default: **1800000**, 1800 seconds, 30 minutes).
    #[prost(message, optional, tag = "66")]
    pub http_receive_timeout: ::core::option::Option<i64>,
    /// HTTP send timeout, in milliseconds.
    ///
    /// Value must be greater than **0** (default: **1800000**, 1800 seconds, 30 minutes).
    #[prost(message, optional, tag = "67")]
    pub http_send_timeout: ::core::option::Option<i64>,
    /// Enables or disables data compression in HTTP responses.
    ///
    /// By default, ClickHouse stores data compressed. When executing a query, its result is uncompressed.
    /// Use this setting to command ClickHouse to compress the result when sending it via HTTP.
    ///
    /// Enable this setting and add the **Accept-Encoding: <compression method>** HTTP header in a HTTP request to force compression of HTTP response from ClickHouse.
    ///
    /// ClickHouse support the following compression methods: **gzip**, **br** and **deflate**.
    ///
    /// Default value: **false** (compression is disabled).
    ///
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/interfaces/http/>).
    #[prost(message, optional, tag = "68")]
    pub enable_http_compression: ::core::option::Option<bool>,
    /// Enables progress notifications using **X-ClickHouse-Progress** HTTP header.
    ///
    /// Default value: **false** (notifications disabled).
    #[prost(message, optional, tag = "69")]
    pub send_progress_in_http_headers: ::core::option::Option<bool>,
    /// Minimum interval between progress notifications with **X-ClickHouse-Progress** HTTP header, in milliseconds.
    ///
    /// Value must be greater than **0** (default: **100**).
    #[prost(message, optional, tag = "70")]
    pub http_headers_progress_interval: ::core::option::Option<i64>,
    /// Adds CORS header in HTTP responses.
    ///
    /// Default value: **false** (header is not added).
    #[prost(message, optional, tag = "71")]
    pub add_http_cors_header: ::core::option::Option<bool>,
    /// Cancels HTTP read-only queries (e.g. SELECT) when a client closes the connection without waiting for the response.
    ///
    /// Default value: **false**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#cancel-http-readonly-queries-on-client-close>).
    #[prost(message, optional, tag = "111")]
    pub cancel_http_readonly_queries_on_client_close: ::core::option::Option<bool>,
    /// Limits the maximum number of HTTP GET redirect hops for \[URL-engine\](<https://clickhouse.com/docs/en/engines/table-engines/special/url>) tables.
    ///
    /// If the parameter is set to **0** (default), no hops is allowed.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-max_http_get_redirects>).
    #[prost(message, optional, tag = "112")]
    pub max_http_get_redirects: ::core::option::Option<i64>,
    /// Maximum length of field name in HTTP header.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#http_max_field_name_size>).
    #[prost(message, optional, tag = "150")]
    pub http_max_field_name_size: ::core::option::Option<i64>,
    /// Maximum length of field value in HTTP header.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#http_max_field_value_size>).
    #[prost(message, optional, tag = "151")]
    pub http_max_field_value_size: ::core::option::Option<i64>,
    #[prost(message, optional, tag = "93")]
    pub joined_subquery_requires_alias: ::core::option::Option<bool>,
    #[prost(message, optional, tag = "94")]
    pub join_use_nulls: ::core::option::Option<bool>,
    #[prost(message, optional, tag = "95")]
    pub transform_null_in: ::core::option::Option<bool>,
    /// Quota accounting mode. Possible values: QUOTA_MODE_DEFAULT, QUOTA_MODE_KEYED and QUOTA_MODE_KEYED_BY_IP.
    #[prost(enumeration = "user_settings::QuotaMode", tag = "80")]
    pub quota_mode: i32,
    /// Sets the data format of a \[nested\](<https://clickhouse.com/docs/en/sql-reference/data-types/nested-data-structures/nested>) columns.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#flatten-nested>).
    #[prost(message, optional, tag = "113")]
    pub flatten_nested: ::core::option::Option<bool>,
    /// Regular expression (for Regexp format)
    #[prost(string, tag = "114")]
    pub format_regexp: ::prost::alloc::string::String,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#format_regexp_escaping_rule>).
    #[prost(enumeration = "user_settings::FormatRegexpEscapingRule", tag = "115")]
    pub format_regexp_escaping_rule: i32,
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#format_regexp_skip_unmatched>).
    #[prost(message, optional, tag = "116")]
    pub format_regexp_skip_unmatched: ::core::option::Option<bool>,
    /// Enables asynchronous inserts.
    ///
    /// Disabled by default.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert>).
    #[prost(message, optional, tag = "117")]
    pub async_insert: ::core::option::Option<bool>,
    /// The maximum number of threads for background data parsing and insertion.
    ///
    /// If the parameter is set to **0**, asynchronous insertions are disabled. Default value: **16**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-threads>).
    #[prost(message, optional, tag = "118")]
    pub async_insert_threads: ::core::option::Option<i64>,
    /// Enables waiting for processing of asynchronous insertion. If enabled, server returns OK only after the data is inserted.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#wait-for-async-insert>).
    #[prost(message, optional, tag = "119")]
    pub wait_for_async_insert: ::core::option::Option<bool>,
    /// The timeout (in seconds) for waiting for processing of asynchronous insertion.
    ///
    /// Default value: **120**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#wait-for-async-insert-timeout>).
    #[prost(message, optional, tag = "120")]
    pub wait_for_async_insert_timeout: ::core::option::Option<i64>,
    /// The maximum size of the unparsed data in bytes collected per query before being inserted.
    ///
    /// If the parameter is set to **0**, asynchronous insertions are disabled. Default value: **100000**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-max-data-size>).
    #[prost(message, optional, tag = "121")]
    pub async_insert_max_data_size: ::core::option::Option<i64>,
    /// The maximum timeout in milliseconds since the first INSERT query before inserting collected data.
    ///
    /// If the parameter is set to **0**, the timeout is disabled. Default value: **200**.
    ///
    /// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-busy-timeout-ms>).
    #[prost(message, optional, tag = "122")]
    pub async_insert_busy_timeout: ::core::option::Option<i64>,
    /// If it is set to true, use adaptive busy timeout for asynchronous inserts.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#async_insert_use_adaptive_busy_timeout>).
    #[prost(message, optional, tag = "152")]
    pub async_insert_use_adaptive_busy_timeout: ::core::option::Option<bool>,
    /// Memory profiler step (in bytes).
    ///
    /// If the next query step requires more memory than this parameter specifies, the memory profiler collects the allocating stack trace. Values lower than a few megabytes slow down query processing.
    ///
    /// Default value: **4194304** (4 MB). Zero means disabled memory profiler.
    #[prost(message, optional, tag = "124")]
    pub memory_profiler_step: ::core::option::Option<i64>,
    /// Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type. The probability is for every alloc/free regardless to the size of the allocation.
    ///
    /// Possible values: from **0** to **1**. Default: **0**.
    #[prost(message, optional, tag = "125")]
    pub memory_profiler_sample_probability: ::core::option::Option<f64>,
    /// Sets the maximum number of parallel threads for the SELECT query data read phase with the FINAL modifier.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max-final-threads>).
    #[prost(message, optional, tag = "126")]
    pub max_final_threads: ::core::option::Option<i64>,
    /// Enables or disables order-preserving parallel parsing of data formats. Supported only for \[TSV\](<https://clickhouse.com/docs/en/interfaces/formats#tabseparated>), \[TKSV\](<https://clickhouse.com/docs/en/interfaces/formats#tskv>), \[CSV\](<https://clickhouse.com/docs/en/interfaces/formats#csv>) and \[JSONEachRow\](<https://clickhouse.com/docs/en/interfaces/formats#jsoneachrow>) formats.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#input-format-parallel-parsing>)
    #[prost(message, optional, tag = "127")]
    pub input_format_parallel_parsing: ::core::option::Option<bool>,
    /// Enables or disables the insertion of JSON data with nested objects.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#input-format-parallel-parsing>)
    #[prost(message, optional, tag = "128")]
    pub input_format_import_nested_json: ::core::option::Option<bool>,
    /// Avro schema registry URL.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/formats#format_avro_schema_registry_url>).
    #[prost(string, tag = "148")]
    pub format_avro_schema_registry_url: ::prost::alloc::string::String,
    /// Allows data types without explicit modifiers NULL or NOT NULL in column definition will be Nullable.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#data_type_default_nullable>).
    #[prost(message, optional, tag = "149")]
    pub data_type_default_nullable: ::core::option::Option<bool>,
    /// Method of reading data from local filesystem, one of: read, pread, mmap, io_uring, pread_threadpool. The 'io_uring' method is experimental and does not work for Log, TinyLog, StripeLog, File, Set and Join, and other tables with append-able files in presence of concurrent reads and writes.
    #[prost(enumeration = "user_settings::LocalFilesystemReadMethod", tag = "129")]
    pub local_filesystem_read_method: i32,
    /// The maximum size of the buffer to read from the filesystem.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/codebrowser/ClickHouse/src/Core/Settings.h.html#DB::SettingsTraits::Data::max_read_buffer_size>)
    #[prost(message, optional, tag = "130")]
    pub max_read_buffer_size: ::core::option::Option<i64>,
    /// The setting sets the maximum number of retries for ClickHouse Keeper (or ZooKeeper) requests during insert into replicated MergeTree. Only Keeper requests which failed due to network error, Keeper session timeout, or request timeout are considered for retries.
    /// Default: 20 from 23.2, 0(disabled) before
    /// Min_version: 22.11
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#insert_keeper_max_retries>)
    #[prost(message, optional, tag = "131")]
    pub insert_keeper_max_retries: ::core::option::Option<i64>,
    /// The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running user queries. Zero means unlimited.
    /// Default: 0 - unlimited
    /// Min_version: 22.10
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity#settings_max_temporary_data_on_disk_size_for_user>)
    #[prost(message, optional, tag = "132")]
    pub max_temporary_data_on_disk_size_for_user: ::core::option::Option<i64>,
    /// The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running queries. Zero means unlimited.
    /// Default: 0 - unlimited
    /// Min_version: 22.10
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity#settings_max_temporary_data_on_disk_size_for_query>)
    #[prost(message, optional, tag = "133")]
    pub max_temporary_data_on_disk_size_for_query: ::core::option::Option<i64>,
    /// Limits maximum recursion depth in the recursive descent parser. Allows controlling the stack size.
    /// Default: 1000
    /// Special: 0 - unlimited
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max_parser_depth>)
    #[prost(message, optional, tag = "134")]
    pub max_parser_depth: ::core::option::Option<i64>,
    /// Method of reading data from remote filesystem, one of: read, threadpool.
    /// Default: read
    /// Min_version: 21.11
    /// See in-depth description in [ClickHouse GitHub](<https://github.com/ClickHouse/ClickHouse/blob/f9558345e886876b9132d9c018e357f7fa9b22a3/src/Core/Settings.h#L660>)
    #[prost(enumeration = "user_settings::RemoteFilesystemReadMethod", tag = "135")]
    pub remote_filesystem_read_method: i32,
    /// It represents soft memory limit in case when hard limit is reached on user level. This value is used to compute overcommit ratio for the query. Zero means skip the query.
    /// Default: 1GiB
    /// Min_version: 22.5
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_overcommit_ratio_denominator>)
    #[prost(message, optional, tag = "136")]
    pub memory_overcommit_ratio_denominator: ::core::option::Option<i64>,
    /// It represents soft memory limit in case when hard limit is reached on global level. This value is used to compute overcommit ratio for the query. Zero means skip the query.
    /// Default: 1GiB
    /// Min_version: 22.5
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_overcommit_ratio_denominator_for_user>)
    #[prost(message, optional, tag = "137")]
    pub memory_overcommit_ratio_denominator_for_user: ::core::option::Option<i64>,
    /// Maximum time thread will wait for memory to be freed in the case of memory overcommit on a user level. If the timeout is reached and memory is not freed, an exception is thrown.
    /// Default: 5000000
    /// Min_version: 22.5
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_usage_overcommit_max_wait_microseconds>)
    #[prost(message, optional, tag = "138")]
    pub memory_usage_overcommit_max_wait_microseconds: ::core::option::Option<i64>,
    /// Setting up query threads logging. Query threads log into the \[system.query_thread_log\](<https://clickhouse.com/docs/en/operations/system-tables/query_thread_log>) table. This setting has effect only when \[log_queries\](<https://clickhouse.com/docs/en/operations/settings/settings#log-queries>) is true. Queries threads run by ClickHouse with this setup are logged according to the rules in the \[query_thread_log\](<https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#server_configuration_parameters-query_thread_log>) server configuration parameter.
    /// Default: false
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_query_threads>)
    #[prost(message, optional, tag = "139")]
    pub log_query_threads: ::core::option::Option<bool>,
    /// Enables or disables query views logging to the the system.query_view_log table.
    /// Default: true
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_query_views>)
    #[prost(message, optional, tag = "146")]
    pub log_query_views: ::core::option::Option<bool>,
    /// Log queries with the specified probability.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_queries_probability>).
    #[prost(message, optional, tag = "153")]
    pub log_queries_probability: ::core::option::Option<f64>,
    /// Enabled or disable logging of processors level profiling data to the the system.log_processors_profiles table.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_processors_profiles>).
    #[prost(message, optional, tag = "154")]
    pub log_processors_profiles: ::core::option::Option<bool>,
    /// If turned on, SELECT queries may utilize the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#use_query_cache>).
    #[prost(message, optional, tag = "155")]
    pub use_query_cache: ::core::option::Option<bool>,
    /// If turned on, results of SELECT queries are retrieved from the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#enable_reads_from_query_cache>).
    #[prost(message, optional, tag = "156")]
    pub enable_reads_from_query_cache: ::core::option::Option<bool>,
    /// If turned on, results of SELECT queries are stored in the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#enable_writes_to_query_cache>).
    #[prost(message, optional, tag = "157")]
    pub enable_writes_to_query_cache: ::core::option::Option<bool>,
    /// Minimum number of times a SELECT query must run before its result is stored in the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_min_query_runs>).
    #[prost(message, optional, tag = "158")]
    pub query_cache_min_query_runs: ::core::option::Option<i64>,
    /// Minimum duration in milliseconds a query needs to run for its result to be stored in the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_min_query_duration>).
    #[prost(message, optional, tag = "159")]
    pub query_cache_min_query_duration: ::core::option::Option<i64>,
    /// After this time in seconds entries in the query cache become stale.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_ttl>).
    #[prost(message, optional, tag = "160")]
    pub query_cache_ttl: ::core::option::Option<i64>,
    /// The maximum number of query results the current user may store in the query cache. 0 means unlimited.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_max_entries>).
    #[prost(message, optional, tag = "161")]
    pub query_cache_max_entries: ::core::option::Option<i64>,
    /// The maximum amount of memory (in bytes) the current user may allocate in the query cache. 0 means unlimited.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_max_size_in_bytes>).
    #[prost(message, optional, tag = "162")]
    pub query_cache_max_size_in_bytes: ::core::option::Option<i64>,
    /// A string which acts as a label for query cache entries. The same queries with different tags are considered different by the query cache.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_tag>).
    #[prost(string, tag = "163")]
    pub query_cache_tag: ::prost::alloc::string::String,
    /// If turned on, the result of SELECT queries cached in the query cache can be read by other users. It is not recommended to enable this setting due to security reasons.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_share_between_users>).
    #[prost(message, optional, tag = "164")]
    pub query_cache_share_between_users: ::core::option::Option<bool>,
    /// Controls how the query cache handles SELECT queries with non-deterministic functions like rand() or now().
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_nondeterministic_function_handling>).
    #[prost(
        enumeration = "user_settings::QueryCacheNondeterministicFunctionHandling",
        tag = "165"
    )]
    pub query_cache_nondeterministic_function_handling: i32,
    /// The maximum number of threads to execute the INSERT SELECT query.
    /// Default: 0
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max_insert_threads>)
    #[prost(message, optional, tag = "140")]
    pub max_insert_threads: ::core::option::Option<i64>,
    /// Enables hedged requests logic for remote queries. It allows to establish many connections with different replicas for query. New connection is enabled in case existent connection(s) with replica(s) were not established within hedged_connection_timeout or no data was received within receive_data_timeout. Query uses the first connection which send non empty progress packet (or data packet, if allow_changing_replica_until_first_data_packet); other connections are cancelled. Queries with max_parallel_replicas > 1 are supported.
    /// Default: true
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#use_hedged_requests>)
    #[prost(message, optional, tag = "141")]
    pub use_hedged_requests: ::core::option::Option<bool>,
    /// Timeout to close idle TCP connections after specified number of milliseconds.
    /// Default: 360000 (3600 seconds)
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#idle_connection_timeout>)
    #[prost(message, optional, tag = "142")]
    pub idle_connection_timeout: ::core::option::Option<i64>,
    /// Connection timeout for establishing connection with replica for Hedged requests.
    /// Default: 50
    /// See in-depth description in [ClickHouse GitHub](<https://github.com/ClickHouse/ClickHouse/blob/f9558345e886876b9132d9c018e357f7fa9b22a3/src/Core/Settings.h#L64>)
    #[prost(message, optional, tag = "143")]
    pub hedged_connection_timeout_ms: ::core::option::Option<i64>,
    /// Specifies the algorithm of replicas selection that is used for distributed query processing, one of: random, nearest_hostname, in_order, first_or_random, round_robin.
    /// Default: random
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#load_balancing>)
    #[prost(enumeration = "user_settings::LoadBalancing", tag = "144")]
    pub load_balancing: i32,
    /// Enables or disables preferable using the localhost replica when processing distributed queries.
    /// Default: true
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#prefer_localhost_replica>)
    #[prost(message, optional, tag = "145")]
    pub prefer_localhost_replica: ::core::option::Option<bool>,
    /// Enables or disable independent processing of partitions for SELECT queries with FINAL.
    /// Default: false
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/guides/replacing-merge-tree#exploiting-partitions-with-replacingmergetree>)
    #[prost(message, optional, tag = "147")]
    pub do_not_merge_across_partitions_select_final: ::core::option::Option<bool>,
    /// Ignore materialized views with dropped target table during pushing to views.
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#ignore_materialized_views_with_dropped_target_table>).
    #[prost(message, optional, tag = "166")]
    pub ignore_materialized_views_with_dropped_target_table: ::core::option::Option<
        bool,
    >,
    /// The setting is deprecated and has no effect.
    #[deprecated]
    #[prost(message, optional, tag = "44")]
    pub compile: ::core::option::Option<bool>,
    /// The setting is deprecated and has no effect.
    #[deprecated]
    #[prost(message, optional, tag = "45")]
    pub min_count_to_compile: ::core::option::Option<i64>,
    /// The setting is deprecated and has no effect.
    #[deprecated]
    #[prost(message, optional, tag = "123")]
    pub async_insert_stale_timeout: ::core::option::Option<i64>,
}
/// Nested message and enum types in `UserSettings`.
pub mod user_settings {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OverflowMode {
        Unspecified = 0,
        Throw = 1,
        Break = 2,
    }
    impl OverflowMode {
        /// 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 {
                OverflowMode::Unspecified => "OVERFLOW_MODE_UNSPECIFIED",
                OverflowMode::Throw => "OVERFLOW_MODE_THROW",
                OverflowMode::Break => "OVERFLOW_MODE_BREAK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OVERFLOW_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "OVERFLOW_MODE_THROW" => Some(Self::Throw),
                "OVERFLOW_MODE_BREAK" => Some(Self::Break),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum GroupByOverflowMode {
        Unspecified = 0,
        Throw = 1,
        Break = 2,
        Any = 3,
    }
    impl GroupByOverflowMode {
        /// 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 {
                GroupByOverflowMode::Unspecified => "GROUP_BY_OVERFLOW_MODE_UNSPECIFIED",
                GroupByOverflowMode::Throw => "GROUP_BY_OVERFLOW_MODE_THROW",
                GroupByOverflowMode::Break => "GROUP_BY_OVERFLOW_MODE_BREAK",
                GroupByOverflowMode::Any => "GROUP_BY_OVERFLOW_MODE_ANY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GROUP_BY_OVERFLOW_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "GROUP_BY_OVERFLOW_MODE_THROW" => Some(Self::Throw),
                "GROUP_BY_OVERFLOW_MODE_BREAK" => Some(Self::Break),
                "GROUP_BY_OVERFLOW_MODE_ANY" => Some(Self::Any),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DistributedProductMode {
        Unspecified = 0,
        /// Default value. Prohibits using these types of subqueries (returns the "Double-distributed in/JOIN subqueries is denied" exception).
        Deny = 1,
        /// Replaces the database and table in the subquery with local ones for the destination server (shard), leaving the normal IN/JOIN.
        Local = 2,
        /// Replaces the IN/JOIN query with GLOBAL IN/GLOBAL JOIN.
        Global = 3,
        /// Allows the use of these types of subqueries.
        Allow = 4,
    }
    impl DistributedProductMode {
        /// 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 {
                DistributedProductMode::Unspecified => {
                    "DISTRIBUTED_PRODUCT_MODE_UNSPECIFIED"
                }
                DistributedProductMode::Deny => "DISTRIBUTED_PRODUCT_MODE_DENY",
                DistributedProductMode::Local => "DISTRIBUTED_PRODUCT_MODE_LOCAL",
                DistributedProductMode::Global => "DISTRIBUTED_PRODUCT_MODE_GLOBAL",
                DistributedProductMode::Allow => "DISTRIBUTED_PRODUCT_MODE_ALLOW",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DISTRIBUTED_PRODUCT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "DISTRIBUTED_PRODUCT_MODE_DENY" => Some(Self::Deny),
                "DISTRIBUTED_PRODUCT_MODE_LOCAL" => Some(Self::Local),
                "DISTRIBUTED_PRODUCT_MODE_GLOBAL" => Some(Self::Global),
                "DISTRIBUTED_PRODUCT_MODE_ALLOW" => Some(Self::Allow),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum QuotaMode {
        Unspecified = 0,
        Default = 1,
        Keyed = 2,
        KeyedByIp = 3,
    }
    impl QuotaMode {
        /// 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 {
                QuotaMode::Unspecified => "QUOTA_MODE_UNSPECIFIED",
                QuotaMode::Default => "QUOTA_MODE_DEFAULT",
                QuotaMode::Keyed => "QUOTA_MODE_KEYED",
                QuotaMode::KeyedByIp => "QUOTA_MODE_KEYED_BY_IP",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "QUOTA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "QUOTA_MODE_DEFAULT" => Some(Self::Default),
                "QUOTA_MODE_KEYED" => Some(Self::Keyed),
                "QUOTA_MODE_KEYED_BY_IP" => Some(Self::KeyedByIp),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum CountDistinctImplementation {
        Unspecified = 0,
        Uniq = 1,
        UniqCombined = 2,
        UniqCombined64 = 3,
        UniqHll12 = 4,
        UniqExact = 5,
    }
    impl CountDistinctImplementation {
        /// 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 {
                CountDistinctImplementation::Unspecified => {
                    "COUNT_DISTINCT_IMPLEMENTATION_UNSPECIFIED"
                }
                CountDistinctImplementation::Uniq => "COUNT_DISTINCT_IMPLEMENTATION_UNIQ",
                CountDistinctImplementation::UniqCombined => {
                    "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED"
                }
                CountDistinctImplementation::UniqCombined64 => {
                    "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED_64"
                }
                CountDistinctImplementation::UniqHll12 => {
                    "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_HLL_12"
                }
                CountDistinctImplementation::UniqExact => {
                    "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_EXACT"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "COUNT_DISTINCT_IMPLEMENTATION_UNSPECIFIED" => Some(Self::Unspecified),
                "COUNT_DISTINCT_IMPLEMENTATION_UNIQ" => Some(Self::Uniq),
                "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED" => Some(Self::UniqCombined),
                "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED_64" => {
                    Some(Self::UniqCombined64)
                }
                "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_HLL_12" => Some(Self::UniqHll12),
                "COUNT_DISTINCT_IMPLEMENTATION_UNIQ_EXACT" => Some(Self::UniqExact),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum JoinAlgorithm {
        Unspecified = 0,
        Hash = 1,
        ParallelHash = 2,
        PartialMerge = 3,
        Direct = 4,
        Auto = 5,
        FullSortingMerge = 6,
        PreferPartialMerge = 7,
    }
    impl JoinAlgorithm {
        /// 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 {
                JoinAlgorithm::Unspecified => "JOIN_ALGORITHM_UNSPECIFIED",
                JoinAlgorithm::Hash => "JOIN_ALGORITHM_HASH",
                JoinAlgorithm::ParallelHash => "JOIN_ALGORITHM_PARALLEL_HASH",
                JoinAlgorithm::PartialMerge => "JOIN_ALGORITHM_PARTIAL_MERGE",
                JoinAlgorithm::Direct => "JOIN_ALGORITHM_DIRECT",
                JoinAlgorithm::Auto => "JOIN_ALGORITHM_AUTO",
                JoinAlgorithm::FullSortingMerge => "JOIN_ALGORITHM_FULL_SORTING_MERGE",
                JoinAlgorithm::PreferPartialMerge => {
                    "JOIN_ALGORITHM_PREFER_PARTIAL_MERGE"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "JOIN_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
                "JOIN_ALGORITHM_HASH" => Some(Self::Hash),
                "JOIN_ALGORITHM_PARALLEL_HASH" => Some(Self::ParallelHash),
                "JOIN_ALGORITHM_PARTIAL_MERGE" => Some(Self::PartialMerge),
                "JOIN_ALGORITHM_DIRECT" => Some(Self::Direct),
                "JOIN_ALGORITHM_AUTO" => Some(Self::Auto),
                "JOIN_ALGORITHM_FULL_SORTING_MERGE" => Some(Self::FullSortingMerge),
                "JOIN_ALGORITHM_PREFER_PARTIAL_MERGE" => Some(Self::PreferPartialMerge),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum FormatRegexpEscapingRule {
        Unspecified = 0,
        Escaped = 1,
        Quoted = 2,
        Csv = 3,
        Json = 4,
        Xml = 5,
        Raw = 6,
    }
    impl FormatRegexpEscapingRule {
        /// 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 {
                FormatRegexpEscapingRule::Unspecified => {
                    "FORMAT_REGEXP_ESCAPING_RULE_UNSPECIFIED"
                }
                FormatRegexpEscapingRule::Escaped => {
                    "FORMAT_REGEXP_ESCAPING_RULE_ESCAPED"
                }
                FormatRegexpEscapingRule::Quoted => "FORMAT_REGEXP_ESCAPING_RULE_QUOTED",
                FormatRegexpEscapingRule::Csv => "FORMAT_REGEXP_ESCAPING_RULE_CSV",
                FormatRegexpEscapingRule::Json => "FORMAT_REGEXP_ESCAPING_RULE_JSON",
                FormatRegexpEscapingRule::Xml => "FORMAT_REGEXP_ESCAPING_RULE_XML",
                FormatRegexpEscapingRule::Raw => "FORMAT_REGEXP_ESCAPING_RULE_RAW",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "FORMAT_REGEXP_ESCAPING_RULE_UNSPECIFIED" => Some(Self::Unspecified),
                "FORMAT_REGEXP_ESCAPING_RULE_ESCAPED" => Some(Self::Escaped),
                "FORMAT_REGEXP_ESCAPING_RULE_QUOTED" => Some(Self::Quoted),
                "FORMAT_REGEXP_ESCAPING_RULE_CSV" => Some(Self::Csv),
                "FORMAT_REGEXP_ESCAPING_RULE_JSON" => Some(Self::Json),
                "FORMAT_REGEXP_ESCAPING_RULE_XML" => Some(Self::Xml),
                "FORMAT_REGEXP_ESCAPING_RULE_RAW" => Some(Self::Raw),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DateTimeInputFormat {
        Unspecified = 0,
        BestEffort = 1,
        Basic = 2,
        BestEffortUs = 3,
    }
    impl DateTimeInputFormat {
        /// 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 {
                DateTimeInputFormat::Unspecified => "DATE_TIME_INPUT_FORMAT_UNSPECIFIED",
                DateTimeInputFormat::BestEffort => "DATE_TIME_INPUT_FORMAT_BEST_EFFORT",
                DateTimeInputFormat::Basic => "DATE_TIME_INPUT_FORMAT_BASIC",
                DateTimeInputFormat::BestEffortUs => {
                    "DATE_TIME_INPUT_FORMAT_BEST_EFFORT_US"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DATE_TIME_INPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
                "DATE_TIME_INPUT_FORMAT_BEST_EFFORT" => Some(Self::BestEffort),
                "DATE_TIME_INPUT_FORMAT_BASIC" => Some(Self::Basic),
                "DATE_TIME_INPUT_FORMAT_BEST_EFFORT_US" => Some(Self::BestEffortUs),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum DateTimeOutputFormat {
        Unspecified = 0,
        Simple = 1,
        Iso = 2,
        UnixTimestamp = 3,
    }
    impl DateTimeOutputFormat {
        /// 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 {
                DateTimeOutputFormat::Unspecified => {
                    "DATE_TIME_OUTPUT_FORMAT_UNSPECIFIED"
                }
                DateTimeOutputFormat::Simple => "DATE_TIME_OUTPUT_FORMAT_SIMPLE",
                DateTimeOutputFormat::Iso => "DATE_TIME_OUTPUT_FORMAT_ISO",
                DateTimeOutputFormat::UnixTimestamp => {
                    "DATE_TIME_OUTPUT_FORMAT_UNIX_TIMESTAMP"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DATE_TIME_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
                "DATE_TIME_OUTPUT_FORMAT_SIMPLE" => Some(Self::Simple),
                "DATE_TIME_OUTPUT_FORMAT_ISO" => Some(Self::Iso),
                "DATE_TIME_OUTPUT_FORMAT_UNIX_TIMESTAMP" => Some(Self::UnixTimestamp),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LocalFilesystemReadMethod {
        Unspecified = 0,
        Read = 1,
        PreadThreadpool = 2,
        Pread = 3,
        Nmap = 4,
    }
    impl LocalFilesystemReadMethod {
        /// 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 {
                LocalFilesystemReadMethod::Unspecified => {
                    "LOCAL_FILESYSTEM_READ_METHOD_UNSPECIFIED"
                }
                LocalFilesystemReadMethod::Read => "LOCAL_FILESYSTEM_READ_METHOD_READ",
                LocalFilesystemReadMethod::PreadThreadpool => {
                    "LOCAL_FILESYSTEM_READ_METHOD_PREAD_THREADPOOL"
                }
                LocalFilesystemReadMethod::Pread => "LOCAL_FILESYSTEM_READ_METHOD_PREAD",
                LocalFilesystemReadMethod::Nmap => "LOCAL_FILESYSTEM_READ_METHOD_NMAP",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOCAL_FILESYSTEM_READ_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
                "LOCAL_FILESYSTEM_READ_METHOD_READ" => Some(Self::Read),
                "LOCAL_FILESYSTEM_READ_METHOD_PREAD_THREADPOOL" => {
                    Some(Self::PreadThreadpool)
                }
                "LOCAL_FILESYSTEM_READ_METHOD_PREAD" => Some(Self::Pread),
                "LOCAL_FILESYSTEM_READ_METHOD_NMAP" => Some(Self::Nmap),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RemoteFilesystemReadMethod {
        Unspecified = 0,
        Read = 1,
        Threadpool = 2,
    }
    impl RemoteFilesystemReadMethod {
        /// 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 {
                RemoteFilesystemReadMethod::Unspecified => {
                    "REMOTE_FILESYSTEM_READ_METHOD_UNSPECIFIED"
                }
                RemoteFilesystemReadMethod::Read => "REMOTE_FILESYSTEM_READ_METHOD_READ",
                RemoteFilesystemReadMethod::Threadpool => {
                    "REMOTE_FILESYSTEM_READ_METHOD_THREADPOOL"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "REMOTE_FILESYSTEM_READ_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
                "REMOTE_FILESYSTEM_READ_METHOD_READ" => Some(Self::Read),
                "REMOTE_FILESYSTEM_READ_METHOD_THREADPOOL" => Some(Self::Threadpool),
                _ => None,
            }
        }
    }
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum LoadBalancing {
        Unspecified = 0,
        Random = 1,
        NearestHostname = 2,
        InOrder = 3,
        FirstOrRandom = 4,
        RoundRobin = 5,
    }
    impl LoadBalancing {
        /// 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 {
                LoadBalancing::Unspecified => "LOAD_BALANCING_UNSPECIFIED",
                LoadBalancing::Random => "LOAD_BALANCING_RANDOM",
                LoadBalancing::NearestHostname => "LOAD_BALANCING_NEAREST_HOSTNAME",
                LoadBalancing::InOrder => "LOAD_BALANCING_IN_ORDER",
                LoadBalancing::FirstOrRandom => "LOAD_BALANCING_FIRST_OR_RANDOM",
                LoadBalancing::RoundRobin => "LOAD_BALANCING_ROUND_ROBIN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "LOAD_BALANCING_UNSPECIFIED" => Some(Self::Unspecified),
                "LOAD_BALANCING_RANDOM" => Some(Self::Random),
                "LOAD_BALANCING_NEAREST_HOSTNAME" => Some(Self::NearestHostname),
                "LOAD_BALANCING_IN_ORDER" => Some(Self::InOrder),
                "LOAD_BALANCING_FIRST_OR_RANDOM" => Some(Self::FirstOrRandom),
                "LOAD_BALANCING_ROUND_ROBIN" => Some(Self::RoundRobin),
                _ => None,
            }
        }
    }
    /// Controls how the query cache handles SELECT queries with non-deterministic functions like rand() or now().
    /// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_nondeterministic_function_handling>).
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum QueryCacheNondeterministicFunctionHandling {
        Unspecified = 0,
        /// Throw an exception and don't cache the query result.
        Throw = 1,
        /// Cache the query result.
        Save = 2,
        /// Don't cache the query result and don't throw an exception.
        Ignore = 3,
    }
    impl QueryCacheNondeterministicFunctionHandling {
        /// 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 {
                QueryCacheNondeterministicFunctionHandling::Unspecified => {
                    "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_UNSPECIFIED"
                }
                QueryCacheNondeterministicFunctionHandling::Throw => {
                    "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_THROW"
                }
                QueryCacheNondeterministicFunctionHandling::Save => {
                    "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_SAVE"
                }
                QueryCacheNondeterministicFunctionHandling::Ignore => {
                    "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_IGNORE"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_UNSPECIFIED" => {
                    Some(Self::Unspecified)
                }
                "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_THROW" => {
                    Some(Self::Throw)
                }
                "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_SAVE" => Some(Self::Save),
                "QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_IGNORE" => {
                    Some(Self::Ignore)
                }
                _ => None,
            }
        }
    }
}
/// ClickHouse quota representation. Each quota associated with an user and limits it resource usage for an interval.
/// See in-depth description [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/quotas/>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserQuota {
    /// Duration of interval for quota in milliseconds.
    /// Minimal value is 1 second.
    #[prost(message, optional, tag = "1")]
    pub interval_duration: ::core::option::Option<i64>,
    /// The total number of queries.
    /// 0 - unlimited.
    #[prost(message, optional, tag = "2")]
    pub queries: ::core::option::Option<i64>,
    /// The number of queries that threw exception.
    /// 0 - unlimited.
    #[prost(message, optional, tag = "3")]
    pub errors: ::core::option::Option<i64>,
    /// The total number of rows given as the result..
    /// 0 - unlimited.
    #[prost(message, optional, tag = "4")]
    pub result_rows: ::core::option::Option<i64>,
    /// The total number of source rows read from tables for running the query, on all remote servers.
    /// 0 - unlimited.
    #[prost(message, optional, tag = "5")]
    pub read_rows: ::core::option::Option<i64>,
    /// The total query execution time, in milliseconds (wall time).
    /// 0 - unlimited.
    #[prost(message, optional, tag = "6")]
    pub execution_time: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterRequest {
    /// ID of the ClickHouse Cluster resource to return.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersRequest {
    /// ID of the folder to list ClickHouse clusters in.
    /// To get the folder ID, use a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
    #[prost(string, tag = "1")]
    pub folder_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClustersResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set \[page_token\] to the \[ListClustersResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters resources listed in the response.
    /// The expression must specify:
    /// 1. The field name. Currently you can only use filtering with the \[Cluster.name\] field.
    /// 2. An `=` operator.
    /// 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `\[a-zA-Z0-9_-\]+`.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
    /// List of ClickHouse Cluster resources.
    #[prost(message, repeated, tag = "1")]
    pub clusters: ::prost::alloc::vec::Vec<Cluster>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClustersRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClustersRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
    /// ID of the folder to create the ClickHouse cluster in.
    #[prost(string, tag = "1")]
    pub folder_id: ::prost::alloc::string::String,
    /// Name of the ClickHouse cluster. The name must be unique within the folder.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Description of the ClickHouse cluster.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
    /// For example, "project": "mvp" or "source": "dictionary".
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Deployment environment of the ClickHouse cluster.
    #[prost(enumeration = "cluster::Environment", tag = "5")]
    pub environment: i32,
    /// Configuration and resources for hosts that should be created for the ClickHouse cluster.
    #[prost(message, optional, tag = "6")]
    pub config_spec: ::core::option::Option<ConfigSpec>,
    /// Descriptions of databases to be created in the ClickHouse cluster.
    #[prost(message, repeated, tag = "7")]
    pub database_specs: ::prost::alloc::vec::Vec<DatabaseSpec>,
    /// Descriptions of database users to be created in the ClickHouse cluster.
    #[prost(message, repeated, tag = "8")]
    pub user_specs: ::prost::alloc::vec::Vec<UserSpec>,
    /// Individual configurations for hosts that should be created for the ClickHouse cluster.
    #[prost(message, repeated, tag = "9")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// ID of the network to create the cluster in.
    #[prost(string, tag = "10")]
    pub network_id: ::prost::alloc::string::String,
    /// Name of the first shard in cluster. If not set, defaults to the value 'shard1'.
    #[prost(string, tag = "11")]
    pub shard_name: ::prost::alloc::string::String,
    /// ID of the service account used for access to Object Storage.
    #[prost(string, tag = "12")]
    pub service_account_id: ::prost::alloc::string::String,
    /// User security groups
    #[prost(string, repeated, tag = "13")]
    pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Deletion Protection inhibits deletion of the cluster
    #[prost(bool, tag = "14")]
    pub deletion_protection: bool,
    /// Window of maintenance operations.
    #[prost(message, optional, tag = "15")]
    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
    /// Configuration(s) of the shard(s) to be created.
    #[prost(message, repeated, tag = "16")]
    pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterMetadata {
    /// ID of the ClickHouse cluster that is being created.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
    /// ID of the ClickHouse Cluster resource to update.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Field mask that specifies which fields of the ClickHouse Cluster resource should be updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// New description of the ClickHouse cluster.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
    /// For example, "project": "mvp" or "source": "dictionary".
    ///
    /// The new set of labels will completely replace the old ones. To add a label, request the current
    /// set with the \[ClusterService.Get\] method, then send an \[ClusterService.Update\] request with the new label added to the set.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// New configuration and resources for hosts in the cluster.
    #[prost(message, optional, tag = "5")]
    pub config_spec: ::core::option::Option<ConfigSpec>,
    /// New name for the cluster.
    #[prost(string, tag = "6")]
    pub name: ::prost::alloc::string::String,
    /// ID of the service account used for access to Object Storage.
    #[prost(string, tag = "7")]
    pub service_account_id: ::prost::alloc::string::String,
    /// New maintenance window settings for the cluster.
    #[prost(message, optional, tag = "8")]
    pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
    /// User security groups
    #[prost(string, repeated, tag = "9")]
    pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Deletion Protection inhibits deletion of the cluster
    #[prost(bool, tag = "10")]
    pub deletion_protection: bool,
    /// ID of the network to move the cluster to.
    #[prost(string, tag = "11")]
    pub network_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterMetadata {
    /// ID of the ClickHouse Cluster resource that is being updated.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterRequest {
    /// ID of the ClickHouse cluster to delete.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterMetadata {
    /// ID of the ClickHouse cluster that is being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterRequest {
    /// ID of the ClickHouse cluster to start.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterMetadata {
    /// ID of the ClickHouse cluster being started.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterRequest {
    /// ID of the ClickHouse cluster to stop.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterMetadata {
    /// ID of the ClickHouse cluster being stopped.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterRequest {
    /// ID of the ClickHouse cluster to move.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// ID of the destination folder.
    #[prost(string, tag = "2")]
    pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterMetadata {
    /// ID of the ClickHouse cluster being moved.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// ID of the source folder.
    #[prost(string, tag = "2")]
    pub source_folder_id: ::prost::alloc::string::String,
    /// ID of the destination folder.
    #[prost(string, tag = "3")]
    pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterZookeeperRequest {
    /// ID of the ClickHouse cluster to modify.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Resources allocated to Zookeeper hosts.
    #[prost(message, optional, tag = "2")]
    pub resources: ::core::option::Option<Resources>,
    /// Configuration of ZooKeeper hosts.
    #[prost(message, repeated, tag = "3")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// Enable automatic convertation of non-replicated MergeTree tables to replicated ones.
    #[prost(message, optional, tag = "4")]
    pub convert_tables_to_replicated: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterZookeeperMetadata {
    /// ID of the ClickHouse cluster.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterRequest {
    /// ID of the ClickHouse cluster to back up.
    /// To get the ClickHouse cluster ID use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterMetadata {
    /// ID of the ClickHouse cluster that is being backed up.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterRequest {
    /// ID of the backup to restore from. This backup will be used to create one cluster shard.
    /// To get the backup ID, use a \[ClusterService.ListBackups\] request.
    #[prost(string, tag = "1")]
    pub backup_id: ::prost::alloc::string::String,
    /// Additional IDs of the backups to restore from.
    /// Each additional backup is responsible for restoring separate shard.
    /// Restored cluster will have len(additional_backup_ids)+1 shards in total.
    /// To get the backup ID, use a \[ClusterService.ListBackups\] request.
    #[prost(string, repeated, tag = "13")]
    pub additional_backup_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Name of the new ClickHouse cluster. The name must be unique within the folder.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Description of the new ClickHouse cluster.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
    /// For example, "project": "mvp" or "source": "dictionary".
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Deployment environment of the new ClickHouse cluster.
    #[prost(enumeration = "cluster::Environment", tag = "5")]
    pub environment: i32,
    /// Configuration for the ClickHouse cluster to be created.
    #[prost(message, optional, tag = "6")]
    pub config_spec: ::core::option::Option<ConfigSpec>,
    /// Configurations for ClickHouse hosts that should be created for
    /// the cluster that is being created from the backup.
    #[prost(message, repeated, tag = "7")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// ID of the network to create the ClickHouse cluster in.
    #[prost(string, tag = "8")]
    pub network_id: ::prost::alloc::string::String,
    /// ID of the folder to create the ClickHouse cluster in.
    #[prost(string, tag = "9")]
    pub folder_id: ::prost::alloc::string::String,
    /// ID of the service account used for access to Object Storage.
    #[prost(string, tag = "10")]
    pub service_account_id: ::prost::alloc::string::String,
    /// User security groups
    #[prost(string, repeated, tag = "11")]
    pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Deletion Protection inhibits deletion of the cluster
    #[prost(bool, tag = "14")]
    pub deletion_protection: bool,
    /// Configuration(s) of the shard(s) in the restored cluster.
    #[prost(message, repeated, tag = "15")]
    pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterMetadata {
    /// ID of the new ClickHouse cluster that is being created from a backup.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// ID of the backup that is being used for creating a cluster.
    #[prost(string, tag = "2")]
    pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleMaintenanceRequest {
    /// ID of the ClickHouse cluster to reschedule the maintenance operation for.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The type of reschedule request.
    #[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")]
    pub reschedule_type: i32,
    /// The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if \[reschedule_type.IMMEDIATE\] reschedule type is chosen.
    #[prost(message, optional, tag = "3")]
    pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `RescheduleMaintenanceRequest`.
pub mod reschedule_maintenance_request {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RescheduleType {
        Unspecified = 0,
        /// Start the maintenance operation immediately.
        Immediate = 1,
        /// Start the maintenance operation within the next available maintenance window.
        NextAvailableWindow = 2,
        /// Start the maintenance operation at the specific time.
        SpecificTime = 3,
    }
    impl RescheduleType {
        /// 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 {
                RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
                RescheduleType::Immediate => "IMMEDIATE",
                RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
                RescheduleType::SpecificTime => "SPECIFIC_TIME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "IMMEDIATE" => Some(Self::Immediate),
                "NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
                "SPECIFIC_TIME" => Some(Self::SpecificTime),
                _ => None,
            }
        }
    }
}
/// Rescheduled maintenance operation metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleMaintenanceMetadata {
    /// Required. ID of the ClickHouse cluster.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Required. The time until which this maintenance operation is to be delayed.
    #[prost(message, optional, tag = "4")]
    pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogRecord {
    /// Log record timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
    #[prost(message, optional, tag = "1")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Contents of the log record.
    #[prost(map = "string, string", tag = "2")]
    pub message: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsRequest {
    /// ID of the ClickHouse cluster to request logs for.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Columns from logs table to request.
    /// If no columns are specified, entire log records are returned.
    #[prost(string, repeated, tag = "2")]
    pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Type of the service to request logs about.
    #[prost(enumeration = "list_cluster_logs_request::ServiceType", tag = "3")]
    pub service_type: i32,
    /// Start timestamp for the logs request, in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
    #[prost(message, optional, tag = "4")]
    pub from_time: ::core::option::Option<::prost_types::Timestamp>,
    /// End timestamp for the logs request, in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
    #[prost(message, optional, tag = "5")]
    pub to_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterLogsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "6")]
    pub page_size: i64,
    /// Page token.  To get the next page of results, set \[page_token\] to the \[ListClusterLogsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "7")]
    pub page_token: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ListClusterLogsRequest`.
pub mod list_cluster_logs_request {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ServiceType {
        Unspecified = 0,
        /// Logs of ClickHouse activity.
        Clickhouse = 1,
    }
    impl ServiceType {
        /// 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 {
                ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
                ServiceType::Clickhouse => "CLICKHOUSE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CLICKHOUSE" => Some(Self::Clickhouse),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsResponse {
    /// Requested log records.
    #[prost(message, repeated, tag = "1")]
    pub logs: ::prost::alloc::vec::Vec<LogRecord>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterLogsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterLogsRequest.page_token\] query parameter in the next list request.
    /// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
    /// This value is interchangeable with the \[StreamLogRecord.next_record_token\] from StreamLogs method.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLogRecord {
    /// One of the requested log records.
    #[prost(message, optional, tag = "1")]
    pub record: ::core::option::Option<LogRecord>,
    /// This token allows you to continue streaming logs starting from the exact
    /// same record. To continue streaming, specify value of [next_record_token[
    /// as value for the \[StreamClusterLogsRequest.record_token\] parameter in the next StreamLogs request.
    /// This value is interchangeable with the \[ListClusterLogsResponse.next_page_token\] from ListLogs method.
    #[prost(string, tag = "2")]
    pub next_record_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamClusterLogsRequest {
    /// Required. ID of the ClickHouse cluster.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Columns from logs table to get in the response.
    #[prost(string, repeated, tag = "2")]
    pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "stream_cluster_logs_request::ServiceType", tag = "3")]
    pub service_type: i32,
    /// Start timestamp for the logs request.
    #[prost(message, optional, tag = "4")]
    pub from_time: ::core::option::Option<::prost_types::Timestamp>,
    /// End timestamp for the logs request.
    /// If this field is not set, all existing logs will be sent and then the new ones as
    /// they appear. In essence it has `tail -f` semantics.
    #[prost(message, optional, tag = "5")]
    pub to_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Record token. Set \[record_token\] to the \[StreamLogRecord.next_record_token\] returned by a previous StreamLogs
    /// request to start streaming from next log record.
    #[prost(string, tag = "6")]
    pub record_token: ::prost::alloc::string::String,
    /// A filter expression that filters resources listed in the response.
    /// The expression must specify:
    /// 1. The field name. Currently filtering can be applied to the \[LogRecord.logs.message.hostname\], \[LogRecord.logs.message.severity\] fields.
    /// 2. An `=` operator.
    /// 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `\[a-z0-9.-\]{1,61}`.
    /// Examples of a filter:
    /// - `message.hostname='node1.db.cloud.yandex.net'`
    /// - `message.severity IN ('Error', 'Fatal') AND message.hostname != 'node2.db.cloud.yandex.net'`.
    #[prost(string, tag = "7")]
    pub filter: ::prost::alloc::string::String,
}
/// Nested message and enum types in `StreamClusterLogsRequest`.
pub mod stream_cluster_logs_request {
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ServiceType {
        Unspecified = 0,
        /// Logs of ClickHouse activity.
        Clickhouse = 1,
    }
    impl ServiceType {
        /// 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 {
                ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
                ServiceType::Clickhouse => "CLICKHOUSE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CLICKHOUSE" => Some(Self::Clickhouse),
                _ => None,
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterOperationsRequest {
    /// ID of the ClickHouse Cluster resource to list operations for.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterOperationsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.  To get the next page of results, set \[page_token\] to the \[ListClusterOperationsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterOperationsResponse {
    /// List of Operation resources for the specified ClickHouse cluster.
    #[prost(message, repeated, tag = "1")]
    pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterOperationsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterOperationsRequest.page_token\] query parameter in the next list request.
    /// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterBackupsRequest {
    /// ID of the ClickHouse cluster.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterBackupsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set \[page_token\] to the
    /// \[ListClusterBackupsResponse.next_page_token\] returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterBackupsResponse {
    /// List of ClickHouse Backup resources.
    #[prost(message, repeated, tag = "1")]
    pub backups: ::prost::alloc::vec::Vec<Backup>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterBackupsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterBackupsRequest.page_token\] query parameter in the next list request.
    /// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterHostsRequest {
    /// ID of the ClickHouse cluster.
    /// To get the ClickHouse cluster ID use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterHostsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.  To get the next page of results, set \[page_token\] to the \[ListClusterHostsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterHostsResponse {
    /// Requested list of hosts for the cluster.
    #[prost(message, repeated, tag = "1")]
    pub hosts: ::prost::alloc::vec::Vec<Host>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterHostsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterHostsRequest.page_token\] query parameter in the next list request.
    /// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterHostsRequest {
    /// ID of the ClickHouse cluster to add hosts to.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Configurations for ClickHouse hosts that should be added to the cluster.
    #[prost(message, repeated, tag = "2")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// Whether to copy schema to new ClickHouse hosts from replicas.
    #[prost(message, optional, tag = "3")]
    pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterHostsMetadata {
    /// ID of the ClickHouse cluster to which the hosts are being added.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of hosts that are being added to the cluster.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHostSpec {
    /// Name of the host to update.
    /// To get the ClickHouse host name, use a \[ClusterService.ListHosts\] request.
    #[prost(string, tag = "1")]
    pub host_name: ::prost::alloc::string::String,
    /// Field mask that specifies which fields of the ClickHouse host should be updated.
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Whether the host should get a public IP address on creation.
    #[prost(message, optional, tag = "3")]
    pub assign_public_ip: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterHostsRequest {
    /// ID of the ClickHouse cluster to update hosts in.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// New configurations to apply to hosts.
    #[prost(message, repeated, tag = "2")]
    pub update_host_specs: ::prost::alloc::vec::Vec<UpdateHostSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterHostsMetadata {
    /// ID of the ClickHouse cluster to modify hosts in.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of hosts that are being modified.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsRequest {
    /// ID of the ClickHouse cluster to remove hosts from.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of hosts to delete.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsMetadata {
    /// ID of the ClickHouse cluster to remove hosts from.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of hosts that are being deleted.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartClusterHostsRequest {
    /// Required. ID of the Clickhouse cluster.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Required. Name of the hosts to restart.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartClusterHostsMetadata {
    /// Required. ID of the ClickHouse cluster.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Required. The name of restarting host.
    #[prost(string, repeated, tag = "2")]
    pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterShardRequest {
    /// ID of the cluster that the shard belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    /// To get the name of the database, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard to request information about.
    /// To get the name of a shard, use a \[ClusterService.ListShards\] request.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardsRequest {
    /// ID of the ClickHouse cluster to list shards in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterShardsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.  to get the next page of results, set \[page_token\] to the \[ListClusterShardsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardsResponse {
    /// List of ClickHouse shards.
    #[prost(message, repeated, tag = "1")]
    pub shards: ::prost::alloc::vec::Vec<Shard>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterShardsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterShardsRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardRequest {
    /// ID of the ClickHouse cluster to add a shard to.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name for the new shard.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
    /// Configuration of the new shard.
    #[prost(message, optional, tag = "3")]
    pub config_spec: ::core::option::Option<ShardConfigSpec>,
    /// Configurations for ClickHouse hosts that should be created with the shard.
    #[prost(message, repeated, tag = "4")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// Whether to copy schema to hosts of the shard to be created. The schema is copied from hosts of an existing shard.
    #[prost(message, optional, tag = "5")]
    pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardMetadata {
    /// ID of the cluster that a shard is being added to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard being created.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardsRequest {
    /// ID of the ClickHouse cluster to add shards to.
    /// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Properties of each shard to be created.
    /// If \[ShardSpec.config_spec\] is not specified for some shard, for this shard
    /// it defaults to the configuration of the first shard in the cluster.
    #[prost(message, repeated, tag = "2")]
    pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
    /// Individual configurations for hosts that should be created for the shards.
    /// Two options are available:
    /// 1. If `host_specs` is empty, each shard's number and configurations of hosts will
    ///     be copied from those of the first shard in the cluster;
    /// 2. Otherwise `host_specs` should contain at least one host per created shard.
    #[prost(message, repeated, tag = "3")]
    pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
    /// Whether to copy schema to hosts of the new shards. The schema is copied from hosts of an existing shard.
    #[prost(message, optional, tag = "4")]
    pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardsMetadata {
    /// ID of the cluster that the shards are being added to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of the shards being created.
    #[prost(string, repeated, tag = "2")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardRequest {
    /// ID of the ClickHouse cluster the shard belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard to be updated.
    /// To get the name of a shard, use a \[ClusterService.ListShards\] request.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
    /// Field mask that specifies which attributes of the ClickHouse shard should be updated.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// New configuration for the specified shard.
    #[prost(message, optional, tag = "4")]
    pub config_spec: ::core::option::Option<ShardConfigSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardMetadata {
    /// ID of the cluster that contains the shard being updated.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard being updated.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardRequest {
    /// ID of the ClickHouse cluster the shard belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard to be deleted.
    /// To get the name of a shard, use a \[ClusterService.ListShards\] request.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardMetadata {
    /// ID of the cluster that contains the shard being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard being deleted.
    #[prost(string, tag = "2")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardsRequest {
    /// ID of the ClickHouse cluster the shards belong to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of the shards to be deleted.
    /// To get the name of a shard, use a \[ClusterService.ListShards\] request.
    #[prost(string, repeated, tag = "2")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardsMetadata {
    /// ID of the cluster that contains the shards being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Names of the shards being deleted.
    #[prost(string, repeated, tag = "2")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterShardGroupRequest {
    /// ID of the cluster that the shard group belongs to.
    ///
    /// To get the cluster ID, make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group to request information about.
    ///
    /// To get the name of a shard group, make a \[ClusterService.ListShardGroups\] request.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardGroupsRequest {
    /// ID of the cluster that the shard group belongs to.
    ///
    /// To get the cluster ID, make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return.
    ///
    /// If the number of available results is larger than \[page_size\], the service returns a \[ListClusterShardGroupsResponse.next_page_token\] that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.
    ///
    /// To get the next page of results, set \[page_token\] to the \[ListClusterShardGroupsResponse.next_page_token\] returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardGroupsResponse {
    /// List of ClickHouse cluster's shard groups.
    #[prost(message, repeated, tag = "1")]
    pub shard_groups: ::prost::alloc::vec::Vec<ShardGroup>,
    /// This token allows you to get the next page of results for list requests.
    ///
    /// If the number of results is larger than \[ListClusterShardGroupsRequest.page_size\], use the \[next_page_token\] as the value for the \[ListClusterShardGroupsRequest.page_token\] parameter in the next list request.
    /// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterShardGroupRequest {
    /// ID of the ClickHouse cluster to add a shard group to.
    ///
    /// To get the cluster ID, make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name for the new shard group.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
    /// Description of the new shard group. 0-256 characters long.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// List of shard names that should be put into the new group.
    ///
    /// To get the list, make a \[ClusterService.ListShardGroups\] request.
    #[prost(string, repeated, tag = "4")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterShardGroupMetadata {
    /// ID of the cluster to add a shard group to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group that is being added.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardGroupRequest {
    /// ID of the ClickHouse cluster that contains the shard group to update.
    ///
    /// To get the cluster ID, make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group that should be updated.
    ///
    /// To get the name, make a \[ClusterService.ListShardGroups\] request.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Updated description of the shard group. 0-256 characters long.
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Updated list of shard names that belongs to the shard group.
    #[prost(string, repeated, tag = "5")]
    pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardGroupMetadata {
    /// ID of the cluster that contains the shard group being updated.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group that is being updated.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardGroupRequest {
    /// ID of the ClickHouse cluster that contains the shard group to delete.
    ///
    /// To get the cluster ID, make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group that should be deleted.
    ///
    /// To get the name, make a \[ClusterService.ListShardGroups\] request.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardGroupMetadata {
    /// ID of the cluster that contains the shard group being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the shard group that is being deleted.
    #[prost(string, tag = "2")]
    pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterExternalDictionariesRequest {
    /// ID of the cluster that the external dictionaries belong to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListClusterExternalDictionaryResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set \[page_token\] to the \[ListClusterExternalDictionaryResponse.next_page_token\]
    /// returned by a previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterExternalDictionariesResponse {
    /// List of ClickHouse Cluster external dictionaries.
    #[prost(message, repeated, tag = "1")]
    pub external_dictionaries: ::prost::alloc::vec::Vec<
        config::clickhouse_config::ExternalDictionary,
    >,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListClusterExternalDictionaryRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListClusterExternalDictionaryRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterExternalDictionaryRequest {
    /// ID of the ClickHouse cluster to create the external dictionary for.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Configuration of the external dictionary.
    #[prost(message, optional, tag = "2")]
    pub external_dictionary: ::core::option::Option<
        config::clickhouse_config::ExternalDictionary,
    >,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterExternalDictionaryMetadata {
    /// ID of the cluster for which an external dictionary is being created.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterExternalDictionaryRequest {
    /// ID of the ClickHouse cluster to update the external dictionary for.
    /// To get the cluster ID, use a \[List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Configuration of the external dictionary.
    #[prost(message, optional, tag = "2")]
    pub external_dictionary: ::core::option::Option<
        config::clickhouse_config::ExternalDictionary,
    >,
    /// Field mask that specifies which fields of the External Dictionary should be updated.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterExternalDictionaryMetadata {
    /// ID of the cluster for which an external dictionary is being updated.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the external dictionary.
    #[prost(string, tag = "2")]
    pub external_dictionary_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterExternalDictionaryRequest {
    /// ID of the ClickHouse cluster to delete the external dictionary from.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the external dictionary to delete.
    #[prost(string, tag = "2")]
    pub external_dictionary_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterExternalDictionaryMetadata {
    /// ID of the cluster where an external dictionary is being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HostSpec {
    /// ID of the availability zone where the host resides.
    /// To get a list of available zones, use the \[yandex.cloud.compute.v1.ZoneService.List\] request.
    #[prost(string, tag = "1")]
    pub zone_id: ::prost::alloc::string::String,
    /// Type of the host to be deployed.
    #[prost(enumeration = "host::Type", tag = "2")]
    pub r#type: i32,
    /// ID of the subnet that the host should belong to. This subnet should be a part
    /// of the network that the cluster belongs to.
    /// The ID of the network is set in the \[Cluster.network_id\] field.
    #[prost(string, tag = "3")]
    pub subnet_id: ::prost::alloc::string::String,
    /// Whether the host should get a public IP address on creation.
    ///
    /// After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign
    /// a public IP to a host without one, recreate the host with \[assign_public_ip\] set as needed.
    ///
    /// Possible values:
    /// * false - don't assign a public IP to the host.
    /// * true - the host should have a public IP address.
    #[prost(bool, tag = "4")]
    pub assign_public_ip: bool,
    /// Name of the shard that the host is assigned to.
    #[prost(string, tag = "5")]
    pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSpec {
    /// Version of the ClickHouse server software.
    #[prost(string, tag = "3")]
    pub version: ::prost::alloc::string::String,
    /// Configuration and resources for a ClickHouse server.
    #[prost(message, optional, tag = "1")]
    pub clickhouse: ::core::option::Option<config_spec::Clickhouse>,
    /// Configuration and resources for a ZooKeeper server.
    #[prost(message, optional, tag = "2")]
    pub zookeeper: ::core::option::Option<config_spec::Zookeeper>,
    /// Time to start the daily backup, in the UTC timezone.
    #[prost(message, optional, tag = "4")]
    pub backup_window_start: ::core::option::Option<
        super::super::super::super::super::google::r#type::TimeOfDay,
    >,
    /// Access policy for external services.
    ///
    /// If you want a specific service to access the ClickHouse cluster, then set the necessary values in this policy.
    #[prost(message, optional, tag = "5")]
    pub access: ::core::option::Option<Access>,
    #[prost(message, optional, tag = "6")]
    pub cloud_storage: ::core::option::Option<CloudStorage>,
    /// Whether database management through SQL commands is enabled.
    #[prost(message, optional, tag = "7")]
    pub sql_database_management: ::core::option::Option<bool>,
    /// Whether user management through SQL commands is enabled.
    #[prost(message, optional, tag = "8")]
    pub sql_user_management: ::core::option::Option<bool>,
    /// Password for user 'admin' that has SQL user management access.
    #[prost(string, tag = "9")]
    pub admin_password: ::prost::alloc::string::String,
    /// Whether cluster should use embedded Keeper instead of Zookeeper
    #[prost(message, optional, tag = "10")]
    pub embedded_keeper: ::core::option::Option<bool>,
    /// Retain period of automatically created backup in days
    #[prost(message, optional, tag = "11")]
    pub backup_retain_period_days: ::core::option::Option<i64>,
}
/// Nested message and enum types in `ConfigSpec`.
pub mod config_spec {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Clickhouse {
        /// Configuration for a ClickHouse server.
        #[prost(message, optional, tag = "1")]
        pub config: ::core::option::Option<super::config::ClickhouseConfig>,
        /// Resources allocated to ClickHouse hosts.
        #[prost(message, optional, tag = "2")]
        pub resources: ::core::option::Option<super::Resources>,
    }
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Zookeeper {
        /// Resources allocated to ZooKeeper hosts. If not set, minimal available resources will be used.
        /// All available resource presets can be retrieved with a \[ResourcePresetService.List\] request.
        #[prost(message, optional, tag = "1")]
        pub resources: ::core::option::Option<super::Resources>,
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardConfigSpec {
    /// ClickHouse configuration for a shard.
    #[prost(message, optional, tag = "1")]
    pub clickhouse: ::core::option::Option<shard_config_spec::Clickhouse>,
}
/// Nested message and enum types in `ShardConfigSpec`.
pub mod shard_config_spec {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Clickhouse {
        /// ClickHouse settings for the shard.
        #[prost(message, optional, tag = "1")]
        pub config: ::core::option::Option<super::config::ClickhouseConfig>,
        /// Computational resources for the shard.
        #[prost(message, optional, tag = "2")]
        pub resources: ::core::option::Option<super::Resources>,
        /// Relative weight of the shard considered when writing data to the cluster.
        /// For details, see [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/table_engines/distributed/>).
        #[prost(message, optional, tag = "3")]
        pub weight: ::core::option::Option<i64>,
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardSpec {
    /// Name of the shard to be created.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Configuration of the shard to be created.
    #[prost(message, optional, tag = "2")]
    pub config_spec: ::core::option::Option<ShardConfigSpec>,
    /// Shard groups that contain the shard.
    #[prost(string, repeated, tag = "3")]
    pub shard_group_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Generated client implementations.
pub mod cluster_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ClickHouse clusters.
    #[derive(Debug, Clone)]
    pub struct ClusterServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ClusterServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> ClusterServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> ClusterServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            ClusterServiceClient::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
        }
        /// Returns the specified ClickHouse cluster.
        ///
        /// To get the list of available ClickHouse clusters, make a [List] request.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetClusterRequest>,
        ) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of ClickHouse clusters that belong
        /// to the specified folder.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClustersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClustersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a ClickHouse cluster in the specified folder.
        pub async fn create(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Create",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Create",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified ClickHouse cluster.
        pub async fn update(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Update",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Update",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified ClickHouse cluster.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Starts the specified ClickHouse cluster.
        pub async fn start(
            &mut self,
            request: impl tonic::IntoRequest<super::StartClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Start",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Start",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Stops the specified ClickHouse cluster.
        pub async fn stop(
            &mut self,
            request: impl tonic::IntoRequest<super::StopClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Stop",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Stop",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Moves a ClickHouse cluster to the specified folder.
        pub async fn r#move(
            &mut self,
            request: impl tonic::IntoRequest<super::MoveClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Move",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Move",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Adds a ZooKeeper subcluster to the specified ClickHouse cluster.
        pub async fn add_zookeeper(
            &mut self,
            request: impl tonic::IntoRequest<super::AddClusterZookeeperRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/AddZookeeper",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "AddZookeeper",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a backup for the specified ClickHouse cluster.
        pub async fn backup(
            &mut self,
            request: impl tonic::IntoRequest<super::BackupClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Backup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Backup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ClickHouse cluster using the specified backup.
        pub async fn restore(
            &mut self,
            request: impl tonic::IntoRequest<super::RestoreClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/Restore",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "Restore",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Reschedules planned maintenance operation.
        pub async fn reschedule_maintenance(
            &mut self,
            request: impl tonic::IntoRequest<super::RescheduleMaintenanceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/RescheduleMaintenance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "RescheduleMaintenance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves logs for the specified ClickHouse cluster.
        pub async fn list_logs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterLogsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterLogsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListLogs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListLogs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Same as ListLogs but using server-side streaming. Also allows for `tail -f` semantics.
        pub async fn stream_logs(
            &mut self,
            request: impl tonic::IntoRequest<super::StreamClusterLogsRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::StreamLogRecord>>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/StreamLogs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "StreamLogs",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Retrieves the list of Operation resources for the specified cluster.
        pub async fn list_operations(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterOperationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterOperationsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListOperations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListOperations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of available backups for the specified ClickHouse cluster.
        pub async fn list_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterBackupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterBackupsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListBackups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListBackups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of hosts for the specified cluster.
        pub async fn list_hosts(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterHostsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterHostsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListHosts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListHosts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates new hosts for a cluster.
        pub async fn add_hosts(
            &mut self,
            request: impl tonic::IntoRequest<super::AddClusterHostsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/AddHosts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "AddHosts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified hosts.
        pub async fn update_hosts(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateClusterHostsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/UpdateHosts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "UpdateHosts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified hosts for a cluster.
        pub async fn delete_hosts(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterHostsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/DeleteHosts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "DeleteHosts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn restart_hosts(
            &mut self,
            request: impl tonic::IntoRequest<super::RestartClusterHostsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/RestartHosts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "RestartHosts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified shard.
        pub async fn get_shard(
            &mut self,
            request: impl tonic::IntoRequest<super::GetClusterShardRequest>,
        ) -> std::result::Result<tonic::Response<super::Shard>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/GetShard",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "GetShard",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of shards that belong to the specified cluster.
        pub async fn list_shards(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterShardsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterShardsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListShards",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListShards",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new shard in the specified cluster.
        pub async fn add_shard(
            &mut self,
            request: impl tonic::IntoRequest<super::AddClusterShardRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/AddShard",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "AddShard",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates one or more shards in the specified cluster.
        pub async fn add_shards(
            &mut self,
            request: impl tonic::IntoRequest<super::AddClusterShardsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/AddShards",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "AddShards",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Modifies the specified shard.
        pub async fn update_shard(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateClusterShardRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/UpdateShard",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "UpdateShard",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified shard.
        pub async fn delete_shard(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterShardRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/DeleteShard",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "DeleteShard",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified shards (one or more).
        pub async fn delete_shards(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterShardsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/DeleteShards",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "DeleteShards",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns the specified shard group.
        pub async fn get_shard_group(
            &mut self,
            request: impl tonic::IntoRequest<super::GetClusterShardGroupRequest>,
        ) -> std::result::Result<tonic::Response<super::ShardGroup>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/GetShardGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "GetShardGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of shard groups that belong to specified cluster.
        pub async fn list_shard_groups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClusterShardGroupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterShardGroupsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListShardGroups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListShardGroups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new shard group in the specified cluster.
        pub async fn create_shard_group(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateClusterShardGroupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/CreateShardGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "CreateShardGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified shard group.
        pub async fn update_shard_group(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateClusterShardGroupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/UpdateShardGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "UpdateShardGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified shard group.
        pub async fn delete_shard_group(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterShardGroupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/DeleteShardGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "DeleteShardGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves a list of external dictionaries that belong to specified cluster.
        pub async fn list_external_dictionaries(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ListClusterExternalDictionariesRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::ListClusterExternalDictionariesResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/ListExternalDictionaries",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "ListExternalDictionaries",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates an external dictionary for the specified ClickHouse cluster.
        pub async fn create_external_dictionary(
            &mut self,
            request: impl tonic::IntoRequest<
                super::CreateClusterExternalDictionaryRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/CreateExternalDictionary",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "CreateExternalDictionary",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates an external dictionary for the specified ClickHouse cluster.
        pub async fn update_external_dictionary(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateClusterExternalDictionaryRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/UpdateExternalDictionary",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "UpdateExternalDictionary",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified external dictionary.
        pub async fn delete_external_dictionary(
            &mut self,
            request: impl tonic::IntoRequest<
                super::DeleteClusterExternalDictionaryRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.ClusterService/DeleteExternalDictionary",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ClusterService",
                        "DeleteExternalDictionary",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseRequest {
    /// ID of the ClickHouse cluster that the database belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the ClickHouse Database resource to return.
    /// To get the name of the database, use a \[DatabaseService.List\] request.
    #[prost(string, tag = "2")]
    pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
    /// ID of the ClickHouse cluster to list databases in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListDatabasesResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.  to get the next page of results, set \[page_token\] to the \[ListDatabasesResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResponse {
    /// List of ClickHouse databases.
    #[prost(message, repeated, tag = "1")]
    pub databases: ::prost::alloc::vec::Vec<Database>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListDatabasesRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListDatabasesRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
    /// ID of the ClickHouse cluster to create a database in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Configuration of the database to create.
    #[prost(message, optional, tag = "2")]
    pub database_spec: ::core::option::Option<DatabaseSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseMetadata {
    /// ID of the ClickHouse cluster where a database is being created.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the ClickHouse database that is being created.
    #[prost(string, tag = "2")]
    pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseRequest {
    /// ID of the ClickHouse cluster to delete a database in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the database to delete.
    /// To get the name of the database, use a \[DatabaseService.List\] request.
    #[prost(string, tag = "2")]
    pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseMetadata {
    /// ID of the ClickHouse cluster where a database is being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the ClickHouse database that is being deleted.
    #[prost(string, tag = "2")]
    pub database_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod database_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ClickHouse Database resources.
    /// NOTE: these methods are available only if database management through SQL is disabled.
    #[derive(Debug, Clone)]
    pub struct DatabaseServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl DatabaseServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> DatabaseServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> DatabaseServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            DatabaseServiceClient::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
        }
        /// Returns the specified ClickHouse Database resource.
        ///
        /// To get the list of available ClickHouse Database resources, make a [List] request.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
        ) -> std::result::Result<tonic::Response<super::Database>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.DatabaseService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.DatabaseService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of ClickHouse Database resources in the specified cluster.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListDatabasesResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.DatabaseService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.DatabaseService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new ClickHouse database in the specified cluster.
        pub async fn create(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.DatabaseService/Create",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.DatabaseService",
                        "Create",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified ClickHouse database.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.DatabaseService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.DatabaseService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormatSchema {
    /// Format schema name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ClickHouse cluster ID.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Schema type. Possible values are the following:
    ///
    /// * FORMAT_SCHEMA_TYPE_PROTOBUF - \[Protobuf\](<https://protobuf.dev/>) data format (including \[ProtobufSingle\](<https://clickhouse.com/docs/en/interfaces/formats#protobufsingle>)).
    /// * FORMAT_SCHEMA_TYPE_CAPNPROTO - [Cap'n Proto](<https://capnproto.org/>) data format.
    #[prost(enumeration = "FormatSchemaType", tag = "3")]
    pub r#type: i32,
    /// Link to the file of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FormatSchemaType {
    Unspecified = 0,
    Protobuf = 1,
    Capnproto = 2,
}
impl FormatSchemaType {
    /// 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 {
            FormatSchemaType::Unspecified => "FORMAT_SCHEMA_TYPE_UNSPECIFIED",
            FormatSchemaType::Protobuf => "FORMAT_SCHEMA_TYPE_PROTOBUF",
            FormatSchemaType::Capnproto => "FORMAT_SCHEMA_TYPE_CAPNPROTO",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FORMAT_SCHEMA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "FORMAT_SCHEMA_TYPE_PROTOBUF" => Some(Self::Protobuf),
            "FORMAT_SCHEMA_TYPE_CAPNPROTO" => Some(Self::Capnproto),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFormatSchemaRequest {
    /// ClickHouse cluster ID.
    ///
    /// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    ///
    /// To get a format schema name, use the \[FormatSchemaService.List\] method.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFormatSchemasRequest {
    /// ClickHouse cluster ID.
    ///
    /// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of the results is larger than \[page_size\], the service returns \[ListFormatSchemasResponse.next_page_token\]. You can use it to get the next page of the results in subsequent requests of a format schema list.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set \[page_token\] to the \[ListFormatSchemasResponse.next_page_token\] returned by the previous format schema list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFormatSchemasResponse {
    /// List of format schemas.
    #[prost(message, repeated, tag = "1")]
    pub format_schemas: ::prost::alloc::vec::Vec<FormatSchema>,
    /// This token allows you to get the next page of results when requesting the format schema list. If the number of the results is larger than \[ListFormatSchemasRequest.page_size\], use the \[next_page_token\] as the value for the \[ListFormatSchemasRequest.page_token\] parameter in the next request. Each subsequent request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFormatSchemaRequest {
    /// ClickHouse cluster ID.
    ///
    /// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
    /// Schema type. Possible values are the following:
    ///
    /// * FORMAT_SCHEMA_TYPE_PROTOBUF - \[Protobuf\](<https://protobuf.dev/>) data format (including \[ProtobufSingle\](<https://clickhouse.com/docs/en/interfaces/formats#protobufsingle>)).
    /// * FORMAT_SCHEMA_TYPE_CAPNPROTO - [Cap'n Proto](<https://capnproto.org/>) data format.
    #[prost(enumeration = "FormatSchemaType", tag = "3")]
    pub r#type: i32,
    /// [Link to the file](/docs/managed-clickhouse/operations/s3-access#get-link-to-object) of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFormatSchemaMetadata {
    /// ClickHouse cluster ID.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFormatSchemaRequest {
    /// ClickHouse cluster ID.
    ///
    /// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    ///
    /// To get a format schema name, use the \[FormatSchemaService.List\] method.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// [Link to the file](/docs/managed-clickhouse/operations/s3-access#get-link-to-object) of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFormatSchemaMetadata {
    /// ClickHouse cluster ID.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFormatSchemaRequest {
    /// ClickHouse cluster ID.
    ///
    /// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    ///
    /// To get a format schema name, use the \[FormatSchemaService.List\] method.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFormatSchemaMetadata {
    /// ClickHouse cluster ID.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Format schema name.
    #[prost(string, tag = "2")]
    pub format_schema_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod format_schema_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing [format schemas](https://clickhouse.com/docs/en/interfaces/formats) for input and output data.
    #[derive(Debug, Clone)]
    pub struct FormatSchemaServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl FormatSchemaServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> FormatSchemaServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> FormatSchemaServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            FormatSchemaServiceClient::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
        }
        /// Returns detailed information about a given format schema.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetFormatSchemaRequest>,
        ) -> std::result::Result<tonic::Response<super::FormatSchema>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.FormatSchemaService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Returns a list of format schemas in a cluster.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListFormatSchemasRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListFormatSchemasResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.FormatSchemaService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Adds a format schema to a cluster.
        pub async fn create(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateFormatSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.FormatSchemaService/Create",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
                        "Create",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Changes a format schema.
        pub async fn update(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateFormatSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.FormatSchemaService/Update",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
                        "Update",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a format schema from a cluster.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteFormatSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.FormatSchemaService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MlModel {
    /// Name of the the model.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// ID of the ClickHouse cluster that the model belongs to.
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Type of the model.
    #[prost(enumeration = "MlModelType", tag = "3")]
    pub r#type: i32,
    /// Model file URL. You can only use models stored in Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MlModelType {
    Unspecified = 0,
    /// CatBoost model.
    Catboost = 1,
}
impl MlModelType {
    /// 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 {
            MlModelType::Unspecified => "ML_MODEL_TYPE_UNSPECIFIED",
            MlModelType::Catboost => "ML_MODEL_TYPE_CATBOOST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ML_MODEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ML_MODEL_TYPE_CATBOOST" => Some(Self::Catboost),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMlModelRequest {
    /// ID of the cluster that the model belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the model to return.
    ///
    /// To get a model name make a \[MlModelService.List\] request.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMlModelsRequest {
    /// ID of the cluster that models belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than `page_size`, the service returns a \[ListMlModelsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    /// Default value: 100.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, set `page_token` to the
    /// \[ListMlModelsResponse.next_page_token\] returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMlModelsResponse {
    /// List of models in the specified cluster.
    #[prost(message, repeated, tag = "1")]
    pub ml_models: ::prost::alloc::vec::Vec<MlModel>,
    /// Token for getting the next page of the list. If the number of results is greater than
    /// the specified \[ListMlModelsRequest.page_size\], use `next_page_token` as the value
    /// for the \[ListMlModelsRequest.page_token\] parameter in the next list request.
    ///
    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMlModelRequest {
    /// ID of the cluster to create a model in.
    ///
    /// To get a cluster ID make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Model name. The model name is one of the arguments of the modelEvaluate() function, which is used to call the model in ClickHouse.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
    /// Type of the model.
    #[prost(enumeration = "MlModelType", tag = "3")]
    pub r#type: i32,
    /// Model file URL. You can only use models stored in Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMlModelMetadata {
    /// ID of the cluster that a model is being added to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the the model that is being created.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMlModelRequest {
    /// ID of the cluster to update the model in.
    ///
    /// To get a cluster ID make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the the model to update.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// The new model file URL. You can only use models stored in Object Storage.
    #[prost(string, tag = "4")]
    pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMlModelMetadata {
    /// ID of the cluster that contains the model being updated.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the the model that is being updated.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMlModelRequest {
    /// ID of the cluster to delete the model in.
    ///
    /// To get a cluster ID make a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the the model to delete.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMlModelMetadata {
    /// ID of the cluster that contains the model being deleted.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the the model that is being deleted.
    #[prost(string, tag = "2")]
    pub ml_model_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod ml_model_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing machine learning models.
    #[derive(Debug, Clone)]
    pub struct MlModelServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MlModelServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> MlModelServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> MlModelServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            MlModelServiceClient::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
        }
        /// Returns the specified machine learning model.
        ///
        /// To get the list of all available models, make a [List] request.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMlModelRequest>,
        ) -> std::result::Result<tonic::Response<super::MlModel>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.MlModelService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.MlModelService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of machine learning models in the specified cluster.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListMlModelsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListMlModelsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.MlModelService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.MlModelService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a machine learning model in the specified cluster.
        pub async fn create(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMlModelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.MlModelService/Create",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.MlModelService",
                        "Create",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified machine learning model.
        pub async fn update(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMlModelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.MlModelService/Update",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.MlModelService",
                        "Update",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified machine learning model.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteMlModelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.MlModelService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.MlModelService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// A ResourcePreset resource for describing hardware configuration presets.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourcePreset {
    /// ID of the ResourcePreset resource.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// IDs of availability zones where the resource preset is available.
    #[prost(string, repeated, tag = "2")]
    pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Number of CPU cores for a ClickHouse host created with the preset.
    #[prost(int64, tag = "3")]
    pub cores: i64,
    /// RAM volume for a ClickHouse host created with the preset, in bytes.
    #[prost(int64, tag = "4")]
    pub memory: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcePresetRequest {
    /// ID of the resource preset to return.
    /// To get the resource preset ID, use a \[ResourcePresetService.List\] request.
    #[prost(string, tag = "1")]
    pub resource_preset_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcePresetsRequest {
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListResourcePresetsResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token. To get the next page of results, Set \[page_token\] to the \[ListResourcePresetsResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcePresetsResponse {
    /// List of ResourcePreset resources.
    #[prost(message, repeated, tag = "1")]
    pub resource_presets: ::prost::alloc::vec::Vec<ResourcePreset>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListResourcePresetsRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListResourcePresetsRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod resource_preset_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ResourcePreset resources.
    #[derive(Debug, Clone)]
    pub struct ResourcePresetServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ResourcePresetServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> ResourcePresetServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> ResourcePresetServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            ResourcePresetServiceClient::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
        }
        /// Returns the specified ResourcePreset resource.
        ///
        /// To get the list of available ResourcePreset resources, make a [List] request.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetResourcePresetRequest>,
        ) -> std::result::Result<tonic::Response<super::ResourcePreset>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.ResourcePresetService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ResourcePresetService",
                        "Get",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of available ResourcePreset resources.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListResourcePresetsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListResourcePresetsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.ResourcePresetService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.ResourcePresetService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserRequest {
    /// ID of the ClickHouse cluster the user belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the ClickHouse User resource to return.
    /// To get the name of the user, use a \[UserService.List\] request.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersRequest {
    /// ID of the cluster to list ClickHouse users in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// The maximum number of results per page to return. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListUsersResponse.next_page_token\]
    /// that can be used to get the next page of results in subsequent list requests.
    #[prost(int64, tag = "2")]
    pub page_size: i64,
    /// Page token.  To get the next page of results, set \[page_token\] to the \[ListUsersResponse.next_page_token\]
    /// returned by the previous list request.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersResponse {
    /// List of ClickHouse User resources.
    #[prost(message, repeated, tag = "1")]
    pub users: ::prost::alloc::vec::Vec<User>,
    /// This token allows you to get the next page of results for list requests. If the number of results
    /// is larger than \[ListUsersRequest.page_size\], use the \[next_page_token\] as the value
    /// for the \[ListUsersRequest.page_token\] parameter in the next list request. Each subsequent
    /// list request will have its own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserRequest {
    /// ID of the ClickHouse cluster to create a user in.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Properties of the user to be created.
    #[prost(message, optional, tag = "2")]
    pub user_spec: ::core::option::Option<UserSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserMetadata {
    /// ID of the ClickHouse cluster the user is being created in.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user that is being created.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserRequest {
    /// ID of the ClickHouse cluster the user belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user to be updated.
    /// To get the name of the user, use a \[UserService.List\] request.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
    /// Field mask that specifies which attributes of the ClickHouse user should be updated.
    #[prost(message, optional, tag = "3")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// New password for the user.
    #[prost(string, tag = "4")]
    pub password: ::prost::alloc::string::String,
    /// New set of permissions for the user.
    #[prost(message, repeated, tag = "5")]
    pub permissions: ::prost::alloc::vec::Vec<Permission>,
    #[prost(message, optional, tag = "6")]
    pub settings: ::core::option::Option<UserSettings>,
    #[prost(message, repeated, tag = "7")]
    pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
    /// Generate password using Connection Manager.
    #[prost(message, optional, tag = "8")]
    pub generate_password: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserMetadata {
    /// ID of the ClickHouse cluster the user belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user that is being updated.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserRequest {
    /// ID of the ClickHouse cluster the user belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user to delete.
    /// To get the name of the user, use a \[UserService.List\] request.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserMetadata {
    /// ID of the ClickHouse cluster the user belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user that is being deleted.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionRequest {
    /// ID of the ClickHouse cluster the user belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user to grant the permission to.
    /// To get the name of the user, use a \[UserService.List\] request.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
    /// Permission that should be granted to the specified user.
    #[prost(message, optional, tag = "3")]
    pub permission: ::core::option::Option<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionMetadata {
    /// ID of the ClickHouse cluster the user belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user that is being granted a permission.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionRequest {
    /// ID of the ClickHouse cluster the user belongs to.
    /// To get the cluster ID, use a \[ClusterService.List\] request.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user to revoke a permission from.
    /// To get the name of the user, use a \[UserService.List\] request.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
    /// Name of the database that the user should lose access to.
    #[prost(string, tag = "3")]
    pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionMetadata {
    /// ID of the ClickHouse cluster the user belongs to.
    #[prost(string, tag = "1")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Name of the user whose permission is being revoked.
    #[prost(string, tag = "2")]
    pub user_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod user_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ClickHouse User resources.
    /// NOTE: these methods are available only if user management through SQL is disabled.
    #[derive(Debug, Clone)]
    pub struct UserServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl UserServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> UserServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> UserServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            UserServiceClient::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
        }
        /// Returns the specified ClickHouse User resource.
        ///
        /// To get the list of available ClickHouse User resources, make a [List] request.
        pub async fn get(
            &mut self,
            request: impl tonic::IntoRequest<super::GetUserRequest>,
        ) -> std::result::Result<tonic::Response<super::User>, 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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/Get",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("yandex.cloud.mdb.clickhouse.v1.UserService", "Get"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieves the list of ClickHouse User resources in the specified cluster.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListUsersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListUsersResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("yandex.cloud.mdb.clickhouse.v1.UserService", "List"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a ClickHouse user in the specified cluster.
        pub async fn create(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateUserRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/Create",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.UserService",
                        "Create",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the specified ClickHouse user.
        pub async fn update(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateUserRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/Update",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.UserService",
                        "Update",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes the specified ClickHouse user.
        pub async fn delete(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteUserRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/Delete",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.UserService",
                        "Delete",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Grants a permission to the specified ClickHouse user.
        pub async fn grant_permission(
            &mut self,
            request: impl tonic::IntoRequest<super::GrantUserPermissionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/GrantPermission",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.UserService",
                        "GrantPermission",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Revokes a permission from the specified ClickHouse user.
        pub async fn revoke_permission(
            &mut self,
            request: impl tonic::IntoRequest<super::RevokeUserPermissionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::operation::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(
                "/yandex.cloud.mdb.clickhouse.v1.UserService/RevokePermission",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.UserService",
                        "RevokePermission",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
    /// ID of the version.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Name of the version.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Whether version is deprecated.
    #[prost(bool, tag = "3")]
    pub deprecated: bool,
    /// List of versions that can be updated from current.
    #[prost(string, repeated, tag = "4")]
    pub updatable_to: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionsRequest {
    /// The maximum number of results per page that should be returned. If the number of available
    /// results is larger than \[page_size\], the service returns a \[ListVersionsResponse.next_page_token\] that can be used
    /// to get the next page of results in subsequent ListVersions requests.
    /// Default value: 100.
    #[prost(int64, tag = "1")]
    pub page_size: i64,
    /// Page token. Set \[page_token\] to the \[ListVersionsResponse.next_page_token\] returned by a previous ListVersions
    /// request to get the next page of results.
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionsResponse {
    /// Requested list of available versions.
    #[prost(message, repeated, tag = "1")]
    pub version: ::prost::alloc::vec::Vec<Version>,
    /// This token allows you to get the next page of results for ListVersions requests,
    /// if the number of results is larger than \[ListVersionsRequest.page_size\] specified in the request.
    /// To get the next page, specify the value of \[next_page_token\] as a value for
    /// the \[ListVersionsRequest.page_token\] parameter in the next ListVerions request. Subsequent ListVersions
    /// requests will have their own \[next_page_token\] to continue paging through the results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod versions_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A set of methods for managing ClickHouse versions.
    #[derive(Debug, Clone)]
    pub struct VersionsServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl VersionsServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> VersionsServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> VersionsServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            VersionsServiceClient::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
        }
        /// Returns list of available ClickHouse versions.
        pub async fn list(
            &mut self,
            request: impl tonic::IntoRequest<super::ListVersionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListVersionsResponse>,
            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(
                "/yandex.cloud.mdb.clickhouse.v1.VersionsService/List",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "yandex.cloud.mdb.clickhouse.v1.VersionsService",
                        "List",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}