1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
// This file is @generated by prost-build.
/// Message for requesting a list of Users
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListUsersRequest {
/// Required. Parent value for ListUsersRequest
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Requested page size. Server may return fewer items than
/// requested. If unspecified, server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A token identifying a page of results the server should return.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filtering results
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Hint for how to order the results
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Users
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersResponse {
/// The list of Users
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message describing Connection object
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Connection {
/// Identifier. The resource name of the connection, in the format
/// `projects/{project}/locations/{location}/connections/{connection_id}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. \[Output only\] Create timestamp
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. \[Output only\] Update timestamp
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. \[Output only\] Delete timestamp
#[prost(message, optional, tag = "11")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels as key value pairs
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Installation state of the Connection.
#[prost(message, optional, tag = "6")]
pub installation_state: ::core::option::Option<InstallationState>,
/// Optional. If disabled is set to true, functionality is disabled for this
/// connection. Repository based API methods and webhooks processing for
/// repositories in this connection will be disabled.
#[prost(bool, tag = "7")]
pub disabled: bool,
/// Output only. Set to true when the connection is being set up or updated in
/// the background.
#[prost(bool, tag = "8")]
pub reconciling: bool,
/// Optional. Allows clients to store small amounts of arbitrary data.
#[prost(map = "string, string", tag = "9")]
pub annotations: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "10")]
pub etag: ::prost::alloc::string::String,
/// Output only. A system-assigned unique identifier for the Connection.
#[prost(string, tag = "12")]
pub uid: ::prost::alloc::string::String,
/// Optional. The crypto key configuration. This field is used by the
/// Customer-Managed Encryption Keys (CMEK) feature.
#[prost(message, optional, tag = "15")]
pub crypto_key_config: ::core::option::Option<CryptoKeyConfig>,
/// Optional. Configuration for the git proxy feature. Enabling the git proxy
/// allows clients to perform git operations on the repositories linked in the
/// connection.
#[prost(message, optional, tag = "19")]
pub git_proxy_config: ::core::option::Option<GitProxyConfig>,
/// Configuration for the connection depending on the type of provider.
#[prost(
oneof = "connection::ConnectionConfig",
tags = "5, 13, 14, 16, 17, 18, 20, 21"
)]
pub connection_config: ::core::option::Option<connection::ConnectionConfig>,
}
/// Nested message and enum types in `Connection`.
pub mod connection {
/// Configuration for the connection depending on the type of provider.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ConnectionConfig {
/// Configuration for connections to github.com.
#[prost(message, tag = "5")]
GithubConfig(super::GitHubConfig),
/// Configuration for connections to an instance of GitHub Enterprise.
#[prost(message, tag = "13")]
GithubEnterpriseConfig(super::GitHubEnterpriseConfig),
/// Configuration for connections to gitlab.com.
#[prost(message, tag = "14")]
GitlabConfig(super::GitLabConfig),
/// Configuration for connections to an instance of GitLab Enterprise.
#[prost(message, tag = "16")]
GitlabEnterpriseConfig(super::GitLabEnterpriseConfig),
/// Configuration for connections to an instance of Bitbucket Data Center.
#[prost(message, tag = "17")]
BitbucketDataCenterConfig(super::BitbucketDataCenterConfig),
/// Configuration for connections to an instance of Bitbucket Clouds.
#[prost(message, tag = "18")]
BitbucketCloudConfig(super::BitbucketCloudConfig),
/// Configuration for connections to an instance of Secure Source Manager.
#[prost(message, tag = "20")]
SecureSourceManagerInstanceConfig(super::SecureSourceManagerInstanceConfig),
/// Optional. Configuration for connections to an HTTP service provider.
#[prost(message, tag = "21")]
HttpConfig(super::GenericHttpEndpointConfig),
}
}
/// The crypto key configuration. This field is used by the Customer-managed
/// encryption keys (CMEK) feature.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CryptoKeyConfig {
/// Required. The name of the key which is used to encrypt/decrypt customer
/// data. For key in Cloud KMS, the key should be in the format of
/// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
#[prost(string, tag = "1")]
pub key_reference: ::prost::alloc::string::String,
}
/// The git proxy configuration.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GitProxyConfig {
/// Optional. Setting this to true allows the git proxy to be used for
/// performing git operations on the repositories linked in the connection.
#[prost(bool, tag = "1")]
pub enabled: bool,
/// Output only. The base URI for the HTTP proxy endpoint. Has
/// the format
/// `<https://{generatedID}-c-h-{shortRegion}.developerconnect.dev`>
/// Populated only when enabled is set to true.
/// This endpoint is used by other Google services that integrate with
/// Developer Connect.
#[prost(string, tag = "2")]
pub http_proxy_base_uri: ::prost::alloc::string::String,
}
/// Describes stage and necessary actions to be taken by the
/// user to complete the installation. Used for GitHub and GitHub Enterprise
/// based connections.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstallationState {
/// Output only. Current step of the installation process.
#[prost(enumeration = "installation_state::Stage", tag = "1")]
pub stage: i32,
/// Output only. Message of what the user should do next to continue the
/// installation. Empty string if the installation is already complete.
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
/// Output only. Link to follow for next action. Empty string if the
/// installation is already complete.
#[prost(string, tag = "3")]
pub action_uri: ::prost::alloc::string::String,
}
/// Nested message and enum types in `InstallationState`.
pub mod installation_state {
/// Stage of the installation process.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Stage {
/// No stage specified.
Unspecified = 0,
/// Only for GitHub Enterprise. An App creation has been requested.
/// The user needs to confirm the creation in their GitHub enterprise host.
PendingCreateApp = 1,
/// User needs to authorize the GitHub (or Enterprise) App via OAuth.
PendingUserOauth = 2,
/// User needs to follow the link to install the GitHub (or Enterprise) App.
PendingInstallApp = 3,
/// Installation process has been completed.
Complete = 10,
}
impl Stage {
/// 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 => "STAGE_UNSPECIFIED",
Self::PendingCreateApp => "PENDING_CREATE_APP",
Self::PendingUserOauth => "PENDING_USER_OAUTH",
Self::PendingInstallApp => "PENDING_INSTALL_APP",
Self::Complete => "COMPLETE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STAGE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING_CREATE_APP" => Some(Self::PendingCreateApp),
"PENDING_USER_OAUTH" => Some(Self::PendingUserOauth),
"PENDING_INSTALL_APP" => Some(Self::PendingInstallApp),
"COMPLETE" => Some(Self::Complete),
_ => None,
}
}
}
}
/// Defines the configuration for connections to an HTTP service provider.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenericHttpEndpointConfig {
/// Required. Immutable. The service provider's https endpoint.
#[prost(string, tag = "3")]
pub host_uri: ::prost::alloc::string::String,
/// Optional. Configuration for using Service Directory to privately connect to
/// a HTTP service provider. This should only be set if the Http service
/// provider is hosted on-premises and not reachable by public internet. If
/// this field is left empty, calls to the HTTP service provider will be made
/// over the public internet.
#[prost(message, optional, tag = "4")]
pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
/// Optional. The SSL certificate to use for requests to the HTTP service
/// provider.
#[prost(string, tag = "5")]
pub ssl_ca_certificate: ::prost::alloc::string::String,
/// The authentication mechanism to use for requests to the HTTP service
/// provider.
#[prost(oneof = "generic_http_endpoint_config::Authentication", tags = "1, 2")]
pub authentication: ::core::option::Option<
generic_http_endpoint_config::Authentication,
>,
}
/// Nested message and enum types in `GenericHTTPEndpointConfig`.
pub mod generic_http_endpoint_config {
/// Basic authentication with username and password.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BasicAuthentication {
/// Required. The username to authenticate as.
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
/// The password to authenticate as.
#[prost(oneof = "basic_authentication::Password", tags = "2")]
pub password: ::core::option::Option<basic_authentication::Password>,
}
/// Nested message and enum types in `BasicAuthentication`.
pub mod basic_authentication {
/// The password to authenticate as.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Password {
/// The password SecretManager secret version to authenticate as.
#[prost(string, tag = "2")]
PasswordSecretVersion(::prost::alloc::string::String),
}
}
/// Bearer token authentication with a token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BearerTokenAuthentication {
/// The token to authenticate as.
#[prost(oneof = "bearer_token_authentication::Token", tags = "1")]
pub token: ::core::option::Option<bearer_token_authentication::Token>,
}
/// Nested message and enum types in `BearerTokenAuthentication`.
pub mod bearer_token_authentication {
/// The token to authenticate as.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Token {
/// Optional. The token SecretManager secret version to authenticate as.
#[prost(string, tag = "1")]
TokenSecretVersion(::prost::alloc::string::String),
}
}
/// The authentication mechanism to use for requests to the HTTP service
/// provider.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Authentication {
/// Optional. Basic authentication with username and password.
#[prost(message, tag = "1")]
BasicAuthentication(BasicAuthentication),
/// Optional. Bearer token authentication with a token.
#[prost(message, tag = "2")]
BearerTokenAuthentication(BearerTokenAuthentication),
}
}
/// Configuration for connections to github.com.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GitHubConfig {
/// Required. Immutable. The GitHub Application that was installed to the
/// GitHub user or organization.
#[prost(enumeration = "git_hub_config::GitHubApp", tag = "1")]
pub github_app: i32,
/// Optional. OAuth credential of the account that authorized the GitHub App.
/// It is recommended to use a robot account instead of a human user account.
/// The OAuth token must be tied to the GitHub App of this config.
#[prost(message, optional, tag = "2")]
pub authorizer_credential: ::core::option::Option<OAuthCredential>,
/// Optional. GitHub App installation id.
#[prost(int64, tag = "3")]
pub app_installation_id: i64,
/// Output only. The URI to navigate to in order to manage the installation
/// associated with this GitHubConfig.
#[prost(string, tag = "4")]
pub installation_uri: ::prost::alloc::string::String,
}
/// Nested message and enum types in `GitHubConfig`.
pub mod git_hub_config {
/// Represents the various GitHub Applications that can be installed to a
/// GitHub user or organization and used with Developer Connect.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum GitHubApp {
/// GitHub App not specified.
Unspecified = 0,
/// The Developer Connect GitHub Application.
DeveloperConnect = 1,
/// The Firebase GitHub Application.
Firebase = 2,
/// The Gemini Code Assist Application.
GeminiCodeAssist = 3,
}
impl GitHubApp {
/// 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 => "GIT_HUB_APP_UNSPECIFIED",
Self::DeveloperConnect => "DEVELOPER_CONNECT",
Self::Firebase => "FIREBASE",
Self::GeminiCodeAssist => "GEMINI_CODE_ASSIST",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GIT_HUB_APP_UNSPECIFIED" => Some(Self::Unspecified),
"DEVELOPER_CONNECT" => Some(Self::DeveloperConnect),
"FIREBASE" => Some(Self::Firebase),
"GEMINI_CODE_ASSIST" => Some(Self::GeminiCodeAssist),
_ => None,
}
}
}
}
/// Configuration for connections to an instance of GitHub Enterprise.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GitHubEnterpriseConfig {
/// Required. The URI of the GitHub Enterprise host this connection is for.
#[prost(string, tag = "1")]
pub host_uri: ::prost::alloc::string::String,
/// Optional. ID of the GitHub App created from the manifest.
#[prost(int64, tag = "2")]
pub app_id: i64,
/// Output only. The URL-friendly name of the GitHub App.
#[prost(string, tag = "3")]
pub app_slug: ::prost::alloc::string::String,
/// Optional. SecretManager resource containing the private key of the GitHub
/// App, formatted as `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location).
#[prost(string, tag = "4")]
pub private_key_secret_version: ::prost::alloc::string::String,
/// Optional. SecretManager resource containing the webhook secret of the
/// GitHub App, formatted as `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location).
#[prost(string, tag = "5")]
pub webhook_secret_secret_version: ::prost::alloc::string::String,
/// Optional. ID of the installation of the GitHub App.
#[prost(int64, tag = "8")]
pub app_installation_id: i64,
/// Output only. The URI to navigate to in order to manage the installation
/// associated with this GitHubEnterpriseConfig.
#[prost(string, tag = "9")]
pub installation_uri: ::prost::alloc::string::String,
/// Optional. Configuration for using Service Directory to privately connect to
/// a GitHub Enterprise server. This should only be set if the GitHub
/// Enterprise server is hosted on-premises and not reachable by public
/// internet. If this field is left empty, calls to the GitHub Enterprise
/// server will be made over the public internet.
#[prost(message, optional, tag = "10")]
pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
/// Output only. GitHub Enterprise version installed at the host_uri.
#[prost(string, tag = "12")]
pub server_version: ::prost::alloc::string::String,
/// Optional. SSL certificate to use for requests to GitHub Enterprise.
#[prost(string, tag = "14")]
pub ssl_ca_certificate: ::prost::alloc::string::String,
/// Optional. Immutable. GitHub Enterprise organization in which the GitHub App
/// is created.
#[prost(string, tag = "15")]
pub organization: ::prost::alloc::string::String,
}
/// ServiceDirectoryConfig represents Service Directory configuration for a
/// connection.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServiceDirectoryConfig {
/// Required. The Service Directory service name.
/// Format:
/// projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
#[prost(string, tag = "1")]
pub service: ::prost::alloc::string::String,
}
/// Represents an OAuth token of the account that authorized the Connection,
/// and associated metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OAuthCredential {
/// Required. A SecretManager resource containing the OAuth token that
/// authorizes the connection. Format: `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location).
#[prost(string, tag = "1")]
pub oauth_token_secret_version: ::prost::alloc::string::String,
/// Output only. The username associated with this token.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
}
/// Configuration for connections to gitlab.com.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GitLabConfig {
/// Required. Immutable. SecretManager resource containing the webhook secret
/// of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location). This is used to validate webhooks.
#[prost(string, tag = "1")]
pub webhook_secret_secret_version: ::prost::alloc::string::String,
/// Required. A GitLab personal access token with the minimum `read_api` scope
/// access and a minimum role of `reporter`. The GitLab Projects visible to
/// this Personal Access Token will control which Projects Developer Connect
/// has access to.
#[prost(message, optional, tag = "2")]
pub read_authorizer_credential: ::core::option::Option<UserCredential>,
/// Required. A GitLab personal access token with the minimum `api` scope
/// access and a minimum role of `maintainer`. The GitLab Projects visible to
/// this Personal Access Token will control which Projects Developer Connect
/// has access to.
#[prost(message, optional, tag = "3")]
pub authorizer_credential: ::core::option::Option<UserCredential>,
}
/// Represents a personal access token that authorized the Connection,
/// and associated metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserCredential {
/// Required. A SecretManager resource containing the user token that
/// authorizes the Developer Connect connection. Format:
/// `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location).
#[prost(string, tag = "1")]
pub user_token_secret_version: ::prost::alloc::string::String,
/// Output only. The username associated with this token.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
}
/// Configuration for connections to an instance of GitLab Enterprise.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GitLabEnterpriseConfig {
/// Required. The URI of the GitLab Enterprise host this connection is for.
#[prost(string, tag = "1")]
pub host_uri: ::prost::alloc::string::String,
/// Required. Immutable. SecretManager resource containing the webhook secret
/// of a GitLab project, formatted as `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location). This is used to validate webhooks.
#[prost(string, tag = "2")]
pub webhook_secret_secret_version: ::prost::alloc::string::String,
/// Required. A GitLab personal access token with the minimum `read_api` scope
/// access and a minimum role of `reporter`. The GitLab Projects visible to
/// this Personal Access Token will control which Projects Developer Connect
/// has access to.
#[prost(message, optional, tag = "3")]
pub read_authorizer_credential: ::core::option::Option<UserCredential>,
/// Required. A GitLab personal access token with the minimum `api` scope
/// access and a minimum role of `maintainer`. The GitLab Projects visible to
/// this Personal Access Token will control which Projects Developer Connect
/// has access to.
#[prost(message, optional, tag = "4")]
pub authorizer_credential: ::core::option::Option<UserCredential>,
/// Optional. Configuration for using Service Directory to privately connect to
/// a GitLab Enterprise instance. This should only be set if the GitLab
/// Enterprise server is hosted on-premises and not reachable by public
/// internet. If this field is left empty, calls to the GitLab Enterprise
/// server will be made over the public internet.
#[prost(message, optional, tag = "5")]
pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
/// Optional. SSL Certificate Authority certificate to use for requests to
/// GitLab Enterprise instance.
#[prost(string, tag = "6")]
pub ssl_ca_certificate: ::prost::alloc::string::String,
/// Output only. Version of the GitLab Enterprise server running on the
/// `host_uri`.
#[prost(string, tag = "7")]
pub server_version: ::prost::alloc::string::String,
}
/// Configuration for connections to an instance of Bitbucket Data Center.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BitbucketDataCenterConfig {
/// Required. The URI of the Bitbucket Data Center host this connection is for.
#[prost(string, tag = "1")]
pub host_uri: ::prost::alloc::string::String,
/// Required. Immutable. SecretManager resource containing the webhook secret
/// used to verify webhook events, formatted as
/// `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location). This is used to validate webhooks.
#[prost(string, tag = "2")]
pub webhook_secret_secret_version: ::prost::alloc::string::String,
/// Required. An http access token with the minimum `Repository read` access.
/// It's recommended to use a system account to generate the credentials.
#[prost(message, optional, tag = "3")]
pub read_authorizer_credential: ::core::option::Option<UserCredential>,
/// Required. An http access token with the minimum `Repository admin` scope
/// access. This is needed to create webhooks. It's recommended to use a system
/// account to generate these credentials.
#[prost(message, optional, tag = "4")]
pub authorizer_credential: ::core::option::Option<UserCredential>,
/// Optional. Configuration for using Service Directory to privately connect to
/// a Bitbucket Data Center instance. This should only be set if the Bitbucket
/// Data Center is hosted on-premises and not reachable by public internet. If
/// this field is left empty, calls to the Bitbucket Data Center will be made
/// over the public internet.
#[prost(message, optional, tag = "5")]
pub service_directory_config: ::core::option::Option<ServiceDirectoryConfig>,
/// Optional. SSL certificate authority to trust when making requests to
/// Bitbucket Data Center.
#[prost(string, tag = "6")]
pub ssl_ca_certificate: ::prost::alloc::string::String,
/// Output only. Version of the Bitbucket Data Center server running on the
/// `host_uri`.
#[prost(string, tag = "7")]
pub server_version: ::prost::alloc::string::String,
}
/// Configuration for connections to an instance of Bitbucket Cloud.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BitbucketCloudConfig {
/// Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
/// Platform.
#[prost(string, tag = "1")]
pub workspace: ::prost::alloc::string::String,
/// Required. Immutable. SecretManager resource containing the webhook secret
/// used to verify webhook events, formatted as
/// `projects/*/secrets/*/versions/*` or
/// `projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
/// supported in that location). This is used to validate and create webhooks.
#[prost(string, tag = "2")]
pub webhook_secret_secret_version: ::prost::alloc::string::String,
/// Required. An access token with the minimum `repository` access.
/// It can either be a workspace, project or repository access token.
/// It's recommended to use a system account to generate the credentials.
#[prost(message, optional, tag = "3")]
pub read_authorizer_credential: ::core::option::Option<UserCredential>,
/// Required. An access token with the minimum `repository`, `pullrequest` and
/// `webhook` scope access. It can either be a workspace, project or repository
/// access token. This is needed to create webhooks. It's recommended to use a
/// system account to generate these credentials.
#[prost(message, optional, tag = "4")]
pub authorizer_credential: ::core::option::Option<UserCredential>,
}
/// Configuration for connections to Secure Source Manager instance
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecureSourceManagerInstanceConfig {
/// Required. Immutable. Secure Source Manager instance resource, formatted as
/// `projects/*/locations/*/instances/*`
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
}
/// Message for requesting list of Connections
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListConnectionsRequest {
/// Required. Parent value for ListConnectionsRequest
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Requested page size. Server may return fewer items than
/// requested. If unspecified, server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A token identifying a page of results the server should return.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filtering results
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Hint for how to order the results
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing Connections
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectionsResponse {
/// The list of Connection
#[prost(message, repeated, tag = "1")]
pub connections: ::prost::alloc::vec::Vec<Connection>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a Connection
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetConnectionRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Message for creating a Connection
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConnectionRequest {
/// Required. Value for parent.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. Id of the requesting object
/// If auto-generating Id server-side, remove this field and
/// connection_id from the method_signature of Create RPC
#[prost(string, tag = "2")]
pub connection_id: ::prost::alloc::string::String,
/// Required. The resource being created
#[prost(message, optional, tag = "3")]
pub connection: ::core::option::Option<Connection>,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes since the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Message for updating a Connection
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConnectionRequest {
/// Required. Field mask is used to specify the fields to be overwritten in the
/// Connection resource by the update.
/// The fields specified in the update_mask are relative to the resource, not
/// the full request. A field will be overwritten if it is in the mask. If the
/// user does not provide a mask then all fields will be overwritten.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The resource being updated
#[prost(message, optional, tag = "2")]
pub connection: ::core::option::Option<Connection>,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes since the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set to true, and the connection is not found a new connection
/// will be created. In this situation `update_mask` is ignored.
/// The creation will succeed only if the input connection has all the
/// necessary information (e.g a github_config with both user_oauth_token and
/// installation_id properties).
#[prost(bool, tag = "4")]
pub allow_missing: bool,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Message for deleting a Connection
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteConnectionRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. The current etag of the Connection.
/// If an etag is provided and does not match the current etag of the
/// Connection, deletion will be blocked and an ABORTED error will be returned.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
}
/// Message for requesting list of AccountConnectors
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAccountConnectorsRequest {
/// Required. Parent value for ListAccountConnectorsRequest
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Requested page size. Server may return fewer items than
/// requested. If unspecified, server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A token identifying a page of results the server should return.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filtering results
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Hint for how to order the results
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing AccountConnectors
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccountConnectorsResponse {
/// The list of AccountConnectors
#[prost(message, repeated, tag = "1")]
pub account_connectors: ::prost::alloc::vec::Vec<AccountConnector>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a AccountConnector
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAccountConnectorRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAccountConnectorRequest {
/// Required. Location resource name as the account_connector’s parent.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The ID to use for the AccountConnector, which will become the
/// final component of the AccountConnector's resource name. Its format should
/// adhere to <https://google.aip.dev/122#resource-id-segments> Names must be
/// unique per-project per-location.
#[prost(string, tag = "2")]
pub account_connector_id: ::prost::alloc::string::String,
/// Required. The AccountConnector to create.
#[prost(message, optional, tag = "3")]
pub account_connector: ::core::option::Option<AccountConnector>,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes since the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Message for updating a AccountConnector
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAccountConnectorRequest {
/// Optional. The list of fields to be updated.
#[prost(message, optional, tag = "1")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Required. The AccountConnector to update.
#[prost(message, optional, tag = "2")]
pub account_connector: ::core::option::Option<AccountConnector>,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes since the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set to true, and the accountConnector is not found a new
/// accountConnector will be created. In this situation `update_mask` is
/// ignored. The creation will succeed only if the input accountConnector has
/// all the necessary
#[prost(bool, tag = "4")]
pub allow_missing: bool,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Message for deleting a AccountConnector
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteAccountConnectorRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. The current etag of the AccountConnectorn.
/// If an etag is provided and does not match the current etag of the
/// AccountConnector, deletion will be blocked and an ABORTED error will be
/// returned.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
/// Optional. If set to true, any Users from this AccountConnector will also
/// be deleted. (Otherwise, the request will only work if the AccountConnector
/// has no Users.)
#[prost(bool, tag = "5")]
pub force: bool,
}
/// Message for deleting a User
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteUserRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
}
/// Represents the metadata of the long-running operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationMetadata {
/// Output only. The time the operation was created.
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time the operation finished running.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Server-defined resource path for the target of the operation.
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
/// Output only. Name of the verb executed by the operation.
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
/// Output only. Human-readable status of the operation, if any.
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
/// Output only. Identifies whether the user has requested cancellation
/// of the operation. Operations that have been cancelled successfully
/// have
/// \[google.longrunning.Operation.error\]\[google.longrunning.Operation.error\]
/// value with a \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1,
/// corresponding to `Code.CANCELLED`.
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
/// Output only. API version used to start the operation.
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
/// Message for fetching a User of the user themselves.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchSelfRequest {
/// Required. Name of the AccountConnector resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Message for deleting a User of the user themselves.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSelfRequest {
/// Required. Name of the AccountConnector resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Message for fetching an OAuth access token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchAccessTokenRequest {
/// Required. The resource name of the AccountConnector in the format
/// `projects/*/locations/*/accountConnectors/*`.
#[prost(string, tag = "1")]
pub account_connector: ::prost::alloc::string::String,
}
/// Message for responding to getting an OAuth access token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchAccessTokenResponse {
/// The token content.
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
/// Expiration timestamp. Can be empty if unknown or non-expiring.
#[prost(message, optional, tag = "2")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
/// The scopes of the access token.
#[prost(string, repeated, tag = "3")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The error resulted from exchanging OAuth tokens from the service provider.
#[prost(message, optional, tag = "4")]
pub exchange_error: ::core::option::Option<ExchangeError>,
}
/// Message for starting an OAuth flow.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartOAuthRequest {
/// Required. The resource name of the AccountConnector in the format
/// `projects/*/locations/*/accountConnectors/*`.
#[prost(string, tag = "1")]
pub account_connector: ::prost::alloc::string::String,
}
/// Message for responding to starting an OAuth flow.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartOAuthResponse {
/// The ticket to be used for post processing the callback from the service
/// provider.
#[prost(string, tag = "1")]
pub ticket: ::prost::alloc::string::String,
/// Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.1>
#[prost(string, tag = "2")]
pub code_challenge: ::prost::alloc::string::String,
/// Please refer to <https://datatracker.ietf.org/doc/html/rfc7636#section-4.2>
#[prost(string, tag = "3")]
pub code_challenge_method: ::prost::alloc::string::String,
/// The client ID to the OAuth App of the service provider.
#[prost(string, tag = "4")]
pub client_id: ::prost::alloc::string::String,
/// The list of scopes requested by the application.
#[prost(string, repeated, tag = "5")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The authorization server URL to the OAuth flow of the service provider.
#[prost(string, tag = "6")]
pub auth_uri: ::prost::alloc::string::String,
/// The ID of the service provider.
#[prost(oneof = "start_o_auth_response::Id", tags = "7")]
pub id: ::core::option::Option<start_o_auth_response::Id>,
}
/// Nested message and enum types in `StartOAuthResponse`.
pub mod start_o_auth_response {
/// The ID of the service provider.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Id {
/// The ID of the system provider.
#[prost(enumeration = "super::SystemProvider", tag = "7")]
SystemProviderId(i32),
}
}
/// Message for finishing an OAuth flow.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinishOAuthRequest {
/// Required. The resource name of the AccountConnector in the format
/// `projects/*/locations/*/accountConnectors/*`.
#[prost(string, tag = "1")]
pub account_connector: ::prost::alloc::string::String,
/// The params returned by OAuth flow redirect.
#[prost(oneof = "finish_o_auth_request::Params", tags = "2, 3")]
pub params: ::core::option::Option<finish_o_auth_request::Params>,
}
/// Nested message and enum types in `FinishOAuthRequest`.
pub mod finish_o_auth_request {
/// The params returned by non-Google OAuth 2.0 flow redirect.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OAuthParams {
/// Required. The code to be used for getting the token from SCM provider.
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
/// Required. The ticket to be used for post processing the callback from SCM
/// provider.
#[prost(string, tag = "2")]
pub ticket: ::prost::alloc::string::String,
}
/// The params returned by Google OAuth flow redirects.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GoogleOAuthParams {
/// Required. The scopes returned by Google OAuth flow.
#[prost(string, repeated, tag = "1")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. The version info returned by Google OAuth flow.
#[prost(string, tag = "2")]
pub version_info: ::prost::alloc::string::String,
/// Required. The ticket to be used for post processing the callback from
/// Google OAuth flow.
#[prost(string, tag = "3")]
pub ticket: ::prost::alloc::string::String,
}
/// The params returned by OAuth flow redirect.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Params {
/// The params returned by non-Google OAuth 2.0 flow redirect.
#[prost(message, tag = "2")]
OauthParams(OAuthParams),
/// The params returned by Google OAuth flow redirects.
#[prost(message, tag = "3")]
GoogleOauthParams(GoogleOAuthParams),
}
}
/// Message for responding to finishing an OAuth flow.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinishOAuthResponse {
/// The error resulted from exchanging OAuth tokens from the service provider.
#[prost(message, optional, tag = "1")]
pub exchange_error: ::core::option::Option<ExchangeError>,
}
/// Message for representing an error from exchanging OAuth tokens.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExchangeError {
/// <https://datatracker.ietf.org/doc/html/rfc6749#section-5.2> - error
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
/// <https://datatracker.ietf.org/doc/html/rfc6749#section-5.2> -
/// error_description
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
}
/// Message describing the GitRepositoryLink object
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitRepositoryLink {
/// Identifier. Resource name of the repository, in the format
/// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Required. Git Clone URI.
#[prost(string, tag = "2")]
pub clone_uri: ::prost::alloc::string::String,
/// Output only. \[Output only\] Create timestamp
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. \[Output only\] Update timestamp
#[prost(message, optional, tag = "4")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. \[Output only\] Delete timestamp
#[prost(message, optional, tag = "5")]
pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Labels as key value pairs
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "7")]
pub etag: ::prost::alloc::string::String,
/// Output only. Set to true when the connection is being set up or updated in
/// the background.
#[prost(bool, tag = "8")]
pub reconciling: bool,
/// Optional. Allows clients to store small amounts of arbitrary data.
#[prost(map = "string, string", tag = "9")]
pub annotations: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. A system-assigned unique identifier for the GitRepositoryLink.
#[prost(string, tag = "10")]
pub uid: ::prost::alloc::string::String,
/// Output only. External ID of the webhook created for the repository.
#[prost(string, tag = "11")]
pub webhook_id: ::prost::alloc::string::String,
/// Output only. URI to access the linked repository through the Git Proxy.
/// This field is only populated if the git proxy is enabled for the
/// connection.
#[prost(string, tag = "12")]
pub git_proxy_uri: ::prost::alloc::string::String,
}
/// Message for creating a GitRepositoryLink
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateGitRepositoryLinkRequest {
/// Required. Value for parent.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The resource being created
#[prost(message, optional, tag = "2")]
pub git_repository_link: ::core::option::Option<GitRepositoryLink>,
/// Required. The ID to use for the repository, which will become the final
/// component of the repository's resource name. This ID should be unique in
/// the connection. Allows alphanumeric characters and any of
/// -.\_~%!$&'()\*+,;=@.
#[prost(string, tag = "3")]
pub git_repository_link_id: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes since the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Message for deleting a GitRepositoryLink
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteGitRepositoryLinkRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
}
/// Message for requesting a list of GitRepositoryLinks
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListGitRepositoryLinksRequest {
/// Required. Parent value for ListGitRepositoryLinksRequest
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Requested page size. Server may return fewer items than
/// requested. If unspecified, server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A token identifying a page of results the server should return.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filtering results
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Hint for how to order the results
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Message for response to listing GitRepositoryLinks
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGitRepositoryLinksResponse {
/// The list of GitRepositoryLinks
#[prost(message, repeated, tag = "1")]
pub git_repository_links: ::prost::alloc::vec::Vec<GitRepositoryLink>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Message for getting a GitRepositoryLink
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetGitRepositoryLinkRequest {
/// Required. Name of the resource
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Message for fetching SCM read/write token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchReadWriteTokenRequest {
/// Required. The resource name of the gitRepositoryLink in the format
/// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
#[prost(string, tag = "1")]
pub git_repository_link: ::prost::alloc::string::String,
}
/// Message for fetching SCM read token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchReadTokenRequest {
/// Required. The resource name of the gitRepositoryLink in the format
/// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
#[prost(string, tag = "1")]
pub git_repository_link: ::prost::alloc::string::String,
}
/// Message for responding to get read token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchReadTokenResponse {
/// The token content.
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
/// Expiration timestamp. Can be empty if unknown or non-expiring.
#[prost(message, optional, tag = "2")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
/// The git_username to specify when making a git clone with the
/// token. For example, for GitHub GitRepositoryLinks, this would be
/// "x-access-token"
#[prost(string, tag = "3")]
pub git_username: ::prost::alloc::string::String,
}
/// Message for responding to get read/write token.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchReadWriteTokenResponse {
/// The token content.
#[prost(string, tag = "1")]
pub token: ::prost::alloc::string::String,
/// Expiration timestamp. Can be empty if unknown or non-expiring.
#[prost(message, optional, tag = "2")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
/// The git_username to specify when making a git clone with the
/// token. For example, for GitHub GitRepositoryLinks, this would be
/// "x-access-token"
#[prost(string, tag = "3")]
pub git_username: ::prost::alloc::string::String,
}
/// Request message for FetchLinkableGitRepositoriesRequest.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchLinkableGitRepositoriesRequest {
/// Required. The name of the Connection.
/// Format: `projects/*/locations/*/connections/*`.
#[prost(string, tag = "1")]
pub connection: ::prost::alloc::string::String,
/// Optional. Number of results to return in the list. Defaults to 20.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. Page start.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// Response message for FetchLinkableGitRepositories.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchLinkableGitRepositoriesResponse {
/// The git repositories that can be linked to the connection.
#[prost(message, repeated, tag = "1")]
pub linkable_git_repositories: ::prost::alloc::vec::Vec<LinkableGitRepository>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// LinkableGitRepository represents a git repository that can be linked to a
/// connection.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkableGitRepository {
/// The clone uri of the repository.
#[prost(string, tag = "1")]
pub clone_uri: ::prost::alloc::string::String,
}
/// Request for fetching github installations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchGitHubInstallationsRequest {
/// Required. The resource name of the connection in the format
/// `projects/*/locations/*/connections/*`.
#[prost(string, tag = "1")]
pub connection: ::prost::alloc::string::String,
}
/// Response of fetching github installations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchGitHubInstallationsResponse {
/// List of installations available to the OAuth user (for github.com)
/// or all the installations (for GitHub enterprise).
#[prost(message, repeated, tag = "1")]
pub installations: ::prost::alloc::vec::Vec<
fetch_git_hub_installations_response::Installation,
>,
}
/// Nested message and enum types in `FetchGitHubInstallationsResponse`.
pub mod fetch_git_hub_installations_response {
/// Represents an installation of the GitHub App.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Installation {
/// ID of the installation in GitHub.
#[prost(int64, tag = "1")]
pub id: i64,
/// Name of the GitHub user or organization that owns this installation.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Either "user" or "organization".
#[prost(string, tag = "3")]
pub r#type: ::prost::alloc::string::String,
}
}
/// Request for fetching git refs.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchGitRefsRequest {
/// Required. The resource name of GitRepositoryLink in the format
/// `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
#[prost(string, tag = "1")]
pub git_repository_link: ::prost::alloc::string::String,
/// Required. Type of refs to fetch.
#[prost(enumeration = "fetch_git_refs_request::RefType", tag = "2")]
pub ref_type: i32,
/// Optional. Number of results to return in the list. Default to 20.
#[prost(int32, tag = "4")]
pub page_size: i32,
/// Optional. Page start.
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
}
/// Nested message and enum types in `FetchGitRefsRequest`.
pub mod fetch_git_refs_request {
/// Type of refs.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RefType {
/// No type specified.
Unspecified = 0,
/// To fetch tags.
Tag = 1,
/// To fetch branches.
Branch = 2,
}
impl RefType {
/// 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 => "REF_TYPE_UNSPECIFIED",
Self::Tag => "TAG",
Self::Branch => "BRANCH",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REF_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TAG" => Some(Self::Tag),
"BRANCH" => Some(Self::Branch),
_ => None,
}
}
}
}
/// Response for fetching git refs.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchGitRefsResponse {
/// Name of the refs fetched.
#[prost(string, repeated, tag = "1")]
pub ref_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// AccountConnector encapsulates what a platform administrator needs to
/// configure for users to connect to the service providers, which includes,
/// among other fields, the OAuth client ID, client secret, and authorization and
/// token endpoints.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountConnector {
/// Identifier. The resource name of the accountConnector, in the format
/// `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The timestamp when the accountConnector was created.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the accountConnector was updated.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional. Allows users to store small amounts of arbitrary data.
#[prost(map = "string, string", tag = "6")]
pub annotations: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "7")]
pub etag: ::prost::alloc::string::String,
/// Optional. Labels as key value pairs
#[prost(map = "string, string", tag = "8")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Start OAuth flow by clicking on this URL.
#[prost(string, tag = "10")]
pub oauth_start_uri: ::prost::alloc::string::String,
/// The AccountConnector config.
#[prost(oneof = "account_connector::AccountConnectorConfig", tags = "5")]
pub account_connector_config: ::core::option::Option<
account_connector::AccountConnectorConfig,
>,
}
/// Nested message and enum types in `AccountConnector`.
pub mod account_connector {
/// The AccountConnector config.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum AccountConnectorConfig {
/// Optional. Provider OAuth config.
#[prost(message, tag = "5")]
ProviderOauthConfig(super::ProviderOAuthConfig),
}
}
/// User represents a user connected to the service providers through
/// a AccountConnector.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct User {
/// Identifier. Resource name of the user, in the format
/// `projects/*/locations/*/accountConnectors/*/users/*`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Developer Connect automatically converts user identity
/// to some human readable description, e.g., email address.
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
/// Output only. The timestamp when the user was created.
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The timestamp when the token was last requested.
#[prost(message, optional, tag = "4")]
pub last_token_request_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// ProviderOAuthConfig is the OAuth config for a provider.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProviderOAuthConfig {
/// Required. User selected scopes to apply to the Oauth config
/// In the event of changing scopes, user records under AccountConnector will
/// be deleted and users will re-auth again.
#[prost(string, repeated, tag = "2")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// OAuth Provider ID. It could be Developer Connect owned or providers
/// provided.
#[prost(oneof = "provider_o_auth_config::OauthProviderId", tags = "1")]
pub oauth_provider_id: ::core::option::Option<
provider_o_auth_config::OauthProviderId,
>,
}
/// Nested message and enum types in `ProviderOAuthConfig`.
pub mod provider_o_auth_config {
/// OAuth Provider ID. It could be Developer Connect owned or providers
/// provided.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum OauthProviderId {
/// Optional. Immutable. Developer Connect provided OAuth.
#[prost(enumeration = "super::SystemProvider", tag = "1")]
SystemProviderId(i32),
}
}
/// SystemProvider is a list of providers that are owned by Developer Connect.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SystemProvider {
/// No system provider specified.
Unspecified = 0,
/// GitHub provider.
/// Scopes can be found at
/// <https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes>
Github = 1,
/// GitLab provider.
/// Scopes can be found at
/// <https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes>
Gitlab = 2,
/// Google provider.
/// Recommended scopes:
/// "<https://www.googleapis.com/auth/drive.readonly",>
/// "<https://www.googleapis.com/auth/documents.readonly">
Google = 3,
/// Sentry provider.
/// Scopes can be found at
/// <https://docs.sentry.io/api/permissions/>
Sentry = 4,
/// Rovo provider.
/// Must select the "rovo" scope.
Rovo = 5,
/// New Relic provider.
/// No scopes are allowed.
NewRelic = 6,
/// Datastax provider.
/// No scopes are allowed.
Datastax = 7,
/// Dynatrace provider.
Dynatrace = 8,
}
impl SystemProvider {
/// 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 => "SYSTEM_PROVIDER_UNSPECIFIED",
Self::Github => "GITHUB",
Self::Gitlab => "GITLAB",
Self::Google => "GOOGLE",
Self::Sentry => "SENTRY",
Self::Rovo => "ROVO",
Self::NewRelic => "NEW_RELIC",
Self::Datastax => "DATASTAX",
Self::Dynatrace => "DYNATRACE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SYSTEM_PROVIDER_UNSPECIFIED" => Some(Self::Unspecified),
"GITHUB" => Some(Self::Github),
"GITLAB" => Some(Self::Gitlab),
"GOOGLE" => Some(Self::Google),
"SENTRY" => Some(Self::Sentry),
"ROVO" => Some(Self::Rovo),
"NEW_RELIC" => Some(Self::NewRelic),
"DATASTAX" => Some(Self::Datastax),
"DYNATRACE" => Some(Self::Dynatrace),
_ => None,
}
}
}
/// Generated client implementations.
pub mod developer_connect_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service describing handlers for resources
#[derive(Debug, Clone)]
pub struct DeveloperConnectClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DeveloperConnectClient<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> DeveloperConnectClient<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,
) -> DeveloperConnectClient<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,
{
DeveloperConnectClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists Connections in a given project and location.
pub async fn list_connections(
&mut self,
request: impl tonic::IntoRequest<super::ListConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConnectionsResponse>,
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.developerconnect.v1.DeveloperConnect/ListConnections",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"ListConnections",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Connection.
pub async fn get_connection(
&mut self,
request: impl tonic::IntoRequest<super::GetConnectionRequest>,
) -> std::result::Result<tonic::Response<super::Connection>, 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.developerconnect.v1.DeveloperConnect/GetConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"GetConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new Connection in a given project and location.
pub async fn create_connection(
&mut self,
request: impl tonic::IntoRequest<super::CreateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/CreateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"CreateConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single Connection.
pub async fn update_connection(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/UpdateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"UpdateConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Connection.
pub async fn delete_connection(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/DeleteConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"DeleteConnection",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a GitRepositoryLink. Upon linking a Git Repository, Developer
/// Connect will configure the Git Repository to send webhook events to
/// Developer Connect. Connections that use Firebase GitHub Application will
/// have events forwarded to the Firebase service. Connections that use Gemini
/// Code Assist will have events forwarded to Gemini Code Assist service. All
/// other Connections will have events forwarded to Cloud Build.
pub async fn create_git_repository_link(
&mut self,
request: impl tonic::IntoRequest<super::CreateGitRepositoryLinkRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/CreateGitRepositoryLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"CreateGitRepositoryLink",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single GitRepositoryLink.
pub async fn delete_git_repository_link(
&mut self,
request: impl tonic::IntoRequest<super::DeleteGitRepositoryLinkRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/DeleteGitRepositoryLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"DeleteGitRepositoryLink",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists GitRepositoryLinks in a given project, location, and connection.
pub async fn list_git_repository_links(
&mut self,
request: impl tonic::IntoRequest<super::ListGitRepositoryLinksRequest>,
) -> std::result::Result<
tonic::Response<super::ListGitRepositoryLinksResponse>,
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.developerconnect.v1.DeveloperConnect/ListGitRepositoryLinks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"ListGitRepositoryLinks",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single GitRepositoryLink.
pub async fn get_git_repository_link(
&mut self,
request: impl tonic::IntoRequest<super::GetGitRepositoryLinkRequest>,
) -> std::result::Result<
tonic::Response<super::GitRepositoryLink>,
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.developerconnect.v1.DeveloperConnect/GetGitRepositoryLink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"GetGitRepositoryLink",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetches read/write token of a given gitRepositoryLink.
pub async fn fetch_read_write_token(
&mut self,
request: impl tonic::IntoRequest<super::FetchReadWriteTokenRequest>,
) -> std::result::Result<
tonic::Response<super::FetchReadWriteTokenResponse>,
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.developerconnect.v1.DeveloperConnect/FetchReadWriteToken",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchReadWriteToken",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetches read token of a given gitRepositoryLink.
pub async fn fetch_read_token(
&mut self,
request: impl tonic::IntoRequest<super::FetchReadTokenRequest>,
) -> std::result::Result<
tonic::Response<super::FetchReadTokenResponse>,
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.developerconnect.v1.DeveloperConnect/FetchReadToken",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchReadToken",
),
);
self.inner.unary(req, path, codec).await
}
/// FetchLinkableGitRepositories returns a list of git repositories from an SCM
/// that are available to be added to a Connection.
pub async fn fetch_linkable_git_repositories(
&mut self,
request: impl tonic::IntoRequest<super::FetchLinkableGitRepositoriesRequest>,
) -> std::result::Result<
tonic::Response<super::FetchLinkableGitRepositoriesResponse>,
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.developerconnect.v1.DeveloperConnect/FetchLinkableGitRepositories",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchLinkableGitRepositories",
),
);
self.inner.unary(req, path, codec).await
}
/// FetchGitHubInstallations returns the list of GitHub Installations that
/// are available to be added to a Connection.
/// For github.com, only installations accessible to the authorizer token
/// are returned. For GitHub Enterprise, all installations are returned.
pub async fn fetch_git_hub_installations(
&mut self,
request: impl tonic::IntoRequest<super::FetchGitHubInstallationsRequest>,
) -> std::result::Result<
tonic::Response<super::FetchGitHubInstallationsResponse>,
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.developerconnect.v1.DeveloperConnect/FetchGitHubInstallations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchGitHubInstallations",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetch the list of branches or tags for a given repository.
pub async fn fetch_git_refs(
&mut self,
request: impl tonic::IntoRequest<super::FetchGitRefsRequest>,
) -> std::result::Result<
tonic::Response<super::FetchGitRefsResponse>,
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.developerconnect.v1.DeveloperConnect/FetchGitRefs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchGitRefs",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists AccountConnectors in a given project and location.
pub async fn list_account_connectors(
&mut self,
request: impl tonic::IntoRequest<super::ListAccountConnectorsRequest>,
) -> std::result::Result<
tonic::Response<super::ListAccountConnectorsResponse>,
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.developerconnect.v1.DeveloperConnect/ListAccountConnectors",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"ListAccountConnectors",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single AccountConnector.
pub async fn get_account_connector(
&mut self,
request: impl tonic::IntoRequest<super::GetAccountConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::AccountConnector>,
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.developerconnect.v1.DeveloperConnect/GetAccountConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"GetAccountConnector",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new AccountConnector in a given project and location.
pub async fn create_account_connector(
&mut self,
request: impl tonic::IntoRequest<super::CreateAccountConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/CreateAccountConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"CreateAccountConnector",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single AccountConnector.
pub async fn update_account_connector(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAccountConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/UpdateAccountConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"UpdateAccountConnector",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single AccountConnector.
pub async fn delete_account_connector(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAccountConnectorRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/DeleteAccountConnector",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"DeleteAccountConnector",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetches OAuth access token based on end user credentials.
pub async fn fetch_access_token(
&mut self,
request: impl tonic::IntoRequest<super::FetchAccessTokenRequest>,
) -> std::result::Result<
tonic::Response<super::FetchAccessTokenResponse>,
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.developerconnect.v1.DeveloperConnect/FetchAccessToken",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchAccessToken",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists Users in a given project, location, and account_connector.
pub async fn list_users(
&mut self,
request: impl tonic::IntoRequest<super::ListUsersRequest>,
) -> std::result::Result<
tonic::Response<super::ListUsersResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.developerconnect.v1.DeveloperConnect/ListUsers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"ListUsers",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single User.
pub async fn delete_user(
&mut self,
request: impl tonic::IntoRequest<super::DeleteUserRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/DeleteUser",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"DeleteUser",
),
);
self.inner.unary(req, path, codec).await
}
/// Fetch the User based on the user credentials.
pub async fn fetch_self(
&mut self,
request: impl tonic::IntoRequest<super::FetchSelfRequest>,
) -> std::result::Result<tonic::Response<super::User>, 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.developerconnect.v1.DeveloperConnect/FetchSelf",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FetchSelf",
),
);
self.inner.unary(req, path, codec).await
}
/// Delete the User based on the user credentials.
pub async fn delete_self(
&mut self,
request: impl tonic::IntoRequest<super::DeleteSelfRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.DeveloperConnect/DeleteSelf",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"DeleteSelf",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts OAuth flow for an account connector.
pub async fn start_o_auth(
&mut self,
request: impl tonic::IntoRequest<super::StartOAuthRequest>,
) -> std::result::Result<
tonic::Response<super::StartOAuthResponse>,
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.developerconnect.v1.DeveloperConnect/StartOAuth",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"StartOAuth",
),
);
self.inner.unary(req, path, codec).await
}
/// Finishes OAuth flow for an account connector.
pub async fn finish_o_auth(
&mut self,
request: impl tonic::IntoRequest<super::FinishOAuthRequest>,
) -> std::result::Result<
tonic::Response<super::FinishOAuthResponse>,
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.developerconnect.v1.DeveloperConnect/FinishOAuth",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.DeveloperConnect",
"FinishOAuth",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// The InsightsConfig resource is the core configuration object to capture
/// events from your Software Development Lifecycle. It acts as the central hub
/// for managing how Developer Connect understands your application, its runtime
/// environments, and the artifacts deployed within them.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsightsConfig {
/// Identifier. The name of the InsightsConfig.
/// Format:
/// projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. Create timestamp.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Update timestamp.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The runtime configurations where the application is deployed.
#[prost(message, repeated, tag = "5")]
pub runtime_configs: ::prost::alloc::vec::Vec<RuntimeConfig>,
/// Optional. The artifact configurations of the artifacts that are deployed.
#[prost(message, repeated, tag = "6")]
pub artifact_configs: ::prost::alloc::vec::Vec<ArtifactConfig>,
/// Optional. Output only. The state of the InsightsConfig.
#[prost(enumeration = "insights_config::State", tag = "7")]
pub state: i32,
/// Optional. User specified annotations. See
/// <https://google.aip.dev/148#annotations> for more details such as format and
/// size limitations.
#[prost(map = "string, string", tag = "8")]
pub annotations: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Optional. Set of labels associated with an InsightsConfig.
#[prost(map = "string, string", tag = "9")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Output only. Reconciling (<https://google.aip.dev/128#reconciliation>).
/// Set to true if the current state of InsightsConfig does not match the
/// user's intended state, and the service is actively updating the resource to
/// reconcile them. This can happen due to user-triggered updates or
/// system actions like failover or maintenance.
#[prost(bool, tag = "10")]
pub reconciling: bool,
/// Output only. Any errors that occurred while setting up the InsightsConfig.
/// Each error will be in the format: `field_name: error_message`, e.g.
/// GetAppHubApplication: Permission denied while getting App Hub
/// application. Please grant permissions to the P4SA.
#[prost(message, repeated, tag = "11")]
pub errors: ::prost::alloc::vec::Vec<super::super::super::rpc::Status>,
/// The context of the InsightsConfig.
#[prost(oneof = "insights_config::InsightsConfigContext", tags = "4, 12")]
pub insights_config_context: ::core::option::Option<
insights_config::InsightsConfigContext,
>,
}
/// Nested message and enum types in `InsightsConfig`.
pub mod insights_config {
/// The state of the InsightsConfig.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// No state specified.
Unspecified = 0,
/// The InsightsConfig is pending application discovery/runtime discovery.
Pending = 5,
/// The initial discovery process is complete.
Complete = 3,
/// The InsightsConfig is in an error state.
Error = 4,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Pending => "PENDING",
Self::Complete => "COMPLETE",
Self::Error => "ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"COMPLETE" => Some(Self::Complete),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
/// The context of the InsightsConfig.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum InsightsConfigContext {
/// Optional. The name of the App Hub Application.
/// Format:
/// projects/{project}/locations/{location}/applications/{application}
#[prost(string, tag = "4")]
AppHubApplication(::prost::alloc::string::String),
/// Optional. The projects to track with the InsightsConfig.
#[prost(message, tag = "12")]
Projects(super::Projects),
}
}
/// Projects represents the projects to track with the InsightsConfig.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Projects {
/// Optional. The project IDs.
/// Format: {project}
#[prost(string, repeated, tag = "1")]
pub project_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// RuntimeConfig represents the runtimes where the application is
/// deployed.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuntimeConfig {
/// Required. Immutable. The URI of the runtime configuration.
/// For GKE, this is the cluster name.
/// For Cloud Run, this is the service name.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// Output only. The state of the Runtime.
#[prost(enumeration = "runtime_config::State", tag = "2")]
pub state: i32,
/// The type of the runtime.
#[prost(oneof = "runtime_config::Runtime", tags = "3, 5")]
pub runtime: ::core::option::Option<runtime_config::Runtime>,
/// Where the runtime is derived from.
#[prost(oneof = "runtime_config::DerivedFrom", tags = "4, 6")]
pub derived_from: ::core::option::Option<runtime_config::DerivedFrom>,
}
/// Nested message and enum types in `RuntimeConfig`.
pub mod runtime_config {
/// The state of the runtime in the InsightsConfig.
/// Whether the runtime is linked to the InsightsConfig.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// No state specified.
Unspecified = 0,
/// The runtime configuration has been linked to the InsightsConfig.
Linked = 1,
/// The runtime configuration has been unlinked to the InsightsConfig.
Unlinked = 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::Linked => "LINKED",
Self::Unlinked => "UNLINKED",
}
}
/// 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),
"LINKED" => Some(Self::Linked),
"UNLINKED" => Some(Self::Unlinked),
_ => None,
}
}
}
/// The type of the runtime.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Runtime {
/// Output only. Google Kubernetes Engine runtime.
#[prost(message, tag = "3")]
GkeWorkload(super::GkeWorkload),
/// Output only. Cloud Run runtime.
#[prost(message, tag = "5")]
GoogleCloudRun(super::GoogleCloudRun),
}
/// Where the runtime is derived from.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum DerivedFrom {
/// Output only. App Hub Workload.
#[prost(message, tag = "4")]
AppHubWorkload(super::AppHubWorkload),
/// Output only. App Hub Service.
#[prost(message, tag = "6")]
AppHubService(super::AppHubService),
}
}
/// GKEWorkload represents the Google Kubernetes Engine runtime.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GkeWorkload {
/// Required. Immutable. The name of the GKE cluster.
/// Format:
/// `projects/{project}/locations/{location}/clusters/{cluster}`.
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
/// Output only. The name of the GKE deployment.
/// Format:
/// `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
#[prost(string, tag = "2")]
pub deployment: ::prost::alloc::string::String,
}
/// GoogleCloudRun represents the Cloud Run runtime.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GoogleCloudRun {
/// Required. Immutable. The name of the Cloud Run service.
/// Format:
/// `projects/{project}/locations/{location}/services/{service}`.
#[prost(string, tag = "1")]
pub service_uri: ::prost::alloc::string::String,
}
/// AppHubWorkload represents the App Hub Workload.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AppHubWorkload {
/// Required. Output only. Immutable. The name of the App Hub Workload.
/// Format:
/// `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
#[prost(string, tag = "1")]
pub workload: ::prost::alloc::string::String,
/// Output only. The criticality of the App Hub Workload.
#[prost(string, tag = "2")]
pub criticality: ::prost::alloc::string::String,
/// Output only. The environment of the App Hub Workload.
#[prost(string, tag = "3")]
pub environment: ::prost::alloc::string::String,
}
/// AppHubService represents the App Hub Service.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AppHubService {
/// Required. Output only. Immutable. The name of the App Hub Service.
/// Format:
/// `projects/{project}/locations/{location}/applications/{application}/services/{service}`.
#[prost(string, tag = "1")]
pub apphub_service: ::prost::alloc::string::String,
/// Output only. The criticality of the App Hub Service.
#[prost(string, tag = "2")]
pub criticality: ::prost::alloc::string::String,
/// Output only. The environment of the App Hub Service.
#[prost(string, tag = "3")]
pub environment: ::prost::alloc::string::String,
}
/// The artifact config of the artifact that is deployed.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArtifactConfig {
/// Required. Immutable. The URI of the artifact that is deployed.
/// e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
/// The URI does not include the tag / digest because it captures a lineage of
/// artifacts.
#[prost(string, tag = "1")]
pub uri: ::prost::alloc::string::String,
/// The storage location of the artifact.
#[prost(oneof = "artifact_config::ArtifactStorage", tags = "2")]
pub artifact_storage: ::core::option::Option<artifact_config::ArtifactStorage>,
/// The storage location of the artifact metadata.
#[prost(oneof = "artifact_config::ArtifactMetadataStorage", tags = "3")]
pub artifact_metadata_storage: ::core::option::Option<
artifact_config::ArtifactMetadataStorage,
>,
}
/// Nested message and enum types in `ArtifactConfig`.
pub mod artifact_config {
/// The storage location of the artifact.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ArtifactStorage {
/// Optional. Set if the artifact is stored in Artifact registry.
#[prost(message, tag = "2")]
GoogleArtifactRegistry(super::GoogleArtifactRegistry),
}
/// The storage location of the artifact metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ArtifactMetadataStorage {
/// Optional. Set if the artifact metadata is stored in Artifact analysis.
#[prost(message, tag = "3")]
GoogleArtifactAnalysis(super::GoogleArtifactAnalysis),
}
}
/// Google Artifact Analysis configurations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GoogleArtifactAnalysis {
/// Required. The project id of the project where the provenance is stored.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
/// Google Artifact Registry configurations.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GoogleArtifactRegistry {
/// Required. The host project of Artifact Registry.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. Immutable. The name of the artifact registry package.
#[prost(string, tag = "2")]
pub artifact_registry_package: ::prost::alloc::string::String,
}
/// The DeploymentEvent resource represents the deployment of the artifact within
/// the InsightsConfig resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeploymentEvent {
/// Identifier. The name of the DeploymentEvent. This name is provided by
/// Developer Connect insights. Format:
/// projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The create time of the DeploymentEvent.
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update time of the DeploymentEvent.
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The runtime configurations where the DeploymentEvent happened.
#[prost(message, optional, tag = "8")]
pub runtime_config: ::core::option::Option<RuntimeConfig>,
/// Output only. The runtime assigned URI of the DeploymentEvent.
/// For GKE, this is the fully qualified replica set uri.
/// e.g.
/// container.googleapis.com/projects/{project}/locations/{location}/clusters/{cluster}/k8s/namespaces/{namespace}/apps/replicasets/{replica-set-id}
/// For Cloud Run, this is the revision name.
#[prost(string, tag = "14")]
pub runtime_deployment_uri: ::prost::alloc::string::String,
/// Output only. The state of the DeploymentEvent.
#[prost(enumeration = "deployment_event::State", tag = "11")]
pub state: i32,
/// Output only. The artifact deployments of the DeploymentEvent. Each artifact
/// deployment contains the artifact uri and the runtime configuration uri. For
/// GKE, this would be all the containers images that are deployed in the pod.
#[prost(message, repeated, tag = "9")]
pub artifact_deployments: ::prost::alloc::vec::Vec<ArtifactDeployment>,
/// Output only. The time at which the DeploymentEvent was deployed.
/// This would be the min of all ArtifactDeployment deploy_times.
#[prost(message, optional, tag = "10")]
pub deploy_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which the DeploymentEvent was undeployed, all
/// artifacts are considered undeployed once this time is set. This would be
/// the max of all ArtifactDeployment undeploy_times. If any ArtifactDeployment
/// is still active (i.e. does not have an undeploy_time), this field will be
/// empty.
#[prost(message, optional, tag = "12")]
pub undeploy_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `DeploymentEvent`.
pub mod deployment_event {
/// The state of the DeploymentEvent.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// No state specified.
Unspecified = 0,
/// The deployment is active in the runtime.
Active = 1,
/// The deployment is not in the runtime.
Inactive = 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::Active => "STATE_ACTIVE",
Self::Inactive => "STATE_INACTIVE",
}
}
/// 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),
"STATE_ACTIVE" => Some(Self::Active),
"STATE_INACTIVE" => Some(Self::Inactive),
_ => None,
}
}
}
}
/// Request for getting a DeploymentEvent.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetDeploymentEventRequest {
/// Required. The name of the deployment event to retrieve.
/// Format:
/// projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for requesting list of DeploymentEvents.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListDeploymentEventsRequest {
/// Required. The parent insights config that owns this collection of
/// deployment events. Format:
/// projects/{project}/locations/{location}/insightsConfigs/{insights_config}
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. The maximum number of deployment events to return. The service
/// may return fewer than this value. If unspecified, at most 50 deployment
/// events will be returned. The maximum value is 1000; values above 1000 will
/// be coerced to 1000.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A page token, received from a previous `ListDeploymentEvents`
/// call. Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListDeploymentEvents`
/// must match the call that provided the page token.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filter expression that matches a subset of the DeploymentEvents.
/// <https://google.aip.dev/160.>
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
/// Response to listing DeploymentEvents.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDeploymentEventsResponse {
/// The list of DeploymentEvents.
#[prost(message, repeated, tag = "1")]
pub deployment_events: ::prost::alloc::vec::Vec<DeploymentEvent>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The ArtifactDeployment resource represents the deployment of the artifact
/// within the InsightsConfig resource.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArtifactDeployment {
/// Output only. Unique identifier of `ArtifactDeployment`.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Output only. The artifact that is deployed.
#[prost(string, tag = "2")]
pub artifact_reference: ::prost::alloc::string::String,
/// Output only. The artifact alias in the deployment spec, with Tag/SHA.
/// e.g. us-docker.pkg.dev/my-project/my-repo/image:1.0.0
#[prost(string, tag = "10")]
pub artifact_alias: ::prost::alloc::string::String,
/// Output only. The source commits at which this artifact was built. Extracted
/// from provenance.
#[prost(string, repeated, tag = "6")]
pub source_commit_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Output only. The time at which the deployment was deployed.
#[prost(message, optional, tag = "4")]
pub deploy_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The time at which the deployment was undeployed, all artifacts
/// are considered undeployed once this time is set.
#[prost(message, optional, tag = "5")]
pub undeploy_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The summary of container status of the artifact deployment.
/// Format as `ContainerStatusState-Reason : restartCount`
/// e.g. "Waiting-ImagePullBackOff : 3"
#[prost(string, tag = "7")]
pub container_status_summary: ::prost::alloc::string::String,
}
/// Request for creating an InsightsConfig.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateInsightsConfigRequest {
/// Required. Value for parent.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. ID of the requesting InsightsConfig.
#[prost(string, tag = "2")]
pub insights_config_id: ::prost::alloc::string::String,
/// Required. The resource being created.
#[prost(message, optional, tag = "3")]
pub insights_config: ::core::option::Option<InsightsConfig>,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
/// Request for getting an InsightsConfig.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInsightsConfigRequest {
/// Required. Name of the resource.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// Request for requesting list of InsightsConfigs.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInsightsConfigsRequest {
/// Required. Parent value for ListInsightsConfigsRequest.
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. Requested page size. Server may return fewer items than
/// requested. If unspecified, server will pick an appropriate default.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// Optional. A token identifying a page of results the server should return.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// Optional. Filtering results. See <https://google.aip.dev/160> for more
/// details. Filter string, adhering to the rules in
/// <https://google.aip.dev/160.> List only InsightsConfigs matching the filter.
/// If filter is empty, all InsightsConfigs are listed.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
/// Optional. Hint for how to order the results.
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
}
/// Request for response to listing InsightsConfigs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInsightsConfigsResponse {
/// The list of InsightsConfigs.
#[prost(message, repeated, tag = "1")]
pub insights_configs: ::prost::alloc::vec::Vec<InsightsConfig>,
/// A token identifying a page of results the server should return.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
/// Locations that could not be reached.
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for deleting an InsightsConfig.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteInsightsConfigRequest {
/// Required. Value for parent.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "3")]
pub validate_only: bool,
/// Optional. This checksum is computed by the server based on the value of
/// other fields, and may be sent on update and delete requests to ensure the
/// client has an up-to-date value before proceeding.
#[prost(string, tag = "4")]
pub etag: ::prost::alloc::string::String,
}
/// Request for updating an InsightsConfig.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInsightsConfigRequest {
/// Required. The resource being updated.
#[prost(message, optional, tag = "2")]
pub insights_config: ::core::option::Option<InsightsConfig>,
/// Optional. An optional request ID to identify requests. Specify a unique
/// request ID so that if you must retry your request, the server will know to
/// ignore the request if it has already been completed. The server will
/// guarantee that for at least 60 minutes after the first request.
///
/// For example, consider a situation where you make an initial request and the
/// request times out. If you make the request again with the same request
/// ID, the server can check if original operation with the same request ID
/// was received, and if so, will ignore the second request. This prevents
/// clients from accidentally creating duplicate commitments.
///
/// The request ID must be a valid UUID with the exception that zero UUID is
/// not supported (00000000-0000-0000-0000-000000000000).
#[prost(string, tag = "3")]
pub request_id: ::prost::alloc::string::String,
/// Optional. If set to true, and the insightsConfig is not found a new
/// insightsConfig will be created. In this situation `update_mask` is ignored.
/// The creation will succeed only if the input insightsConfig has all the
/// necessary information (e.g a github_config with both user_oauth_token and
/// installation_id properties).
#[prost(bool, tag = "4")]
pub allow_missing: bool,
/// Optional. If set, validate the request, but do not actually post it.
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
/// Generated client implementations.
pub mod insights_config_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Creates and manages InsightsConfigs.
///
/// The InsightsConfig resource is the core configuration object to capture
/// events from your Software Development Lifecycle. It acts as the central hub
/// for managing how Developer Connect understands your application, its runtime
/// environments, and the artifacts deployed within them.
/// A user can create an InsightsConfig, list previously-requested
/// InsightsConfigs or get InsightsConfigs by their ID to determine the status of
/// the InsightsConfig.
#[derive(Debug, Clone)]
pub struct InsightsConfigServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl InsightsConfigServiceClient<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> InsightsConfigServiceClient<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,
) -> InsightsConfigServiceClient<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,
{
InsightsConfigServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists InsightsConfigs in a given project and location.
pub async fn list_insights_configs(
&mut self,
request: impl tonic::IntoRequest<super::ListInsightsConfigsRequest>,
) -> std::result::Result<
tonic::Response<super::ListInsightsConfigsResponse>,
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.developerconnect.v1.InsightsConfigService/ListInsightsConfigs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"ListInsightsConfigs",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new InsightsConfig in a given project and location.
pub async fn create_insights_config(
&mut self,
request: impl tonic::IntoRequest<super::CreateInsightsConfigRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.InsightsConfigService/CreateInsightsConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"CreateInsightsConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets details of a single Insight.
pub async fn get_insights_config(
&mut self,
request: impl tonic::IntoRequest<super::GetInsightsConfigRequest>,
) -> std::result::Result<tonic::Response<super::InsightsConfig>, 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.developerconnect.v1.InsightsConfigService/GetInsightsConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"GetInsightsConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the parameters of a single InsightsConfig.
pub async fn update_insights_config(
&mut self,
request: impl tonic::IntoRequest<super::UpdateInsightsConfigRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.InsightsConfigService/UpdateInsightsConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"UpdateInsightsConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a single Insight.
pub async fn delete_insights_config(
&mut self,
request: impl tonic::IntoRequest<super::DeleteInsightsConfigRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
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.developerconnect.v1.InsightsConfigService/DeleteInsightsConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"DeleteInsightsConfig",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a single Deployment Event.
pub async fn get_deployment_event(
&mut self,
request: impl tonic::IntoRequest<super::GetDeploymentEventRequest>,
) -> std::result::Result<
tonic::Response<super::DeploymentEvent>,
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.developerconnect.v1.InsightsConfigService/GetDeploymentEvent",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"GetDeploymentEvent",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists Deployment Events in a given insights config.
pub async fn list_deployment_events(
&mut self,
request: impl tonic::IntoRequest<super::ListDeploymentEventsRequest>,
) -> std::result::Result<
tonic::Response<super::ListDeploymentEventsResponse>,
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.developerconnect.v1.InsightsConfigService/ListDeploymentEvents",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.developerconnect.v1.InsightsConfigService",
"ListDeploymentEvents",
),
);
self.inner.unary(req, path, codec).await
}
}
}