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
// This file is @generated by prost-build.
/// Affiliation information of a resource
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Affiliation {
/// Optional. resource id of affiliated resource
#[prost(string, tag = "1")]
pub resource_id: ::prost::alloc::string::String,
/// Optional. Full resource name
#[prost(string, tag = "2")]
pub full_resource_name: ::prost::alloc::string::String,
/// Optional. Multiple lineages can be created from a resource.
/// For example, a resource can be replicated to multiple target resources.
/// In this case, there will be multiple lineages for the resource, one for
/// each target resource.
#[prost(message, repeated, tag = "3")]
pub lineages: ::prost::alloc::vec::Vec<affiliation::Lineage>,
}
/// Nested message and enum types in `Affiliation`.
pub mod affiliation {
/// lineage information of the affiliated resources
/// This captures source, target and process which created the lineage.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Lineage {
/// Optional. FQN of source table / column
#[prost(string, tag = "1")]
pub source_fqn: ::prost::alloc::string::String,
/// Optional. FQN of target table / column
#[prost(string, tag = "2")]
pub target_fqn: ::prost::alloc::string::String,
/// Optional. FQN of process which created the lineage i.e. dataplex,
/// datastream etc.
#[prost(string, tag = "3")]
pub process_fqn: ::prost::alloc::string::String,
/// Optional. Type of process which created the lineage.
#[prost(enumeration = "ProcessType", tag = "4")]
pub process_type: i32,
}
/// Type of process which created the lineage.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ProcessType {
/// Unspecified process type.
Unspecified = 0,
/// Composer process type.
Composer = 1,
/// Datastream process type.
Datastream = 2,
/// Dataflow process type.
Dataflow = 3,
/// Bigquery process type.
Bigquery = 4,
/// Data fusion process type.
DataFusion = 5,
/// Dataproc process type.
Dataproc = 6,
}
impl ProcessType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PROCESS_TYPE_UNSPECIFIED",
Self::Composer => "COMPOSER",
Self::Datastream => "DATASTREAM",
Self::Dataflow => "DATAFLOW",
Self::Bigquery => "BIGQUERY",
Self::DataFusion => "DATA_FUSION",
Self::Dataproc => "DATAPROC",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"COMPOSER" => Some(Self::Composer),
"DATASTREAM" => Some(Self::Datastream),
"DATAFLOW" => Some(Self::Dataflow),
"BIGQUERY" => Some(Self::Bigquery),
"DATA_FUSION" => Some(Self::DataFusion),
"DATAPROC" => Some(Self::Dataproc),
_ => None,
}
}
}
}
/// MachineConfig describes the configuration of a machine specific to a Database
/// Resource.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MachineConfig {
/// Memory size in bytes.
#[prost(int64, tag = "2")]
pub memory_size_bytes: i64,
/// Optional. The number of Shards (if applicable).
#[prost(int32, optional, tag = "3")]
pub shard_count: ::core::option::Option<i32>,
/// Optional. The number of vCPUs (if applicable).
#[prost(double, optional, tag = "4")]
pub vcpu_count: ::core::option::Option<f64>,
/// Optional. Baseline slots for BigQuery Reservations. Baseline slots are in
/// increments of 50.
#[prost(int64, optional, tag = "5")]
pub baseline_slot_count: ::core::option::Option<i64>,
/// Optional. Max slots for BigQuery Reservations. Max slots are in increments
/// of 50.
#[prost(int64, optional, tag = "6")]
pub max_reservation_slot_count: ::core::option::Option<i64>,
}
/// Maintenance window for the database resource. It specifies preferred time
/// and day of the week and phase in some cases, when the maintenance can start.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceMaintenanceSchedule {
/// Optional. Preferred time to start the maintenance operation on the
/// specified day.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<super::super::super::r#type::TimeOfDay>,
/// Optional. Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY,
/// etc.
#[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "2")]
pub day: i32,
/// Optional. Phase of the maintenance window. This is to capture order of
/// maintenance. For example, for Cloud SQL resources, this can be used to
/// capture if the maintenance window is in Week1, Week2, Week5, etc. Non
/// production resources are usually part of early phase.
/// For more details, refer to Cloud SQL resources -
/// <https://cloud.google.com/sql/docs/mysql/maintenance>
#[prost(enumeration = "Phase", tag = "3")]
pub phase: i32,
}
/// Deny maintenance period for the database resource. It specifies the time
/// range during which the maintenance cannot start. This is configured by the
/// customer.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceMaintenanceDenySchedule {
/// Optional. The start date of the deny maintenance period.
#[prost(message, optional, tag = "1")]
pub start_date: ::core::option::Option<super::super::super::r#type::Date>,
/// Optional. Deny period end date.
#[prost(message, optional, tag = "2")]
pub end_date: ::core::option::Option<super::super::super::r#type::Date>,
/// Optional. Time in UTC when the deny period starts on start_date and ends on
/// end_date.
#[prost(message, optional, tag = "3")]
pub time: ::core::option::Option<super::super::super::r#type::TimeOfDay>,
}
/// Upcoming maintenance window for the database resource.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpcomingMaintenance {
/// Output only. Start time of the upcoming maintenance.
/// Start time is always populated when an upcoming maintenance is
/// scheduled.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. End time of the upcoming maintenance. This is only populated
/// for an engine, if end time is public for the engine.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// MaintenanceInfo to capture the maintenance details of database resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceInfo {
/// Optional. Maintenance window for the database resource.
#[prost(message, optional, tag = "1")]
pub maintenance_schedule: ::core::option::Option<ResourceMaintenanceSchedule>,
/// Optional. List of Deny maintenance period for the database resource.
#[prost(message, repeated, tag = "2")]
pub deny_maintenance_schedules: ::prost::alloc::vec::Vec<
ResourceMaintenanceDenySchedule,
>,
/// Output only. Current Maintenance version of the database resource. Example:
/// "MYSQL_8_0_41.R20250531.01_15"
#[prost(string, tag = "3")]
pub maintenance_version: ::prost::alloc::string::String,
/// Output only. The date when the maintenance version was released.
#[prost(message, optional, tag = "4")]
pub current_version_release_date: ::core::option::Option<
super::super::super::r#type::Date,
>,
/// Output only. Upcoming maintenance window for the database resource. This is
/// only populated for an engine, if upcoming maintenance is scheduled for the
/// resource. This schedule is generated per engine and engine version, and
/// there is only one upcoming maintenance window at any given time. In case of
/// upcoming maintenance, the maintenance_state will be set to SCHEDULED first,
/// and then IN_PROGRESS when the maintenance window starts.
#[prost(message, optional, tag = "5")]
pub upcoming_maintenance: ::core::option::Option<UpcomingMaintenance>,
/// Output only. Resource maintenance state. This is to capture the current
/// state of the maintenance.
#[prost(enumeration = "MaintenanceState", tag = "6")]
pub state: i32,
/// Output only. List of possible reasons why the maintenance is not completed.
/// This is an optional field and is only populated if there are any
/// reasons for failures recorded for the maintenance by DB Center.
/// FAILURE maintenance status may not always have a failure reason.
#[prost(
enumeration = "PossibleFailureReason",
repeated,
packed = "false",
tag = "7"
)]
pub possible_failure_reasons: ::prost::alloc::vec::Vec<i32>,
/// Output only. Previous maintenance version of the database resource.
/// Example: "MYSQL_8_0_41.R20250531.01_15". This is available once a minor
/// version maintenance is complete on a database resource.
#[prost(string, tag = "8")]
pub previous_maintenance_version: ::prost::alloc::string::String,
}
/// Phase/Week of the maintenance window. This is to capture order of
/// maintenance. For example, for Cloud SQL resources -
/// <https://cloud.google.com/sql/docs/mysql/maintenance.>
/// This enum can be extended to support DB Center specific phases for
/// recommendation plan generation.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Phase {
/// Phase is unspecified.
Unspecified = 0,
/// Week 1.
Week1 = 1,
/// Week 2.
Week2 = 2,
/// Week 5.
Week5 = 3,
/// Any phase.
Any = 4,
}
impl Phase {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PHASE_UNSPECIFIED",
Self::Week1 => "PHASE_WEEK1",
Self::Week2 => "PHASE_WEEK2",
Self::Week5 => "PHASE_WEEK5",
Self::Any => "PHASE_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 {
"PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"PHASE_WEEK1" => Some(Self::Week1),
"PHASE_WEEK2" => Some(Self::Week2),
"PHASE_WEEK5" => Some(Self::Week5),
"PHASE_ANY" => Some(Self::Any),
_ => None,
}
}
}
/// Resource maintenance state.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MaintenanceState {
/// Status is unspecified.
Unspecified = 0,
/// Maintenance is scheduled.
Scheduled = 1,
/// Maintenance is in progress.
InProgress = 2,
/// Maintenance is completed.
Completed = 3,
/// Maintenance has failed.
Failed = 4,
}
impl MaintenanceState {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MAINTENANCE_STATE_UNSPECIFIED",
Self::Scheduled => "MAINTENANCE_STATE_SCHEDULED",
Self::InProgress => "MAINTENANCE_STATE_IN_PROGRESS",
Self::Completed => "MAINTENANCE_STATE_COMPLETED",
Self::Failed => "MAINTENANCE_STATE_FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MAINTENANCE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"MAINTENANCE_STATE_SCHEDULED" => Some(Self::Scheduled),
"MAINTENANCE_STATE_IN_PROGRESS" => Some(Self::InProgress),
"MAINTENANCE_STATE_COMPLETED" => Some(Self::Completed),
"MAINTENANCE_STATE_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
/// Possible reasons why the maintenance is not completed.
/// STATE_FAILED maintenance state may not always have a failure reason.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PossibleFailureReason {
/// Failure reason is unspecified.
Unspecified = 0,
/// Maintenance may not be completed because there is a deny policy
/// overlapping with upcoming maintenance schedule.
DenyPolicyConflict = 1,
/// Maintenance may not be completed because the instance is stopped.
InstanceInStoppedState = 2,
}
impl PossibleFailureReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "POSSIBLE_FAILURE_REASON_UNSPECIFIED",
Self::DenyPolicyConflict => "POSSIBLE_FAILURE_REASON_DENY_POLICY_CONFLICT",
Self::InstanceInStoppedState => {
"POSSIBLE_FAILURE_REASON_INSTANCE_IN_STOPPED_STATE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POSSIBLE_FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"POSSIBLE_FAILURE_REASON_DENY_POLICY_CONFLICT" => {
Some(Self::DenyPolicyConflict)
}
"POSSIBLE_FAILURE_REASON_INSTANCE_IN_STOPPED_STATE" => {
Some(Self::InstanceInStoppedState)
}
_ => None,
}
}
}
/// Metrics represents the metrics for a database resource.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Metrics {
/// P99 CPU utilization observed for the resource. The value is a
/// fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
#[prost(message, optional, tag = "1")]
pub p99_cpu_utilization: ::core::option::Option<MetricData>,
/// P95 CPU utilization observed for the resource. The value is a
/// fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
#[prost(message, optional, tag = "2")]
pub p95_cpu_utilization: ::core::option::Option<MetricData>,
/// Current storage used by the resource in bytes.
#[prost(message, optional, tag = "3")]
pub current_storage_used_bytes: ::core::option::Option<MetricData>,
/// Peak storage utilization observed for the resource. The value is a
/// fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
#[prost(message, optional, tag = "4")]
pub peak_storage_utilization: ::core::option::Option<MetricData>,
/// Peak memory utilization observed for the resource. The value is a
/// fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).
#[prost(message, optional, tag = "5")]
pub peak_memory_utilization: ::core::option::Option<MetricData>,
/// Peak number of connections observed for the resource. The value is a
/// positive integer.
#[prost(message, optional, tag = "6")]
pub peak_number_connections: ::core::option::Option<MetricData>,
/// Number of nodes in instance for spanner or bigtable.
#[prost(message, optional, tag = "7")]
pub node_count: ::core::option::Option<MetricData>,
/// Number of processing units in spanner.
#[prost(message, optional, tag = "8")]
pub processing_unit_count: ::core::option::Option<MetricData>,
/// Current memory used by the resource in bytes.
#[prost(message, optional, tag = "9")]
pub current_memory_used_bytes: ::core::option::Option<MetricData>,
}
/// MetricData represents the metric data for a database resource.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricData {
/// The value associated with the metric.
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<TypedValue>,
/// The time the metric was observed in the metric source service.
#[prost(message, optional, tag = "2")]
pub observation_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// TypedValue represents the value of the metric based on data type.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TypedValue {
/// The data type of metric value would be chosen based on the metric type.
#[prost(oneof = "typed_value::Value", tags = "1, 2")]
pub value: ::core::option::Option<typed_value::Value>,
}
/// Nested message and enum types in `TypedValue`.
pub mod typed_value {
/// The data type of metric value would be chosen based on the metric type.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Value {
/// The value of the metric as double.
#[prost(double, tag = "1")]
DoubleValue(f64),
/// The value of the metric as int.
#[prost(int64, tag = "2")]
Int64Value(i64),
}
}
/// OperationErrorType is used to expose specific error type which can happen in
/// database resource while performing an operation. For example, an error can
/// happen while database resource being backed up.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OperationErrorType {
/// UNSPECIFIED means operation error type is not known or available.
Unspecified = 0,
/// Key destroyed, expired, not found, unreachable or permission denied.
KmsKeyError = 1,
/// Database is not accessible.
DatabaseError = 2,
/// The zone or region does not have sufficient resources to handle the request
/// at the moment.
StockoutError = 3,
/// User initiated cancellation.
CancellationError = 4,
/// SQL server specific error.
SqlserverError = 5,
/// Any other internal error.
InternalError = 6,
}
impl OperationErrorType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OPERATION_ERROR_TYPE_UNSPECIFIED",
Self::KmsKeyError => "KMS_KEY_ERROR",
Self::DatabaseError => "DATABASE_ERROR",
Self::StockoutError => "STOCKOUT_ERROR",
Self::CancellationError => "CANCELLATION_ERROR",
Self::SqlserverError => "SQLSERVER_ERROR",
Self::InternalError => "INTERNAL_ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPERATION_ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"KMS_KEY_ERROR" => Some(Self::KmsKeyError),
"DATABASE_ERROR" => Some(Self::DatabaseError),
"STOCKOUT_ERROR" => Some(Self::StockoutError),
"CANCELLATION_ERROR" => Some(Self::CancellationError),
"SQLSERVER_ERROR" => Some(Self::SqlserverError),
"INTERNAL_ERROR" => Some(Self::InternalError),
_ => None,
}
}
}
/// Product specification for databasecenter resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Product {
/// Optional. Type of specific database product. It could be CloudSQL, AlloyDB
/// etc..
#[prost(enumeration = "ProductType", tag = "1")]
pub r#type: i32,
/// Optional. The specific engine that the underlying database is running.
#[prost(enumeration = "Engine", tag = "2")]
pub engine: i32,
/// Optional. Version of the underlying database engine. Example values: For
/// MySQL, it could be "8.0", "5.7" etc. For Postgres, it could be "14", "15"
/// etc.
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
/// Optional. Minor version of the underlying database engine. Example values:
/// For MySQL, it could be "8.0.35", "5.7.25" etc. For PostgreSQL, it could be
/// "14.4", "15.5" etc.
#[prost(string, tag = "4")]
pub minor_version: ::prost::alloc::string::String,
}
/// Engine refers to underlying database binary running in an instance.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Engine {
/// UNSPECIFIED means engine type is not known or available.
Unspecified = 0,
/// MySQL binary running as an engine in the database instance.
Mysql = 1,
/// Postgres binary running as engine in database instance.
Postgres = 2,
/// SQLServer binary running as engine in database instance.
SqlServer = 3,
/// Native database binary running as engine in instance.
Native = 4,
/// Memorystore with Redis dialect.
MemorystoreForRedis = 8,
/// Memorystore with Redis cluster dialect.
MemorystoreForRedisCluster = 9,
/// Firestore with native mode.
FirestoreWithNativeMode = 10,
/// Firestore with datastore mode.
FirestoreWithDatastoreMode = 11,
/// Oracle Exadata engine.
ExadataOracle = 12,
/// Oracle Autonomous DB Serverless engine.
AdbServerlessOracle = 13,
/// Firestore with MongoDB compatibility.
FirestoreWithMongodbCompatibilityMode = 14,
/// Other refers to rest of other database engine. This is to be when engine is
/// known, but it is not present in this enum.
Other = 6,
}
impl Engine {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ENGINE_UNSPECIFIED",
Self::Mysql => "ENGINE_MYSQL",
Self::Postgres => "ENGINE_POSTGRES",
Self::SqlServer => "ENGINE_SQL_SERVER",
Self::Native => "ENGINE_NATIVE",
Self::MemorystoreForRedis => "ENGINE_MEMORYSTORE_FOR_REDIS",
Self::MemorystoreForRedisCluster => "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER",
Self::FirestoreWithNativeMode => "ENGINE_FIRESTORE_WITH_NATIVE_MODE",
Self::FirestoreWithDatastoreMode => "ENGINE_FIRESTORE_WITH_DATASTORE_MODE",
Self::ExadataOracle => "ENGINE_EXADATA_ORACLE",
Self::AdbServerlessOracle => "ENGINE_ADB_SERVERLESS_ORACLE",
Self::FirestoreWithMongodbCompatibilityMode => {
"ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE"
}
Self::Other => "ENGINE_OTHER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
"ENGINE_MYSQL" => Some(Self::Mysql),
"ENGINE_POSTGRES" => Some(Self::Postgres),
"ENGINE_SQL_SERVER" => Some(Self::SqlServer),
"ENGINE_NATIVE" => Some(Self::Native),
"ENGINE_MEMORYSTORE_FOR_REDIS" => Some(Self::MemorystoreForRedis),
"ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER" => {
Some(Self::MemorystoreForRedisCluster)
}
"ENGINE_FIRESTORE_WITH_NATIVE_MODE" => Some(Self::FirestoreWithNativeMode),
"ENGINE_FIRESTORE_WITH_DATASTORE_MODE" => {
Some(Self::FirestoreWithDatastoreMode)
}
"ENGINE_EXADATA_ORACLE" => Some(Self::ExadataOracle),
"ENGINE_ADB_SERVERLESS_ORACLE" => Some(Self::AdbServerlessOracle),
"ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE" => {
Some(Self::FirestoreWithMongodbCompatibilityMode)
}
"ENGINE_OTHER" => Some(Self::Other),
_ => None,
}
}
}
/// ProductType is used to identify a database service offering either in a cloud
/// provider or on-premise. This enum needs to be updated whenever we introduce
/// a new ProductType.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductType {
/// PRODUCT_TYPE_UNSPECIFIED means product type is not known or that the user
/// didn't provide this field in the request.
Unspecified = 0,
/// Cloud SQL product area in Google Cloud
CloudSql = 1,
/// AlloyDB product area in Google Cloud
Alloydb = 2,
/// Spanner product area in Google Cloud
Spanner = 3,
/// Bigtable product area in Google Cloud
Bigtable = 6,
/// Memorystore product area in Google Cloud
Memorystore = 7,
/// Firestore product area in Google Cloud
Firestore = 8,
/// Compute Engine self managed databases
ComputeEngine = 9,
/// Oracle product area in Google Cloud
OracleOnGcp = 10,
/// BigQuery product area in Google Cloud
Bigquery = 11,
/// Other refers to rest of other product type. This is to be when product type
/// is known, but it is not present in this enum.
Other = 5,
}
impl ProductType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
Self::CloudSql => "PRODUCT_TYPE_CLOUD_SQL",
Self::Alloydb => "PRODUCT_TYPE_ALLOYDB",
Self::Spanner => "PRODUCT_TYPE_SPANNER",
Self::Bigtable => "PRODUCT_TYPE_BIGTABLE",
Self::Memorystore => "PRODUCT_TYPE_MEMORYSTORE",
Self::Firestore => "PRODUCT_TYPE_FIRESTORE",
Self::ComputeEngine => "PRODUCT_TYPE_COMPUTE_ENGINE",
Self::OracleOnGcp => "PRODUCT_TYPE_ORACLE_ON_GCP",
Self::Bigquery => "PRODUCT_TYPE_BIGQUERY",
Self::Other => "PRODUCT_TYPE_OTHER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCT_TYPE_CLOUD_SQL" => Some(Self::CloudSql),
"PRODUCT_TYPE_ALLOYDB" => Some(Self::Alloydb),
"PRODUCT_TYPE_SPANNER" => Some(Self::Spanner),
"PRODUCT_TYPE_BIGTABLE" => Some(Self::Bigtable),
"PRODUCT_TYPE_MEMORYSTORE" => Some(Self::Memorystore),
"PRODUCT_TYPE_FIRESTORE" => Some(Self::Firestore),
"PRODUCT_TYPE_COMPUTE_ENGINE" => Some(Self::ComputeEngine),
"PRODUCT_TYPE_ORACLE_ON_GCP" => Some(Self::OracleOnGcp),
"PRODUCT_TYPE_BIGQUERY" => Some(Self::Bigquery),
"PRODUCT_TYPE_OTHER" => Some(Self::Other),
_ => None,
}
}
}
/// The reason for suspension of the database resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SuspensionReason {
/// Suspension reason is unspecified.
Unspecified = 0,
/// Wipeout hide event.
WipeoutHideEvent = 1,
/// Wipeout purge event.
WipeoutPurgeEvent = 2,
/// Billing disabled for project
BillingDisabled = 3,
/// Abuse detected for resource
AbuserDetected = 4,
/// Encryption key inaccessible.
EncryptionKeyInaccessible = 5,
/// Replicated cluster encryption key inaccessible.
ReplicatedClusterEncryptionKeyInaccessible = 6,
}
impl SuspensionReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SUSPENSION_REASON_UNSPECIFIED",
Self::WipeoutHideEvent => "WIPEOUT_HIDE_EVENT",
Self::WipeoutPurgeEvent => "WIPEOUT_PURGE_EVENT",
Self::BillingDisabled => "BILLING_DISABLED",
Self::AbuserDetected => "ABUSER_DETECTED",
Self::EncryptionKeyInaccessible => "ENCRYPTION_KEY_INACCESSIBLE",
Self::ReplicatedClusterEncryptionKeyInaccessible => {
"REPLICATED_CLUSTER_ENCRYPTION_KEY_INACCESSIBLE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUSPENSION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"WIPEOUT_HIDE_EVENT" => Some(Self::WipeoutHideEvent),
"WIPEOUT_PURGE_EVENT" => Some(Self::WipeoutPurgeEvent),
"BILLING_DISABLED" => Some(Self::BillingDisabled),
"ABUSER_DETECTED" => Some(Self::AbuserDetected),
"ENCRYPTION_KEY_INACCESSIBLE" => Some(Self::EncryptionKeyInaccessible),
"REPLICATED_CLUSTER_ENCRYPTION_KEY_INACCESSIBLE" => {
Some(Self::ReplicatedClusterEncryptionKeyInaccessible)
}
_ => None,
}
}
}
/// A group of signal types that specifies what the user is interested in.
///
/// Used by QueryDatabaseResourceGroups API.
///
/// Example:
///
/// signal_type_group {
/// name = "AVAILABILITY"
/// types = \[SIGNAL_TYPE_NO_PROMOTABLE_REPLICA\]
/// }
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SignalTypeGroup {
/// Required. The display name of a signal group.
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
/// Optional. List of signal types present in the group.
#[prost(enumeration = "SignalType", repeated, packed = "false", tag = "2")]
pub signal_types: ::prost::alloc::vec::Vec<i32>,
}
/// A filter for Signals.
///
/// If signal_type is left unset, all signals should be returned.
/// For example, the following filter returns all issues.
/// signal_filter: {
/// signal_status: SIGNAL_STATUS_ISSUE;
/// }
///
/// Another example, the following filter returns issues of the given type:
/// signal_filter: {
/// type: SIGNAL_TYPE_NO_PROMOTABLE_REPLICA
/// signal_status: ISSUE
/// }
///
/// If signal_status is left unset or set to SIGNAL_STATE_UNSPECIFIED, an error
/// should be returned.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SignalFilter {
/// Optional. Represents the type of the Signal for which the filter is for.
#[prost(enumeration = "SignalType", tag = "1")]
pub signal_type: i32,
/// Optional. Represents the status of the Signal for which the filter is for.
#[prost(enumeration = "SignalStatus", tag = "2")]
pub signal_status: i32,
}
/// A group of signals and their counts.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalGroup {
/// Title of a signal group corresponding to the request.
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
/// When applied to a DatabaseResource represents count of issues associated
/// with the resource. A signal is an issue when its SignalStatus field is
/// set to SIGNAL_STATUS_ISSUE.
#[prost(int32, tag = "2")]
pub issue_count: i32,
/// List of signals present in the group and associated with the resource.
///
/// Only applies to a DatabaseResource.
#[prost(message, repeated, tag = "3")]
pub signals: ::prost::alloc::vec::Vec<Signal>,
}
/// Count of issues for a group of signals.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IssueCount {
/// Title of a signal group corresponding to the request.
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
/// The count of the number of issues associated with those resources that
/// are explicitly filtered in by the filters present in the request.
/// A signal is an issue when its SignalStatus field is set to
/// SIGNAL_STATUS_ISSUE.
#[prost(int32, tag = "2")]
pub issue_count: i32,
}
/// Details related to signal.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdditionalDetail {
/// Where the signal is coming from.
#[prost(enumeration = "SignalSource", tag = "1")]
pub signal_source: i32,
/// Type of the signal.
#[prost(enumeration = "SignalType", tag = "5")]
pub signal_type: i32,
/// Event time when signal was recorded by source service.
#[prost(message, optional, tag = "7")]
pub signal_event_time: ::core::option::Option<::prost_types::Timestamp>,
/// Details related to signal.
#[prost(
oneof = "additional_detail::Detail",
tags = "2, 3, 4, 6, 8, 9, 10, 11, 12, 13"
)]
pub detail: ::core::option::Option<additional_detail::Detail>,
}
/// Nested message and enum types in `AdditionalDetail`.
pub mod additional_detail {
/// Details related to signal.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Detail {
/// Short backup retention information applies to signals with type
/// SIGNAL_TYPE_SHORT_BACKUP_RETENTION.
#[prost(message, tag = "2")]
ShortBackupRetentionInfo(super::RetentionSettingsInfo),
/// Backup run information applies to signals with types
/// SIGNAL_TYPE_LAST_BACKUP_FAILED and SIGNAL_TYPE_LAST_BACKUP_OLD.
#[prost(message, tag = "3")]
BackupRunInfo(super::BackupRunInfo),
/// SCC information applies to SCC signals.
#[prost(message, tag = "4")]
SccInfo(super::SccInfo),
/// Recommendation information applies to recommendations.
#[prost(message, tag = "6")]
RecommendationInfo(super::RecommendationInfo),
/// Automated backup policy information applies to signals with type
/// SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY.
#[prost(message, tag = "8")]
AutomatedBackupPolicyInfo(super::AutomatedBackupPolicyInfo),
/// Deletion protection information applies to signals with type
/// \[SIGNAL_TYPE_NO_DELETION_PROTECTION\]\[google.cloud.databasecenter.v1beta.SignalType.SIGNAL_TYPE_NO_DELETION_PROTECTION\]
#[prost(message, tag = "9")]
DeletionProtectionInfo(super::DeletionProtectionInfo),
/// Resource suspension information applies to signals with type
/// \[SIGNAL_TYPE_RESOURCE_SUSPENDED\]\[google.cloud.databasecenter.v1beta.SignalType.SIGNAL_TYPE_RESOURCE_SUSPENDED\].
#[prost(message, tag = "10")]
ResourceSuspensionInfo(super::ResourceSuspensionInfo),
/// Inefficient query information applies to signals with type
/// \[SIGNAL_TYPE_INEFFICIENT_QUERY\]\[google.cloud.databasecenter.v1beta.SignalType.SIGNAL_TYPE_INEFFICIENT_QUERY\].
#[prost(message, tag = "11")]
InefficientQueryInfo(super::InefficientQueryInfo),
/// Outdated minor version information applies to signals with type
/// SIGNAL_TYPE_OUTDATED_MINOR_VERSION.
#[prost(message, tag = "12")]
OutdatedMinorVersionInfo(super::OutdatedMinorVersionInfo),
/// Maintenance recommendation information applies to signals
/// with type SIGNAL_TYPE_RECOMMENDED_MAINTENANCE_POLICIES.
#[prost(message, tag = "13")]
MaintenanceRecommendationInfo(super::MaintenanceRecommendationInfo),
}
}
/// Sub resource details
/// For Spanner/Bigtable instance certain data protection settings are at
/// sub resource level like database/table.
/// This message is used to capture such sub resource details.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubResource {
/// Optional. Resource type associated with the sub resource where backup
/// settings are configured. E.g. "spanner.googleapis.com/Database" for Spanner
/// where backup retention is configured on database within an instance
/// OPTIONAL
#[prost(string, tag = "1")]
pub resource_type: ::prost::alloc::string::String,
/// Optional. Resource name associated with the sub resource where backup
/// settings are configured.
/// E.g."//spanner.googleapis.com/projects/project1/instances/inst1/databases/db1"
/// for Spanner where backup retention is configured on database within
/// an instance
/// OPTIONAL
#[prost(string, tag = "2")]
pub full_resource_name: ::prost::alloc::string::String,
/// Optional. Product information associated with the sub resource where
/// backup retention settings are configured.
/// e.g.
///
/// ```text,
/// product: {
/// type : PRODUCT_TYPE_SPANNER
/// engine : ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT
/// }
/// ```
///
/// for Spanner where backup is configured on database within
/// an instance
/// OPTIONAL
#[prost(message, optional, tag = "3")]
pub product: ::core::option::Option<Product>,
/// Specifies where the resource is created. For Google Cloud resources, it is
/// the full name of the project.
#[prost(string, tag = "4")]
pub container: ::prost::alloc::string::String,
}
/// Metadata about backup retention settings for a database resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RetentionSettingsInfo {
/// Optional. Sub resource details associated with the backup configuration.
#[prost(message, optional, tag = "4")]
pub sub_resource: ::core::option::Option<SubResource>,
/// Depending on the value of retention_unit, this is used to determine
/// if a backup needs to be deleted. If retention_unit is 'COUNT', we will
/// retain this many backups.
#[prost(oneof = "retention_settings_info::Retention", tags = "3, 5, 6")]
pub retention: ::core::option::Option<retention_settings_info::Retention>,
}
/// Nested message and enum types in `RetentionSettingsInfo`.
pub mod retention_settings_info {
/// Depending on the value of retention_unit, this is used to determine
/// if a backup needs to be deleted. If retention_unit is 'COUNT', we will
/// retain this many backups.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Retention {
/// Number of backups that will be retained.
#[prost(message, tag = "3")]
QuantityBasedRetention(i32),
/// Duration based retention period i.e. 172800 seconds (2 days)
#[prost(message, tag = "5")]
DurationBasedRetention(::prost_types::Duration),
/// Timestamp based retention period i.e. till 2024-05-01T00:00:00Z
#[prost(message, tag = "6")]
TimestampBasedRetentionTime(::prost_types::Timestamp),
}
}
/// Automated backup policy signal info
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutomatedBackupPolicyInfo {
/// Optional. Sub resource details associated with the signal.
#[prost(message, optional, tag = "1")]
pub sub_resource: ::core::option::Option<SubResource>,
/// Is automated policy enabled.
#[prost(bool, tag = "2")]
pub is_enabled: bool,
}
/// Deletion protection signal info for a database resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletionProtectionInfo {
/// Optional. Sub resource details associated with the signal.
#[prost(message, optional, tag = "1")]
pub sub_resource: ::core::option::Option<SubResource>,
/// Is deletion protection enabled.
#[prost(bool, tag = "2")]
pub deletion_protection_enabled: bool,
}
/// Resource suspension info for a database resource.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceSuspensionInfo {
/// Is resource suspended.
#[prost(bool, tag = "1")]
pub resource_suspended: bool,
/// Suspension reason for the resource.
#[prost(enumeration = "SuspensionReason", tag = "2")]
pub suspension_reason: i32,
}
/// Metadata about latest backup run state for a database resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupRunInfo {
/// The time the backup operation started.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time the backup operation completed.
#[prost(message, optional, tag = "6")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The state of this run.
#[prost(enumeration = "backup_run_info::State", tag = "2")]
pub state: i32,
/// Additional information about the error encountered.
#[prost(string, tag = "3")]
pub error_message: ::prost::alloc::string::String,
/// Optional. OperationErrorType to expose specific error when backup operation
/// of database resource failed, that is state is FAILED.
#[prost(enumeration = "OperationErrorType", tag = "4")]
pub operation_error_type: i32,
/// Optional. Sub resource details associated with the backup run.
#[prost(message, optional, tag = "5")]
pub sub_resource: ::core::option::Option<SubResource>,
}
/// Nested message and enum types in `BackupRunInfo`.
pub mod backup_run_info {
/// The status of a backup run.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified.
Unspecified = 0,
/// The backup succeeded.
Succeeded = 1,
/// The backup was unsuccessful.
Failed = 2,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Succeeded => "SUCCEEDED",
Self::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
}
/// Metadata about inefficient query signal info for a database resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InefficientQueryInfo {
/// Name of the database where index is required. For example, "db1", which is
/// the name of the database present in the instance.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Name of the table where index is required
#[prost(string, tag = "2")]
pub table: ::prost::alloc::string::String,
/// SQL statement of the index. Based on the ddl type, this will be either
/// CREATE INDEX or DROP INDEX.
#[prost(string, tag = "3")]
pub sql_index_statement: ::prost::alloc::string::String,
/// Cost of additional disk usage in bytes
#[prost(int64, tag = "4")]
pub storage_cost_bytes: i64,
/// Count of queries to be impacted if index is applied
#[prost(int64, tag = "5")]
pub impacted_queries_count: i64,
}
/// Info associated with SCC signals.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SccInfo {
/// Name of the signal.
#[prost(string, tag = "1")]
pub signal: ::prost::alloc::string::String,
/// Name by which SCC calls this signal.
#[prost(string, tag = "2")]
pub category: ::prost::alloc::string::String,
/// Compliances that are associated with the signal.
#[prost(message, repeated, tag = "3")]
pub regulatory_standards: ::prost::alloc::vec::Vec<RegulatoryStandard>,
/// External URI which points to a SCC page associated with the signal.
#[prost(string, tag = "4")]
pub external_uri: ::prost::alloc::string::String,
}
/// Info associated with recommendation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RecommendationInfo {
/// Name of recommendation.
/// Examples:
/// organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876
#[prost(string, tag = "1")]
pub recommender: ::prost::alloc::string::String,
/// ID of recommender.
/// Examples: "google.cloudsql.instance.PerformanceRecommender"
#[prost(string, tag = "2")]
pub recommender_id: ::prost::alloc::string::String,
/// Contains an identifier for a subtype of recommendations produced for the
/// same recommender. Subtype is a function of content and impact, meaning a
/// new subtype might be added when significant changes to `content` or
/// `primary_impact.category` are introduced. See the Recommenders section
/// to see a list of subtypes for a given Recommender.
///
/// Examples:
/// For recommender = "google.cloudsql.instance.PerformanceRecommender",
/// recommender_subtype can be
/// "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE"
#[prost(string, tag = "3")]
pub recommender_subtype: ::prost::alloc::string::String,
}
/// Compliances associated with signals.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegulatoryStandard {
/// Name of industry compliance standards, such as such as CIS, PCI, and
/// OWASP.
#[prost(string, tag = "1")]
pub standard: ::prost::alloc::string::String,
/// Version of the standard or benchmark, for example, 1.1.
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
}
/// Info associated with outdated minor version.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OutdatedMinorVersionInfo {
/// Recommended minor version of the underlying database engine. Example
/// values: For MySQL, it could be "8.0.35", "5.7.25" etc. For PostgreSQL, it
/// could be "14.4", "15.5" etc.
#[prost(string, tag = "1")]
pub recommended_minor_version: ::prost::alloc::string::String,
}
/// Info associated with maintenance recommendation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceRecommendationInfo {
/// Optional. List of recommended maintenance schedules for the database
/// resource.
#[prost(message, repeated, tag = "1")]
pub resource_maintenance_schedules: ::prost::alloc::vec::Vec<
ResourceMaintenanceSchedule,
>,
}
/// Represents a signal.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Signal {
/// Type of the signal.
#[prost(enumeration = "SignalType", tag = "1")]
pub signal_type: i32,
/// Status of the signal.
#[prost(enumeration = "SignalStatus", tag = "2")]
pub signal_status: i32,
/// Additional information related to the signal.
/// In the case of composite signals, this field encapsulates details
/// associated with granular signals, having a signal status of "ISSUE";
/// signals with a status of "OK" are not included.
/// For granular signals, it encompasses information relevant to the signal,
/// regardless of the signal status.
#[prost(message, repeated, tag = "3")]
pub additional_details: ::prost::alloc::vec::Vec<AdditionalDetail>,
/// Severity of the issue.
#[prost(enumeration = "IssueSeverity", tag = "4")]
pub issue_severity: i32,
/// Timestamp when the issue was created (when signal status is ISSUE).
#[prost(message, optional, tag = "5")]
pub issue_create_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Represents the state of a signal. More enum values are expected to be added
/// as needed.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SignalStatus {
/// Unspecified.
Unspecified = 0,
/// Signal is not applicable to the resource.
NotApplicable = 1,
/// Signal is not an issue.
Ok = 2,
/// Signal is an issue.
Issue = 3,
/// Signal is not enabled for the resource.
NotEnabled = 4,
}
impl SignalStatus {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SIGNAL_STATUS_UNSPECIFIED",
Self::NotApplicable => "SIGNAL_STATUS_NOT_APPLICABLE",
Self::Ok => "SIGNAL_STATUS_OK",
Self::Issue => "SIGNAL_STATUS_ISSUE",
Self::NotEnabled => "SIGNAL_STATUS_NOT_ENABLED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"SIGNAL_STATUS_NOT_APPLICABLE" => Some(Self::NotApplicable),
"SIGNAL_STATUS_OK" => Some(Self::Ok),
"SIGNAL_STATUS_ISSUE" => Some(Self::Issue),
"SIGNAL_STATUS_NOT_ENABLED" => Some(Self::NotEnabled),
_ => None,
}
}
}
/// Represents the source system from where a signal comes from.
/// More enum values are expected to be added as needed.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SignalSource {
/// Unspecified.
Unspecified = 0,
/// Signal comes from resource metadata.
ResourceMetadata = 1,
/// Signal comes from SCC findings.
SecurityFindings = 2,
/// Signal comes from recommender hub.
Recommender = 3,
/// Signal comes from modern observability platform.
ModernObservability = 4,
}
impl SignalSource {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SIGNAL_SOURCE_UNSPECIFIED",
Self::ResourceMetadata => "SIGNAL_SOURCE_RESOURCE_METADATA",
Self::SecurityFindings => "SIGNAL_SOURCE_SECURITY_FINDINGS",
Self::Recommender => "SIGNAL_SOURCE_RECOMMENDER",
Self::ModernObservability => "SIGNAL_SOURCE_MODERN_OBSERVABILITY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNAL_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"SIGNAL_SOURCE_RESOURCE_METADATA" => Some(Self::ResourceMetadata),
"SIGNAL_SOURCE_SECURITY_FINDINGS" => Some(Self::SecurityFindings),
"SIGNAL_SOURCE_RECOMMENDER" => Some(Self::Recommender),
"SIGNAL_SOURCE_MODERN_OBSERVABILITY" => Some(Self::ModernObservability),
_ => None,
}
}
}
/// IssueSeverity represents the severity of an issue.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IssueSeverity {
/// Unspecified.
Unspecified = 0,
/// Low severity.
Low = 1,
/// Medium severity.
Medium = 2,
/// High severity.
High = 3,
/// Critical severity.
Critical = 4,
/// Irrelevant severity. This means the issue should not be surfaced at all.
Irrelevant = 5,
}
impl IssueSeverity {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ISSUE_SEVERITY_UNSPECIFIED",
Self::Low => "ISSUE_SEVERITY_LOW",
Self::Medium => "ISSUE_SEVERITY_MEDIUM",
Self::High => "ISSUE_SEVERITY_HIGH",
Self::Critical => "ISSUE_SEVERITY_CRITICAL",
Self::Irrelevant => "ISSUE_SEVERITY_IRRELEVANT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ISSUE_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"ISSUE_SEVERITY_LOW" => Some(Self::Low),
"ISSUE_SEVERITY_MEDIUM" => Some(Self::Medium),
"ISSUE_SEVERITY_HIGH" => Some(Self::High),
"ISSUE_SEVERITY_CRITICAL" => Some(Self::Critical),
"ISSUE_SEVERITY_IRRELEVANT" => Some(Self::Irrelevant),
_ => None,
}
}
}
/// Represents the type of a signal. More values are expected to be added
/// as needed.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SignalType {
/// Unspecified.
Unspecified = 0,
/// Represents if a resource is protected by automatic failover.
/// Checks for resources that are configured to have redundancy
/// within a region that enables automatic failover.
ResourceFailoverProtected = 1,
/// Represents if a group is replicating across regions.
/// Checks for resources that are configured to have redundancy,
/// and ongoing replication, across regions.
GroupMultiregional = 2,
/// Represents if a resource has an automated backup policy.
NoAutomatedBackupPolicy = 4,
/// Represents if a resources has a short backup retention period.
ShortBackupRetention = 5,
/// Represents if the last backup of a resource failed.
LastBackupFailed = 6,
/// Represents if the last backup of a resource is older than some threshold
/// value.
LastBackupOld = 7,
/// Represents if a resource violates CIS Google Cloud Platform Foundation 2.0.
ViolatesCisGcpFoundation20 = 8,
/// Represents if a resource violates CIS Google Cloud Platform Foundation 1.3.
ViolatesCisGcpFoundation13 = 9,
/// Represents if a resource violates CIS Google Cloud Platform Foundation 1.2.
ViolatesCisGcpFoundation12 = 10,
/// Represents if a resource violates CIS Google Cloud Platform Foundation 1.1.
ViolatesCisGcpFoundation11 = 11,
/// Represents if a resource violates CIS Google Cloud Platform Foundation 1.0.
ViolatesCisGcpFoundation10 = 12,
/// Represents if a resource violates CIS Controls 8.0.
ViolatesCisControlsV80 = 76,
/// Represents if a resource violates NIST 800-53.
ViolatesNist80053 = 13,
/// Represents if a resource violates NIST 800-53 R5.
ViolatesNist80053R5 = 69,
/// Represents if a resource violates NIST Cybersecurity Framework 1.0.
ViolatesNistCybersecurityFrameworkV10 = 72,
/// Represents if a resource violates ISO-27001.
ViolatesIso27001 = 14,
/// Represents if a resource violates ISO 27001 2022.
ViolatesIso27001V2022 = 70,
/// Represents if a resource violates PCI-DSS v3.2.1.
ViolatesPciDssV321 = 15,
/// Represents if a resource violates PCI-DSS v4.0.
ViolatesPciDssV40 = 71,
/// Represents if a resource violates Cloud Controls Matrix v4.0.
ViolatesCloudControlsMatrixV4 = 73,
/// Represents if a resource violates HIPAA.
ViolatesHipaa = 74,
/// Represents if a resource violates SOC2 v2017.
ViolatesSoc2V2017 = 75,
/// Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL
/// instance is not set to on.
LogsNotOptimizedForTroubleshooting = 16,
/// Represents if the log_duration database flag for a Cloud SQL for PostgreSQL
/// instance is not set to on.
QueryDurationsNotLogged = 17,
/// Represents if the log_error_verbosity database flag for a Cloud SQL for
/// PostgreSQL instance is not set to default or stricter (default or terse).
VerboseErrorLogging = 18,
/// Represents if the log_lock_waits database flag for a Cloud SQL for
/// PostgreSQL instance is not set to on.
QueryLockWaitsNotLogged = 19,
/// Represents if the log_min_error_statement database flag for a Cloud SQL
/// for PostgreSQL instance is not set appropriately.
LoggingMostErrors = 20,
/// Represents if the log_min_error_statement database flag for a Cloud SQL
/// for PostgreSQL instance does not have an appropriate severity level.
LoggingOnlyCriticalErrors = 21,
/// Represents if the log_min_messages database flag for a Cloud SQL for
/// PostgreSQL instance is not set to warning or another recommended value.
MinimalErrorLogging = 22,
/// Represents if the databaseFlags property of instance metadata for
/// the log_executor_status field is set to on.
QueryStatsLogged = 23,
/// Represents if the log_hostname database flag for a Cloud SQL for
/// PostgreSQL instance is not set to off.
ExcessiveLoggingOfClientHostname = 24,
/// Represents if the log_parser_stats database flag for a Cloud SQL for
/// PostgreSQL instance is not set to off.
ExcessiveLoggingOfParserStats = 25,
/// Represents if the log_planner_stats database flag for a Cloud SQL for
/// PostgreSQL instance is not set to off.
ExcessiveLoggingOfPlannerStats = 26,
/// Represents if the log_statement database flag for a Cloud SQL for
/// PostgreSQL instance is not set to DDL (all data definition statements).
NotLoggingOnlyDdlStatements = 27,
/// Represents if the log_statement_stats database flag for a Cloud SQL for
/// PostgreSQL instance is not set to off.
LoggingQueryStats = 28,
/// Represents if the log_temp_files database flag for a Cloud SQL for
/// PostgreSQL instance is not set to "0". (NOTE: 0 = ON)
NotLoggingTemporaryFiles = 29,
/// Represents if the user connections database flag for a Cloud SQL for SQL
/// Server instance is configured.
ConnectionMaxNotConfigured = 30,
/// Represents if the user options database flag for Cloud SQL SQL Server
/// instance is configured or not.
UserOptionsConfigured = 31,
/// Represents if a resource is exposed to public access.
ExposedToPublicAccess = 32,
/// Represents if a resources requires all incoming connections to use SSL
/// or not.
UnencryptedConnections = 33,
/// Represents if a Cloud SQL database has a password configured for the
/// root account or not.
NoRootPassword = 34,
/// Represents if a Cloud SQL database has a weak password configured for the
/// root account.
WeakRootPassword = 35,
/// Represents if a SQL database instance is not encrypted with
/// customer-managed encryption keys (CMEK).
EncryptionKeyNotCustomerManaged = 36,
/// Represents if The contained database authentication database flag for a
/// Cloud SQL for SQL Server instance is not set to off.
ServerAuthenticationNotRequired = 37,
/// Represents if he external scripts enabled database flag for a Cloud SQL
/// for SQL Server instance is not set to off.
ExposedToExternalScripts = 39,
/// Represents if the local_infile database flag for a Cloud SQL for MySQL
/// instance is not set to off.
ExposedToLocalDataLoads = 40,
/// Represents if the log_connections database flag for a Cloud SQL for
/// PostgreSQL instance is not set to on.
ConnectionAttemptsNotLogged = 41,
/// Represents if the log_disconnections database flag for a Cloud SQL for
/// PostgreSQL instance is not set to on.
DisconnectionsNotLogged = 42,
/// Represents if the log_min_duration_statement database flag for a Cloud SQL
/// for PostgreSQL instance is not set to -1.
LoggingExcessiveStatementInfo = 43,
/// Represents if the remote access database flag for a Cloud SQL for SQL
/// Server instance is not set to off.
ExposedToRemoteAccess = 44,
/// Represents if the skip_show_database database flag for a Cloud SQL for
/// MySQL instance is not set to on.
DatabaseNamesExposed = 45,
/// Represents if the 3625 (trace flag) database flag for a Cloud SQL for
/// SQL Server instance is not set to on.
SensitiveTraceInfoNotMasked = 46,
/// Represents if public IP is enabled.
PublicIpEnabled = 47,
/// Represents idle instance helps to reduce costs.
Idle = 48,
/// Represents instances that are unnecessarily large for given workload.
Overprovisioned = 49,
/// Represents high number of concurrently opened tables.
HighNumberOfOpenTables = 50,
/// Represents high table count close to SLA limit.
HighNumberOfTables = 51,
/// Represents high number of unvacuumed transactions
HighTransactionIdUtilization = 52,
/// Represents need for more CPU and/or memory
Underprovisioned = 53,
/// Represents out of disk.
OutOfDisk = 54,
/// Represents server certificate is near expiry.
ServerCertificateNearExpiry = 55,
/// Represents database auditing is disabled.
DatabaseAuditingDisabled = 56,
/// Represents not restricted to authorized networks.
RestrictAuthorizedNetworks = 57,
/// Represents violate org policy restrict public ip.
ViolatePolicyRestrictPublicIp = 58,
/// Cluster nearing quota limit
QuotaLimit = 59,
/// No password policy set on resources
NoPasswordPolicy = 60,
/// Performance impact of connections settings
ConnectionsPerformanceImpact = 61,
/// Performance impact of temporary tables settings
TmpTablesPerformanceImpact = 62,
/// Performance impact of transaction logs settings
TransLogsPerformanceImpact = 63,
/// Performance impact of high joins without indexes
HighJoinsWithoutIndexes = 64,
/// Detects events where a database superuser (postgres for PostgreSQL servers
/// or root for MySQL users) writes to non-system tables.
SuperuserWritingToUserTables = 65,
/// Detects events where a database user or role has been granted all
/// privileges to a database, or to all tables, procedures, or functions in a
/// schema.
UserGrantedAllPermissions = 66,
/// Detects if database instance data exported to a Cloud Storage bucket
/// outside of the organization.
DataExportToExternalCloudStorageBucket = 67,
/// Detects if database instance data exported to a Cloud Storage bucket that
/// is owned by the organization and is publicly accessible.
DataExportToPublicCloudStorageBucket = 68,
/// Detects if a database instance is using a weak password hash algorithm.
WeakPasswordHashAlgorithm = 77,
/// Detects if a database instance has no user password policy set.
NoUserPasswordPolicy = 78,
/// Detects if a database instance/cluster has a hot node.
HotNode = 79,
/// Deletion Protection Disabled for the resource
NoDeletionProtection = 80,
/// Detects if a database instance has no point in time recovery enabled.
NoPointInTimeRecovery = 81,
/// Detects if a database instance/cluster has suspended resources.
ResourceSuspended = 82,
/// Detects that expensive commands are being run on a database instance
/// impacting overall performance.
ExpensiveCommands = 83,
/// Indicates that the instance does not have a maintenance policy configured.
NoMaintenancePolicyConfigured = 84,
/// Indicates that the instance has inefficient queries detected.
InefficientQuery = 85,
/// Indicates that the instance has read intensive workload.
ReadIntensiveWorkload = 86,
/// Indicates that the instance is nearing memory limit.
MemoryLimit = 87,
/// Indicates that the instance's max server memory is configured higher than
/// the recommended value.
MaxServerMemory = 88,
/// Indicates that the database has large rows beyond the recommended limit.
LargeRows = 89,
/// Heavy write pressure on the database rows.
HighWritePressure = 90,
/// Heavy read pressure on the database rows.
HighReadPressure = 91,
/// Encryption org policy not satisfied.
EncryptionOrgPolicyNotSatisfied = 92,
/// Location org policy not satisfied.
LocationOrgPolicyNotSatisfied = 93,
/// Outdated DB minor version.
OutdatedMinorVersion = 94,
/// Schema not optimized.
SchemaNotOptimized = 95,
/// Replication delay.
ReplicationLag = 97,
/// Outdated client.
OutdatedClient = 99,
/// Databoost is disabled.
DataboostDisabled = 100,
/// Recommended maintenance policy.
RecommendedMaintenancePolicies = 101,
/// Resource version is in extended support.
ExtendedSupport = 102,
/// Represents a database version nearing end of life.
VersionNearingEndOfLife = 104,
}
impl SignalType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SIGNAL_TYPE_UNSPECIFIED",
Self::ResourceFailoverProtected => "SIGNAL_TYPE_RESOURCE_FAILOVER_PROTECTED",
Self::GroupMultiregional => "SIGNAL_TYPE_GROUP_MULTIREGIONAL",
Self::NoAutomatedBackupPolicy => "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY",
Self::ShortBackupRetention => "SIGNAL_TYPE_SHORT_BACKUP_RETENTION",
Self::LastBackupFailed => "SIGNAL_TYPE_LAST_BACKUP_FAILED",
Self::LastBackupOld => "SIGNAL_TYPE_LAST_BACKUP_OLD",
Self::ViolatesCisGcpFoundation20 => {
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0"
}
Self::ViolatesCisGcpFoundation13 => {
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3"
}
Self::ViolatesCisGcpFoundation12 => {
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2"
}
Self::ViolatesCisGcpFoundation11 => {
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1"
}
Self::ViolatesCisGcpFoundation10 => {
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0"
}
Self::ViolatesCisControlsV80 => "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0",
Self::ViolatesNist80053 => "SIGNAL_TYPE_VIOLATES_NIST_800_53",
Self::ViolatesNist80053R5 => "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5",
Self::ViolatesNistCybersecurityFrameworkV10 => {
"SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0"
}
Self::ViolatesIso27001 => "SIGNAL_TYPE_VIOLATES_ISO_27001",
Self::ViolatesIso27001V2022 => "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022",
Self::ViolatesPciDssV321 => "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1",
Self::ViolatesPciDssV40 => "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0",
Self::ViolatesCloudControlsMatrixV4 => {
"SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4"
}
Self::ViolatesHipaa => "SIGNAL_TYPE_VIOLATES_HIPAA",
Self::ViolatesSoc2V2017 => "SIGNAL_TYPE_VIOLATES_SOC2_V2017",
Self::LogsNotOptimizedForTroubleshooting => {
"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING"
}
Self::QueryDurationsNotLogged => "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED",
Self::VerboseErrorLogging => "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING",
Self::QueryLockWaitsNotLogged => "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED",
Self::LoggingMostErrors => "SIGNAL_TYPE_LOGGING_MOST_ERRORS",
Self::LoggingOnlyCriticalErrors => "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS",
Self::MinimalErrorLogging => "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING",
Self::QueryStatsLogged => "SIGNAL_TYPE_QUERY_STATS_LOGGED",
Self::ExcessiveLoggingOfClientHostname => {
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME"
}
Self::ExcessiveLoggingOfParserStats => {
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATS"
}
Self::ExcessiveLoggingOfPlannerStats => {
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATS"
}
Self::NotLoggingOnlyDdlStatements => {
"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS"
}
Self::LoggingQueryStats => "SIGNAL_TYPE_LOGGING_QUERY_STATS",
Self::NotLoggingTemporaryFiles => "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES",
Self::ConnectionMaxNotConfigured => {
"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED"
}
Self::UserOptionsConfigured => "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED",
Self::ExposedToPublicAccess => "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS",
Self::UnencryptedConnections => "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS",
Self::NoRootPassword => "SIGNAL_TYPE_NO_ROOT_PASSWORD",
Self::WeakRootPassword => "SIGNAL_TYPE_WEAK_ROOT_PASSWORD",
Self::EncryptionKeyNotCustomerManaged => {
"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED"
}
Self::ServerAuthenticationNotRequired => {
"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED"
}
Self::ExposedToExternalScripts => "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS",
Self::ExposedToLocalDataLoads => "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS",
Self::ConnectionAttemptsNotLogged => {
"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED"
}
Self::DisconnectionsNotLogged => "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED",
Self::LoggingExcessiveStatementInfo => {
"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO"
}
Self::ExposedToRemoteAccess => "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS",
Self::DatabaseNamesExposed => "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED",
Self::SensitiveTraceInfoNotMasked => {
"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED"
}
Self::PublicIpEnabled => "SIGNAL_TYPE_PUBLIC_IP_ENABLED",
Self::Idle => "SIGNAL_TYPE_IDLE",
Self::Overprovisioned => "SIGNAL_TYPE_OVERPROVISIONED",
Self::HighNumberOfOpenTables => "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES",
Self::HighNumberOfTables => "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES",
Self::HighTransactionIdUtilization => {
"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION"
}
Self::Underprovisioned => "SIGNAL_TYPE_UNDERPROVISIONED",
Self::OutOfDisk => "SIGNAL_TYPE_OUT_OF_DISK",
Self::ServerCertificateNearExpiry => {
"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY"
}
Self::DatabaseAuditingDisabled => "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED",
Self::RestrictAuthorizedNetworks => {
"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS"
}
Self::ViolatePolicyRestrictPublicIp => {
"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP"
}
Self::QuotaLimit => "SIGNAL_TYPE_QUOTA_LIMIT",
Self::NoPasswordPolicy => "SIGNAL_TYPE_NO_PASSWORD_POLICY",
Self::ConnectionsPerformanceImpact => {
"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT"
}
Self::TmpTablesPerformanceImpact => {
"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT"
}
Self::TransLogsPerformanceImpact => {
"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT"
}
Self::HighJoinsWithoutIndexes => "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES",
Self::SuperuserWritingToUserTables => {
"SIGNAL_TYPE_SUPERUSER_WRITING_TO_USER_TABLES"
}
Self::UserGrantedAllPermissions => "SIGNAL_TYPE_USER_GRANTED_ALL_PERMISSIONS",
Self::DataExportToExternalCloudStorageBucket => {
"SIGNAL_TYPE_DATA_EXPORT_TO_EXTERNAL_CLOUD_STORAGE_BUCKET"
}
Self::DataExportToPublicCloudStorageBucket => {
"SIGNAL_TYPE_DATA_EXPORT_TO_PUBLIC_CLOUD_STORAGE_BUCKET"
}
Self::WeakPasswordHashAlgorithm => "SIGNAL_TYPE_WEAK_PASSWORD_HASH_ALGORITHM",
Self::NoUserPasswordPolicy => "SIGNAL_TYPE_NO_USER_PASSWORD_POLICY",
Self::HotNode => "SIGNAL_TYPE_HOT_NODE",
Self::NoDeletionProtection => "SIGNAL_TYPE_NO_DELETION_PROTECTION",
Self::NoPointInTimeRecovery => "SIGNAL_TYPE_NO_POINT_IN_TIME_RECOVERY",
Self::ResourceSuspended => "SIGNAL_TYPE_RESOURCE_SUSPENDED",
Self::ExpensiveCommands => "SIGNAL_TYPE_EXPENSIVE_COMMANDS",
Self::NoMaintenancePolicyConfigured => {
"SIGNAL_TYPE_NO_MAINTENANCE_POLICY_CONFIGURED"
}
Self::InefficientQuery => "SIGNAL_TYPE_INEFFICIENT_QUERY",
Self::ReadIntensiveWorkload => "SIGNAL_TYPE_READ_INTENSIVE_WORKLOAD",
Self::MemoryLimit => "SIGNAL_TYPE_MEMORY_LIMIT",
Self::MaxServerMemory => "SIGNAL_TYPE_MAX_SERVER_MEMORY",
Self::LargeRows => "SIGNAL_TYPE_LARGE_ROWS",
Self::HighWritePressure => "SIGNAL_TYPE_HIGH_WRITE_PRESSURE",
Self::HighReadPressure => "SIGNAL_TYPE_HIGH_READ_PRESSURE",
Self::EncryptionOrgPolicyNotSatisfied => {
"SIGNAL_TYPE_ENCRYPTION_ORG_POLICY_NOT_SATISFIED"
}
Self::LocationOrgPolicyNotSatisfied => {
"SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED"
}
Self::OutdatedMinorVersion => "SIGNAL_TYPE_OUTDATED_MINOR_VERSION",
Self::SchemaNotOptimized => "SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED",
Self::ReplicationLag => "SIGNAL_TYPE_REPLICATION_LAG",
Self::OutdatedClient => "SIGNAL_TYPE_OUTDATED_CLIENT",
Self::DataboostDisabled => "SIGNAL_TYPE_DATABOOST_DISABLED",
Self::RecommendedMaintenancePolicies => {
"SIGNAL_TYPE_RECOMMENDED_MAINTENANCE_POLICIES"
}
Self::ExtendedSupport => "SIGNAL_TYPE_EXTENDED_SUPPORT",
Self::VersionNearingEndOfLife => "SIGNAL_TYPE_VERSION_NEARING_END_OF_LIFE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNAL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SIGNAL_TYPE_RESOURCE_FAILOVER_PROTECTED" => {
Some(Self::ResourceFailoverProtected)
}
"SIGNAL_TYPE_GROUP_MULTIREGIONAL" => Some(Self::GroupMultiregional),
"SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" => {
Some(Self::NoAutomatedBackupPolicy)
}
"SIGNAL_TYPE_SHORT_BACKUP_RETENTION" => Some(Self::ShortBackupRetention),
"SIGNAL_TYPE_LAST_BACKUP_FAILED" => Some(Self::LastBackupFailed),
"SIGNAL_TYPE_LAST_BACKUP_OLD" => Some(Self::LastBackupOld),
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" => {
Some(Self::ViolatesCisGcpFoundation20)
}
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" => {
Some(Self::ViolatesCisGcpFoundation13)
}
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" => {
Some(Self::ViolatesCisGcpFoundation12)
}
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" => {
Some(Self::ViolatesCisGcpFoundation11)
}
"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" => {
Some(Self::ViolatesCisGcpFoundation10)
}
"SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" => {
Some(Self::ViolatesCisControlsV80)
}
"SIGNAL_TYPE_VIOLATES_NIST_800_53" => Some(Self::ViolatesNist80053),
"SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" => Some(Self::ViolatesNist80053R5),
"SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" => {
Some(Self::ViolatesNistCybersecurityFrameworkV10)
}
"SIGNAL_TYPE_VIOLATES_ISO_27001" => Some(Self::ViolatesIso27001),
"SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" => Some(Self::ViolatesIso27001V2022),
"SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" => Some(Self::ViolatesPciDssV321),
"SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" => Some(Self::ViolatesPciDssV40),
"SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" => {
Some(Self::ViolatesCloudControlsMatrixV4)
}
"SIGNAL_TYPE_VIOLATES_HIPAA" => Some(Self::ViolatesHipaa),
"SIGNAL_TYPE_VIOLATES_SOC2_V2017" => Some(Self::ViolatesSoc2V2017),
"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" => {
Some(Self::LogsNotOptimizedForTroubleshooting)
}
"SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" => {
Some(Self::QueryDurationsNotLogged)
}
"SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" => Some(Self::VerboseErrorLogging),
"SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" => {
Some(Self::QueryLockWaitsNotLogged)
}
"SIGNAL_TYPE_LOGGING_MOST_ERRORS" => Some(Self::LoggingMostErrors),
"SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" => {
Some(Self::LoggingOnlyCriticalErrors)
}
"SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" => Some(Self::MinimalErrorLogging),
"SIGNAL_TYPE_QUERY_STATS_LOGGED" => Some(Self::QueryStatsLogged),
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" => {
Some(Self::ExcessiveLoggingOfClientHostname)
}
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATS" => {
Some(Self::ExcessiveLoggingOfParserStats)
}
"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATS" => {
Some(Self::ExcessiveLoggingOfPlannerStats)
}
"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" => {
Some(Self::NotLoggingOnlyDdlStatements)
}
"SIGNAL_TYPE_LOGGING_QUERY_STATS" => Some(Self::LoggingQueryStats),
"SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" => {
Some(Self::NotLoggingTemporaryFiles)
}
"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" => {
Some(Self::ConnectionMaxNotConfigured)
}
"SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" => Some(Self::UserOptionsConfigured),
"SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" => Some(Self::ExposedToPublicAccess),
"SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" => Some(Self::UnencryptedConnections),
"SIGNAL_TYPE_NO_ROOT_PASSWORD" => Some(Self::NoRootPassword),
"SIGNAL_TYPE_WEAK_ROOT_PASSWORD" => Some(Self::WeakRootPassword),
"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" => {
Some(Self::EncryptionKeyNotCustomerManaged)
}
"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" => {
Some(Self::ServerAuthenticationNotRequired)
}
"SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" => {
Some(Self::ExposedToExternalScripts)
}
"SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" => {
Some(Self::ExposedToLocalDataLoads)
}
"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" => {
Some(Self::ConnectionAttemptsNotLogged)
}
"SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" => {
Some(Self::DisconnectionsNotLogged)
}
"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" => {
Some(Self::LoggingExcessiveStatementInfo)
}
"SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" => Some(Self::ExposedToRemoteAccess),
"SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" => Some(Self::DatabaseNamesExposed),
"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" => {
Some(Self::SensitiveTraceInfoNotMasked)
}
"SIGNAL_TYPE_PUBLIC_IP_ENABLED" => Some(Self::PublicIpEnabled),
"SIGNAL_TYPE_IDLE" => Some(Self::Idle),
"SIGNAL_TYPE_OVERPROVISIONED" => Some(Self::Overprovisioned),
"SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" => {
Some(Self::HighNumberOfOpenTables)
}
"SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" => Some(Self::HighNumberOfTables),
"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" => {
Some(Self::HighTransactionIdUtilization)
}
"SIGNAL_TYPE_UNDERPROVISIONED" => Some(Self::Underprovisioned),
"SIGNAL_TYPE_OUT_OF_DISK" => Some(Self::OutOfDisk),
"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" => {
Some(Self::ServerCertificateNearExpiry)
}
"SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" => {
Some(Self::DatabaseAuditingDisabled)
}
"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" => {
Some(Self::RestrictAuthorizedNetworks)
}
"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" => {
Some(Self::ViolatePolicyRestrictPublicIp)
}
"SIGNAL_TYPE_QUOTA_LIMIT" => Some(Self::QuotaLimit),
"SIGNAL_TYPE_NO_PASSWORD_POLICY" => Some(Self::NoPasswordPolicy),
"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" => {
Some(Self::ConnectionsPerformanceImpact)
}
"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" => {
Some(Self::TmpTablesPerformanceImpact)
}
"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" => {
Some(Self::TransLogsPerformanceImpact)
}
"SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" => {
Some(Self::HighJoinsWithoutIndexes)
}
"SIGNAL_TYPE_SUPERUSER_WRITING_TO_USER_TABLES" => {
Some(Self::SuperuserWritingToUserTables)
}
"SIGNAL_TYPE_USER_GRANTED_ALL_PERMISSIONS" => {
Some(Self::UserGrantedAllPermissions)
}
"SIGNAL_TYPE_DATA_EXPORT_TO_EXTERNAL_CLOUD_STORAGE_BUCKET" => {
Some(Self::DataExportToExternalCloudStorageBucket)
}
"SIGNAL_TYPE_DATA_EXPORT_TO_PUBLIC_CLOUD_STORAGE_BUCKET" => {
Some(Self::DataExportToPublicCloudStorageBucket)
}
"SIGNAL_TYPE_WEAK_PASSWORD_HASH_ALGORITHM" => {
Some(Self::WeakPasswordHashAlgorithm)
}
"SIGNAL_TYPE_NO_USER_PASSWORD_POLICY" => Some(Self::NoUserPasswordPolicy),
"SIGNAL_TYPE_HOT_NODE" => Some(Self::HotNode),
"SIGNAL_TYPE_NO_DELETION_PROTECTION" => Some(Self::NoDeletionProtection),
"SIGNAL_TYPE_NO_POINT_IN_TIME_RECOVERY" => Some(Self::NoPointInTimeRecovery),
"SIGNAL_TYPE_RESOURCE_SUSPENDED" => Some(Self::ResourceSuspended),
"SIGNAL_TYPE_EXPENSIVE_COMMANDS" => Some(Self::ExpensiveCommands),
"SIGNAL_TYPE_NO_MAINTENANCE_POLICY_CONFIGURED" => {
Some(Self::NoMaintenancePolicyConfigured)
}
"SIGNAL_TYPE_INEFFICIENT_QUERY" => Some(Self::InefficientQuery),
"SIGNAL_TYPE_READ_INTENSIVE_WORKLOAD" => Some(Self::ReadIntensiveWorkload),
"SIGNAL_TYPE_MEMORY_LIMIT" => Some(Self::MemoryLimit),
"SIGNAL_TYPE_MAX_SERVER_MEMORY" => Some(Self::MaxServerMemory),
"SIGNAL_TYPE_LARGE_ROWS" => Some(Self::LargeRows),
"SIGNAL_TYPE_HIGH_WRITE_PRESSURE" => Some(Self::HighWritePressure),
"SIGNAL_TYPE_HIGH_READ_PRESSURE" => Some(Self::HighReadPressure),
"SIGNAL_TYPE_ENCRYPTION_ORG_POLICY_NOT_SATISFIED" => {
Some(Self::EncryptionOrgPolicyNotSatisfied)
}
"SIGNAL_TYPE_LOCATION_ORG_POLICY_NOT_SATISFIED" => {
Some(Self::LocationOrgPolicyNotSatisfied)
}
"SIGNAL_TYPE_OUTDATED_MINOR_VERSION" => Some(Self::OutdatedMinorVersion),
"SIGNAL_TYPE_SCHEMA_NOT_OPTIMIZED" => Some(Self::SchemaNotOptimized),
"SIGNAL_TYPE_REPLICATION_LAG" => Some(Self::ReplicationLag),
"SIGNAL_TYPE_OUTDATED_CLIENT" => Some(Self::OutdatedClient),
"SIGNAL_TYPE_DATABOOST_DISABLED" => Some(Self::DataboostDisabled),
"SIGNAL_TYPE_RECOMMENDED_MAINTENANCE_POLICIES" => {
Some(Self::RecommendedMaintenancePolicies)
}
"SIGNAL_TYPE_EXTENDED_SUPPORT" => Some(Self::ExtendedSupport),
"SIGNAL_TYPE_VERSION_NEARING_END_OF_LIFE" => {
Some(Self::VersionNearingEndOfLife)
}
_ => None,
}
}
}
/// QueryProductsRequest is the request to get a list of products.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryProductsRequest {
/// Required. Parent can be a project, a folder, or an organization.
///
/// The allowed values are:
///
/// * projects/{PROJECT_ID}/locations/{LOCATION}
/// (e.g.,"projects/foo-bar/locations/us-central1")
/// * projects/{PROJECT_NUMBER}/locations/{LOCATION}
/// (e.g.,"projects/12345678/locations/us-central1")
/// * folders/{FOLDER_NUMBER}/locations/{LOCATION}
/// (e.g.,"folders/1234567/locations/us-central1")
/// * organizations/{ORGANIZATION_NUMBER}/locations/{LOCATION}
/// (e.g.,"organizations/123456/locations/us-central1")
/// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
/// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
/// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
/// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
#[prost(string, tag = "3")]
pub parent: ::prost::alloc::string::String,
/// Optional. If unspecified, at most 50 products will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "1")]
pub page_size: i32,
/// Optional. A page token, received from a previous `ListLocations` call.
/// Provide this to retrieve the subsequent page.
/// All other parameters except page size should match the call that provided
/// the page page token.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
}
/// QueryProductsResponse represents the response containing a list of products.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryProductsResponse {
/// List of database products returned.
#[prost(message, repeated, tag = "1")]
pub products: ::prost::alloc::vec::Vec<Product>,
/// A token that can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Unordered list. List of unreachable regions from where data could not be
/// retrieved.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// QueryDatabaseResourceGroupsRequest is the request to get a list of database
/// groups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDatabaseResourceGroupsRequest {
/// Required. Parent can be a project, a folder, or an organization. The search
/// is limited to the resources within the `scope`.
///
/// The allowed values are:
///
/// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
/// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
/// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
/// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. The expression to filter resources.
///
/// The following fields are filterable:
///
/// * full_resource_name
/// * resource_type
/// * container
/// * product.type
/// * product.engine
/// * product.version
/// * location
/// * labels
/// * resource_category
/// * machine_config.cpu_count
/// * machine_config.memory_size_bytes
/// * machine_config.shard_count
/// * resource_name
/// * tags
/// * backupdr_config.backupdr_managed
/// * edition
///
/// The expression is a list of zero or more restrictions combined via logical
/// operators `AND` and `OR`. When `AND` and `OR` are both used in the
/// expression, parentheses must be appropriately used to group the
/// combinations.
///
/// Example: `location="us-east1"`
/// Example: `container="projects/123" OR container="projects/456"`
/// Example: `(container="projects/123" OR container="projects/456") AND location="us-east1"`
/// Example: `full_resource_name=~"test"`
/// Example: `full_resource_name=~"test.*master"`
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Optional. Groups of signal types that are requested.
#[prost(message, repeated, tag = "3")]
pub signal_type_groups: ::prost::alloc::vec::Vec<SignalTypeGroup>,
/// Optional. Filters based on signals. The list will be ORed together and then
/// ANDed with the `filters` field above.
#[prost(message, repeated, tag = "4")]
pub signal_filters: ::prost::alloc::vec::Vec<SignalFilter>,
/// Optional. A field that specifies the sort order of the results.
///
/// The following fields are sortable:
///
/// * full_resource_name
/// * product.type
/// * product.engine
/// * product.version
/// * container
/// * issue_count
/// * machine_config.vcpu_count
/// * machine_config.memory_size_bytes
/// * machine_config.shard_count
/// * resource_name
/// * issue_severity
/// * signal_type
/// * location
/// * resource_type
/// * instance_type
/// * edition
/// * metrics.p99_cpu_utilization
/// * metrics.p95_cpu_utilization
/// * metrics.current_storage_used_bytes
/// * metrics.node_count
/// * metrics.processing_unit_count
/// * metrics.current_memory_used_bytes
/// * metrics.peak_storage_utilization
/// * metrics.peak_number_connections
/// * metrics.peak_memory_utilization
///
/// The default order is ascending. Add "DESC" after the field name to indicate
/// descending order. Add "ASC" after the field name to indicate ascending
/// order. It only supports a single field at a time.
///
/// For example:
/// `order_by = "full_resource_name"` sorts response in ascending order
/// `order_by = "full_resource_name DESC"` sorts response in descending order
/// `order_by = "issue_count DESC"` sorts response in descending order of
/// count of all issues associated with a resource.
///
/// More explicitly, `order_by = "full_resource_name, product"` is not
/// supported.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
/// Optional. If unspecified, at most 50 resource groups will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "6")]
pub page_size: i32,
/// Optional. A page token, received from a previous
/// `QueryDatabaseResourceGroupsRequest` call. Provide this to retrieve the
/// subsequent page. All parameters except page_token should match the
/// parameters in the call that provided the page page token.
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
}
/// QueryDatabaseResourceGroupsResponse represents the response message
/// containing a list of resource groups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDatabaseResourceGroupsResponse {
/// List of database resource groups that pass the filter.
#[prost(message, repeated, tag = "1")]
pub resource_groups: ::prost::alloc::vec::Vec<DatabaseResourceGroup>,
/// A token that can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Unordered list. List of unreachable regions from where data could not be
/// retrieved.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// DatabaseResourceGroup represents all resources that serve a common data set.
/// It is considered notionally as a single entity, powered by any number of
/// units of compute and storage.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseResourceGroup {
/// A database resource that serves as a root of the group of database
/// resources. It is repeated just in case we have the concept of multiple
/// roots in the future, however, it will only be populated with a single value
/// for now.
#[prost(message, repeated, tag = "1")]
pub root_resources: ::prost::alloc::vec::Vec<DatabaseResource>,
/// The filtered signal groups and the count of issues associated with the
/// resources that have been filtered in.
#[prost(message, repeated, tag = "2")]
pub signal_groups: ::prost::alloc::vec::Vec<IssueCount>,
}
/// DatabaseResource represents every individually configured database unit
/// representing compute and/or storage.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseResource {
/// List of children associated with a database group.
#[prost(message, repeated, tag = "1")]
pub child_resources: ::prost::alloc::vec::Vec<DatabaseResource>,
/// The full resource name, based on CAIS resource name format
/// <https://cloud.google.com/asset-inventory/docs/resource-name-format>
///
/// Example:
///
/// `//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`
/// `//cloudsql.googleapis.com/projects/project-number/instances/postgres-1`
/// `//spanner.googleapis.com/projects/project-number/instances/spanner-instance-1`
/// `//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1`
/// `//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1`
#[prost(string, tag = "3")]
pub full_resource_name: ::prost::alloc::string::String,
/// Specifies where the resource is created. For Google Cloud resources, it is
/// the full name of the project.
#[prost(string, tag = "4")]
pub container: ::prost::alloc::string::String,
/// The product this resource represents.
#[prost(message, optional, tag = "5")]
pub product: ::core::option::Option<Product>,
/// The location of the resources. It supports returning only regional
/// locations in Google Cloud. These are of the form: "us-central1",
/// "us-east1", etc. See <https://cloud.google.com/about/locations> for a list of
/// such regions.
#[prost(string, tag = "6")]
pub location: ::prost::alloc::string::String,
/// Labels applied on the resource. The requirements for labels assigned to
/// Google Cloud resources may be found at
/// <https://cloud.google.com/resource-manager/docs/labels-overview#requirements>
#[prost(message, repeated, tag = "7")]
pub labels: ::prost::alloc::vec::Vec<Label>,
/// Tags applied on the resource. The requirements for tags assigned to
/// Google Cloud resources may be found at
/// <https://cloud.google.com/resource-manager/docs/tags/tags-overview>
#[prost(message, repeated, tag = "16")]
pub tags: ::prost::alloc::vec::Vec<Tag>,
/// The type of resource defined according to the pattern:
/// {Service Name}/{Type}. Ex:
/// sqladmin.googleapis.com/Instance
/// alloydb.googleapis.com/Cluster
/// alloydb.googleapis.com/Instance
/// spanner.googleapis.com/Instance
#[prost(string, tag = "8")]
pub resource_type: ::prost::alloc::string::String,
/// Subtype of the resource specified at creation time.
#[prost(enumeration = "SubResourceType", tag = "9")]
pub sub_resource_type: i32,
/// Machine configuration like CPU, memory, etc for the resource.
#[prost(message, optional, tag = "12")]
pub machine_config: ::core::option::Option<MachineConfig>,
/// The list of signal groups and count of issues related to the resource.
/// Only those signals which have been requested would be included.
#[prost(message, repeated, tag = "10")]
pub signal_groups: ::prost::alloc::vec::Vec<SignalGroup>,
/// Observable metrics for the resource e.g. CPU utilization, memory
/// utilization, etc.
#[prost(message, optional, tag = "13")]
pub metrics: ::core::option::Option<Metrics>,
/// The category of the resource.
#[prost(enumeration = "ResourceCategory", tag = "14")]
pub resource_category: i32,
/// The name of the resource(The last part of the full resource name).
/// Example:
/// For full resource name -
/// `//cloudsql.googleapis.com/projects/project-number/instances/mysql-1`,
/// resource name - `mysql-1`
/// For full resource name -
/// `//cloudsql.googleapis.com/projects/project-number/instances/postgres-1` ,
/// resource name - `postgres-1`
/// Note: In some cases, there might be more than one resource with the same
/// resource name.
#[prost(string, tag = "15")]
pub resource_name: ::prost::alloc::string::String,
/// Optional. Backup and disaster recovery details for the resource.
#[prost(message, optional, tag = "17")]
pub backupdr_config: ::core::option::Option<BackupDrConfig>,
/// The edition of the resource.
#[prost(enumeration = "Edition", tag = "18")]
pub edition: i32,
/// Optional. The maintenance information of the resource.
#[prost(message, optional, tag = "19")]
pub maintenance_info: ::core::option::Option<MaintenanceInfo>,
/// Optional. Affiliation details of the resource.
#[prost(message, repeated, tag = "20")]
pub affiliations: ::prost::alloc::vec::Vec<Affiliation>,
}
/// AggregateIssueStatsRequest represents the input to the AggregateIssueStats
/// method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateIssueStatsRequest {
/// Required. Parent can be a project, a folder, or an organization. The search
/// is limited to the resources within the `scope`.
///
/// The allowed values are:
///
/// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
/// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
/// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
/// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. The expression to filter resources.
///
/// Supported fields are: `full_resource_name`, `resource_type`, `container`,
/// `product.type`, `product.engine`, `product.version`, `location`,
/// `labels`, `issues`, fields of availability_info,
/// data_protection_info,'resource_name', etc.
///
/// The expression is a list of zero or more restrictions combined via logical
/// operators `AND` and `OR`. When `AND` and `OR` are both used in the
/// expression, parentheses must be appropriately used to group the
/// combinations.
///
/// Example: `location="us-east1"`
/// Example: `container="projects/123" OR container="projects/456"`
/// Example: `(container="projects/123" OR container="projects/456") AND location="us-east1"`
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Optional. Lists of signal types that are issues.
#[prost(message, repeated, tag = "3")]
pub signal_type_groups: ::prost::alloc::vec::Vec<SignalTypeGroup>,
/// Optional. The baseline date w.r.t. which the delta counts are calculated.
/// If not set, delta counts are not included in the response and the response
/// indicates the current state of the fleet.
#[prost(message, optional, tag = "4")]
pub baseline_date: ::core::option::Option<super::super::super::r#type::Date>,
}
/// The response message containing one of more group of relevant health issues
/// for database resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateIssueStatsResponse {
/// List of issue group stats where each group contains stats for resources
/// having a particular combination of relevant issues.
#[prost(message, repeated, tag = "1")]
pub issue_group_stats: ::prost::alloc::vec::Vec<IssueGroupStats>,
/// Total count of the resources filtered in based on the user given filter.
#[prost(int32, tag = "2")]
pub total_resources_count: i32,
/// Total count of the resource filtered in based on the user given filter.
#[prost(int32, tag = "3")]
pub total_resource_groups_count: i32,
/// Unordered list. List of unreachable regions from where data could not be
/// retrieved.
#[prost(string, repeated, tag = "4")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// IssueGroupStats refers to stats for a particulare combination of relevant
/// health issues of database resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueGroupStats {
/// Database resource level health card name. This will corresponds to one of
/// the requested input group names.
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
/// Total count of the groups of resources returned by the filter that
/// also have one or more resources for which any of the specified issues
/// are applicable.
#[prost(int32, tag = "2")]
pub resource_groups_count: i32,
/// Total count of resources returned by the filter for which any of the
/// specified issues are applicable.
#[prost(int32, tag = "3")]
pub resources_count: i32,
/// The number of resource groups from the total groups as defined above
/// that are healthy with respect to all of the specified issues.
#[prost(int32, tag = "4")]
pub healthy_resource_groups_count: i32,
/// The number of resources from the total defined above in field
/// total_resources_count that are healthy with respect to all of the specified
/// issues.
#[prost(int32, tag = "5")]
pub healthy_resources_count: i32,
/// List of issues stats containing count of resources having particular issue
/// category.
#[prost(message, repeated, tag = "6")]
pub issue_stats: ::prost::alloc::vec::Vec<IssueStats>,
}
/// IssueStats holds stats for a particular signal category.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IssueStats {
/// Type of signal which is an issue.
#[prost(enumeration = "SignalType", tag = "1")]
pub signal_type: i32,
/// Number of resources having issues of a given type.
#[prost(int32, tag = "2")]
pub resource_count: i32,
/// Optional. Delta counts and details of resources for which issue was raised
/// or fixed.
#[prost(message, optional, tag = "3")]
pub delta_details: ::core::option::Option<DeltaDetails>,
/// Severity of the issue.
#[prost(enumeration = "IssueSeverity", optional, tag = "4")]
pub issue_severity: ::core::option::Option<i32>,
}
/// Label is a key value pair applied to a resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Label {
/// The key part of the label.
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
/// The value part of the label.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
/// The source of the Label. Source is empty if the label is directly attached
/// to the resource and not inherited.
#[prost(string, tag = "3")]
pub source: ::prost::alloc::string::String,
}
/// The request message to aggregate fleet which are grouped by a field.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AggregateFleetRequest {
/// Required. Parent can be a project, a folder, or an organization. The search
/// is limited to the resources within the `scope`.
///
/// The allowed values are:
///
/// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
/// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
/// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
/// * organizations/{ORGANIZATION_NUMBER} (e.g.,
/// "organizations/123456")
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. The expression to filter resources.
///
/// Supported fields are: `full_resource_name`, `resource_type`, `container`,
/// `product.type`, `product.engine`, `product.version`, `location`,
/// `labels`, `issues`, fields of availability_info, data_protection_info,
/// 'resource_name', etc.
///
/// The expression is a list of zero or more restrictions combined via logical
/// operators `AND` and `OR`. When `AND` and `OR` are both used in the
/// expression, parentheses must be appropriately used to group the
/// combinations.
///
/// Example: `location="us-east1"`
/// Example: `container="projects/123" OR container="projects/456"`
/// Example: `(container="projects/123" OR container="projects/456") AND location="us-east1"`
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Optional. A field that statistics are grouped by.
/// Valid values are any combination of the following:
///
/// * container
/// * product.type
/// * product.engine
/// * product.version
/// * location
/// * sub_resource_type
/// * management_type
/// * tag.key
/// * tag.value
/// * tag.source
/// * tag.inherited
/// * label.key
/// * label.value
/// * label.source
/// * has_maintenance_schedule
/// * has_deny_maintenance_schedules
/// Comma separated list.
#[prost(string, tag = "3")]
pub group_by: ::prost::alloc::string::String,
/// Optional. Valid values to order by are:
///
/// * resource_groups_count
/// * resources_count
/// * and all fields supported by `group_by`
/// The default order is ascending. Add "DESC" after the field name to indicate
/// descending order. Add "ASC" after the field name to indicate ascending
/// order. It supports ordering using multiple fields.
/// For example:
/// `order_by = "resource_groups_count"` sorts response in ascending order
/// `order_by = "resource_groups_count DESC"` sorts response in descending
/// order
/// `order_by = "product.type, product.version DESC, location"` orders by type
/// in ascending order, version in descending order and location in ascending
/// order
#[prost(string, tag = "4")]
pub order_by: ::prost::alloc::string::String,
/// Optional. If unspecified, at most 50 items will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "5")]
pub page_size: i32,
/// Optional. A page token, received from a previous `AggregateFleet` call.
/// Provide this to retrieve the subsequent page.
/// All other parameters should match the parameters in the call that provided
/// the page token except for page_size which can be different.
#[prost(string, tag = "6")]
pub page_token: ::prost::alloc::string::String,
/// Optional. The baseline date w.r.t. which the delta counts are calculated.
/// If not set, delta counts are not included in the response and the response
/// indicates the current state of the fleet.
#[prost(message, optional, tag = "7")]
pub baseline_date: ::core::option::Option<super::super::super::r#type::Date>,
}
/// The response message to aggregate a fleet by some group by
/// fields.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateFleetResponse {
/// Represents a row grouped by the fields in the input.
#[prost(message, repeated, tag = "1")]
pub rows: ::prost::alloc::vec::Vec<AggregateFleetRow>,
/// Count of all resource groups in the fleet. This includes counts from all
/// pages.
#[prost(int32, tag = "2")]
pub resource_groups_total_count: i32,
/// Count of all resources in the fleet. This includes counts from all pages.
#[prost(int32, tag = "3")]
pub resource_total_count: i32,
/// A token that can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "4")]
pub next_page_token: ::prost::alloc::string::String,
/// Unordered list. List of unreachable regions from where data could not be
/// retrieved.
#[prost(string, repeated, tag = "5")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Individual row grouped by a particular dimension.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregateFleetRow {
/// Group by dimension.
#[prost(message, repeated, tag = "1")]
pub dimension: ::prost::alloc::vec::Vec<Dimension>,
/// Number of resource groups that have a particular dimension.
#[prost(int32, tag = "2")]
pub resource_groups_count: i32,
/// Number of resources that have a particular dimension.
#[prost(int32, tag = "3")]
pub resources_count: i32,
/// Optional. Delta counts and details of resources which were added to/deleted
/// from fleet.
#[prost(message, optional, tag = "4")]
pub delta_details: ::core::option::Option<DeltaDetails>,
}
/// Dimension used to aggregate the fleet.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Dimension {
/// Followings are the dimensions to be used to aggregate the fleet.
#[prost(
oneof = "dimension::Dimension",
tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20"
)]
pub dimension: ::core::option::Option<dimension::Dimension>,
}
/// Nested message and enum types in `Dimension`.
pub mod dimension {
/// Followings are the dimensions to be used to aggregate the fleet.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Dimension {
/// Specifies where the resource is created. For Google Cloud resources, it
/// is the full name of the project.
#[prost(string, tag = "2")]
Container(::prost::alloc::string::String),
/// Type to identify a product
#[prost(enumeration = "super::ProductType", tag = "3")]
ProductType(i32),
/// Engine refers to underlying database binary running in an instance.
#[prost(enumeration = "super::Engine", tag = "4")]
ProductEngine(i32),
/// Version of the underlying database engine
#[prost(string, tag = "5")]
ProductVersion(::prost::alloc::string::String),
/// The location of the resources. It supports returning only regional
/// locations in Google Cloud.
#[prost(string, tag = "6")]
Location(::prost::alloc::string::String),
/// The type of resource defined according to the pattern:
/// {Service Name}/{Type}. Ex:
/// sqladmin.googleapis.com/Instance
/// alloydb.googleapis.com/Cluster
/// alloydb.googleapis.com/Instance
/// spanner.googleapis.com/Instance
#[prost(string, tag = "7")]
ResourceType(::prost::alloc::string::String),
/// Subtype of the resource specified at creation time.
#[prost(enumeration = "super::SubResourceType", tag = "8")]
SubResourceType(i32),
/// The category of the resource.
#[prost(enumeration = "super::ResourceCategory", tag = "9")]
ResourceCategory(i32),
/// The management type of the resource.
#[prost(enumeration = "super::ManagementType", tag = "10")]
ManagementType(i32),
/// The edition of the resource.
#[prost(enumeration = "super::Edition", tag = "11")]
Edition(i32),
/// Tag key of the resource.
#[prost(string, tag = "12")]
TagKey(::prost::alloc::string::String),
/// Tag value of the resource.
#[prost(string, tag = "13")]
TagValue(::prost::alloc::string::String),
/// Tag source of the resource.
#[prost(string, tag = "14")]
TagSource(::prost::alloc::string::String),
/// Tag inheritance value of the resource.
#[prost(bool, tag = "15")]
TagInherited(bool),
/// Label key of the resource.
#[prost(string, tag = "16")]
LabelKey(::prost::alloc::string::String),
/// Label value of the resource.
#[prost(string, tag = "17")]
LabelValue(::prost::alloc::string::String),
/// Label source of the resource.
#[prost(string, tag = "18")]
LabelSource(::prost::alloc::string::String),
/// Whether the resource has a maintenance schedule.
#[prost(bool, tag = "19")]
HasMaintenanceSchedule(bool),
/// Whether the resource has deny maintenance schedules.
#[prost(bool, tag = "20")]
HasDenyMaintenanceSchedules(bool),
}
}
/// BackupDRConfig to capture the backup and disaster recovery details of
/// database resource.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupDrConfig {
/// Indicates if the resource is managed by BackupDR.
#[prost(bool, optional, tag = "1")]
pub backupdr_managed: ::core::option::Option<bool>,
}
/// QueryIssuesRequest is the request to get a list of issues.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIssuesRequest {
/// Required. Parent can be a project, a folder, or an organization. The list
/// is limited to the one attached to resources within the `scope` that a user
/// has access to.
///
/// The allowed values are:
///
/// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
/// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
/// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
/// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional.
/// Supported fields are:
/// 'product',
/// `location`,
/// `issue_severity`,
/// 'tags',
/// 'labels',
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
/// Optional. Filters based on signal and product. The filter list will be ORed
/// across pairs and ANDed within a signal and products pair.
#[prost(message, repeated, tag = "3")]
pub signal_products_filters: ::prost::alloc::vec::Vec<SignalProductsFilters>,
/// Optional. Following fields are sortable:
/// SignalType
/// Product
/// Location
/// IssueSeverity
///
/// The default order is ascending. Add "DESC" after the field name to indicate
/// descending order. Add "ASC" after the field name to indicate ascending
/// order. It only supports a single field at a time.
#[prost(string, tag = "4")]
pub order_by: ::prost::alloc::string::String,
/// Optional. If unspecified, at most 50 issues will be returned.
/// The maximum value is 1000; values above 1000 will be coerced to 1000.
#[prost(int32, tag = "5")]
pub page_size: i32,
/// Optional. A page token, received from a previous `QueryIssues` call.
/// Provide this to retrieve the subsequent page.
/// All parameters except page size should match the parameters used in the
/// call that provided the page token.
#[prost(string, tag = "6")]
pub page_token: ::prost::alloc::string::String,
}
/// SignalProductsFilters represents a signal and list of supported products.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalProductsFilters {
/// Optional. The type of signal.
#[prost(enumeration = "SignalType", tag = "1")]
pub signal_type: i32,
/// Optional. Product type of the resource. The version of the product will be
/// ignored in filtering.
#[prost(message, repeated, tag = "2")]
pub products: ::prost::alloc::vec::Vec<Product>,
}
/// QueryIssuesResponse is the response containing a list of issues.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIssuesResponse {
/// List of issues and resource details.
#[prost(message, repeated, tag = "1")]
pub resource_issues: ::prost::alloc::vec::Vec<DatabaseResourceIssue>,
/// A token that can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Unordered list. List of unreachable regions from where data could not be
/// retrieved.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// DatabaseResource and Issue associated with it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseResourceIssue {
/// Signal associated with the issue.
#[prost(message, optional, tag = "1")]
pub signal: ::core::option::Option<Signal>,
/// Resource associated with the issue.
#[prost(message, optional, tag = "2")]
pub resource: ::core::option::Option<DatabaseResource>,
}
/// Tag is a key value pair attached to a resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Tag {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
/// The value part of the tag.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
/// The source of the tag. According to
/// <https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,>
/// tags can be created only at the project or organization level. Tags can be
/// inherited from different project as well not just the current project where
/// the database resource is present.
/// Format:
/// "projects/{PROJECT_ID}",
/// "projects/{PROJECT_NUMBER}",
/// "organizations/{ORGANIZATION_ID}"
#[prost(string, tag = "3")]
pub source: ::prost::alloc::string::String,
/// Indicates the inheritance status of a tag value
/// attached to the given resource. If the tag value is inherited from one of
/// the resource's ancestors, inherited will be true. If false, then the tag
/// value is directly attached to the resource.
#[prost(bool, tag = "4")]
pub inherited: bool,
}
/// Capture the resource details for resources that are included in the delta
/// counts.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceDetails {
/// Full resource name of the resource.
#[prost(string, tag = "1")]
pub full_resource_name: ::prost::alloc::string::String,
/// Specifies where the resource is created. For Google Cloud resources, it is
/// the full name of the project.
#[prost(string, tag = "2")]
pub container: ::prost::alloc::string::String,
/// Product type of the resource.
#[prost(message, optional, tag = "3")]
pub product: ::core::option::Option<Product>,
/// Location of the resource.
#[prost(string, tag = "4")]
pub location: ::prost::alloc::string::String,
}
/// Captures the details of items that have increased or decreased in some bucket
/// when compared to some point in history.
/// It is currently used to capture the delta of resources that have been added
/// or removed in the fleet as well as to capture the resources that have a
/// change in Issue/Signal status.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeltaDetails {
/// Details of resources that have increased.
#[prost(message, repeated, tag = "1")]
pub increased_resources: ::prost::alloc::vec::Vec<ResourceDetails>,
/// Details of resources that have decreased.
#[prost(message, repeated, tag = "2")]
pub decreased_resources: ::prost::alloc::vec::Vec<ResourceDetails>,
}
/// Represents the edition of a database resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Edition {
/// Default, to make it consistent with instance edition enum.
Unspecified = 0,
/// Represents the enterprise edition.
Enterprise = 1,
/// Represents the enterprise plus edition.
EnterprisePlus = 2,
/// Represents the standard edition.
Standard = 3,
}
impl Edition {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "EDITION_UNSPECIFIED",
Self::Enterprise => "EDITION_ENTERPRISE",
Self::EnterprisePlus => "EDITION_ENTERPRISE_PLUS",
Self::Standard => "EDITION_STANDARD",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EDITION_UNSPECIFIED" => Some(Self::Unspecified),
"EDITION_ENTERPRISE" => Some(Self::Enterprise),
"EDITION_ENTERPRISE_PLUS" => Some(Self::EnterprisePlus),
"EDITION_STANDARD" => Some(Self::Standard),
_ => None,
}
}
}
/// SubResourceType refers to the sub-type of database resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SubResourceType {
/// Unspecified.
Unspecified = 0,
/// A resource acting as a primary.
Primary = 1,
/// A resource acting as a secondary.
Secondary = 2,
/// A resource acting as a read-replica.
ReadReplica = 3,
/// A resource acting as an external primary.
ExternalPrimary = 5,
/// A resource acting as a read pool.
ReadPool = 6,
/// Represents a reservation resource.
Reservation = 7,
/// Represents a dataset resource.
Dataset = 8,
/// For the rest of the categories.
Other = 4,
}
impl SubResourceType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SUB_RESOURCE_TYPE_UNSPECIFIED",
Self::Primary => "SUB_RESOURCE_TYPE_PRIMARY",
Self::Secondary => "SUB_RESOURCE_TYPE_SECONDARY",
Self::ReadReplica => "SUB_RESOURCE_TYPE_READ_REPLICA",
Self::ExternalPrimary => "SUB_RESOURCE_TYPE_EXTERNAL_PRIMARY",
Self::ReadPool => "SUB_RESOURCE_TYPE_READ_POOL",
Self::Reservation => "SUB_RESOURCE_TYPE_RESERVATION",
Self::Dataset => "SUB_RESOURCE_TYPE_DATASET",
Self::Other => "SUB_RESOURCE_TYPE_OTHER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUB_RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SUB_RESOURCE_TYPE_PRIMARY" => Some(Self::Primary),
"SUB_RESOURCE_TYPE_SECONDARY" => Some(Self::Secondary),
"SUB_RESOURCE_TYPE_READ_REPLICA" => Some(Self::ReadReplica),
"SUB_RESOURCE_TYPE_EXTERNAL_PRIMARY" => Some(Self::ExternalPrimary),
"SUB_RESOURCE_TYPE_READ_POOL" => Some(Self::ReadPool),
"SUB_RESOURCE_TYPE_RESERVATION" => Some(Self::Reservation),
"SUB_RESOURCE_TYPE_DATASET" => Some(Self::Dataset),
"SUB_RESOURCE_TYPE_OTHER" => Some(Self::Other),
_ => None,
}
}
}
/// The management type of the resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ManagementType {
/// Unspecified.
Unspecified = 0,
/// Google-managed resource.
GcpManaged = 1,
/// Self-managed resource.
SelfManaged = 2,
}
impl ManagementType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MANAGEMENT_TYPE_UNSPECIFIED",
Self::GcpManaged => "MANAGEMENT_TYPE_GCP_MANAGED",
Self::SelfManaged => "MANAGEMENT_TYPE_SELF_MANAGED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MANAGEMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MANAGEMENT_TYPE_GCP_MANAGED" => Some(Self::GcpManaged),
"MANAGEMENT_TYPE_SELF_MANAGED" => Some(Self::SelfManaged),
_ => None,
}
}
}
/// The enum value corresponds to 'type' suffix in the resource_type field.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResourceCategory {
/// Unspecified.
Unspecified = 0,
/// A resource that is an Instance.
Instance = 1,
/// A resource that is a Cluster.
Cluster = 2,
/// A resource that is a Database.
Database = 3,
/// A resource that is a Dataset.
Dataset = 4,
/// A resource that is a Reservation.
Reservation = 5,
}
impl ResourceCategory {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RESOURCE_CATEGORY_UNSPECIFIED",
Self::Instance => "INSTANCE",
Self::Cluster => "CLUSTER",
Self::Database => "DATABASE",
Self::Dataset => "DATASET",
Self::Reservation => "RESERVATION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESOURCE_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
"INSTANCE" => Some(Self::Instance),
"CLUSTER" => Some(Self::Cluster),
"DATABASE" => Some(Self::Database),
"DATASET" => Some(Self::Dataset),
"RESERVATION" => Some(Self::Reservation),
_ => None,
}
}
}
/// Generated client implementations.
pub mod database_center_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// DatabaseCenter contains methods to query fleet view for database resources.
#[derive(Debug, Clone)]
pub struct DatabaseCenterClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DatabaseCenterClient<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> DatabaseCenterClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DatabaseCenterClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DatabaseCenterClient::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
}
/// QueryProducts provides a list of all possible products which can be used to
/// filter database resources.
pub async fn query_products(
&mut self,
request: impl tonic::IntoRequest<super::QueryProductsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryProductsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.databasecenter.v1beta.DatabaseCenter/QueryProducts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.databasecenter.v1beta.DatabaseCenter",
"QueryProducts",
),
);
self.inner.unary(req, path, codec).await
}
/// AggregateFleet provides statistics about the fleet grouped by various
/// fields.
pub async fn aggregate_fleet(
&mut self,
request: impl tonic::IntoRequest<super::AggregateFleetRequest>,
) -> std::result::Result<
tonic::Response<super::AggregateFleetResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.databasecenter.v1beta.DatabaseCenter/AggregateFleet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.databasecenter.v1beta.DatabaseCenter",
"AggregateFleet",
),
);
self.inner.unary(req, path, codec).await
}
/// QueryDatabaseResourceGroups returns paginated results of database groups.
pub async fn query_database_resource_groups(
&mut self,
request: impl tonic::IntoRequest<super::QueryDatabaseResourceGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryDatabaseResourceGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.databasecenter.v1beta.DatabaseCenter/QueryDatabaseResourceGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.databasecenter.v1beta.DatabaseCenter",
"QueryDatabaseResourceGroups",
),
);
self.inner.unary(req, path, codec).await
}
/// AggregateIssueStats provides database resource issues statistics.
pub async fn aggregate_issue_stats(
&mut self,
request: impl tonic::IntoRequest<super::AggregateIssueStatsRequest>,
) -> std::result::Result<
tonic::Response<super::AggregateIssueStatsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.databasecenter.v1beta.DatabaseCenter/AggregateIssueStats",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.databasecenter.v1beta.DatabaseCenter",
"AggregateIssueStats",
),
);
self.inner.unary(req, path, codec).await
}
/// QueryIssues provides a list of issues and recommendations
/// that a user has access to and that are within the requested scope.
pub async fn query_issues(
&mut self,
request: impl tonic::IntoRequest<super::QueryIssuesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIssuesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.databasecenter.v1beta.DatabaseCenter/QueryIssues",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.databasecenter.v1beta.DatabaseCenter",
"QueryIssues",
),
);
self.inner.unary(req, path, codec).await
}
}
}