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
// This file is @generated by prost-build.
/// Represents the metadata of the long-running operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Output only. Identifies whether the user has requested cancellation
    /// of the operation. Operations that have been cancelled successfully
    /// have [Operation.error][] value with a
    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
    /// `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// A Network Connectivity Center hub is a global management resource to which
/// you attach spokes. A single hub can contain spokes from multiple regions.
/// However, if any of a hub's spokes use the site-to-site data transfer feature,
/// the resources associated with those spokes must all be in the same VPC
/// network. Spokes that do not use site-to-site data transfer can be associated
/// with any VPC network in your project.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hub {
    /// Immutable. The name of the hub. Hub names must be unique. They use the
    /// following form:
    ///      `projects/{project_number}/locations/global/hubs/{hub_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the hub was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the hub was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the hub.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the hub. This value is unique
    /// across all hub resources. If a hub is deleted and another with the same
    /// name is created, the new hub is assigned a different unique_id.
    #[prost(string, tag = "8")]
    pub unique_id: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this hub.
    #[prost(enumeration = "State", tag = "9")]
    pub state: i32,
    /// The VPC networks associated with this hub's spokes.
    ///
    /// This field is read-only. Network Connectivity Center automatically
    /// populates it based on the set of spokes attached to the hub.
    #[prost(message, repeated, tag = "10")]
    pub routing_vpcs: ::prost::alloc::vec::Vec<RoutingVpc>,
    /// Output only. The route tables that belong to this hub. They use the
    /// following form:
    ///     `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
    ///
    /// This field is read-only. Network Connectivity Center automatically
    /// populates it based on the route tables nested under the hub.
    #[prost(string, repeated, tag = "11")]
    pub route_tables: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. A summary of the spokes associated with a hub. The
    /// summary includes a count of spokes according to type
    /// and according to state. If any spokes are inactive,
    /// the summary also lists the reasons they are inactive,
    /// including a count for each reason.
    #[prost(message, optional, tag = "12")]
    pub spoke_summary: ::core::option::Option<SpokeSummary>,
}
/// RoutingVPC contains information about the VPC networks associated
/// with the spokes of a Network Connectivity Center hub.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoutingVpc {
    /// The URI of the VPC network.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// Output only. If true, indicates that this VPC network is currently
    /// associated with spokes that use the data transfer feature (spokes where the
    /// site_to_site_data_transfer field is set to true). If you create new spokes
    /// that use data transfer, they must be associated with this VPC network. At
    /// most, one VPC network will have this field set to true.
    #[prost(bool, tag = "2")]
    pub required_for_new_site_to_site_data_transfer_spokes: bool,
}
/// A Network Connectivity Center spoke represents one or more network
/// connectivity resources.
///
/// When you create a spoke, you associate it with a hub. You must also
/// identify a value for exactly one of the following fields:
///
/// * linked_vpn_tunnels
/// * linked_interconnect_attachments
/// * linked_router_appliance_instances
/// * linked_vpc_network
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Spoke {
    /// Immutable. The name of the spoke. Spoke names must be unique. They use the
    /// following form:
    ///      `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the spoke was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the spoke was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the spoke.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Immutable. The name of the hub that this spoke is attached to.
    #[prost(string, tag = "6")]
    pub hub: ::prost::alloc::string::String,
    /// Optional. The name of the group that this spoke is associated with.
    #[prost(string, tag = "23")]
    pub group: ::prost::alloc::string::String,
    /// VPN tunnels that are associated with the spoke.
    #[prost(message, optional, tag = "17")]
    pub linked_vpn_tunnels: ::core::option::Option<LinkedVpnTunnels>,
    /// VLAN attachments that are associated with the spoke.
    #[prost(message, optional, tag = "18")]
    pub linked_interconnect_attachments: ::core::option::Option<
        LinkedInterconnectAttachments,
    >,
    /// Router appliance instances that are associated with the spoke.
    #[prost(message, optional, tag = "19")]
    pub linked_router_appliance_instances: ::core::option::Option<
        LinkedRouterApplianceInstances,
    >,
    /// Optional. VPC network that is associated with the spoke.
    #[prost(message, optional, tag = "20")]
    pub linked_vpc_network: ::core::option::Option<LinkedVpcNetwork>,
    /// Output only. The Google-generated UUID for the spoke. This value is unique
    /// across all spoke resources. If a spoke is deleted and another with the same
    /// name is created, the new spoke is assigned a different `unique_id`.
    #[prost(string, tag = "11")]
    pub unique_id: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this spoke.
    #[prost(enumeration = "State", tag = "15")]
    pub state: i32,
    /// Output only. The reasons for current state of the spoke. Only present when
    /// the spoke is in the `INACTIVE` state.
    #[prost(message, repeated, tag = "21")]
    pub reasons: ::prost::alloc::vec::Vec<spoke::StateReason>,
    /// Output only. The type of resource associated with the spoke.
    #[prost(enumeration = "SpokeType", tag = "22")]
    pub spoke_type: i32,
}
/// Nested message and enum types in `Spoke`.
pub mod spoke {
    /// The reason a spoke is inactive.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct StateReason {
        /// The code associated with this reason.
        #[prost(enumeration = "state_reason::Code", tag = "1")]
        pub code: i32,
        /// Human-readable details about this reason.
        #[prost(string, tag = "2")]
        pub message: ::prost::alloc::string::String,
        /// Additional information provided by the user in the RejectSpoke call.
        #[prost(string, tag = "3")]
        pub user_details: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `StateReason`.
    pub mod state_reason {
        /// The Code enum represents the various reasons a state can be `INACTIVE`.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Code {
            /// No information available.
            Unspecified = 0,
            /// The proposed spoke is pending review.
            PendingReview = 1,
            /// The proposed spoke has been rejected by the hub administrator.
            Rejected = 2,
            /// The spoke has been deactivated internally.
            Paused = 3,
            /// Network Connectivity Center encountered errors while accepting
            /// the spoke.
            Failed = 4,
        }
        impl Code {
            /// 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 {
                    Code::Unspecified => "CODE_UNSPECIFIED",
                    Code::PendingReview => "PENDING_REVIEW",
                    Code::Rejected => "REJECTED",
                    Code::Paused => "PAUSED",
                    Code::Failed => "FAILED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "CODE_UNSPECIFIED" => Some(Self::Unspecified),
                    "PENDING_REVIEW" => Some(Self::PendingReview),
                    "REJECTED" => Some(Self::Rejected),
                    "PAUSED" => Some(Self::Paused),
                    "FAILED" => Some(Self::Failed),
                    _ => None,
                }
            }
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteTable {
    /// Immutable. The name of the route table. Route table names must be unique.
    /// They use the following form:
    ///       `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the route table was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the route table was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the route table.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the route table. This value is
    /// unique across all route table resources. If a route table is deleted and
    /// another with the same name is created, the new route table is assigned
    /// a different `uid`.
    #[prost(string, tag = "6")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this route table.
    #[prost(enumeration = "State", tag = "7")]
    pub state: i32,
}
/// A route defines a path from VM instances within a spoke to a specific
/// destination resource. Only VPC spokes have routes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
    /// Immutable. The name of the route. Route names must be unique. Route names
    /// use the following form:
    ///       `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the route was created.
    #[prost(message, optional, tag = "4")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the route was last updated.
    #[prost(message, optional, tag = "5")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The destination IP address range.
    #[prost(string, tag = "1")]
    pub ip_cidr_range: ::prost::alloc::string::String,
    /// Output only. The route's type. Its type is determined by the properties of
    /// its IP address range.
    #[prost(enumeration = "RouteType", tag = "10")]
    pub r#type: i32,
    /// Immutable. The destination VPC network for packets on this route.
    #[prost(message, optional, tag = "2")]
    pub next_hop_vpc_network: ::core::option::Option<NextHopVpcNetwork>,
    /// Optional labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(btree_map = "string, string", tag = "6")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// An optional description of the route.
    #[prost(string, tag = "7")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the route. This value is unique
    /// across all Network Connectivity Center route resources. If a
    /// route is deleted and another with the same name is created,
    /// the new route is assigned a different `uid`.
    #[prost(string, tag = "8")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of the route.
    #[prost(enumeration = "State", tag = "9")]
    pub state: i32,
    /// Immutable. The spoke that this route leads to.
    /// Example: projects/12345/locations/global/spokes/SPOKE
    #[prost(string, tag = "11")]
    pub spoke: ::prost::alloc::string::String,
    /// Output only. The location of the route.
    /// Uses the following form: "projects/{project}/locations/{location}"
    /// Example: projects/1234/locations/us-central1
    #[prost(string, tag = "12")]
    pub location: ::prost::alloc::string::String,
}
/// A group represents a subset of spokes attached to a hub.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
    /// Immutable. The name of the group. Group names must be unique. They
    /// use the following form:
    ///       `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time the group was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the group was last updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Labels in key-value pair format. For more information about
    /// labels, see [Requirements for
    /// labels](<https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements>).
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. The description of the group.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The Google-generated UUID for the group. This value is unique
    /// across all group resources. If a group is deleted and
    /// another with the same name is created, the new route table is assigned
    /// a different unique_id.
    #[prost(string, tag = "6")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. The current lifecycle state of this group.
    #[prost(enumeration = "State", tag = "7")]
    pub state: i32,
}
/// Request for
/// [HubService.ListHubs][google.cloud.networkconnectivity.v1.HubService.ListHubs]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubsRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page to return.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// [HubService.ListHubs][google.cloud.networkconnectivity.v1.HubService.ListHubs]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubsResponse {
    /// The requested hubs.
    #[prost(message, repeated, tag = "1")]
    pub hubs: ::prost::alloc::vec::Vec<Hub>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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
/// [HubService.GetHub][google.cloud.networkconnectivity.v1.HubService.GetHub]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHubRequest {
    /// Required. The name of the hub resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// [HubService.CreateHub][google.cloud.networkconnectivity.v1.HubService.CreateHub]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateHubRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. A unique identifier for the hub.
    #[prost(string, tag = "2")]
    pub hub_id: ::prost::alloc::string::String,
    /// Required. The initial values for a new hub.
    #[prost(message, optional, tag = "3")]
    pub hub: ::core::option::Option<Hub>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// Request for
/// [HubService.UpdateHub][google.cloud.networkconnectivity.v1.HubService.UpdateHub]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHubRequest {
    /// Optional. In the case of an update to an existing hub, field mask is used
    /// to specify the fields to be overwritten. The fields specified in the
    /// update_mask are relative to the resource, not the full request. A field is
    /// overwritten if it is in the mask. If the user does not provide a mask, then
    /// all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The state that the hub should be in after the update.
    #[prost(message, optional, tag = "2")]
    pub hub: ::core::option::Option<Hub>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// [HubService.DeleteHub][google.cloud.networkconnectivity.v1.HubService.DeleteHub].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteHubRequest {
    /// Required. The name of the hub to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
///
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubSpokesRequest {
    /// Required. The name of the hub.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// A list of locations.
    /// Specify one of the following: `\[global\]`, a single region (for
    /// example, `\[us-central1\]`), or a combination of
    /// values (for example, `\[global, us-central1, us-west1\]`).
    /// If the spoke_locations field is populated, the list of results
    /// includes only spokes in the specified location.
    /// If the spoke_locations field is not populated, the list of results
    /// includes spokes in all locations.
    #[prost(string, repeated, tag = "2")]
    pub spoke_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by name or create_time.
    #[prost(string, tag = "6")]
    pub order_by: ::prost::alloc::string::String,
    /// The view of the spoke to return.
    /// The view that you use determines which spoke fields are included in the
    /// response.
    #[prost(enumeration = "list_hub_spokes_request::SpokeView", tag = "7")]
    pub view: i32,
}
/// Nested message and enum types in `ListHubSpokesRequest`.
pub mod list_hub_spokes_request {
    /// Enum that controls which spoke fields are included in the response.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SpokeView {
        /// The spoke view is unspecified. When the spoke view is unspecified, the
        /// API returns the same fields as the `BASIC` view.
        Unspecified = 0,
        /// Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
        /// and `spoke_type`. This is the default value.
        Basic = 1,
        /// Includes all spoke fields except `labels`.
        /// You can use the `DETAILED` view only when you set the `spoke_locations`
        /// field to `\[global\]`.
        Detailed = 2,
    }
    impl SpokeView {
        /// 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 {
                SpokeView::Unspecified => "SPOKE_VIEW_UNSPECIFIED",
                SpokeView::Basic => "BASIC",
                SpokeView::Detailed => "DETAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "SPOKE_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
                "BASIC" => Some(Self::Basic),
                "DETAILED" => Some(Self::Detailed),
                _ => None,
            }
        }
    }
}
/// The response for
/// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1.HubService.ListHubSpokes].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListHubSpokesResponse {
    /// The requested spokes.
    /// The spoke fields can be partially populated based on the `view` field in
    /// the request message.
    #[prost(message, repeated, tag = "1")]
    pub spokes: ::prost::alloc::vec::Vec<Spoke>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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>,
}
/// The request for
/// [HubService.ListSpokes][google.cloud.networkconnectivity.v1.HubService.ListSpokes].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpokesRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// The response for
/// [HubService.ListSpokes][google.cloud.networkconnectivity.v1.HubService.ListSpokes].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSpokesResponse {
    /// The requested spokes.
    #[prost(message, repeated, tag = "1")]
    pub spokes: ::prost::alloc::vec::Vec<Spoke>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[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>,
}
/// The request for
/// [HubService.GetSpoke][google.cloud.networkconnectivity.v1.HubService.GetSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSpokeRequest {
    /// Required. The name of the spoke resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The request for
/// [HubService.CreateSpoke][google.cloud.networkconnectivity.v1.HubService.CreateSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSpokeRequest {
    /// Required. The parent resource.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Unique id for the spoke to create.
    #[prost(string, tag = "2")]
    pub spoke_id: ::prost::alloc::string::String,
    /// Required. The initial values for a new spoke.
    #[prost(message, optional, tag = "3")]
    pub spoke: ::core::option::Option<Spoke>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// Request for
/// [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1.HubService.UpdateSpoke]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSpokeRequest {
    /// Optional. In the case of an update to an existing spoke, field mask is used
    /// to specify the fields to be overwritten. The fields specified in the
    /// update_mask are relative to the resource, not the full request. A field is
    /// overwritten if it is in the mask. If the user does not provide a mask, then
    /// all fields are overwritten.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The state that the spoke should be in after the update.
    #[prost(message, optional, tag = "2")]
    pub spoke: ::core::option::Option<Spoke>,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1.HubService.DeleteSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSpokeRequest {
    /// Required. The name of the spoke to delete.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The request for
/// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptHubSpokeRequest {
    /// Required. The name of the hub into which to accept the spoke.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to accept into the hub.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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,
}
/// The response for
/// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1.HubService.AcceptHubSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptHubSpokeResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectHubSpokeRequest {
    /// Required. The name of the hub from which to reject the spoke.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The URI of the spoke to reject from the hub.
    #[prost(string, tag = "2")]
    pub spoke_uri: ::prost::alloc::string::String,
    /// Optional. A request ID to identify requests. Specify a unique request ID so
    /// that if you must retry your request, the server knows to ignore the request
    /// if it has already been completed. The server guarantees that a request
    /// doesn't result in creation of duplicate commitments for at least 60
    /// minutes.
    ///
    /// 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 to see whether the original operation
    /// was received. If it was, the server ignores the second request. This
    /// behavior prevents clients from mistakenly 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. Additional information provided by the hub administrator.
    #[prost(string, tag = "4")]
    pub details: ::prost::alloc::string::String,
}
/// The response for
/// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1.HubService.RejectHubSpoke].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectHubSpokeResponse {
    /// The spoke that was operated on.
    #[prost(message, optional, tag = "1")]
    pub spoke: ::core::option::Option<Spoke>,
}
/// The request for
/// [HubService.GetRouteTable][google.cloud.networkconnectivity.v1.HubService.GetRouteTable].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRouteTableRequest {
    /// Required. The name of the route table resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// The request for
/// [HubService.GetRoute][google.cloud.networkconnectivity.v1.HubService.GetRoute].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRouteRequest {
    /// Required. The name of the route resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for
/// [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRoutesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// [HubService.ListRoutes][google.cloud.networkconnectivity.v1.HubService.ListRoutes]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRoutesResponse {
    /// The requested routes.
    #[prost(message, repeated, tag = "1")]
    pub routes: ::prost::alloc::vec::Vec<Route>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// RouteTables that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for
/// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRouteTablesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1.HubService.ListRouteTables]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRouteTablesResponse {
    /// The requested route tables.
    #[prost(message, repeated, tag = "1")]
    pub route_tables: ::prost::alloc::vec::Vec<RouteTable>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Hubs that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for
/// [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGroupsRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results to return per page.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// An expression that filters the list of results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for
/// [HubService.ListGroups][google.cloud.networkconnectivity.v1.HubService.ListGroups]
/// method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListGroupsResponse {
    /// The requested groups.
    #[prost(message, repeated, tag = "1")]
    pub groups: ::prost::alloc::vec::Vec<Group>,
    /// The token for the next page of the response. To see more results,
    /// use this value as the page_token for your next request. If this value
    /// is empty, there are no more results.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Hubs that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A collection of Cloud VPN tunnel resources. These resources should be
/// redundant HA VPN tunnels that all advertise the same prefixes to Google
/// Cloud. Alternatively, in a passive/active configuration, all tunnels
/// should be capable of advertising the same prefixes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinkedVpnTunnels {
    /// The URIs of linked VPN tunnel resources.
    #[prost(string, repeated, tag = "1")]
    pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these VPN tunnels are located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
}
/// A collection of VLAN attachment resources. These resources should
/// be redundant attachments that all advertise the same prefixes to Google
/// Cloud. Alternatively, in active/passive configurations, all attachments
/// should be capable of advertising the same prefixes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinkedInterconnectAttachments {
    /// The URIs of linked interconnect attachment resources
    #[prost(string, repeated, tag = "1")]
    pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these VLAN attachments are located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
}
/// A collection of router appliance instances. If you configure multiple router
/// appliance instances to receive data from the same set of sites outside of
/// Google Cloud, we recommend that you associate those instances with the same
/// spoke.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinkedRouterApplianceInstances {
    /// The list of router appliance instances.
    #[prost(message, repeated, tag = "1")]
    pub instances: ::prost::alloc::vec::Vec<RouterApplianceInstance>,
    /// A value that controls whether site-to-site data transfer is enabled for
    /// these resources. Data transfer is available only in [supported
    /// locations](<https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations>).
    #[prost(bool, tag = "2")]
    pub site_to_site_data_transfer: bool,
    /// Output only. The VPC network where these router appliance instances are
    /// located.
    #[prost(string, tag = "3")]
    pub vpc_network: ::prost::alloc::string::String,
}
/// An existing VPC network.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinkedVpcNetwork {
    /// Required. The URI of the VPC network resource.
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    /// Optional. IP ranges encompassing the subnets to be excluded from peering.
    #[prost(string, repeated, tag = "2")]
    pub exclude_export_ranges: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A router appliance instance is a Compute Engine virtual machine (VM) instance
/// that acts as a BGP speaker. A router appliance instance is specified by the
/// URI of the VM and the internal IP address of one of the VM's network
/// interfaces.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouterApplianceInstance {
    /// The URI of the VM.
    #[prost(string, tag = "1")]
    pub virtual_machine: ::prost::alloc::string::String,
    /// The IP address on the VM to use for peering.
    #[prost(string, tag = "3")]
    pub ip_address: ::prost::alloc::string::String,
}
/// Metadata about locations
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationMetadata {
    /// List of supported features
    #[prost(enumeration = "LocationFeature", repeated, tag = "1")]
    pub location_features: ::prost::alloc::vec::Vec<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NextHopVpcNetwork {
    /// The URI of the VPC network resource
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
}
/// Summarizes information about the spokes associated with a hub.
/// The summary includes a count of spokes according to type
/// and according to state. If any spokes are inactive,
/// the summary also lists the reasons they are inactive,
/// including a count for each reason.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpokeSummary {
    /// Output only. Counts the number of spokes of each type that are
    /// associated with a specific hub.
    #[prost(message, repeated, tag = "1")]
    pub spoke_type_counts: ::prost::alloc::vec::Vec<spoke_summary::SpokeTypeCount>,
    /// Output only. Counts the number of spokes that are in each state
    /// and associated with a given hub.
    #[prost(message, repeated, tag = "2")]
    pub spoke_state_counts: ::prost::alloc::vec::Vec<spoke_summary::SpokeStateCount>,
    /// Output only. Counts the number of spokes that are inactive for each
    /// possible reason and associated with a given hub.
    #[prost(message, repeated, tag = "3")]
    pub spoke_state_reason_counts: ::prost::alloc::vec::Vec<
        spoke_summary::SpokeStateReasonCount,
    >,
}
/// Nested message and enum types in `SpokeSummary`.
pub mod spoke_summary {
    /// The number of spokes of a given type that are associated
    /// with a specific hub. The type indicates what kind of
    /// resource is associated with the spoke.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SpokeTypeCount {
        /// Output only. The type of the spokes.
        #[prost(enumeration = "super::SpokeType", tag = "1")]
        pub spoke_type: i32,
        /// Output only. The total number of spokes of this type that are
        /// associated with the hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
    /// The number of spokes that are in a particular state
    /// and associated with a given hub.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SpokeStateCount {
        /// Output only. The state of the spokes.
        #[prost(enumeration = "super::State", tag = "1")]
        pub state: i32,
        /// Output only. The total number of spokes that are in this state
        /// and associated with a given hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
    /// The number of spokes in the hub that are inactive for this reason.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SpokeStateReasonCount {
        /// Output only. The reason that a spoke is inactive.
        #[prost(enumeration = "super::spoke::state_reason::Code", tag = "1")]
        pub state_reason_code: i32,
        /// Output only. The total number of spokes that are inactive for a
        /// particular reason and associated with a given hub.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
}
/// The request for
/// [HubService.GetGroup][google.cloud.networkconnectivity.v1.HubService.GetGroup].
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupRequest {
    /// Required. The name of the route table resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Supported features for a location
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LocationFeature {
    /// No publicly supported feature in this location
    Unspecified = 0,
    /// Site-to-cloud spokes are supported in this location
    SiteToCloudSpokes = 1,
    /// Site-to-site spokes are supported in this location
    SiteToSiteSpokes = 2,
}
impl LocationFeature {
    /// 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 {
            LocationFeature::Unspecified => "LOCATION_FEATURE_UNSPECIFIED",
            LocationFeature::SiteToCloudSpokes => "SITE_TO_CLOUD_SPOKES",
            LocationFeature::SiteToSiteSpokes => "SITE_TO_SITE_SPOKES",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOCATION_FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
            "SITE_TO_CLOUD_SPOKES" => Some(Self::SiteToCloudSpokes),
            "SITE_TO_SITE_SPOKES" => Some(Self::SiteToSiteSpokes),
            _ => None,
        }
    }
}
/// The route's type
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RouteType {
    /// No route type information specified
    Unspecified = 0,
    /// The route leads to a destination within the primary address range of the
    /// VPC network's subnet.
    VpcPrimarySubnet = 1,
    /// The route leads to a destination within the secondary address range of the
    /// VPC network's subnet.
    VpcSecondarySubnet = 2,
}
impl RouteType {
    /// 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 {
            RouteType::Unspecified => "ROUTE_TYPE_UNSPECIFIED",
            RouteType::VpcPrimarySubnet => "VPC_PRIMARY_SUBNET",
            RouteType::VpcSecondarySubnet => "VPC_SECONDARY_SUBNET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ROUTE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "VPC_PRIMARY_SUBNET" => Some(Self::VpcPrimarySubnet),
            "VPC_SECONDARY_SUBNET" => Some(Self::VpcSecondarySubnet),
            _ => None,
        }
    }
}
/// The State enum represents the lifecycle stage of a Network Connectivity
/// Center resource.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
    /// No state information available
    Unspecified = 0,
    /// The resource's create operation is in progress.
    Creating = 1,
    /// The resource is active
    Active = 2,
    /// The resource's delete operation is in progress.
    Deleting = 3,
    /// The resource's accept operation is in progress.
    Accepting = 8,
    /// The resource's reject operation is in progress.
    Rejecting = 9,
    /// The resource's update operation is in progress.
    Updating = 6,
    /// The resource is inactive.
    Inactive = 7,
    /// The hub associated with this spoke resource has been deleted.
    /// This state applies to spoke resources only.
    Obsolete = 10,
}
impl State {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            State::Unspecified => "STATE_UNSPECIFIED",
            State::Creating => "CREATING",
            State::Active => "ACTIVE",
            State::Deleting => "DELETING",
            State::Accepting => "ACCEPTING",
            State::Rejecting => "REJECTING",
            State::Updating => "UPDATING",
            State::Inactive => "INACTIVE",
            State::Obsolete => "OBSOLETE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "CREATING" => Some(Self::Creating),
            "ACTIVE" => Some(Self::Active),
            "DELETING" => Some(Self::Deleting),
            "ACCEPTING" => Some(Self::Accepting),
            "REJECTING" => Some(Self::Rejecting),
            "UPDATING" => Some(Self::Updating),
            "INACTIVE" => Some(Self::Inactive),
            "OBSOLETE" => Some(Self::Obsolete),
            _ => None,
        }
    }
}
/// The SpokeType enum represents the type of spoke. The type
/// reflects the kind of resource that a spoke is associated with.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SpokeType {
    /// Unspecified spoke type.
    Unspecified = 0,
    /// Spokes associated with VPN tunnels.
    VpnTunnel = 1,
    /// Spokes associated with VLAN attachments.
    InterconnectAttachment = 2,
    /// Spokes associated with router appliance instances.
    RouterAppliance = 3,
    /// Spokes associated with VPC networks.
    VpcNetwork = 4,
}
impl SpokeType {
    /// 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 {
            SpokeType::Unspecified => "SPOKE_TYPE_UNSPECIFIED",
            SpokeType::VpnTunnel => "VPN_TUNNEL",
            SpokeType::InterconnectAttachment => "INTERCONNECT_ATTACHMENT",
            SpokeType::RouterAppliance => "ROUTER_APPLIANCE",
            SpokeType::VpcNetwork => "VPC_NETWORK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SPOKE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "VPN_TUNNEL" => Some(Self::VpnTunnel),
            "INTERCONNECT_ATTACHMENT" => Some(Self::InterconnectAttachment),
            "ROUTER_APPLIANCE" => Some(Self::RouterAppliance),
            "VPC_NETWORK" => Some(Self::VpcNetwork),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod hub_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Network Connectivity Center is a hub-and-spoke abstraction for network
    /// connectivity management in Google Cloud. It reduces operational complexity
    /// through a simple, centralized connectivity management model.
    #[derive(Debug, Clone)]
    pub struct HubServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> HubServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> HubServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            HubServiceClient::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 the Network Connectivity Center hubs associated with a given project.
        pub async fn list_hubs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHubsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHubsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListHubs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListHubs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center hub.
        pub async fn get_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::GetHubRequest>,
        ) -> std::result::Result<tonic::Response<super::Hub>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/GetHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Network Connectivity Center hub in the specified project.
        pub async fn create_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateHubRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/CreateHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "CreateHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the description and/or labels of a Network Connectivity Center
        /// hub.
        pub async fn update_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateHubRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/UpdateHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "UpdateHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a Network Connectivity Center hub.
        pub async fn delete_hub(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteHubRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/DeleteHub",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "DeleteHub",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the Network Connectivity Center spokes associated with a
        /// specified hub and location. The list includes both spokes that are attached
        /// to the hub and spokes that have been proposed but not yet accepted.
        pub async fn list_hub_spokes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListHubSpokesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListHubSpokesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListHubSpokes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListHubSpokes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the Network Connectivity Center spokes in a specified project and
        /// location.
        pub async fn list_spokes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSpokesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListSpokesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListSpokes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListSpokes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center spoke.
        pub async fn get_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSpokeRequest>,
        ) -> std::result::Result<tonic::Response<super::Spoke>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/GetSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a Network Connectivity Center spoke.
        pub async fn create_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateSpokeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/CreateSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "CreateSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a Network Connectivity Center spoke.
        pub async fn update_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateSpokeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/UpdateSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "UpdateSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Rejects a Network Connectivity Center spoke from being attached to a hub.
        /// If the spoke was previously in the `ACTIVE` state, it
        /// transitions to the `INACTIVE` state and is no longer able to
        /// connect to other spokes that are attached to the hub.
        pub async fn reject_hub_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::RejectHubSpokeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/RejectHubSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "RejectHubSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Accepts a proposal to attach a Network Connectivity Center spoke
        /// to a hub.
        pub async fn accept_hub_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::AcceptHubSpokeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "AcceptHubSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a Network Connectivity Center spoke.
        pub async fn delete_spoke(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteSpokeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/DeleteSpoke",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "DeleteSpoke",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center route table.
        pub async fn get_route_table(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRouteTableRequest>,
        ) -> std::result::Result<tonic::Response<super::RouteTable>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/GetRouteTable",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetRouteTable",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about the specified route.
        pub async fn get_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetRouteRequest>,
        ) -> std::result::Result<tonic::Response<super::Route>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/GetRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists routes in a given project.
        pub async fn list_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists route tables in a given project.
        pub async fn list_route_tables(
            &mut self,
            request: impl tonic::IntoRequest<super::ListRouteTablesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListRouteTablesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListRouteTables",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListRouteTables",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about a Network Connectivity Center group.
        pub async fn get_group(
            &mut self,
            request: impl tonic::IntoRequest<super::GetGroupRequest>,
        ) -> std::result::Result<tonic::Response<super::Group>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/GetGroup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "GetGroup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists groups in a given hub.
        pub async fn list_groups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListGroupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListGroupsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.HubService/ListGroups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.HubService",
                        "ListGroups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Policy Based Routes (PBR) are more powerful routes that allows GCP customers
/// to route their L4 network traffic based on not just destination IP, but also
/// source IP, protocol and more. A PBR always take precedence when it conflicts
/// with other types of routes.
/// Next id: 22
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyBasedRoute {
    /// Immutable. A unique name of the resource in the form of
    /// `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Time when the PolicyBasedRoute was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the PolicyBasedRoute was updated.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// User-defined labels.
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. An optional description of this resource. Provide this field when
    /// you create the resource.
    #[prost(string, tag = "5")]
    pub description: ::prost::alloc::string::String,
    /// Required. Fully-qualified URL of the network that this route applies to.
    /// e.g. projects/my-project/global/networks/my-network.
    #[prost(string, tag = "6")]
    pub network: ::prost::alloc::string::String,
    /// Required. The filter to match L4 traffic.
    #[prost(message, optional, tag = "10")]
    pub filter: ::core::option::Option<policy_based_route::Filter>,
    /// Optional. The priority of this policy based route. Priority is used to
    /// break ties in cases where there are more than one matching policy based
    /// routes found. In cases where multiple policy based routes are matched, the
    /// one with the lowest-numbered priority value wins. The default value is
    /// 1000. The priority value must be from 1 to 65535, inclusive.
    #[prost(int32, tag = "11")]
    pub priority: i32,
    /// Output only. If potential misconfigurations are detected for this route,
    /// this field will be populated with warning messages.
    #[prost(message, repeated, tag = "14")]
    pub warnings: ::prost::alloc::vec::Vec<policy_based_route::Warnings>,
    /// Output only. Server-defined fully-qualified URL for this resource.
    #[prost(string, tag = "15")]
    pub self_link: ::prost::alloc::string::String,
    /// Output only. Type of this resource. Always
    /// networkconnectivity#policyBasedRoute for Policy Based Route resources.
    #[prost(string, tag = "16")]
    pub kind: ::prost::alloc::string::String,
    /// Target specifies network endpoints to which this policy based route applies
    /// to. If none of the target is specified, the PBR will be installed on all
    /// network endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC.
    #[prost(oneof = "policy_based_route::Target", tags = "18, 9")]
    pub target: ::core::option::Option<policy_based_route::Target>,
    #[prost(oneof = "policy_based_route::NextHop", tags = "12, 21")]
    pub next_hop: ::core::option::Option<policy_based_route::NextHop>,
}
/// Nested message and enum types in `PolicyBasedRoute`.
pub mod policy_based_route {
    /// VM instances to which this policy based route applies to.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct VirtualMachine {
        /// Optional. A list of VM instance tags to which this policy based route
        /// applies to. VM instances that have ANY of tags specified here will
        /// install this PBR.
        #[prost(string, repeated, tag = "1")]
        pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// InterconnectAttachment to which this route applies to.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InterconnectAttachment {
        /// Optional. Cloud region to install this policy based route on interconnect
        /// attachment. Use `all` to install it on all interconnect attachments.
        #[prost(string, tag = "1")]
        pub region: ::prost::alloc::string::String,
    }
    /// Filter matches L4 traffic.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Filter {
        /// Optional. The IP protocol that this policy based route applies to. Valid
        /// values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
        #[prost(string, tag = "1")]
        pub ip_protocol: ::prost::alloc::string::String,
        /// Optional. The source IP range of outgoing packets that this policy based
        /// route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
        #[prost(string, tag = "2")]
        pub src_range: ::prost::alloc::string::String,
        /// Optional. The destination IP range of outgoing packets that this policy
        /// based route applies to. Default is "0.0.0.0/0" if protocol version is
        /// IPv4.
        #[prost(string, tag = "3")]
        pub dest_range: ::prost::alloc::string::String,
        /// Required. Internet protocol versions this policy based route applies to.
        /// For this version, only IPV4 is supported.
        #[prost(enumeration = "filter::ProtocolVersion", tag = "6")]
        pub protocol_version: i32,
    }
    /// Nested message and enum types in `Filter`.
    pub mod filter {
        /// The internet protocol version.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum ProtocolVersion {
            /// Default value.
            Unspecified = 0,
            /// The PBR is for IPv4 internet protocol traffic.
            Ipv4 = 1,
        }
        impl ProtocolVersion {
            /// 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 {
                    ProtocolVersion::Unspecified => "PROTOCOL_VERSION_UNSPECIFIED",
                    ProtocolVersion::Ipv4 => "IPV4",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "PROTOCOL_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
                    "IPV4" => Some(Self::Ipv4),
                    _ => None,
                }
            }
        }
    }
    /// Informational warning message.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Warnings {
        /// Output only. A warning code, if applicable.
        #[prost(enumeration = "warnings::Code", tag = "1")]
        pub code: i32,
        /// Output only. Metadata about this warning in key: value format. The key
        /// should provides more detail on the warning being returned. For example,
        /// for warnings where there are no results in a list request for a
        /// particular zone, this key might be scope and the key value might be the
        /// zone name. Other examples might be a key indicating a deprecated resource
        /// and a suggested replacement.
        #[prost(btree_map = "string, string", tag = "2")]
        pub data: ::prost::alloc::collections::BTreeMap<
            ::prost::alloc::string::String,
            ::prost::alloc::string::String,
        >,
        /// Output only. A human-readable description of the warning code.
        #[prost(string, tag = "3")]
        pub warning_message: ::prost::alloc::string::String,
    }
    /// Nested message and enum types in `Warnings`.
    pub mod warnings {
        /// Warning code for Policy Based Routing. Expect to add values in the
        /// future.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum Code {
            /// Default value.
            WarningUnspecified = 0,
            /// The policy based route is not active and functioning. Common causes are
            /// the dependent network was deleted or the resource project was turned
            /// off.
            ResourceNotActive = 1,
            /// The policy based route is being modified (e.g. created/deleted) at this
            /// time.
            ResourceBeingModified = 2,
        }
        impl Code {
            /// 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 {
                    Code::WarningUnspecified => "WARNING_UNSPECIFIED",
                    Code::ResourceNotActive => "RESOURCE_NOT_ACTIVE",
                    Code::ResourceBeingModified => "RESOURCE_BEING_MODIFIED",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "WARNING_UNSPECIFIED" => Some(Self::WarningUnspecified),
                    "RESOURCE_NOT_ACTIVE" => Some(Self::ResourceNotActive),
                    "RESOURCE_BEING_MODIFIED" => Some(Self::ResourceBeingModified),
                    _ => None,
                }
            }
        }
    }
    /// The other routing cases.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum OtherRoutes {
        /// Default value.
        Unspecified = 0,
        /// Use the routes from the default routing tables (system-generated routes,
        /// custom routes, peering route) to determine the next hop. This will
        /// effectively exclude matching packets being applied on other PBRs with a
        /// lower priority.
        DefaultRouting = 1,
    }
    impl OtherRoutes {
        /// 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 {
                OtherRoutes::Unspecified => "OTHER_ROUTES_UNSPECIFIED",
                OtherRoutes::DefaultRouting => "DEFAULT_ROUTING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "OTHER_ROUTES_UNSPECIFIED" => Some(Self::Unspecified),
                "DEFAULT_ROUTING" => Some(Self::DefaultRouting),
                _ => None,
            }
        }
    }
    /// Target specifies network endpoints to which this policy based route applies
    /// to. If none of the target is specified, the PBR will be installed on all
    /// network endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Target {
        /// Optional. VM instances to which this policy based route applies to.
        #[prost(message, tag = "18")]
        VirtualMachine(VirtualMachine),
        /// Optional. The interconnect attachments to which this route applies to.
        #[prost(message, tag = "9")]
        InterconnectAttachment(InterconnectAttachment),
    }
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum NextHop {
        /// Optional. The IP of a global access enabled L4 ILB that should be the
        /// next hop to handle matching packets. For this version, only
        /// next_hop_ilb_ip is supported.
        #[prost(string, tag = "12")]
        NextHopIlbIp(::prost::alloc::string::String),
        /// Optional. Other routes that will be referenced to determine the next hop
        /// of the packet.
        #[prost(enumeration = "OtherRoutes", tag = "21")]
        NextHopOtherRoutes(i32),
    }
}
/// Request for [PolicyBasedRouting.ListPolicyBasedRoutes][] method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPolicyBasedRoutesRequest {
    /// Required. The parent resource's name.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of results per page that should be returned.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The page token.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// A filter expression that filters the results listed in the response.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Sort the results by a certain order.
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response for [PolicyBasedRouting.ListPolicyBasedRoutes][] method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPolicyBasedRoutesResponse {
    /// Policy based routes to be returned.
    #[prost(message, repeated, tag = "1")]
    pub policy_based_routes: ::prost::alloc::vec::Vec<PolicyBasedRoute>,
    /// The next pagination token in the List response. It should be used as
    /// page_token for the following request. An empty value means no more result.
    #[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 [PolicyBasedRouting.GetPolicyBasedRoute][] method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPolicyBasedRouteRequest {
    /// Required. Name of the PolicyBasedRoute resource to get.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for [PolicyBasedRouting.CreatePolicyBasedRoute][] method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePolicyBasedRouteRequest {
    /// Required. The parent resource's name of the PolicyBasedRoute.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. Unique id for the Policy Based Route to create.
    #[prost(string, tag = "2")]
    pub policy_based_route_id: ::prost::alloc::string::String,
    /// Required. Initial values for a new Policy Based Route.
    #[prost(message, optional, tag = "3")]
    pub policy_based_route: ::core::option::Option<PolicyBasedRoute>,
    /// 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,
}
/// Request for [PolicyBasedRouting.DeletePolicyBasedRoute][] method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePolicyBasedRouteRequest {
    /// Required. Name of the PolicyBasedRoute resource to delete.
    #[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,
}
/// Generated client implementations.
pub mod policy_based_routing_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Policy-Based Routing allows GCP customers to specify flexibile routing
    /// policies for Layer 4 traffic traversing through the connected service.
    #[derive(Debug, Clone)]
    pub struct PolicyBasedRoutingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> PolicyBasedRoutingServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> PolicyBasedRoutingServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            PolicyBasedRoutingServiceClient::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 PolicyBasedRoutes in a given project and location.
        pub async fn list_policy_based_routes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListPolicyBasedRoutesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListPolicyBasedRoutesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/ListPolicyBasedRoutes",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "ListPolicyBasedRoutes",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single PolicyBasedRoute.
        pub async fn get_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::GetPolicyBasedRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::PolicyBasedRoute>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/GetPolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "GetPolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new PolicyBasedRoute in a given project and location.
        pub async fn create_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::CreatePolicyBasedRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "CreatePolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single PolicyBasedRoute.
        pub async fn delete_policy_based_route(
            &mut self,
            request: impl tonic::IntoRequest<super::DeletePolicyBasedRouteRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/DeletePolicyBasedRoute",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService",
                        "DeletePolicyBasedRoute",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}