1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
// This file is @generated by prost-build.
/// The top level element in the routing configuration is a virtual host. Each virtual host has
/// a logical name as well as a set of domains that get routed to it based on the incoming request's
/// host header. This allows a single listener to service multiple top level domain path trees. Once
/// a virtual host is selected based on the domain, the routes are processed in order to see which
/// upstream cluster to route to or whether to perform a redirect.
/// \[\#next-free-field: 26\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VirtualHost {
/// The logical name of the virtual host. This is used when emitting certain
/// statistics but is not relevant for routing.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A list of domains (host/authority header) that will be matched to this
/// virtual host. Wildcard hosts are supported in the suffix or prefix form.
///
/// Domain search order:
///
/// 1. Exact domain names: `www.foo.com`.
/// 1. Suffix domain wildcards: `*.foo.com` or `*-bar.foo.com`.
/// 1. Prefix domain wildcards: `foo.*` or `foo-*`.
/// 1. Special wildcard `*` matching any domain.
///
/// .. note::
///
/// The wildcard will not match the empty string.
/// For example, `*-bar.foo.com` will match `baz-bar.foo.com` but not `-bar.foo.com`.
/// The longest wildcards match first.
/// Only a single virtual host in the entire route configuration can match on `*`. A domain
/// must be unique across all virtual hosts or the config will fail to load.
///
/// Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE.
#[prost(string, repeated, tag = "2")]
pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The list of routes that will be matched, in order, for incoming requests.
/// The first route that matches will be used.
/// Only one of this and `matcher` can be specified.
#[prost(message, repeated, tag = "3")]
pub routes: ::prost::alloc::vec::Vec<Route>,
/// The match tree to use when resolving route actions for incoming requests. Only one of this and `routes`
/// can be specified.
#[prost(message, optional, tag = "21")]
pub matcher: ::core::option::Option<
super::super::super::super::xds::r#type::matcher::v3::Matcher,
>,
/// Specifies the type of TLS enforcement the virtual host expects. If this option is not
/// specified, there is no TLS requirement for the virtual host.
#[prost(enumeration = "virtual_host::TlsRequirementType", tag = "4")]
pub require_tls: i32,
/// A list of virtual clusters defined for this virtual host. Virtual clusters
/// are used for additional statistics gathering.
#[prost(message, repeated, tag = "5")]
pub virtual_clusters: ::prost::alloc::vec::Vec<VirtualCluster>,
/// Specifies a set of rate limit configurations that will be applied to the
/// virtual host.
#[prost(message, repeated, tag = "6")]
pub rate_limits: ::prost::alloc::vec::Vec<RateLimit>,
/// Specifies a list of HTTP headers that should be added to each request
/// handled by this virtual host. Headers specified at this level are applied
/// after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the
/// enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including
/// details on header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "7")]
pub request_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each request
/// handled by this virtual host.
#[prost(string, repeated, tag = "13")]
pub request_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Specifies a list of HTTP headers that should be added to each response
/// handled by this virtual host. Headers specified at this level are applied
/// after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the
/// enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including
/// details on header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "10")]
pub response_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each response
/// handled by this virtual host.
#[prost(string, repeated, tag = "11")]
pub response_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
///
/// Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is
/// found in the
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>`.
///
///
/// .. attention::
///
///
/// This option has been deprecated. Please use
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>`
/// to configure the CORS HTTP filter.
#[deprecated]
#[prost(message, optional, tag = "8")]
pub cors: ::core::option::Option<CorsPolicy>,
///
/// This field can be used to provide virtual host level per filter config. The key should match the
/// : ref:`filter config name <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
/// See :ref:`HTTP filter route-specific config <arch_overview_http_filters_per_filter_config>`
/// for details.
/// \[\#comment: An entry's value may be wrapped in a
/// : ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
/// message to specify additional options.\]
#[prost(map = "string, message", tag = "15")]
pub typed_per_filter_config: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::super::google::protobuf::Any,
>,
/// Decides whether the :ref:`x-envoy-attempt-count <config_http_filters_router_x-envoy-attempt-count>` header should be included
/// in the upstream request. Setting this option will cause it to override any existing header
/// value, so in the case of two Envoys on the request path with this option enabled, the upstream
/// will see the attempt count as perceived by the second Envoy.
///
/// Defaults to `false`.
///
///
/// This header is unaffected by the
/// : ref:`suppress_envoy_headers <envoy_v3_api_field_extensions.filters.http.router.v3.Router.suppress_envoy_headers>` flag.
///
///
/// \[\#next-major-version: rename to include_attempt_count_in_request.\]
#[prost(bool, tag = "14")]
pub include_request_attempt_count: bool,
/// Decides whether the :ref:`x-envoy-attempt-count <config_http_filters_router_x-envoy-attempt-count>` header should be included
/// in the downstream response. Setting this option will cause the router to override any existing header
/// value, so in the case of two Envoys on the request path with this option enabled, the downstream
/// will see the attempt count as perceived by the Envoy closest upstream from itself.
///
/// Defaults to `false`.
///
///
/// This header is unaffected by the
/// : ref:`suppress_envoy_headers <envoy_v3_api_field_extensions.filters.http.router.v3.Router.suppress_envoy_headers>` flag.
#[prost(bool, tag = "19")]
pub include_attempt_count_in_response: bool,
/// Indicates the retry policy for all routes in this virtual host. Note that setting a
/// route level entry will take precedence over this config and it'll be treated
/// independently (e.g., values are not inherited).
#[prost(message, optional, tag = "16")]
pub retry_policy: ::core::option::Option<RetryPolicy>,
/// \[\#not-implemented-hide:\]
/// Specifies the configuration for retry policy extension. Note that setting a route level entry
/// will take precedence over this config and it'll be treated independently (e.g., values are not
/// inherited). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>` should not be
/// set if this field is used.
#[prost(message, optional, tag = "20")]
pub retry_policy_typed_config: ::core::option::Option<
super::super::super::super::google::protobuf::Any,
>,
/// Indicates the hedge policy for all routes in this virtual host. Note that setting a
/// route level entry will take precedence over this config and it'll be treated
/// independently (e.g., values are not inherited).
#[prost(message, optional, tag = "17")]
pub hedge_policy: ::core::option::Option<HedgePolicy>,
/// Decides whether to include the :ref:`x-envoy-is-timeout-retry <config_http_filters_router_x-envoy-is-timeout-retry>`
/// request header in retries initiated by per-try timeouts.
#[prost(bool, tag = "23")]
pub include_is_timeout_retry_header: bool,
/// The maximum bytes which will be buffered for retries and shadowing. If set, the bytes actually buffered will be
/// the minimum value of this and the listener `per_connection_buffer_limit_bytes`.
///
/// .. attention::
///
/// This field has been deprecated. Please use :ref:`request_body_buffer_limit <envoy_v3_api_field_config.route.v3.VirtualHost.request_body_buffer_limit>` instead.
/// Only one of `per_request_buffer_limit_bytes` and `request_body_buffer_limit` could be set.
#[deprecated]
#[prost(message, optional, tag = "18")]
pub per_request_buffer_limit_bytes: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// The maximum bytes which will be buffered for request bodies to support large request body
/// buffering beyond the `per_connection_buffer_limit_bytes`.
///
/// This limit is specifically for the request body buffering and allows buffering larger payloads while maintaining
/// flow control.
///
/// Buffer limit precedence (from highest to lowest priority):
///
/// 1. If `request_body_buffer_limit` is set, then `request_body_buffer_limit` will be used.
/// 1. If :ref:`per_request_buffer_limit_bytes <envoy_v3_api_field_config.route.v3.VirtualHost.per_request_buffer_limit_bytes>`
/// is set but `request_body_buffer_limit` is not, then `min(per_request_buffer_limit_bytes, per_connection_buffer_limit_bytes)`
/// will be used.
/// 1. If neither is set, then `per_connection_buffer_limit_bytes` will be used.
///
/// For flow control chunk sizes, `min(per_connection_buffer_limit_bytes, 16KB)` will be used.
///
/// Only one of :ref:`per_request_buffer_limit_bytes <envoy_v3_api_field_config.route.v3.VirtualHost.per_request_buffer_limit_bytes>`
/// and `request_body_buffer_limit` could be set.
#[prost(message, optional, tag = "25")]
pub request_body_buffer_limit: ::core::option::Option<
super::super::super::super::google::protobuf::UInt64Value,
>,
/// Specify a set of default request mirroring policies for every route under this virtual host.
/// It takes precedence over the route config mirror policy entirely.
/// That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
#[prost(message, repeated, tag = "22")]
pub request_mirror_policies: ::prost::alloc::vec::Vec<
route_action::RequestMirrorPolicy,
>,
/// The metadata field can be used to provide additional information
/// about the virtual host. It can be used for configuration, stats, and logging.
/// The metadata should go under the filter namespace that will need it.
/// For instance, if the metadata is intended for the Router filter,
/// the filter name should be specified as `envoy.filters.http.router`.
#[prost(message, optional, tag = "24")]
pub metadata: ::core::option::Option<super::super::core::v3::Metadata>,
}
/// Nested message and enum types in `VirtualHost`.
pub mod virtual_host {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TlsRequirementType {
/// No TLS requirement for the virtual host.
None = 0,
/// External requests must use TLS. If a request is external and it is not
/// using TLS, a 301 redirect will be sent telling the client to use HTTPS.
ExternalOnly = 1,
/// All requests must use TLS. If a request is not using TLS, a 301 redirect
/// will be sent telling the client to use HTTPS.
All = 2,
}
impl TlsRequirementType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::None => "NONE",
Self::ExternalOnly => "EXTERNAL_ONLY",
Self::All => "ALL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NONE" => Some(Self::None),
"EXTERNAL_ONLY" => Some(Self::ExternalOnly),
"ALL" => Some(Self::All),
_ => None,
}
}
}
}
impl ::prost::Name for VirtualHost {
const NAME: &'static str = "VirtualHost";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.VirtualHost".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.VirtualHost".into()
}
}
/// A filter-defined action type.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilterAction {
#[prost(message, optional, tag = "1")]
pub action: ::core::option::Option<
super::super::super::super::google::protobuf::Any,
>,
}
impl ::prost::Name for FilterAction {
const NAME: &'static str = "FilterAction";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.FilterAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.FilterAction".into()
}
}
/// This can be used in route matcher :ref:`VirtualHost.matcher <envoy_v3_api_field_config.route.v3.VirtualHost.matcher>`.
/// When the matcher matches, routes will be matched and run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteList {
/// The list of routes that will be matched and run, in order. The first route that matches will be used.
#[prost(message, repeated, tag = "1")]
pub routes: ::prost::alloc::vec::Vec<Route>,
}
impl ::prost::Name for RouteList {
const NAME: &'static str = "RouteList";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteList".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteList".into()
}
}
/// A route is both a specification of how to match a request as well as an indication of what to do
/// next (e.g., redirect, forward, rewrite, etc.).
///
/// .. attention::
///
/// Envoy supports routing on HTTP method via :ref:`header matching <envoy_v3_api_msg_config.route.v3.HeaderMatcher>`.
/// \[\#next-free-field: 21\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
/// Name for the route.
#[prost(string, tag = "14")]
pub name: ::prost::alloc::string::String,
/// Route matching parameters.
#[prost(message, optional, tag = "1")]
pub r#match: ::core::option::Option<RouteMatch>,
/// The Metadata field can be used to provide additional information
/// about the route. It can be used for configuration, stats, and logging.
/// The metadata should go under the filter namespace that will need it.
/// For instance, if the metadata is intended for the Router filter,
/// the filter name should be specified as `envoy.filters.http.router`.
#[prost(message, optional, tag = "4")]
pub metadata: ::core::option::Option<super::super::core::v3::Metadata>,
/// Decorator for the matched route.
#[prost(message, optional, tag = "5")]
pub decorator: ::core::option::Option<Decorator>,
///
/// This field can be used to provide route specific per filter config. The key should match the
/// : ref:`filter config name <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
/// See :ref:`HTTP filter route-specific config <arch_overview_http_filters_per_filter_config>`
/// for details.
/// \[\#comment: An entry's value may be wrapped in a
/// : ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
/// message to specify additional options.\]
#[prost(map = "string, message", tag = "13")]
pub typed_per_filter_config: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::super::google::protobuf::Any,
>,
///
/// Specifies a set of headers that will be added to requests matching this
/// route. Headers specified at this level are applied before headers from the
/// enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
/// header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "9")]
pub request_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each request
/// matching this route.
#[prost(string, repeated, tag = "12")]
pub request_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
///
/// Specifies a set of headers that will be added to responses to requests
/// matching this route. Headers specified at this level are applied before
/// headers from the enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including
/// details on header value syntax, see the documentation on
/// : ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "10")]
pub response_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each response
/// to requests matching this route.
#[prost(string, repeated, tag = "11")]
pub response_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Presence of the object defines whether the connection manager's tracing configuration
/// is overridden by this route specific instance.
#[prost(message, optional, tag = "15")]
pub tracing: ::core::option::Option<Tracing>,
/// The maximum bytes which will be buffered for retries and shadowing.
/// If set, the bytes actually buffered will be the minimum value of this and the
/// listener per_connection_buffer_limit_bytes.
///
/// .. attention::
///
/// This field has been deprecated. Please use :ref:`request_body_buffer_limit <envoy_v3_api_field_config.route.v3.Route.request_body_buffer_limit>` instead.
/// Only one of `per_request_buffer_limit_bytes` and `request_body_buffer_limit` may be set.
#[deprecated]
#[prost(message, optional, tag = "16")]
pub per_request_buffer_limit_bytes: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// The human readable prefix to use when emitting statistics for this endpoint.
/// The statistics are rooted at vhost.<virtual host name>.route.\<stat_prefix>.
/// This should be set for highly critical
/// endpoints that one wishes to get “per-route” statistics on.
/// If not set, endpoint statistics are not generated.
///
/// The emitted statistics are the same as those documented for :ref:`virtual clusters <config_http_filters_router_vcluster_stats>`.
///
/// .. warning::
///
/// ```text
/// We do not recommend setting up a stat prefix for
/// every application endpoint. This is both not easily maintainable and
/// statistics use a non-trivial amount of memory (approximately 1KiB per route).
/// ```
#[prost(string, tag = "19")]
pub stat_prefix: ::prost::alloc::string::String,
/// The maximum bytes which will be buffered for request bodies to support large request body
/// buffering beyond the `per_connection_buffer_limit_bytes`.
///
/// This limit is specifically for the request body buffering and allows buffering larger payloads while maintaining
/// flow control.
///
/// Buffer limit precedence (from highest to lowest priority):
///
/// 1. If `request_body_buffer_limit` is set: use `request_body_buffer_limit`
/// 1. If :ref:`per_request_buffer_limit_bytes <envoy_v3_api_field_config.route.v3.Route.per_request_buffer_limit_bytes>`
/// is set but `request_body_buffer_limit` is not: use `min(per_request_buffer_limit_bytes, per_connection_buffer_limit_bytes)`
/// 1. If neither is set: use `per_connection_buffer_limit_bytes`
///
/// For flow control chunk sizes, use `min(per_connection_buffer_limit_bytes, 16KB)`.
///
/// Only one of :ref:`per_request_buffer_limit_bytes <envoy_v3_api_field_config.route.v3.Route.per_request_buffer_limit_bytes>`
/// and `request_body_buffer_limit` may be set.
#[prost(message, optional, tag = "20")]
pub request_body_buffer_limit: ::core::option::Option<
super::super::super::super::google::protobuf::UInt64Value,
>,
#[prost(oneof = "route::Action", tags = "2, 3, 7, 17, 18")]
pub action: ::core::option::Option<route::Action>,
}
/// Nested message and enum types in `Route`.
pub mod route {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
/// Route request to some upstream cluster.
#[prost(message, tag = "2")]
Route(super::RouteAction),
/// Return a redirect.
#[prost(message, tag = "3")]
Redirect(super::RedirectAction),
/// Return an arbitrary HTTP response directly, without proxying.
#[prost(message, tag = "7")]
DirectResponse(super::DirectResponseAction),
/// \[\#not-implemented-hide:\]
/// A filter-defined action (e.g., it could dynamically generate the RouteAction).
/// \[\#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when
/// implemented\]
#[prost(message, tag = "17")]
FilterAction(super::FilterAction),
/// \[\#not-implemented-hide:\]
/// An action used when the route will generate a response directly,
/// without forwarding to an upstream host. This will be used in non-proxy
/// xDS clients like the gRPC server. It could also be used in the future
/// in Envoy for a filter that directly generates responses for requests.
#[prost(message, tag = "18")]
NonForwardingAction(super::NonForwardingAction),
}
}
impl ::prost::Name for Route {
const NAME: &'static str = "Route";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.Route".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.Route".into()
}
}
/// Compared to the :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` field that specifies a
/// single upstream cluster as the target of a request, the :ref:`weighted_clusters <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>` option allows for specification of
/// multiple upstream clusters along with weights that indicate the percentage of
/// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the
/// weights.
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeightedCluster {
/// Specifies one or more upstream clusters associated with the route.
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<weighted_cluster::ClusterWeight>,
/// Specifies the total weight across all clusters. The sum of all cluster weights must equal this
/// value, if this is greater than 0.
/// This field is now deprecated, and the client will use the sum of all
/// cluster weights. It is up to the management server to supply the correct weights.
#[deprecated]
#[prost(message, optional, tag = "3")]
pub total_weight: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// Specifies the runtime key prefix that should be used to construct the
/// runtime keys associated with each cluster. When the `runtime_key_prefix` is
/// specified, the router will look for weights associated with each upstream
/// cluster under the key `runtime_key_prefix` + `.` + `cluster\[i\].name` where
/// `cluster\[i\]` denotes an entry in the clusters array field. If the runtime
/// key for the cluster does not exist, the value specified in the
/// configuration file will be used as the default weight. See the :ref:`runtime documentation <operations_runtime>` for how key names map to the underlying implementation.
#[prost(string, tag = "2")]
pub runtime_key_prefix: ::prost::alloc::string::String,
#[prost(oneof = "weighted_cluster::RandomValueSpecifier", tags = "4, 5")]
pub random_value_specifier: ::core::option::Option<
weighted_cluster::RandomValueSpecifier,
>,
}
/// Nested message and enum types in `WeightedCluster`.
pub mod weighted_cluster {
/// \[\#next-free-field: 13\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterWeight {
///
/// Only one of `name` and `cluster_header` may be specified.
/// \[\#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}\]
/// Name of the upstream cluster. The cluster must exist in the
/// : ref:`cluster manager configuration <config_cluster_manager>`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Only one of `name` and `cluster_header` may be specified.
/// \[\#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }\]
/// Envoy will determine the cluster to route to by reading the value of the
/// HTTP header named by cluster_header from the request headers. If the
/// header is not found or the referenced cluster does not exist, Envoy will
/// return a 404 response.
///
/// .. attention::
///
/// Internally, Envoy always uses the HTTP/2 `:authority` header to represent the HTTP/1
/// `Host` header. Thus, if attempting to match on `Host`, match on `:authority` instead.
///
/// .. note::
///
/// If the header appears multiple times only the first value is used.
#[prost(string, tag = "12")]
pub cluster_header: ::prost::alloc::string::String,
/// The weight of the cluster. This value is relative to the other clusters'
/// weights. When a request matches the route, the choice of an upstream cluster
/// is determined by its weight. The sum of weights across all
/// entries in the clusters array must be greater than 0, and must not exceed
/// uint32_t maximal value (4294967295).
#[prost(message, optional, tag = "2")]
pub weight: ::core::option::Option<
super::super::super::super::super::google::protobuf::UInt32Value,
>,
///
/// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
/// the upstream cluster with metadata matching what is set in this field will be considered for
/// load balancing. Note that this will be merged with what's provided in
/// : ref:`RouteAction.metadata_match <envoy_v3_api_field_config.route.v3.RouteAction.metadata_match>`, with
/// values here taking precedence. The filter name should be specified as `envoy.lb`.
#[prost(message, optional, tag = "3")]
pub metadata_match: ::core::option::Option<
super::super::super::core::v3::Metadata,
>,
///
/// Specifies a list of headers to be added to requests when this cluster is selected
/// through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
/// Headers specified at this level are applied before headers from the enclosing
/// : ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
/// header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "4")]
pub request_headers_to_add: ::prost::alloc::vec::Vec<
super::super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each request when
/// this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
#[prost(string, repeated, tag = "9")]
pub request_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
///
/// Specifies a list of headers to be added to responses when this cluster is selected
/// through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
/// Headers specified at this level are applied before headers from the enclosing
/// : ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on
/// header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "5")]
pub response_headers_to_add: ::prost::alloc::vec::Vec<
super::super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of headers to be removed from responses when this cluster is selected
/// through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`.
#[prost(string, repeated, tag = "6")]
pub response_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
///
/// This field can be used to provide weighted cluster specific per filter config. The key should match the
/// : ref:`filter config name <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
/// See :ref:`HTTP filter route-specific config <arch_overview_http_filters_per_filter_config>`
/// for details.
/// \[\#comment: An entry's value may be wrapped in a
/// : ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
/// message to specify additional options.\]
#[prost(map = "string, message", tag = "10")]
pub typed_per_filter_config: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::super::super::google::protobuf::Any,
>,
#[prost(oneof = "cluster_weight::HostRewriteSpecifier", tags = "11")]
pub host_rewrite_specifier: ::core::option::Option<
cluster_weight::HostRewriteSpecifier,
>,
}
/// Nested message and enum types in `ClusterWeight`.
pub mod cluster_weight {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum HostRewriteSpecifier {
/// Indicates that during forwarding, the host header will be swapped with
/// this value.
#[prost(string, tag = "11")]
HostRewriteLiteral(::prost::alloc::string::String),
}
}
impl ::prost::Name for ClusterWeight {
const NAME: &'static str = "ClusterWeight";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.WeightedCluster.ClusterWeight".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.WeightedCluster.ClusterWeight"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum RandomValueSpecifier {
/// Specifies the header name that is used to look up the random value passed in the request header.
/// This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic.
/// If header is not present or invalid, Envoy will fall back to use the internally generated random value.
/// This header is expected to be single-valued header as we only want to have one selected value throughout
/// the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX.
#[prost(string, tag = "4")]
HeaderName(::prost::alloc::string::String),
/// When set to true, the hash policies will be used to generate the random value for weighted cluster selection.
/// This could ensure consistent cluster picking across multiple proxy levels for weighted traffic.
#[prost(message, tag = "5")]
UseHashPolicy(super::super::super::super::super::google::protobuf::BoolValue),
}
}
impl ::prost::Name for WeightedCluster {
const NAME: &'static str = "WeightedCluster";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.WeightedCluster".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.WeightedCluster".into()
}
}
/// Configuration for a cluster specifier plugin.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClusterSpecifierPlugin {
/// The name of the plugin and its opaque configuration.
///
/// \[\#extension-category: envoy.router.cluster_specifier_plugin\]
#[prost(message, optional, tag = "1")]
pub extension: ::core::option::Option<super::super::core::v3::TypedExtensionConfig>,
/// If is_optional is not set or is set to false and the plugin defined by this message is not a
/// supported type, the containing resource is NACKed. If is_optional is set to true, the resource
/// would not be NACKed for this reason. In this case, routes referencing this plugin's name would
/// not be treated as an illegal configuration, but would result in a failure if the route is
/// selected.
#[prost(bool, tag = "2")]
pub is_optional: bool,
}
impl ::prost::Name for ClusterSpecifierPlugin {
const NAME: &'static str = "ClusterSpecifierPlugin";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.ClusterSpecifierPlugin".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.ClusterSpecifierPlugin".into()
}
}
/// \[\#next-free-field: 18\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteMatch {
/// Indicates that prefix/path matching should be case-sensitive. The default
/// is true. Ignored for safe_regex matching.
#[prost(message, optional, tag = "4")]
pub case_sensitive: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
/// Indicates that the route should additionally match on a runtime key. Every time the route
/// is considered for a match, it must also fall under the percentage of matches indicated by
/// this field. For some fraction N/D, a random number in the range \[0,D) is selected. If the
/// number is \<= the value of the numerator N, or if the key is not present, the default
/// value, the router continues to evaluate the remaining match criteria. A runtime_fraction
/// route configuration can be used to roll out route changes in a gradual manner without full
/// code/config deploys. Refer to the :ref:`traffic shifting <config_http_conn_man_route_table_traffic_splitting_shift>` docs for additional documentation.
///
/// .. note::
///
/// ```text
/// Parsing this field is implemented such that the runtime key's data may be represented
/// as a FractionalPercent proto represented as JSON/YAML and may also be represented as an
/// integer with the assumption that the value is an integral percentage out of 100. For
/// instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent
/// whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics.
/// ```
#[prost(message, optional, tag = "9")]
pub runtime_fraction: ::core::option::Option<
super::super::core::v3::RuntimeFractionalPercent,
>,
/// Specifies a set of headers that the route should match on. The router will
/// check the request’s headers against all the specified headers in the route
/// config. A match will happen if all the headers in the route are present in
/// the request with the same values (or based on presence if the value field
/// is not in the config).
#[prost(message, repeated, tag = "6")]
pub headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
/// Specifies a set of URL query parameters on which the route should
/// match. The router will check the query string from the `path` header
/// against all the specified query parameters. If the number of specified
/// query parameters is nonzero, they all must match the `path` header's
/// query string for a match to occur. In the event query parameters are
/// repeated, only the first value for each key will be considered.
///
/// .. note::
///
/// ```text
/// If query parameters are used to pass request message fields when
/// `grpc_json_transcoder <<https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter>`_>
/// is used, the transcoded message fields may be different. The query parameters are
/// URL-encoded, but the message fields are not. For example, if a query
/// parameter is "foo%20bar", the message field will be "foo bar".
/// ```
#[prost(message, repeated, tag = "7")]
pub query_parameters: ::prost::alloc::vec::Vec<QueryParameterMatcher>,
/// Specifies a set of cookies on which the route should match. The router parses the `Cookie`
/// header and evaluates the named cookie against each matcher. If the number of specified cookie
/// matchers is nonzero, they all must match for the route to be selected.
#[prost(message, repeated, tag = "17")]
pub cookies: ::prost::alloc::vec::Vec<CookieMatcher>,
/// If specified, only gRPC requests will be matched. The router will check
/// that the `Content-Type` header has `application/grpc` or one of the various
/// `application/grpc+` values.
#[prost(message, optional, tag = "8")]
pub grpc: ::core::option::Option<route_match::GrpcRouteMatchOptions>,
/// If specified, the client tls context will be matched against the defined
/// match options.
///
/// \[\#next-major-version: unify with RBAC\]
#[prost(message, optional, tag = "11")]
pub tls_context: ::core::option::Option<route_match::TlsContextMatchOptions>,
/// Specifies a set of dynamic metadata matchers on which the route should match.
/// The router will check the dynamic metadata against all the specified dynamic metadata matchers.
/// If the number of specified dynamic metadata matchers is nonzero, they all must match the
/// dynamic metadata for a match to occur.
#[prost(message, repeated, tag = "13")]
pub dynamic_metadata: ::prost::alloc::vec::Vec<
super::super::super::r#type::matcher::v3::MetadataMatcher,
>,
/// Specifies a set of filter state matchers on which the route should match.
/// The router will check the filter state against all the specified filter state matchers.
/// If the number of specified filter state matchers is nonzero, they all must match the
/// filter state for a match to occur.
#[prost(message, repeated, tag = "16")]
pub filter_state: ::prost::alloc::vec::Vec<
super::super::super::r#type::matcher::v3::FilterStateMatcher,
>,
#[prost(oneof = "route_match::PathSpecifier", tags = "1, 2, 10, 12, 14, 15")]
pub path_specifier: ::core::option::Option<route_match::PathSpecifier>,
}
/// Nested message and enum types in `RouteMatch`.
pub mod route_match {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GrpcRouteMatchOptions {}
impl ::prost::Name for GrpcRouteMatchOptions {
const NAME: &'static str = "GrpcRouteMatchOptions";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TlsContextMatchOptions {
/// If specified, the route will match against whether or not a certificate is presented.
/// If not specified, certificate presentation status (true or false) will not be considered when route matching.
#[prost(message, optional, tag = "1")]
pub presented: ::core::option::Option<
super::super::super::super::super::google::protobuf::BoolValue,
>,
/// If specified, the route will match against whether or not a certificate is validated.
/// If not specified, certificate validation status (true or false) will not be considered when route matching.
///
/// .. warning::
///
/// ```text
/// Client certificate validation is not currently performed upon TLS session resumption. For
/// a resumed TLS session the route will match only when ``validated`` is false, regardless of
/// whether the client TLS certificate is valid.
///
/// The only known workaround for this issue is to disable TLS session resumption entirely, by
/// setting both :ref:`disable_stateless_session_resumption <envoy_v3_api_field_extensions.transport_sockets.tls.v3.DownstreamTlsContext.disable_stateless_session_resumption>`
/// and :ref:`disable_stateful_session_resumption <envoy_v3_api_field_extensions.transport_sockets.tls.v3.DownstreamTlsContext.disable_stateful_session_resumption>` on the DownstreamTlsContext.
/// ```
#[prost(message, optional, tag = "2")]
pub validated: ::core::option::Option<
super::super::super::super::super::google::protobuf::BoolValue,
>,
}
impl ::prost::Name for TlsContextMatchOptions {
const NAME: &'static str = "TlsContextMatchOptions";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteMatch.TlsContextMatchOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteMatch.TlsContextMatchOptions"
.into()
}
}
/// An extensible message for matching CONNECT or CONNECT-UDP requests.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConnectMatcher {}
impl ::prost::Name for ConnectMatcher {
const NAME: &'static str = "ConnectMatcher";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteMatch.ConnectMatcher".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteMatch.ConnectMatcher".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum PathSpecifier {
/// If specified, the route is a prefix rule meaning that the prefix must
/// match the beginning of the `:path` header.
#[prost(string, tag = "1")]
Prefix(::prost::alloc::string::String),
/// If specified, the route is an exact path rule meaning that the path must
/// exactly match the `:path` header once the query string is removed.
#[prost(string, tag = "2")]
Path(::prost::alloc::string::String),
/// If specified, the route is a regular expression rule meaning that the
/// regex must match the `:path` header once the query string is removed. The entire path
/// (without the query string) must match the regex. The rule will not match if only a
/// subsequence of the `:path` header matches the regex.
///
/// \[\#next-major-version: In the v3 API we should redo how path specification works such
/// that we utilize StringMatcher, and additionally have consistent options around whether we
/// strip query strings, do a case-sensitive match, etc. In the interim it will be too disruptive
/// to deprecate the existing options. We should even consider whether we want to do away with
/// path_specifier entirely and just rely on a set of header matchers which can already match
/// on :path, etc. The issue with that is it is unclear how to generically deal with query string
/// stripping. This needs more thought.\]
#[prost(message, tag = "10")]
SafeRegex(super::super::super::super::r#type::matcher::v3::RegexMatcher),
/// If this is used as the matcher, the matcher will only match CONNECT or CONNECT-UDP requests.
/// Note that this will not match other Extended CONNECT requests (WebSocket and the like) as
/// they are normalized in Envoy as HTTP/1.1 style upgrades.
/// This is the only way to match CONNECT requests for HTTP/1.1. For HTTP/2 and HTTP/3,
/// where Extended CONNECT requests may have a path, the path matchers will work if
/// there is a path present.
/// Note that CONNECT support is currently considered alpha in Envoy.
/// \[\#comment: TODO(htuch): Replace the above comment with an alpha tag.\]
#[prost(message, tag = "12")]
ConnectMatcher(ConnectMatcher),
/// If specified, the route is a path-separated prefix rule meaning that the
/// `:path` header (without the query string) must either exactly match the
/// `path_separated_prefix` or have it as a prefix, followed by `/`
///
/// For example, `/api/dev` would match
/// `/api/dev`, `/api/dev/`, `/api/dev/v1`, and `/api/dev?param=true`
/// but would not match `/api/developer`
///
/// Expect the value to not contain `?` or `#` and not to end in `/`
#[prost(string, tag = "14")]
PathSeparatedPrefix(::prost::alloc::string::String),
/// \[\#extension-category: envoy.path.match\]
#[prost(message, tag = "15")]
PathMatchPolicy(super::super::super::core::v3::TypedExtensionConfig),
}
}
impl ::prost::Name for RouteMatch {
const NAME: &'static str = "RouteMatch";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteMatch".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteMatch".into()
}
}
/// Cors policy configuration.
///
/// .. attention::
///
///
/// This message has been deprecated. Please use
/// : ref:`CorsPolicy in filter extension <envoy_v3_api_msg_extensions.filters.http.cors.v3.CorsPolicy>`
/// as as alternative.
///
///
/// \[\#next-free-field: 14\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CorsPolicy {
/// Specifies string patterns that match allowed origins. An origin is allowed if any of the
/// string matchers match.
#[prost(message, repeated, tag = "11")]
pub allow_origin_string_match: ::prost::alloc::vec::Vec<
super::super::super::r#type::matcher::v3::StringMatcher,
>,
/// Specifies the content for the `access-control-allow-methods` header.
#[prost(string, tag = "2")]
pub allow_methods: ::prost::alloc::string::String,
/// Specifies the content for the `access-control-allow-headers` header.
#[prost(string, tag = "3")]
pub allow_headers: ::prost::alloc::string::String,
/// Specifies the content for the `access-control-expose-headers` header.
#[prost(string, tag = "4")]
pub expose_headers: ::prost::alloc::string::String,
/// Specifies the content for the `access-control-max-age` header.
#[prost(string, tag = "5")]
pub max_age: ::prost::alloc::string::String,
/// Specifies whether the resource allows credentials.
#[prost(message, optional, tag = "6")]
pub allow_credentials: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
/// Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not
/// enforced.
///
/// This field is intended to be used when `filter_enabled` and `enabled` are off. One of those
/// fields have to explicitly disable the filter in order for this setting to take effect.
///
/// If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is specified,
/// Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate
/// and track the request's `Origin` to determine if it's valid but will not enforce any policies.
#[prost(message, optional, tag = "10")]
pub shadow_enabled: ::core::option::Option<
super::super::core::v3::RuntimeFractionalPercent,
>,
/// Specify whether allow requests whose target server's IP address is more private than that from
/// which the request initiator was fetched.
///
/// More details refer to <https://developer.chrome.com/blog/private-network-access-preflight.>
#[prost(message, optional, tag = "12")]
pub allow_private_network_access: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
/// Specifies if preflight requests not matching the configured allowed origin should be forwarded
/// to the upstream. Default is `true`.
#[prost(message, optional, tag = "13")]
pub forward_not_matching_preflights: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
#[prost(oneof = "cors_policy::EnabledSpecifier", tags = "9")]
pub enabled_specifier: ::core::option::Option<cors_policy::EnabledSpecifier>,
}
/// Nested message and enum types in `CorsPolicy`.
pub mod cors_policy {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum EnabledSpecifier {
/// Specifies the % of requests for which the CORS filter is enabled.
///
/// If neither `enabled`, `filter_enabled`, nor `shadow_enabled` are specified, the CORS
/// filter will be enabled for 100% of the requests.
///
/// If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is
/// specified, Envoy will lookup the runtime key to get the percentage of requests to filter.
#[prost(message, tag = "9")]
FilterEnabled(super::super::super::core::v3::RuntimeFractionalPercent),
}
}
impl ::prost::Name for CorsPolicy {
const NAME: &'static str = "CorsPolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.CorsPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.CorsPolicy".into()
}
}
/// \[\#next-free-field: 46\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteAction {
/// The HTTP status code to use when configured cluster is not found.
/// The default response code is 503 Service Unavailable.
#[prost(enumeration = "route_action::ClusterNotFoundResponseCode", tag = "20")]
pub cluster_not_found_response_code: i32,
/// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
/// in the upstream cluster with metadata matching what's set in this field will be considered
/// for load balancing. If using :ref:`weighted_clusters <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`, metadata will be merged, with values
/// provided there taking precedence. The filter name should be specified as `envoy.lb`.
#[prost(message, optional, tag = "4")]
pub metadata_match: ::core::option::Option<super::super::core::v3::Metadata>,
/// Indicates that during forwarding, the matched prefix (or path) should be
/// swapped with this value. This option allows application URLs to be rooted
/// at a different path from those exposed at the reverse proxy layer. The router filter will
/// place the original path before rewrite into the :ref:`x-envoy-original-path <config_http_filters_router_x-envoy-original-path>` header.
///
///
/// Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
/// : ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
/// : ref:`path_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite>`,
/// or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`
/// may be specified.
///
///
/// .. attention::
///
///
/// Pay careful attention to the use of trailing slashes in the
/// : ref:`route's match <envoy_v3_api_field_config.route.v3.Route.match>` prefix value.
/// Stripping a prefix from a path requires multiple Routes to handle all cases. For example,
/// rewriting `/prefix` to `/` and `/prefix/etc` to `/etc` cannot be done in a single
/// : ref:`Route <envoy_v3_api_msg_config.route.v3.Route>`, as shown by the below config entries:
///
///
/// .. code-block:: yaml
///
/// ```text
/// - match:
/// prefix: "/prefix/"
/// route:
/// prefix_rewrite: "/"
/// - match:
/// prefix: "/prefix"
/// route:
/// prefix_rewrite: "/"
/// ```
///
/// Having above entries in the config, requests to `/prefix` will be stripped to `/`, while
/// requests to `/prefix/etc` will be stripped to `/etc`.
#[prost(string, tag = "5")]
pub prefix_rewrite: ::prost::alloc::string::String,
/// Indicates that during forwarding, portions of the path that match the
/// pattern should be rewritten, even allowing the substitution of capture
/// groups from the pattern into the new path as specified by the rewrite
/// substitution string. This is useful to allow application paths to be
/// rewritten in a way that is aware of segments with variable content like
/// identifiers. The router filter will place the original path as it was
/// before the rewrite into the :ref:`x-envoy-original-path <config_http_filters_router_x-envoy-original-path>` header.
///
///
/// Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
/// : ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
/// : ref:`path_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite>`,
/// or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`
/// may be specified.
///
///
/// Examples using Google's `RE2 <<https://github.com/google/re2>`\_> engine:
///
/// * The path pattern `^/service/(\[^/\]+)(/.*)$` paired with a substitution
/// string of `\2/instance/\1` would transform `/service/foo/v1/api`
/// into `/v1/api/instance/foo`.
///
/// * The pattern `one` paired with a substitution string of `two` would
/// transform `/xxx/one/yyy/one/zzz` into `/xxx/two/yyy/two/zzz`.
///
/// * The pattern `^(.*?)one(.*)$` paired with a substitution string of
/// `\1two\2` would replace only the first occurrence of `one`,
/// transforming path `/xxx/one/yyy/one/zzz` into `/xxx/two/yyy/one/zzz`.
///
/// * The pattern `(?i)/xxx/` paired with a substitution string of `/yyy/`
/// would do a case-insensitive match and transform path `/aaa/XxX/bbb` to
/// `/aaa/yyy/bbb`.
#[prost(message, optional, tag = "32")]
pub regex_rewrite: ::core::option::Option<
super::super::super::r#type::matcher::v3::RegexMatchAndSubstitute,
>,
/// \[\#extension-category: envoy.path.rewrite\]
#[prost(message, optional, tag = "41")]
pub path_rewrite_policy: ::core::option::Option<
super::super::core::v3::TypedExtensionConfig,
>,
/// Rewrites the whole path (without query parameters) with the given path value.
/// The router filter will
/// place the original path before rewrite into the :ref:`x-envoy-original-path <config_http_filters_router_x-envoy-original-path>` header.
///
///
/// Only one of :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`,
/// : ref:`path_rewrite_policy <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite_policy>`,
/// : ref:`path_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.path_rewrite>`,
/// or :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`
/// may be specified.
///
///
/// The :ref:`substitution format specifier <config_access_log_format>` could be applied here.
/// For example, with the following config:
///
/// .. code-block:: yaml
///
/// ```text
/// path_rewrite: "/new_path_prefix%REQ(custom-path-header-name)%"
/// ```
///
/// Would rewrite the path to `/new_path_prefix/some_value` given the header
/// `custom-path-header-name: some_value`. If the header is not present, the path will be
/// rewritten to `/new_path_prefix`.
///
/// If the final output of the path rewrite is empty, then the update will be ignored and the
/// original path will be preserved.
#[prost(string, tag = "45")]
pub path_rewrite: ::prost::alloc::string::String,
///
/// If set, then a host rewrite action (one of
/// : ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_literal>`,
/// : ref:`auto_host_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.auto_host_rewrite>`,
/// : ref:`host_rewrite_header <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_header>`, or
/// : ref:`host_rewrite_path_regex <envoy_v3_api_field_config.route.v3.RouteAction.host_rewrite_path_regex>`)
/// causes the original value of the host header, if any, to be appended to the
/// : ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended.
#[prost(bool, tag = "38")]
pub append_x_forwarded_host: bool,
/// Specifies the upstream timeout for the route. If not specified, the default is 15s. This
/// spans between the point at which the entire downstream request (i.e. end-of-stream) has been
/// processed and when the upstream response has been completely processed. A value of 0 will
/// disable the route's timeout.
///
/// .. note::
///
///
/// This timeout includes all retries. See also
/// : ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
/// : ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
/// : ref:`retry overview <arch_overview_http_routing_retry>`.
#[prost(message, optional, tag = "8")]
pub timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
/// Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout,
/// although the connection manager wide :ref:`stream_idle_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
/// will still apply. A value of 0 will completely disable the route's idle timeout, even if a
/// connection manager stream idle timeout is configured.
///
/// The idle timeout is distinct to :ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, which provides an upper bound
/// on the upstream response time; :ref:`idle_timeout <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` instead bounds the amount
/// of time the request's stream may be idle.
///
/// After header decoding, the idle timeout will apply on downstream and
/// upstream request events. Each time an encode/decode event for headers or
/// data is processed for the stream, the timer will be reset. If the timeout
/// fires, the stream is terminated with a 408 Request Timeout error code if no
/// upstream response header has been received, otherwise a stream reset
/// occurs.
///
///
/// If the :ref:`overload action <config_overload_manager_overload_actions>` "envoy.overload_actions.reduce_timeouts"
/// is configured, this timeout is scaled according to the value for
/// : ref:`HTTP_DOWNSTREAM_STREAM_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_STREAM_IDLE>`.
///
///
/// This timeout may also be used in place of `flush_timeout` in very specific cases. See the
/// documentation for `flush_timeout` for more details.
#[prost(message, optional, tag = "24")]
pub idle_timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
/// Specifies the codec stream flush timeout for the route.
///
/// If not specified, the first preference is the global :ref:`stream_flush_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_flush_timeout>`,
/// but only if explicitly configured.
///
/// If neither the explicit HCM-wide flush timeout nor this route-specific flush timeout is configured,
/// the route's stream idle timeout is reused for this timeout. This is for
/// backwards compatibility since both behaviors were historically controlled by the one timeout.
///
/// If the route also does not have an idle timeout configured, the global :ref:`stream_idle_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`. used, again
/// for backwards compatibility. That timeout defaults to 5 minutes.
///
/// A value of 0 via any of the above paths will completely disable the timeout for a given route.
#[prost(message, optional, tag = "42")]
pub flush_timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
/// Specifies how to send request over TLS early data.
/// If absent, allows `safe HTTP requests <<https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1>`\_> to be sent on early data.
/// \[\#extension-category: envoy.route.early_data_policy\]
#[prost(message, optional, tag = "40")]
pub early_data_policy: ::core::option::Option<
super::super::core::v3::TypedExtensionConfig,
>,
/// Indicates that the route has a retry policy. Note that if this is set,
/// it'll take precedence over the virtual host level retry policy entirely
/// (e.g., policies are not merged, the most internal one becomes the enforced policy).
#[prost(message, optional, tag = "9")]
pub retry_policy: ::core::option::Option<RetryPolicy>,
/// \[\#not-implemented-hide:\]
/// Specifies the configuration for retry policy extension. Note that if this is set, it'll take
/// precedence over the virtual host level retry policy entirely (e.g., policies are not merged,
/// the most internal one becomes the enforced policy). :ref:`Retry policy <envoy_v3_api_field_config.route.v3.VirtualHost.retry_policy>`
/// should not be set if this field is used.
#[prost(message, optional, tag = "33")]
pub retry_policy_typed_config: ::core::option::Option<
super::super::super::super::google::protobuf::Any,
>,
/// Specify a set of route request mirroring policies.
/// It takes precedence over the virtual host and route config mirror policy entirely.
/// That is, policies are not merged, the most specific non-empty one becomes the mirror policies.
#[prost(message, repeated, tag = "30")]
pub request_mirror_policies: ::prost::alloc::vec::Vec<
route_action::RequestMirrorPolicy,
>,
/// Optionally specifies the :ref:`routing priority <arch_overview_http_routing_priority>`.
#[prost(enumeration = "super::super::core::v3::RoutingPriority", tag = "11")]
pub priority: i32,
/// Specifies a set of rate limit configurations that could be applied to the
/// route.
#[prost(message, repeated, tag = "13")]
pub rate_limits: ::prost::alloc::vec::Vec<RateLimit>,
///
/// Specifies if the rate limit filter should include the virtual host rate
/// limits. By default, if the route configured rate limits, the virtual host
/// : ref:`rate_limits <envoy_v3_api_field_config.route.v3.VirtualHost.rate_limits>` are not applied to the
/// request.
///
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`vh_rate_limits <envoy_v3_api_field_extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits>`
#[deprecated]
#[prost(message, optional, tag = "14")]
pub include_vh_rate_limits: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
/// Specifies a list of hash policies to use for ring hash load balancing. Each
/// hash policy is evaluated individually and the combined result is used to
/// route the request. The method of combination is deterministic such that
/// identical lists of hash policies will produce the same hash. Since a hash
/// policy examines specific parts of a request, it can fail to produce a hash
/// (i.e. if the hashed header is not present). If (and only if) all configured
/// hash policies fail to generate a hash, no hash will be produced for
/// the route. In this case, the behavior is the same as if no hash policies
/// were specified (i.e. the ring hash load balancer will choose a random
/// backend). If a hash policy has the "terminal" attribute set to true, and
/// there is already a hash generated, the hash is returned immediately,
/// ignoring the rest of the hash policy list.
#[prost(message, repeated, tag = "15")]
pub hash_policy: ::prost::alloc::vec::Vec<route_action::HashPolicy>,
///
/// Indicates that the route has a CORS policy. This field is ignored if related cors policy is
/// found in the :ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
/// : ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`.
///
///
/// .. attention::
///
///
/// This option has been deprecated. Please use
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>` or
/// : ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
/// to configure the CORS HTTP filter.
#[deprecated]
#[prost(message, optional, tag = "17")]
pub cors: ::core::option::Option<CorsPolicy>,
///
/// Deprecated by :ref:`grpc_timeout_header_max <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_max>`
/// If present, and the request is a gRPC request, use the
/// `grpc-timeout header <<https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`\_,>
/// or its default value (infinity) instead of
/// : ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>`, but limit the applied timeout
/// to the maximum value specified here. If configured as 0, the maximum allowed timeout for
/// gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used
/// and gRPC requests time out like any other requests using
/// : ref:`timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` or its default.
/// This can be used to prevent unexpected upstream request timeouts due to potentially long
/// time gaps between gRPC request and response in gRPC streaming mode.
///
///
/// .. note::
///
/// ```text
/// If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes
/// precedence over `grpc-timeout header <<https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_,> when
/// both are present. See also
/// :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`,
/// :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the
/// :ref:`retry overview <arch_overview_http_routing_retry>`.
/// ```
#[deprecated]
#[prost(message, optional, tag = "23")]
pub max_grpc_timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
/// Deprecated by :ref:`grpc_timeout_header_offset <envoy_v3_api_field_config.route.v3.RouteAction.MaxStreamDuration.grpc_timeout_header_offset>`.
/// If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting
/// the provided duration from the header. This is useful in allowing Envoy to set its global
/// timeout to be less than that of the deadline imposed by the calling client, which makes it more
/// likely that Envoy will handle the timeout instead of having the call canceled by the client.
/// The offset will only be applied if the provided grpc_timeout is greater than the offset. This
/// ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning
/// infinity).
#[deprecated]
#[prost(message, optional, tag = "28")]
pub grpc_timeout_offset: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
#[prost(message, repeated, tag = "25")]
pub upgrade_configs: ::prost::alloc::vec::Vec<route_action::UpgradeConfig>,
/// If present, Envoy will try to follow an upstream redirect response instead of proxying the
/// response back to the downstream. An upstream redirect response is defined
/// by :ref:`redirect_response_codes <envoy_v3_api_field_config.route.v3.InternalRedirectPolicy.redirect_response_codes>`.
#[prost(message, optional, tag = "34")]
pub internal_redirect_policy: ::core::option::Option<InternalRedirectPolicy>,
#[deprecated]
#[prost(enumeration = "route_action::InternalRedirectAction", tag = "26")]
pub internal_redirect_action: i32,
///
/// An internal redirect is handled, iff the number of previous internal redirects that a
/// downstream request has encountered is lower than this value, and
/// : ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
/// is set to :ref:`HANDLE_INTERNAL_REDIRECT <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.HANDLE_INTERNAL_REDIRECT>`
/// In the case where a downstream request is bounced among multiple routes by internal redirect,
/// the first route that hits this threshold, or has
/// : ref:`internal_redirect_action <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_action>`
/// set to
/// : ref:`PASS_THROUGH_INTERNAL_REDIRECT <envoy_v3_api_enum_value_config.route.v3.RouteAction.InternalRedirectAction.PASS_THROUGH_INTERNAL_REDIRECT>`
/// will pass the redirect back to downstream.
///
///
/// If not specified, at most one redirect will be followed.
#[deprecated]
#[prost(message, optional, tag = "31")]
pub max_internal_redirects: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// Indicates that the route has a hedge policy. Note that if this is set,
/// it'll take precedence over the virtual host level hedge policy entirely
/// (e.g., policies are not merged, the most internal one becomes the enforced policy).
#[prost(message, optional, tag = "27")]
pub hedge_policy: ::core::option::Option<HedgePolicy>,
/// Specifies the maximum stream duration for this route.
#[prost(message, optional, tag = "36")]
pub max_stream_duration: ::core::option::Option<route_action::MaxStreamDuration>,
#[prost(oneof = "route_action::ClusterSpecifier", tags = "1, 2, 3, 37, 39")]
pub cluster_specifier: ::core::option::Option<route_action::ClusterSpecifier>,
///
/// If one of the host rewrite specifiers is set and the
/// : ref:`suppress_envoy_headers <envoy_v3_api_field_extensions.filters.http.router.v3.Router.suppress_envoy_headers>` flag is not
/// set to true, the router filter will place the original host header value before
/// rewriting into the :ref:`x-envoy-original-host <config_http_filters_router_x-envoy-original-host>` header.
///
/// And if the
/// : ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
/// is set to true, the original host value will also be appended to the
/// : ref:`config_http_conn_man_headers_x-forwarded-host` header.
#[prost(oneof = "route_action::HostRewriteSpecifier", tags = "6, 7, 29, 35, 44")]
pub host_rewrite_specifier: ::core::option::Option<
route_action::HostRewriteSpecifier,
>,
}
/// Nested message and enum types in `RouteAction`.
pub mod route_action {
/// The router is capable of shadowing traffic from one cluster to another. The current
/// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to
/// respond before returning the response from the primary cluster. All normal statistics are
/// collected for the shadow cluster making this feature useful for testing.
///
/// During shadowing, the host/authority header is altered such that `-shadow` is appended. This is
/// useful for logging. For example, `cluster1` becomes `cluster1-shadow`. This behavior can be
/// disabled by setting `disable_shadow_host_suffix_append` to `true`.
///
/// .. note::
///
/// Shadowing will not be triggered if the primary cluster does not exist.
///
/// .. note::
///
/// Shadowing doesn't support HTTP CONNECT and upgrades.
/// \[\#next-free-field: 9\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestMirrorPolicy {
/// Only one of `cluster` and `cluster_header` can be specified.
/// \[\#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}\]
/// Specifies the cluster that requests will be mirrored to. The cluster must
/// exist in the cluster manager configuration.
#[prost(string, tag = "1")]
pub cluster: ::prost::alloc::string::String,
/// Only one of `cluster` and `cluster_header` can be specified.
/// Envoy will determine the cluster to route to by reading the value of the
/// HTTP header named by cluster_header from the request headers. Only the first value in header is used,
/// and no shadow request will happen if the value is not found in headers. Envoy will not wait for
/// the shadow cluster to respond before returning the response from the primary cluster.
///
/// .. attention::
///
/// Internally, Envoy always uses the HTTP/2 `:authority` header to represent the HTTP/1
/// `Host` header. Thus, if attempting to match on `Host`, match on `:authority` instead.
///
/// .. note::
///
/// If the header appears multiple times only the first value is used.
#[prost(string, tag = "5")]
pub cluster_header: ::prost::alloc::string::String,
/// If not specified, all requests to the target cluster will be mirrored.
///
/// If specified, this field takes precedence over the `runtime_key` field and requests must also
/// fall under the percentage of matches indicated by this field.
///
/// For some fraction N/D, a random number in the range \[0,D) is selected. If the
/// number is \<= the value of the numerator N, or if the key is not present, the default
/// value, the request will be mirrored.
#[prost(message, optional, tag = "3")]
pub runtime_fraction: ::core::option::Option<
super::super::super::core::v3::RuntimeFractionalPercent,
>,
/// Specifies whether the trace span for the shadow request should be sampled. If this field is not explicitly set,
/// the shadow request will inherit the sampling decision of its parent span. This ensures consistency with the trace
/// sampling policy of the original request and prevents oversampling, especially in scenarios where runtime sampling
/// is disabled.
#[prost(message, optional, tag = "4")]
pub trace_sampled: ::core::option::Option<
super::super::super::super::super::google::protobuf::BoolValue,
>,
/// Disables appending the `-shadow` suffix to the shadowed `Host` header.
///
/// Defaults to `false`.
#[prost(bool, tag = "6")]
pub disable_shadow_host_suffix_append: bool,
/// Specifies a list of header mutations that should be applied to each mirrored request.
/// Header mutations are applied in the order they are specified. For more information, including
/// details on header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "7")]
pub request_headers_mutations: ::prost::alloc::vec::Vec<
super::super::super::common::mutation_rules::v3::HeaderMutation,
>,
///
/// Indicates that during mirroring, the host header will be swapped with this value.
/// : ref:`disable_shadow_host_suffix_append <envoy_v3_api_field_config.route.v3.RouteAction.RequestMirrorPolicy.disable_shadow_host_suffix_append>`
/// is implicitly enabled if this field is set.
#[prost(string, tag = "8")]
pub host_rewrite_literal: ::prost::alloc::string::String,
}
impl ::prost::Name for RequestMirrorPolicy {
const NAME: &'static str = "RequestMirrorPolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.RequestMirrorPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.RequestMirrorPolicy"
.into()
}
}
/// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer <arch_overview_load_balancing_types>`.
/// \[\#next-free-field: 7\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashPolicy {
/// The flag that short-circuits the hash computing. This field provides a
/// 'fallback' style of configuration: "if a terminal policy doesn't work,
/// fallback to rest of the policy list", it saves time when the terminal
/// policy works.
///
/// If true, and there is already a hash computed, ignore rest of the
/// list of hash polices.
/// For example, if the following hash methods are configured:
///
/// ========= ========
/// specifier terminal
/// ========= ========
/// Header A true
/// Header B false
/// Header C false
/// ========= ========
///
/// The generateHash process ends if policy "header A" generates a hash, as
/// it's a terminal policy.
#[prost(bool, tag = "4")]
pub terminal: bool,
#[prost(oneof = "hash_policy::PolicySpecifier", tags = "1, 2, 3, 5, 6")]
pub policy_specifier: ::core::option::Option<hash_policy::PolicySpecifier>,
}
/// Nested message and enum types in `HashPolicy`.
pub mod hash_policy {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Header {
/// The name of the request header that will be used to obtain the hash
/// key. If the request header is not present, no hash will be produced.
#[prost(string, tag = "1")]
pub header_name: ::prost::alloc::string::String,
/// If specified, the request header value will be rewritten and used
/// to produce the hash key.
#[prost(message, optional, tag = "2")]
pub regex_rewrite: ::core::option::Option<
super::super::super::super::super::r#type::matcher::v3::RegexMatchAndSubstitute,
>,
}
impl ::prost::Name for Header {
const NAME: &'static str = "Header";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.Header".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.Header"
.into()
}
}
/// CookieAttribute defines an API for adding additional attributes for a HTTP cookie.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CookieAttribute {
/// The name of the cookie attribute.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The optional value of the cookie attribute.
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
impl ::prost::Name for CookieAttribute {
const NAME: &'static str = "CookieAttribute";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute"
.into()
}
}
/// Envoy supports two types of cookie affinity:
///
/// 1. Passive. Envoy takes a cookie that's present in the cookies header and
/// hashes on its value.
///
/// 1. Generated. Envoy generates and sets a cookie with an expiration (TTL)
/// on the first request from the client in its response to the client,
/// based on the endpoint the request gets sent to. The client then
/// presents this on the next and all subsequent requests. The hash of
/// this is sufficient to ensure these requests get sent to the same
/// endpoint. The cookie is generated by hashing the source and
/// destination ports and addresses so that multiple independent HTTP2
/// streams on the same connection will independently receive the same
/// cookie, even if they arrive at the Envoy simultaneously.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cookie {
/// The name of the cookie that will be used to obtain the hash key. If the
/// cookie is not present and ttl below is not set, no hash will be
/// produced.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// If specified, a cookie with the TTL will be generated if the cookie is
/// not present. If the TTL is present and zero, the generated cookie will
/// be a session cookie.
#[prost(message, optional, tag = "2")]
pub ttl: ::core::option::Option<
super::super::super::super::super::super::google::protobuf::Duration,
>,
/// The name of the path for the cookie. If no path is specified here, no path
/// will be set for the cookie.
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
/// Additional attributes for the cookie. They will be used when generating a new cookie.
#[prost(message, repeated, tag = "4")]
pub attributes: ::prost::alloc::vec::Vec<CookieAttribute>,
}
impl ::prost::Name for Cookie {
const NAME: &'static str = "Cookie";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.Cookie".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.Cookie"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConnectionProperties {
/// Hash on source IP address.
#[prost(bool, tag = "1")]
pub source_ip: bool,
}
impl ::prost::Name for ConnectionProperties {
const NAME: &'static str = "ConnectionProperties";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryParameter {
/// The name of the URL query parameter that will be used to obtain the hash
/// key. If the parameter is not present, no hash will be produced. Query
/// parameter names are case-sensitive. If query parameters are repeated, only
/// the first value will be considered.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryParameter {
const NAME: &'static str = "QueryParameter";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilterState {
/// The name of the Object in the per-request filterState, which is an
/// Envoy::Hashable object. If there is no data associated with the key,
/// or the stored object is not Envoy::Hashable, no hash will be produced.
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
}
impl ::prost::Name for FilterState {
const NAME: &'static str = "FilterState";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy.FilterState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy.FilterState"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PolicySpecifier {
/// Header hash policy.
#[prost(message, tag = "1")]
Header(Header),
/// Cookie hash policy.
#[prost(message, tag = "2")]
Cookie(Cookie),
/// Connection properties hash policy.
#[prost(message, tag = "3")]
ConnectionProperties(ConnectionProperties),
/// Query parameter hash policy.
#[prost(message, tag = "5")]
QueryParameter(QueryParameter),
/// Filter state hash policy.
#[prost(message, tag = "6")]
FilterState(FilterState),
}
}
impl ::prost::Name for HashPolicy {
const NAME: &'static str = "HashPolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.HashPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.HashPolicy".into()
}
}
///
/// Allows enabling and disabling upgrades on a per-route basis.
/// This overrides any enabled/disabled upgrade filter chain specified in the
/// HttpConnectionManager
/// : ref:`upgrade_configs <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs>`
/// but does not affect any custom filter chain specified there.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpgradeConfig {
/// The case-insensitive name of this upgrade, for example, "websocket".
/// For each upgrade type present in upgrade_configs, requests with
/// Upgrade: \[upgrade_type\] will be proxied upstream.
#[prost(string, tag = "1")]
pub upgrade_type: ::prost::alloc::string::String,
/// Determines if upgrades are available on this route.
///
/// Defaults to `true`.
#[prost(message, optional, tag = "2")]
pub enabled: ::core::option::Option<
super::super::super::super::super::google::protobuf::BoolValue,
>,
/// Configuration for sending data upstream as a raw data payload. This is used for
/// CONNECT requests, when forwarding CONNECT payload as raw TCP.
/// Note that CONNECT support is currently considered alpha in Envoy.
/// \[\#comment: TODO(htuch): Replace the above comment with an alpha tag.\]
#[prost(message, optional, tag = "3")]
pub connect_config: ::core::option::Option<upgrade_config::ConnectConfig>,
}
/// Nested message and enum types in `UpgradeConfig`.
pub mod upgrade_config {
/// Configuration for sending data upstream as a raw data payload. This is used for
/// CONNECT or POST requests, when forwarding request payload as raw TCP.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectConfig {
/// If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream.
#[prost(message, optional, tag = "1")]
pub proxy_protocol_config: ::core::option::Option<
super::super::super::super::core::v3::ProxyProtocolConfig,
>,
/// If set, the route will also allow forwarding POST payload as raw TCP.
#[prost(bool, tag = "2")]
pub allow_post: bool,
}
impl ::prost::Name for ConnectConfig {
const NAME: &'static str = "ConnectConfig";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig"
.into()
}
}
}
impl ::prost::Name for UpgradeConfig {
const NAME: &'static str = "UpgradeConfig";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.UpgradeConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.UpgradeConfig".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MaxStreamDuration {
///
/// Specifies the maximum duration allowed for streams on the route. If not specified, the value
/// from the :ref:`max_stream_duration <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
/// : ref:`HttpConnectionManager.common_http_protocol_options <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
/// is used. If this field is set explicitly to zero, any
/// HttpConnectionManager max_stream_duration timeout will be disabled for
/// this route.
#[prost(message, optional, tag = "1")]
pub max_stream_duration: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
/// If present, and the request contains a `grpc-timeout header <<https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`\_,> use that value as the
/// `max_stream_duration`, but limit the applied timeout to the maximum value specified here.
/// If set to 0, the `grpc-timeout` header is used without modification.
#[prost(message, optional, tag = "2")]
pub grpc_timeout_header_max: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
/// If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by
/// subtracting the provided duration from the header. This is useful for allowing Envoy to set
/// its global timeout to be less than that of the deadline imposed by the calling client, which
/// makes it more likely that Envoy will handle the timeout instead of having the call canceled
/// by the client. If, after applying the offset, the resulting timeout is zero or negative,
/// the stream will timeout immediately.
#[prost(message, optional, tag = "3")]
pub grpc_timeout_header_offset: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
}
impl ::prost::Name for MaxStreamDuration {
const NAME: &'static str = "MaxStreamDuration";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction.MaxStreamDuration".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction.MaxStreamDuration"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ClusterNotFoundResponseCode {
/// HTTP status code - 503 Service Unavailable.
ServiceUnavailable = 0,
/// HTTP status code - 404 Not Found.
NotFound = 1,
/// HTTP status code - 500 Internal Server Error.
InternalServerError = 2,
}
impl ClusterNotFoundResponseCode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ServiceUnavailable => "SERVICE_UNAVAILABLE",
Self::NotFound => "NOT_FOUND",
Self::InternalServerError => "INTERNAL_SERVER_ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVICE_UNAVAILABLE" => Some(Self::ServiceUnavailable),
"NOT_FOUND" => Some(Self::NotFound),
"INTERNAL_SERVER_ERROR" => Some(Self::InternalServerError),
_ => None,
}
}
}
/// Configures :ref:`internal redirect <arch_overview_internal_redirects>` behavior.
/// \[\#next-major-version: remove this definition - it's defined in the InternalRedirectPolicy message.\]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum InternalRedirectAction {
PassThroughInternalRedirect = 0,
HandleInternalRedirect = 1,
}
impl InternalRedirectAction {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PassThroughInternalRedirect => "PASS_THROUGH_INTERNAL_REDIRECT",
Self::HandleInternalRedirect => "HANDLE_INTERNAL_REDIRECT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PASS_THROUGH_INTERNAL_REDIRECT" => {
Some(Self::PassThroughInternalRedirect)
}
"HANDLE_INTERNAL_REDIRECT" => Some(Self::HandleInternalRedirect),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ClusterSpecifier {
/// Indicates the upstream cluster to which the request should be routed
/// to.
#[prost(string, tag = "1")]
Cluster(::prost::alloc::string::String),
/// Envoy will determine the cluster to route to by reading the value of the
/// HTTP header named by cluster_header from the request headers. If the
/// header is not found or the referenced cluster does not exist, Envoy will
/// return a 404 response.
///
/// .. attention::
///
/// Internally, Envoy always uses the HTTP/2 `:authority` header to represent the HTTP/1
/// `Host` header. Thus, if attempting to match on `Host`, match on `:authority` instead.
///
/// .. note::
///
/// If the header appears multiple times only the first value is used.
#[prost(string, tag = "2")]
ClusterHeader(::prost::alloc::string::String),
///
/// Multiple upstream clusters can be specified for a given route. The
/// request is routed to one of the upstream clusters based on weights
/// assigned to each cluster. See
/// : ref:`traffic splitting <config_http_conn_man_route_table_traffic_splitting_split>`
/// for additional documentation.
#[prost(message, tag = "3")]
WeightedClusters(super::WeightedCluster),
///
/// Name of the cluster specifier plugin to use to determine the cluster for requests on this route.
/// The cluster specifier plugin name must be defined in the associated
/// : ref:`cluster specifier plugins <envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins>`
/// in the :ref:`name <envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name>` field.
#[prost(string, tag = "37")]
ClusterSpecifierPlugin(::prost::alloc::string::String),
/// Custom cluster specifier plugin configuration to use to determine the cluster for requests
/// on this route.
#[prost(message, tag = "39")]
InlineClusterSpecifierPlugin(super::ClusterSpecifierPlugin),
}
///
/// If one of the host rewrite specifiers is set and the
/// : ref:`suppress_envoy_headers <envoy_v3_api_field_extensions.filters.http.router.v3.Router.suppress_envoy_headers>` flag is not
/// set to true, the router filter will place the original host header value before
/// rewriting into the :ref:`x-envoy-original-host <config_http_filters_router_x-envoy-original-host>` header.
///
/// And if the
/// : ref:`append_x_forwarded_host <envoy_v3_api_field_config.route.v3.RouteAction.append_x_forwarded_host>`
/// is set to true, the original host value will also be appended to the
/// : ref:`config_http_conn_man_headers_x-forwarded-host` header.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum HostRewriteSpecifier {
/// Indicates that during forwarding, the host header will be swapped with
/// this value.
#[prost(string, tag = "6")]
HostRewriteLiteral(::prost::alloc::string::String),
/// Indicates that during forwarding, the host header will be swapped with
/// the hostname of the upstream host chosen by the cluster manager. This
/// option is applicable only when the destination cluster for a route is of
/// type `strict_dns` or `logical_dns`,
/// or when :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.hostname>`
/// field is not empty. Setting this to true with other cluster types
/// has no effect.
#[prost(message, tag = "7")]
AutoHostRewrite(super::super::super::super::super::google::protobuf::BoolValue),
/// Indicates that during forwarding, the host header will be swapped with the content of given
/// downstream or :ref:`custom <config_http_conn_man_headers_custom_request_headers>` header.
/// If header value is empty, host header is left intact.
///
/// .. attention::
///
/// Pay attention to the potential security implications of using this option. Provided header
/// must come from trusted source.
///
/// .. note::
///
/// If the header appears multiple times only the first value is used.
#[prost(string, tag = "29")]
HostRewriteHeader(::prost::alloc::string::String),
/// Indicates that during forwarding, the host header will be swapped with
/// the result of the regex substitution executed on path value with query and fragment removed.
/// This is useful for transitioning variable content between path segment and subdomain.
///
/// For example with the following config:
///
/// .. code-block:: yaml
///
/// ```text
/// host_rewrite_path_regex:
/// pattern:
/// google_re2: {}
/// regex: "^/(.+)/.+$"
/// substitution: \1
/// ```
///
/// Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`.
#[prost(message, tag = "35")]
HostRewritePathRegex(
super::super::super::super::r#type::matcher::v3::RegexMatchAndSubstitute,
),
/// Rewrites the host header with the value of this field. The router filter will
/// place the original host header value before rewriting into the :ref:`x-envoy-original-host <config_http_filters_router_x-envoy-original-host>` header.
///
/// The :ref:`substitution format specifier <config_access_log_format>` could be applied here.
/// For example, with the following config:
///
/// .. code-block:: yaml
///
/// ```text
/// host_rewrite: "prefix-%REQ(custom-host-header-name)%"
/// ```
///
/// Would rewrite the host header to `prefix-some_value` given the header
/// `custom-host-header-name: some_value`. If the header is not present, the host header will
/// be rewritten to an value of `prefix-`.
///
/// If the final output of the host rewrite is empty, then the update will be ignored and the
/// original host header will be preserved.
#[prost(string, tag = "44")]
HostRewrite(::prost::alloc::string::String),
}
}
impl ::prost::Name for RouteAction {
const NAME: &'static str = "RouteAction";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteAction".into()
}
}
/// HTTP retry :ref:`architecture overview <arch_overview_http_routing_retry>`.
/// \[\#next-free-field: 14\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetryPolicy {
///
/// Specifies the conditions under which retry takes place. These are the same
/// conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and
/// : ref:`config_http_filters_router_x-envoy-retry-grpc-on`.
#[prost(string, tag = "1")]
pub retry_on: ::prost::alloc::string::String,
///
/// Specifies the allowed number of retries. This parameter is optional and
/// defaults to 1. These are the same conditions documented for
/// : ref:`config_http_filters_router_x-envoy-max-retries`.
#[prost(message, optional, tag = "2")]
pub num_retries: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
///
/// Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This
/// parameter is optional. The same conditions documented for
/// : ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply.
///
///
/// .. note::
///
///
/// If left unspecified, Envoy will use the global
/// : ref:`route timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` for the request.
/// Consequently, when using a :ref:`5xx <config_http_filters_router_x-envoy-retry-on>` based
/// retry policy, a request that times out will not be retried as the total timeout budget
/// would have been exhausted.
#[prost(message, optional, tag = "3")]
pub per_try_timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
///
/// Specifies an upstream idle timeout per retry attempt (including the initial attempt). This
/// parameter is optional and if absent there is no per-try idle timeout. The semantics of the per-
/// try idle timeout are similar to the
/// : ref:`route idle timeout <envoy_v3_api_field_config.route.v3.RouteAction.timeout>` and
/// : ref:`stream idle timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
/// both enforced by the HTTP connection manager. The difference is that this idle timeout
/// is enforced by the router for each individual attempt and thus after all previous filters have
/// run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout
/// is useful in cases in which total request timeout is bounded by a number of retries and a
/// : ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`, but
/// there is a desire to ensure each try is making incremental progress. Note also that similar
/// to :ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`,
/// this idle timeout does not start until after both the entire request has been received by the
/// router *and* a connection pool connection has been obtained. Unlike
/// : ref:`per_try_timeout <envoy_v3_api_field_config.route.v3.RetryPolicy.per_try_timeout>`,
/// the idle timer continues once the response starts streaming back to the downstream client.
/// This ensures that response data continues to make progress without using one of the HTTP
/// connection manager idle timeouts.
#[prost(message, optional, tag = "13")]
pub per_try_idle_timeout: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
///
/// Specifies an implementation of a RetryPriority which is used to determine the
/// distribution of load across priorities used for retries. Refer to
/// : ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more details.
#[prost(message, optional, tag = "4")]
pub retry_priority: ::core::option::Option<retry_policy::RetryPriority>,
/// Specifies a collection of RetryHostPredicates that will be consulted when selecting a host
/// for retries. If any of the predicates reject the host, host selection will be reattempted.
/// Refer to :ref:`retry plugin configuration <arch_overview_http_retry_plugins>` for more
/// details.
#[prost(message, repeated, tag = "5")]
pub retry_host_predicate: ::prost::alloc::vec::Vec<retry_policy::RetryHostPredicate>,
/// Retry options predicates that will be applied prior to retrying a request. These predicates
/// allow customizing request behavior between retries.
/// \[\#comment: add \[\#extension-category: envoy.retry_options_predicates\] when there are built-in extensions\]
#[prost(message, repeated, tag = "12")]
pub retry_options_predicates: ::prost::alloc::vec::Vec<
super::super::core::v3::TypedExtensionConfig,
>,
/// The maximum number of times host selection will be reattempted before giving up, at which
/// point the host that was last selected will be routed to. If unspecified, this will default to
/// retrying once.
#[prost(int64, tag = "6")]
pub host_selection_retry_max_attempts: i64,
/// HTTP status codes that should trigger a retry in addition to those specified by retry_on.
#[prost(uint32, repeated, tag = "7")]
pub retriable_status_codes: ::prost::alloc::vec::Vec<u32>,
/// Specifies parameters that control exponential retry back off. This parameter is optional, in which case the
/// default base interval is 25 milliseconds or, if set, the current value of the
/// `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times
/// the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries`
/// describes Envoy's back-off algorithm.
#[prost(message, optional, tag = "8")]
pub retry_back_off: ::core::option::Option<retry_policy::RetryBackOff>,
/// Specifies parameters that control a retry back-off strategy that is used
/// when the request is rate limited by the upstream server. The server may
/// return a response header like `Retry-After` or `X-RateLimit-Reset` to
/// provide feedback to the client on how long to wait before retrying. If
/// configured, this back-off strategy will be used instead of the
/// default exponential back off strategy (configured using `retry_back_off`)
/// whenever a response includes the matching headers.
#[prost(message, optional, tag = "11")]
pub rate_limited_retry_back_off: ::core::option::Option<
retry_policy::RateLimitedRetryBackOff,
>,
/// HTTP response headers that trigger a retry if present in the response. A retry will be
/// triggered if any of the header matches match the upstream response headers.
/// The field is only consulted if 'retriable-headers' retry policy is active.
#[prost(message, repeated, tag = "9")]
pub retriable_headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
/// HTTP headers which must be present in the request for retries to be attempted.
#[prost(message, repeated, tag = "10")]
pub retriable_request_headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
}
/// Nested message and enum types in `RetryPolicy`.
pub mod retry_policy {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RetryPriority {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// \[\#extension-category: envoy.retry_priorities\]
#[prost(oneof = "retry_priority::ConfigType", tags = "3")]
pub config_type: ::core::option::Option<retry_priority::ConfigType>,
}
/// Nested message and enum types in `RetryPriority`.
pub mod retry_priority {
/// \[\#extension-category: envoy.retry_priorities\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ConfigType {
#[prost(message, tag = "3")]
TypedConfig(super::super::super::super::super::super::google::protobuf::Any),
}
}
impl ::prost::Name for RetryPriority {
const NAME: &'static str = "RetryPriority";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy.RetryPriority".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy.RetryPriority".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RetryHostPredicate {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// \[\#extension-category: envoy.retry_host_predicates\]
#[prost(oneof = "retry_host_predicate::ConfigType", tags = "3")]
pub config_type: ::core::option::Option<retry_host_predicate::ConfigType>,
}
/// Nested message and enum types in `RetryHostPredicate`.
pub mod retry_host_predicate {
/// \[\#extension-category: envoy.retry_host_predicates\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ConfigType {
#[prost(message, tag = "3")]
TypedConfig(super::super::super::super::super::super::google::protobuf::Any),
}
}
impl ::prost::Name for RetryHostPredicate {
const NAME: &'static str = "RetryHostPredicate";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy.RetryHostPredicate".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy.RetryHostPredicate"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RetryBackOff {
/// Specifies the base interval between retries. This parameter is required and must be greater
/// than zero. Values less than 1 ms are rounded up to 1 ms.
/// See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's
/// back-off algorithm.
#[prost(message, optional, tag = "1")]
pub base_interval: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
/// Specifies the maximum interval between retries. This parameter is optional, but must be
/// greater than or equal to the `base_interval` if set. The default is 10 times the
/// `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion
/// of Envoy's back-off algorithm.
#[prost(message, optional, tag = "2")]
pub max_interval: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
}
impl ::prost::Name for RetryBackOff {
const NAME: &'static str = "RetryBackOff";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy.RetryBackOff".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy.RetryBackOff".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResetHeader {
/// The name of the reset header.
///
/// .. note::
///
/// If the header appears multiple times only the first value is used.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The format of the reset header.
#[prost(enumeration = "ResetHeaderFormat", tag = "2")]
pub format: i32,
}
impl ::prost::Name for ResetHeader {
const NAME: &'static str = "ResetHeader";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy.ResetHeader".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy.ResetHeader".into()
}
}
/// A retry back-off strategy that applies when the upstream server rate limits
/// the request.
///
/// Given this configuration:
///
/// .. code-block:: yaml
///
/// rate_limited_retry_back_off:
/// reset_headers:
/// - name: Retry-After
/// format: SECONDS
/// - name: X-RateLimit-Reset
/// format: UNIX_TIMESTAMP
/// max_interval: "300s"
///
/// The following algorithm will apply:
///
/// 1. If the response contains the header `Retry-After` its value must be on
/// the form `120` (an integer that represents the number of seconds to
/// wait before retrying). If so, this value is used as the back-off interval.
/// 1. Otherwise, if the response contains the header `X-RateLimit-Reset` its
/// value must be on the form `1595320702` (an integer that represents the
/// point in time at which to retry, as a Unix timestamp in seconds). If so,
/// the current time is subtracted from this value and the result is used as
/// the back-off interval.
/// 1.
/// Otherwise, Envoy will use the default
/// : ref:`exponential back-off <envoy_v3_api_field_config.route.v3.RetryPolicy.retry_back_off>`
/// strategy.
///
///
/// No matter which format is used, if the resulting back-off interval exceeds
/// `max_interval` it is discarded and the next header in `reset_headers`
/// is tried. If a request timeout is configured for the route it will further
/// limit how long the request will be allowed to run.
///
/// To prevent many clients retrying at the same point in time jitter is added
/// to the back-off interval, so the resulting interval is decided by taking:
/// `random(interval, interval * 1.5)`.
///
/// .. attention::
///
/// Configuring `rate_limited_retry_back_off` will not by itself cause a request
/// to be retried. You will still need to configure the right retry policy to match
/// the responses from the upstream server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RateLimitedRetryBackOff {
/// Specifies the reset headers (like `Retry-After` or `X-RateLimit-Reset`)
/// to match against the response. Headers are tried in order, and matched case
/// insensitive. The first header to be parsed successfully is used. If no headers
/// match the default exponential back-off is used instead.
#[prost(message, repeated, tag = "1")]
pub reset_headers: ::prost::alloc::vec::Vec<ResetHeader>,
/// Specifies the maximum back off interval that Envoy will allow. If a reset
/// header contains an interval longer than this then it will be discarded and
/// the next header will be tried.
///
/// Defaults to 300 seconds.
#[prost(message, optional, tag = "2")]
pub max_interval: ::core::option::Option<
super::super::super::super::super::google::protobuf::Duration,
>,
}
impl ::prost::Name for RateLimitedRetryBackOff {
const NAME: &'static str = "RateLimitedRetryBackOff";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ResetHeaderFormat {
Seconds = 0,
UnixTimestamp = 1,
}
impl ResetHeaderFormat {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Seconds => "SECONDS",
Self::UnixTimestamp => "UNIX_TIMESTAMP",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SECONDS" => Some(Self::Seconds),
"UNIX_TIMESTAMP" => Some(Self::UnixTimestamp),
_ => None,
}
}
}
}
impl ::prost::Name for RetryPolicy {
const NAME: &'static str = "RetryPolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RetryPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RetryPolicy".into()
}
}
/// HTTP request hedging :ref:`architecture overview <arch_overview_http_routing_hedging>`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HedgePolicy {
/// Specifies the number of initial requests that should be sent upstream.
/// Must be at least 1.
///
/// Defaults to 1.
/// \[\#not-implemented-hide:\]
#[prost(message, optional, tag = "1")]
pub initial_requests: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// Specifies a probability that an additional upstream request should be sent
/// on top of what is specified by initial_requests.
///
/// Defaults to 0.
/// \[\#not-implemented-hide:\]
#[prost(message, optional, tag = "2")]
pub additional_request_chance: ::core::option::Option<
super::super::super::r#type::v3::FractionalPercent,
>,
/// Indicates that a hedged request should be sent when the per-try timeout is hit.
/// This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight.
/// The first request to complete successfully will be the one returned to the caller.
///
/// * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client.
/// * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned to the client
/// if there are no more retries left.
/// * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress.
///
/// .. note::
///
/// For this to have effect, you must have a :ref:`RetryPolicy <envoy_v3_api_msg_config.route.v3.RetryPolicy>` that retries at least
/// one error code and specifies a maximum number of retries.
///
/// Defaults to `false`.
#[prost(bool, tag = "3")]
pub hedge_on_per_try_timeout: bool,
}
impl ::prost::Name for HedgePolicy {
const NAME: &'static str = "HedgePolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.HedgePolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.HedgePolicy".into()
}
}
/// \[\#next-free-field: 10\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RedirectAction {
/// The host portion of the URL will be swapped with this value.
#[prost(string, tag = "1")]
pub host_redirect: ::prost::alloc::string::String,
/// The port value of the URL will be swapped with this value.
#[prost(uint32, tag = "8")]
pub port_redirect: u32,
/// The HTTP status code to use in the redirect response. The default response
/// code is MOVED_PERMANENTLY (301).
#[prost(enumeration = "redirect_action::RedirectResponseCode", tag = "3")]
pub response_code: i32,
/// Indicates that during redirection, the query portion of the URL will
/// be removed. Default value is false.
#[prost(bool, tag = "6")]
pub strip_query: bool,
/// When the scheme redirection take place, the following rules apply:
///
/// 1. If the source URI scheme is `http` and the port is explicitly
/// set to `:80`, the port will be removed after the redirection
/// 1. If the source URI scheme is `https` and the port is explicitly
/// set to `:443`, the port will be removed after the redirection
#[prost(oneof = "redirect_action::SchemeRewriteSpecifier", tags = "4, 7")]
pub scheme_rewrite_specifier: ::core::option::Option<
redirect_action::SchemeRewriteSpecifier,
>,
#[prost(oneof = "redirect_action::PathRewriteSpecifier", tags = "2, 5, 9")]
pub path_rewrite_specifier: ::core::option::Option<
redirect_action::PathRewriteSpecifier,
>,
}
/// Nested message and enum types in `RedirectAction`.
pub mod redirect_action {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RedirectResponseCode {
/// Moved Permanently HTTP Status Code - 301.
MovedPermanently = 0,
/// Found HTTP Status Code - 302.
Found = 1,
/// See Other HTTP Status Code - 303.
SeeOther = 2,
/// Temporary Redirect HTTP Status Code - 307.
TemporaryRedirect = 3,
/// Permanent Redirect HTTP Status Code - 308.
PermanentRedirect = 4,
}
impl RedirectResponseCode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MovedPermanently => "MOVED_PERMANENTLY",
Self::Found => "FOUND",
Self::SeeOther => "SEE_OTHER",
Self::TemporaryRedirect => "TEMPORARY_REDIRECT",
Self::PermanentRedirect => "PERMANENT_REDIRECT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MOVED_PERMANENTLY" => Some(Self::MovedPermanently),
"FOUND" => Some(Self::Found),
"SEE_OTHER" => Some(Self::SeeOther),
"TEMPORARY_REDIRECT" => Some(Self::TemporaryRedirect),
"PERMANENT_REDIRECT" => Some(Self::PermanentRedirect),
_ => None,
}
}
}
/// When the scheme redirection take place, the following rules apply:
///
/// 1. If the source URI scheme is `http` and the port is explicitly
/// set to `:80`, the port will be removed after the redirection
/// 1. If the source URI scheme is `https` and the port is explicitly
/// set to `:443`, the port will be removed after the redirection
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum SchemeRewriteSpecifier {
/// The scheme portion of the URL will be swapped with "https".
#[prost(bool, tag = "4")]
HttpsRedirect(bool),
/// The scheme portion of the URL will be swapped with this value.
#[prost(string, tag = "7")]
SchemeRedirect(::prost::alloc::string::String),
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum PathRewriteSpecifier {
/// The path portion of the URL will be swapped with this value.
/// Please note that query string in path_redirect will override the
/// request's query string and will not be stripped.
///
/// For example, let's say we have the following routes:
///
/// * match: { path: "/old-path-1" }
/// redirect: { path_redirect: "/new-path-1" }
/// * match: { path: "/old-path-2" }
/// redirect: { path_redirect: "/new-path-2", strip-query: "true" }
/// * match: { path: "/old-path-3" }
/// redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" }
///
/// 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1"
/// 1. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2"
/// 1. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1"
#[prost(string, tag = "2")]
PathRedirect(::prost::alloc::string::String),
/// Indicates that during redirection, the matched prefix (or path)
/// should be swapped with this value. This option allows redirect URLs be dynamically created
/// based on the request.
///
/// .. attention::
///
///
/// Pay attention to the use of trailing slashes as mentioned in
/// : ref:`RouteAction's prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`.
#[prost(string, tag = "5")]
PrefixRewrite(::prost::alloc::string::String),
/// Indicates that during redirect, portions of the path that match the
/// pattern should be rewritten, even allowing the substitution of capture
/// groups from the pattern into the new path as specified by the rewrite
/// substitution string. This is useful to allow application paths to be
/// rewritten in a way that is aware of segments with variable content like
/// identifiers.
///
/// Examples using Google's `RE2 <<https://github.com/google/re2>`\_> engine:
///
/// * The path pattern `^/service/(\[^/\]+)(/.*)$` paired with a substitution
/// string of `\2/instance/\1` would transform `/service/foo/v1/api`
/// into `/v1/api/instance/foo`.
///
/// * The pattern `one` paired with a substitution string of `two` would
/// transform `/xxx/one/yyy/one/zzz` into `/xxx/two/yyy/two/zzz`.
///
/// * The pattern `^(.*?)one(.*)$` paired with a substitution string of
/// `\1two\2` would replace only the first occurrence of `one`,
/// transforming path `/xxx/one/yyy/one/zzz` into `/xxx/two/yyy/one/zzz`.
///
/// * The pattern `(?i)/xxx/` paired with a substitution string of `/yyy/`
/// would do a case-insensitive match and transform path `/aaa/XxX/bbb` to
/// `/aaa/yyy/bbb`.
#[prost(message, tag = "9")]
RegexRewrite(
super::super::super::super::r#type::matcher::v3::RegexMatchAndSubstitute,
),
}
}
impl ::prost::Name for RedirectAction {
const NAME: &'static str = "RedirectAction";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RedirectAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RedirectAction".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DirectResponseAction {
/// Specifies the HTTP response status to be returned.
#[prost(uint32, tag = "1")]
pub status: u32,
/// Specifies the content of the response body. If this setting is omitted,
/// no body is included in the generated response.
///
/// .. note::
///
///
/// Headers can be specified using `response_headers_to_add` in the enclosing
/// : ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or
/// : ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.
#[prost(message, optional, tag = "2")]
pub body: ::core::option::Option<super::super::core::v3::DataSource>,
/// Specifies a format string for the response body. If present, the contents of
/// `body_format` will be formatted and used as the response body, where the
/// contents of `body` (may be empty) will be passed as the variable `%LOCAL_REPLY_BODY%`.
/// If neither are provided, no body is included in the generated response.
#[prost(message, optional, tag = "3")]
pub body_format: ::core::option::Option<
super::super::core::v3::SubstitutionFormatString,
>,
}
impl ::prost::Name for DirectResponseAction {
const NAME: &'static str = "DirectResponseAction";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.DirectResponseAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.DirectResponseAction".into()
}
}
/// \[\#not-implemented-hide:\]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NonForwardingAction {}
impl ::prost::Name for NonForwardingAction {
const NAME: &'static str = "NonForwardingAction";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.NonForwardingAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.NonForwardingAction".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Decorator {
/// The operation name associated with the request matched to this route. If tracing is
/// enabled, this information will be used as the span name reported for this request.
///
/// .. note::
///
/// For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden
/// by the :ref:`x-envoy-decorator-operation <config_http_filters_router_x-envoy-decorator-operation>` header.
#[prost(string, tag = "1")]
pub operation: ::prost::alloc::string::String,
/// Whether the decorated details should be propagated to the other party. The default is `true`.
#[prost(message, optional, tag = "2")]
pub propagate: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
}
impl ::prost::Name for Decorator {
const NAME: &'static str = "Decorator";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.Decorator".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.Decorator".into()
}
}
/// \[\#next-free-field: 7\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tracing {
/// Target percentage of requests managed by this HTTP connection manager that will be force
/// traced if the :ref:`x-client-trace-id <config_http_conn_man_headers_x-client-trace-id>`
/// header is set. This field is a direct analog for the runtime variable
/// 'tracing.client_enabled' in the :ref:`HTTP Connection Manager <config_http_conn_man_runtime>`.
/// Default: 100%
#[prost(message, optional, tag = "1")]
pub client_sampling: ::core::option::Option<
super::super::super::r#type::v3::FractionalPercent,
>,
///
/// Target percentage of requests managed by this HTTP connection manager that will be randomly
/// selected for trace generation, if not requested by the client or not forced. This field is
/// a direct analog for the runtime variable 'tracing.random_sampling' in the
/// : ref:`HTTP Connection Manager <config_http_conn_man_runtime>`.
/// Default: 100%
#[prost(message, optional, tag = "2")]
pub random_sampling: ::core::option::Option<
super::super::super::r#type::v3::FractionalPercent,
>,
///
/// Target percentage of requests managed by this HTTP connection manager that will be traced
/// after all other sampling checks have been applied (client-directed, force tracing, random
/// sampling). This field functions as an upper limit on the total configured sampling rate. For
/// instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1%
/// of client requests with the appropriate headers to be force traced. This field is a direct
/// analog for the runtime variable 'tracing.global_enabled' in the
/// : ref:`HTTP Connection Manager <config_http_conn_man_runtime>`.
/// Default: 100%
#[prost(message, optional, tag = "3")]
pub overall_sampling: ::core::option::Option<
super::super::super::r#type::v3::FractionalPercent,
>,
/// A list of custom tags with unique tag name to create tags for the active span.
/// It will take effect after merging with the :ref:`corresponding configuration <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags>`
/// configured in the HTTP connection manager. If two tags with the same name are configured
/// each in the HTTP connection manager and the route level, the one configured here takes
/// priority.
#[prost(message, repeated, tag = "4")]
pub custom_tags: ::prost::alloc::vec::Vec<
super::super::super::r#type::tracing::v3::CustomTag,
>,
/// The operation name of the span which will be used for tracing.
///
///
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here, however
/// unknown specifier values are replaced with the empty string instead of `-`.
///
///
/// This field will take precedence over and make following settings ineffective:
///
/// * :ref:`route decorator <envoy_v3_api_field_config.route.v3.Route.decorator>`.
/// * :ref:`x-envoy-decorator-operation <config_http_filters_router_x-envoy-decorator-operation>`.
/// * :ref:`HCM tracing operation <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.operation>`.
#[prost(string, tag = "5")]
pub operation: ::prost::alloc::string::String,
/// The operation name of the upstream span which will be used for tracing.
/// This only takes effect when `spawn_upstream_span` is set to true and the upstream
/// span is created.
///
///
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here, however
/// unknown specifier values are replaced with the empty string instead of `-`.
///
///
/// This field will take precedence over and make following settings ineffective:
///
/// * :ref:`HCM tracing upstream operation <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.upstream_operation>`
#[prost(string, tag = "6")]
pub upstream_operation: ::prost::alloc::string::String,
}
impl ::prost::Name for Tracing {
const NAME: &'static str = "Tracing";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.Tracing".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.Tracing".into()
}
}
/// A virtual cluster is a way of specifying a regex matching rule against
/// certain important endpoints such that statistics are generated explicitly for
/// the matched requests. The reason this is useful is that when doing
/// prefix/path matching Envoy does not always know what the application
/// considers to be an endpoint. Thus, it’s impossible for Envoy to generically
/// emit per endpoint statistics. However, often systems have highly critical
/// endpoints that they wish to get “perfect” statistics on. Virtual cluster
/// statistics are perfect in the sense that they are emitted on the downstream
/// side such that they include network level failures.
///
/// Documentation for :ref:`virtual cluster statistics <config_http_filters_router_vcluster_stats>`.
///
/// .. note::
///
/// ```text
/// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for
/// every application endpoint. This is both not easily maintainable and as well the matching and
/// statistics output are not free.
/// ```
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VirtualCluster {
/// Specifies a list of header matchers to use for matching requests. Each specified header must
/// match. The pseudo-headers `:path` and `:method` can be used to match the request path and
/// method, respectively.
#[prost(message, repeated, tag = "4")]
pub headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
/// Specifies the name of the virtual cluster. The virtual cluster name as well
/// as the virtual host name are used when emitting statistics. The statistics are emitted by the
/// router filter and are documented :ref:`here <config_http_filters_router_stats>`.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for VirtualCluster {
const NAME: &'static str = "VirtualCluster";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.VirtualCluster".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.VirtualCluster".into()
}
}
/// Global rate limiting :ref:`architecture overview <arch_overview_global_rate_limit>`.
/// Also applies to Local rate limiting :ref:`using descriptors <config_http_filters_local_rate_limit_descriptors>`.
/// \[\#next-free-field: 8\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RateLimit {
/// Refers to the stage set in the filter. The rate limit configuration only
/// applies to filters with the same stage number. The default stage number is
/// 0.
///
/// .. note::
///
/// The filter supports a range of 0 - 10 inclusively for stage numbers.
///
///
/// .. note::
/// This is not supported if the rate limit action is configured in the `typed_per_filter_config` like
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>` or
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>`, etc.
#[prost(message, optional, tag = "1")]
pub stage: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// The key to be set in runtime to disable this rate limit configuration.
///
///
/// .. note::
/// This is not supported if the rate limit action is configured in the `typed_per_filter_config` like
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>` or
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>`, etc.
#[prost(string, tag = "2")]
pub disable_key: ::prost::alloc::string::String,
/// A list of actions that are to be applied for this rate limit configuration.
/// Order matters as the actions are processed sequentially and the descriptor
/// is composed by appending descriptor entries in that sequence. If an action
/// cannot append a descriptor entry, no descriptor is generated for the
/// configuration. See :ref:`composing actions <config_http_filters_rate_limit_composing_actions>` for additional documentation.
#[prost(message, repeated, tag = "3")]
pub actions: ::prost::alloc::vec::Vec<rate_limit::Action>,
/// An optional limit override to be appended to the descriptor produced by this
/// rate limit configuration. If the override value is invalid or cannot be resolved
/// from metadata, no override is provided. See :ref:`rate limit override <config_http_filters_rate_limit_rate_limit_override>` for more information.
///
///
/// .. note::
/// This is not supported if the rate limit action is configured in the `typed_per_filter_config` like
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>` or
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>`, etc.
#[prost(message, optional, tag = "4")]
pub limit: ::core::option::Option<rate_limit::Override>,
/// An optional hits addend to be appended to the descriptor produced by this rate limit
/// configuration.
///
///
/// .. note::
/// This is only supported if the rate limit action is configured in the `typed_per_filter_config` like
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>` or
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>`, etc.
#[prost(message, optional, tag = "5")]
pub hits_addend: ::core::option::Option<rate_limit::HitsAddend>,
/// If true, the rate limit request will be applied when the stream completes. The default value is false.
/// This is useful when the rate limit budget needs to reflect the response context that is not available
/// on the request path.
///
/// For example, let's say the upstream service calculates the usage statistics and returns them in the response body
/// and we want to utilize these numbers to apply the rate limit action for the subsequent requests.
/// Combined with another filter that can set the desired addend based on the response (e.g. Lua filter),
/// this can be used to subtract the usage statistics from the rate limit budget.
///
/// A rate limit applied on the stream completion is "fire-and-forget" by nature, and rate limit is not enforced by this config.
/// In other words, the current request won't be blocked when this is true, but the budget will be updated for the subsequent
/// requests based on the action with this field set to true. Users should ensure that the rate limit is enforced by the actions
/// applied on the request path, i.e. the ones with this field set to false.
///
/// Currently, this is only supported by the HTTP global rate filter.
#[prost(bool, tag = "6")]
pub apply_on_stream_done: bool,
/// Descriptor level X-RateLimit headers options which may override the filter level setting.
#[prost(enumeration = "rate_limit::XRateLimitOption", tag = "7")]
pub x_ratelimit_option: i32,
}
/// Nested message and enum types in `RateLimit`.
pub mod rate_limit {
/// \[\#next-free-field: 13\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(
oneof = "action::ActionSpecifier",
tags = "1, 2, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11"
)]
pub action_specifier: ::core::option::Option<action::ActionSpecifier>,
}
/// Nested message and enum types in `Action`.
pub mod action {
/// The following descriptor entry is appended to the descriptor:
///
/// .. code-block:: cpp
///
/// ("source_cluster", "<local service cluster>")
///
/// <local service cluster> is derived from the :option:`--service-cluster` option.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SourceCluster {}
impl ::prost::Name for SourceCluster {
const NAME: &'static str = "SourceCluster";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.SourceCluster".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.SourceCluster"
.into()
}
}
/// The following descriptor entry is appended to the descriptor:
///
/// .. code-block:: cpp
///
/// ("destination_cluster", "<routed target cluster>")
///
/// Once a request matches against a route table rule, a routed cluster is determined by one of
/// the following :ref:`route table configuration <envoy_v3_api_msg_config.route.v3.RouteConfiguration>`
/// settings:
///
/// * :ref:`cluster <envoy_v3_api_field_config.route.v3.RouteAction.cluster>` indicates the upstream cluster
/// to route to.
/// * :ref:`weighted_clusters <envoy_v3_api_field_config.route.v3.RouteAction.weighted_clusters>`
/// chooses a cluster randomly from a set of clusters with attributed weight.
/// * :ref:`cluster_header <envoy_v3_api_field_config.route.v3.RouteAction.cluster_header>` indicates which
/// header in the request contains the target cluster.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DestinationCluster {}
impl ::prost::Name for DestinationCluster {
const NAME: &'static str = "DestinationCluster";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.DestinationCluster".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.DestinationCluster"
.into()
}
}
/// The following descriptor entry is appended when a header contains a key that matches the
/// `header_name`:
///
/// .. code-block:: cpp
///
/// ("\<descriptor_key>", "\<header_value_queried_from_header>")
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RequestHeaders {
/// The header name to be queried from the request headers. The header’s
/// value is used to populate the value of the descriptor entry for the
/// descriptor_key.
#[prost(string, tag = "1")]
pub header_name: ::prost::alloc::string::String,
/// The key to use in the descriptor entry.
#[prost(string, tag = "2")]
pub descriptor_key: ::prost::alloc::string::String,
/// Controls the behavior when the specified header is not present in the request.
///
/// If set to `false` (default):
///
/// * Envoy does **NOT** call the rate limiting service for this descriptor.
/// * Useful if the header is optional and you prefer to skip rate limiting when it's absent.
///
/// If set to `true`:
///
/// * Envoy calls the rate limiting service but omits this descriptor if the header is missing.
/// * Useful if you want Envoy to enforce rate limiting even when the header is not present.
#[prost(bool, tag = "3")]
pub skip_if_absent: bool,
}
impl ::prost::Name for RequestHeaders {
const NAME: &'static str = "RequestHeaders";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.RequestHeaders".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.RequestHeaders"
.into()
}
}
/// The following descriptor entry is appended when a query parameter contains a key that matches the
/// `query_parameter_name`:
///
/// .. code-block:: cpp
///
/// ("\<descriptor_key>", "\<query_parameter_value_queried_from_query_parameter>")
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryParameters {
/// The name of the query parameter to use for rate limiting. Value of this query parameter is used to populate
/// the value of the descriptor entry for the descriptor_key.
#[prost(string, tag = "1")]
pub query_parameter_name: ::prost::alloc::string::String,
/// The key to use when creating the rate limit descriptor entry. This descriptor key will be used to identify the
/// rate limit rule in the rate limiting service.
#[prost(string, tag = "2")]
pub descriptor_key: ::prost::alloc::string::String,
/// Controls the behavior when the specified query parameter is not present in the request.
///
/// If set to `false` (default):
///
/// * Envoy does **NOT** call the rate limiting service for this descriptor.
/// * Useful if the query parameter is optional and you prefer to skip rate limiting when it's absent.
///
/// If set to `true`:
///
/// * Envoy calls the rate limiting service but omits this descriptor if the query parameter is missing.
/// * Useful if you want Envoy to enforce rate limiting even when the query parameter is not present.
#[prost(bool, tag = "3")]
pub skip_if_absent: bool,
}
impl ::prost::Name for QueryParameters {
const NAME: &'static str = "QueryParameters";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.QueryParameters".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.QueryParameters"
.into()
}
}
/// The following descriptor entry is appended to the descriptor and is populated using the
/// trusted address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
///
/// .. code-block:: cpp
///
/// ("remote_address", "<trusted address from x-forwarded-for>")
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoteAddress {}
impl ::prost::Name for RemoteAddress {
const NAME: &'static str = "RemoteAddress";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.RemoteAddress".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.RemoteAddress"
.into()
}
}
/// The following descriptor entry is appended to the descriptor and is populated using the
/// masked address from :ref:`x-forwarded-for <config_http_conn_man_headers_x-forwarded-for>`:
///
/// .. code-block:: cpp
///
/// ("masked_remote_address", "<masked address from x-forwarded-for>")
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MaskedRemoteAddress {
/// Length of prefix mask len for IPv4 (e.g. 0, 32).
///
/// Defaults to 32 when unset.
///
/// For example, trusted address from x-forwarded-for is `192.168.1.1`,
/// the descriptor entry is ("masked_remote_address", "192.168.1.1/32");
/// if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24").
#[prost(message, optional, tag = "1")]
pub v4_prefix_mask_len: ::core::option::Option<
super::super::super::super::super::super::google::protobuf::UInt32Value,
>,
/// Length of prefix mask len for IPv6 (e.g. 0, 128).
///
/// Defaults to 128 when unset.
///
/// For example, trusted address from x-forwarded-for is `2001:abcd:ef01:2345:6789:abcd:ef01:234`,
/// the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128");
/// if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64").
#[prost(message, optional, tag = "2")]
pub v6_prefix_mask_len: ::core::option::Option<
super::super::super::super::super::super::google::protobuf::UInt32Value,
>,
}
impl ::prost::Name for MaskedRemoteAddress {
const NAME: &'static str = "MaskedRemoteAddress";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.MaskedRemoteAddress"
.into()
}
}
/// The following descriptor entry is appended to the descriptor:
///
/// .. code-block:: cpp
///
/// ("generic_key", "\<descriptor_value>")
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenericKey {
/// Descriptor value of entry.
///
///
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here, however
/// unknown specifier values are replaced with the empty string instead of `-`.
///
///
/// .. note::
///
/// Formatter parsing is controlled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`
/// (disabled by default).
///
/// When enabled: The format string can contain multiple valid substitution
/// fields. If multiple substitution fields are present, their results will be concatenated
/// to form the final descriptor value. If it contains no substitution fields, the value
/// will be used as is. If the final concatenated result is empty and `default_value` is set,
/// the `default_value` will be used. If `default_value` is not set and the result is
/// empty, this descriptor will be skipped and not included in the rate limit call.
///
/// When disabled (default): The descriptor_value is used as a literal string without any formatter
/// parsing or substitution.
///
/// For example, `static_value` will be used as is since there are no substitution fields.
/// `%REQ(:method)%` will be replaced with the HTTP method, and
/// `%REQ(:method)%%REQ(:path)%` will be replaced with the concatenation of the HTTP method and path.
/// `%CEL(request.headers\['user-id'\])%` will use CEL to extract the user ID from request headers.
#[prost(string, tag = "1")]
pub descriptor_value: ::prost::alloc::string::String,
/// An optional value to use if the final concatenated `descriptor_value` result is empty.
/// Only applicable when formatter parsing is enabled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value` (disabled by default).
#[prost(string, tag = "3")]
pub default_value: ::prost::alloc::string::String,
/// An optional key to use in the descriptor entry. If not set it defaults
/// to 'generic_key' as the descriptor key.
#[prost(string, tag = "2")]
pub descriptor_key: ::prost::alloc::string::String,
}
impl ::prost::Name for GenericKey {
const NAME: &'static str = "GenericKey";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.GenericKey".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.GenericKey"
.into()
}
}
/// The following descriptor entry is appended to the descriptor:
///
/// .. code-block:: cpp
///
/// ("header_match", "\<descriptor_value>")
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeaderValueMatch {
/// Descriptor value of entry.
///
///
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here, however
/// unknown specifier values are replaced with the empty string instead of `-`.
///
///
/// .. note::
///
/// Formatter parsing is controlled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`
/// (disabled by default).
///
/// When enabled: The format string can contain multiple valid substitution
/// fields. If multiple substitution fields are present, their results will be concatenated
/// to form the final descriptor value. If it contains no substitution fields, the value
/// will be used as is. All substitution fields will be evaluated and their results
/// concatenated. If the final concatenated result is empty and `default_value` is set,
/// the `default_value` will be used. If `default_value` is not set and the result is
/// empty, this descriptor will be skipped and not included in the rate limit call.
///
/// When disabled (default): The descriptor_value is used as a literal string without any formatter
/// parsing or substitution.
///
/// For example, `static_value` will be used as is since there are no substitution fields.
/// `%REQ(:method)%` will be replaced with the HTTP method, and
/// `%REQ(:method)%%REQ(:path)%` will be replaced with the concatenation of the HTTP method and path.
/// `%CEL(request.headers\['user-id'\])%` will use CEL to extract the user ID from request headers.
#[prost(string, tag = "1")]
pub descriptor_value: ::prost::alloc::string::String,
/// An optional value to use if the final concatenated `descriptor_value` result is empty.
/// Only applicable when formatter parsing is enabled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value` (disabled by default).
#[prost(string, tag = "5")]
pub default_value: ::prost::alloc::string::String,
/// The key to use in the descriptor entry.
///
/// Defaults to `header_match`.
#[prost(string, tag = "4")]
pub descriptor_key: ::prost::alloc::string::String,
/// If set to true, the action will append a descriptor entry when the
/// request matches the headers. If set to false, the action will append a
/// descriptor entry when the request does not match the headers. The
/// default value is true.
#[prost(message, optional, tag = "2")]
pub expect_match: ::core::option::Option<
super::super::super::super::super::super::google::protobuf::BoolValue,
>,
/// Specifies a set of headers that the rate limit action should match
/// on. The action will check the request's headers against all the
/// specified headers in the config. A match will happen if all the
/// headers in the config are present in the request with the same values
/// (or based on presence if the value field is not in the config).
#[prost(message, repeated, tag = "3")]
pub headers: ::prost::alloc::vec::Vec<super::super::HeaderMatcher>,
}
impl ::prost::Name for HeaderValueMatch {
const NAME: &'static str = "HeaderValueMatch";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.HeaderValueMatch".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.HeaderValueMatch"
.into()
}
}
///
/// The following descriptor entry is appended when the
/// : ref:`dynamic metadata <well_known_dynamic_metadata>` contains a key value:
///
///
/// .. code-block:: cpp
///
/// ("\<descriptor_key>", "\<value_queried_from_dynamic_metadata>")
///
/// .. attention::
/// This action has been deprecated in favor of the :ref:`metadata <envoy_v3_api_msg_config.route.v3.RateLimit.Action.MetaData>` action
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DynamicMetaData {
/// The key to use in the descriptor entry.
#[prost(string, tag = "1")]
pub descriptor_key: ::prost::alloc::string::String,
/// Metadata struct that defines the key and path to retrieve the string value. A match will
/// only happen if the value in the dynamic metadata is of type string.
#[prost(message, optional, tag = "2")]
pub metadata_key: ::core::option::Option<
super::super::super::super::super::r#type::metadata::v3::MetadataKey,
>,
/// An optional value to use if `metadata_key` is empty. If not set and
/// no value is present under the metadata_key then no descriptor is generated.
#[prost(string, tag = "3")]
pub default_value: ::prost::alloc::string::String,
}
impl ::prost::Name for DynamicMetaData {
const NAME: &'static str = "DynamicMetaData";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.DynamicMetaData".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.DynamicMetaData"
.into()
}
}
/// The following descriptor entry is appended when the metadata contains a key value:
///
/// .. code-block:: cpp
///
/// ("\<descriptor_key>", "\<value_queried_from_metadata>")
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaData {
/// The key to use in the descriptor entry.
#[prost(string, tag = "1")]
pub descriptor_key: ::prost::alloc::string::String,
/// Metadata struct that defines the key and path to retrieve the string value. A match will
/// only happen if the value in the metadata is of type string.
#[prost(message, optional, tag = "2")]
pub metadata_key: ::core::option::Option<
super::super::super::super::super::r#type::metadata::v3::MetadataKey,
>,
/// An optional value to use if `metadata_key` is empty. If not set and
/// no value is present under the metadata_key then `skip_if_absent` is followed to
/// skip calling the rate limiting service or skip the descriptor.
#[prost(string, tag = "3")]
pub default_value: ::prost::alloc::string::String,
/// Source of metadata
#[prost(enumeration = "meta_data::Source", tag = "4")]
pub source: i32,
/// Controls the behavior when the specified `metadata_key` is empty and `default_value` is not set.
///
/// If set to `false` (default):
///
/// * Envoy does **NOT** call the rate limiting service for this descriptor.
/// * Useful if the metadata is optional and you prefer to skip rate limiting when it's absent.
///
/// If set to `true`:
///
/// * Envoy calls the rate limiting service but omits this descriptor if the `metadata_key` is empty and
/// `default_value` is missing.
/// * Useful if you want Envoy to enforce rate limiting even when the metadata is not present.
#[prost(bool, tag = "5")]
pub skip_if_absent: bool,
}
/// Nested message and enum types in `MetaData`.
pub mod meta_data {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Source {
/// Query :ref:`dynamic metadata <well_known_dynamic_metadata>`
Dynamic = 0,
/// Query :ref:`route entry metadata <envoy_v3_api_field_config.route.v3.Route.metadata>`
RouteEntry = 1,
}
impl Source {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Dynamic => "DYNAMIC",
Self::RouteEntry => "ROUTE_ENTRY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DYNAMIC" => Some(Self::Dynamic),
"ROUTE_ENTRY" => Some(Self::RouteEntry),
_ => None,
}
}
}
}
impl ::prost::Name for MetaData {
const NAME: &'static str = "MetaData";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.MetaData".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.MetaData"
.into()
}
}
/// The following descriptor entry is appended to the descriptor:
///
/// .. code-block:: cpp
///
/// ("query_match", "\<descriptor_value>")
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParameterValueMatch {
/// Descriptor value of entry.
///
///
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here, however
/// unknown specifier values are replaced with the empty string instead of `-`.
///
///
/// .. note::
///
/// Formatter parsing is controlled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`
/// (disabled by default).
///
/// When enabled: The format string can contain multiple valid substitution
/// fields. If multiple substitution fields are present, their results will be concatenated
/// to form the final descriptor value. If it contains no substitution fields, the value
/// will be used as is. All substitution fields will be evaluated and their results
/// concatenated. If the final concatenated result is empty and `default_value` is set,
/// the `default_value` will be used. If `default_value` is not set and the result is
/// empty, this descriptor will be skipped and not included in the rate limit call.
///
/// When disabled (default): The descriptor_value is used as a literal string without any formatter
/// parsing or substitution.
///
/// For example, `static_value` will be used as is since there are no substitution fields.
/// `%REQ(:method)%` will be replaced with the HTTP method, and
/// `%REQ(:method)%%REQ(:path)%` will be replaced with the concatenation of the HTTP method and path.
/// `%CEL(request.headers\['user-id'\])%` will use CEL to extract the user ID from request headers.
#[prost(string, tag = "1")]
pub descriptor_value: ::prost::alloc::string::String,
/// An optional value to use if the final concatenated `descriptor_value` result is empty.
/// Only applicable when formatter parsing is enabled by the runtime feature flag
/// `envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value` (disabled by default).
#[prost(string, tag = "5")]
pub default_value: ::prost::alloc::string::String,
/// The key to use in the descriptor entry.
///
/// Defaults to `query_match`.
#[prost(string, tag = "4")]
pub descriptor_key: ::prost::alloc::string::String,
/// If set to true, the action will append a descriptor entry when the
/// request matches the headers. If set to false, the action will append a
/// descriptor entry when the request does not match the headers. The
/// default value is true.
#[prost(message, optional, tag = "2")]
pub expect_match: ::core::option::Option<
super::super::super::super::super::super::google::protobuf::BoolValue,
>,
/// Specifies a set of query parameters that the rate limit action should match
/// on. The action will check the request's query parameters against all the
/// specified query parameters in the config. A match will happen if all the
/// query parameters in the config are present in the request with the same values
/// (or based on presence if the value field is not in the config).
#[prost(message, repeated, tag = "3")]
pub query_parameters: ::prost::alloc::vec::Vec<
super::super::QueryParameterMatcher,
>,
}
impl ::prost::Name for QueryParameterValueMatch {
const NAME: &'static str = "QueryParameterValueMatch";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action.QueryParameterValueMatch"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActionSpecifier {
/// Rate limit on source cluster.
#[prost(message, tag = "1")]
SourceCluster(SourceCluster),
/// Rate limit on destination cluster.
#[prost(message, tag = "2")]
DestinationCluster(DestinationCluster),
/// Rate limit on request headers.
#[prost(message, tag = "3")]
RequestHeaders(RequestHeaders),
/// Rate limit on query parameters.
#[prost(message, tag = "12")]
QueryParameters(QueryParameters),
/// Rate limit on remote address.
#[prost(message, tag = "4")]
RemoteAddress(RemoteAddress),
/// Rate limit on a generic key.
#[prost(message, tag = "5")]
GenericKey(GenericKey),
/// Rate limit on the existence of request headers.
#[prost(message, tag = "6")]
HeaderValueMatch(HeaderValueMatch),
/// Rate limit on dynamic metadata.
///
/// .. attention::
/// This field has been deprecated in favor of the :ref:`metadata <envoy_v3_api_field_config.route.v3.RateLimit.Action.metadata>` field
#[deprecated]
#[prost(message, tag = "7")]
DynamicMetadata(DynamicMetaData),
/// Rate limit on metadata.
#[prost(message, tag = "8")]
Metadata(MetaData),
///
/// Rate limit descriptor extension. See the rate limit descriptor extensions documentation.
/// : ref:`HTTP matching input functions <arch_overview_matching_api>` are
/// permitted as descriptor extensions. The input functions are only
/// looked up if there is no rate limit descriptor extension matching
/// the type URL.
///
///
/// \[\#extension-category: envoy.rate_limit_descriptors\]
#[prost(message, tag = "9")]
Extension(super::super::super::super::core::v3::TypedExtensionConfig),
/// Rate limit on masked remote address.
#[prost(message, tag = "10")]
MaskedRemoteAddress(MaskedRemoteAddress),
/// Rate limit on the existence of query parameters.
#[prost(message, tag = "11")]
QueryParameterValueMatch(QueryParameterValueMatch),
}
}
impl ::prost::Name for Action {
const NAME: &'static str = "Action";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Action".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Action".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Override {
#[prost(oneof = "r#override::OverrideSpecifier", tags = "1")]
pub override_specifier: ::core::option::Option<r#override::OverrideSpecifier>,
}
/// Nested message and enum types in `Override`.
pub mod r#override {
/// Fetches the override from the dynamic metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DynamicMetadata {
/// Metadata struct that defines the key and path to retrieve the struct value.
/// The value must be a struct containing an integer "requests_per_unit" property
/// and a "unit" property with a value parseable to :ref:`RateLimitUnit enum <envoy_v3_api_enum_type.v3.RateLimitUnit>`
#[prost(message, optional, tag = "1")]
pub metadata_key: ::core::option::Option<
super::super::super::super::super::r#type::metadata::v3::MetadataKey,
>,
}
impl ::prost::Name for DynamicMetadata {
const NAME: &'static str = "DynamicMetadata";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Override.DynamicMetadata".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Override.DynamicMetadata"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OverrideSpecifier {
/// Limit override from dynamic metadata.
#[prost(message, tag = "1")]
DynamicMetadata(DynamicMetadata),
}
}
impl ::prost::Name for Override {
const NAME: &'static str = "Override";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.Override".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.Override".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HitsAddend {
/// Fixed number of hits to add to the rate limit descriptor.
///
/// One of the `number` or `format` fields should be set but not both.
#[prost(message, optional, tag = "1")]
pub number: ::core::option::Option<
super::super::super::super::super::google::protobuf::UInt64Value,
>,
///
/// Substitution format string to extract the number of hits to add to the rate limit descriptor.
/// The same :ref:`format specifier <config_access_log_format>` as used for
/// : ref:`HTTP access logging <config_access_log>` applies here.
///
///
/// .. note::
///
/// The format string must contains only single valid substitution field. If the format string
/// not meets the requirement, the configuration will be rejected.
///
/// The substitution field should generates a non-negative number or string representation of
/// a non-negative number. The value of the non-negative number should be less than or equal
/// to 1000000000 like the `number` field. If the output of the substitution field not meet
/// the requirement, this will be treated as an error and the current descriptor will be ignored.
///
/// For example, the `%BYTES_RECEIVED%` format string will be replaced with the number of bytes
/// received in the request.
///
/// One of the `number` or `format` fields should be set but not both.
#[prost(string, tag = "2")]
pub format: ::prost::alloc::string::String,
}
impl ::prost::Name for HitsAddend {
const NAME: &'static str = "HitsAddend";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit.HitsAddend".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit.HitsAddend".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum XRateLimitOption {
/// X-RateLimit headers is not specified. When this enum is used at descriptor level,
/// the behavior is to inherit the setting from the filter.
Unspecified = 0,
/// X-RateLimit headers disabled.
Off = 1,
/// Use `draft RFC Version 03 <<https://tools.ietf.org/id/draft-polli-ratelimit-headers-03.html>`\_>
/// where 3 headers will be added:
///
/// * `X-RateLimit-Limit` - indicates the request-quota associated to the
/// client in the current time-window followed by the description of the
/// quota policy. The value is returned by the maximum tokens of the token bucket.
/// * `X-RateLimit-Remaining` - indicates the remaining requests in the
/// current time-window. The value is returned by the remaining tokens in the token bucket.
/// * `X-RateLimit-Reset` - indicates the number of seconds until reset of
/// the current time-window. The value is returned by the remaining fill interval of the token bucket.
DraftVersion03 = 2,
}
impl XRateLimitOption {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "UNSPECIFIED",
Self::Off => "OFF",
Self::DraftVersion03 => "DRAFT_VERSION_03",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"OFF" => Some(Self::Off),
"DRAFT_VERSION_03" => Some(Self::DraftVersion03),
_ => None,
}
}
}
}
impl ::prost::Name for RateLimit {
const NAME: &'static str = "RateLimit";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RateLimit".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RateLimit".into()
}
}
/// .. attention::
///
/// Internally, Envoy always uses the HTTP/2 `:authority` header to represent the HTTP/1 `Host`
/// header. Thus, if attempting to match on `Host`, match on `:authority` instead.
///
/// .. attention::
///
/// To route on HTTP method, use the special HTTP/2 `:method` header. This works for both
/// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g.,
///
/// .. code-block:: json
///
/// ```text
/// {
/// "name": ":method",
/// "string_match": {
/// "exact": "POST"
/// }
/// }
/// ```
///
/// .. attention::
/// In the absence of any header match specifier, match will default to :ref:`present_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.present_match>`. i.e, a request that has the :ref:`name <envoy_v3_api_field_config.route.v3.HeaderMatcher.name>` header will match, regardless of the header's
/// value.
///
/// \[\#next-major-version: HeaderMatcher should be refactored to use StringMatcher.\]
/// \[\#next-free-field: 15\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeaderMatcher {
/// Specifies the name of the header in the request.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// If specified, the match result will be inverted before checking.
///
/// Defaults to `false`.
///
/// Examples:
///
/// * The regex `\d{3}` does not match the value `1234`, so it will match when inverted.
/// * The range \[-10,0) will match the value -1, so it will not match when inverted.
#[prost(bool, tag = "8")]
pub invert_match: bool,
/// If specified, for any header match rule, if the header match rule specified header
/// does not exist, this header value will be treated as empty.
///
/// Defaults to `false`.
///
/// Examples:
///
/// *
/// The header match rule specified header "header1" to range match of \[0, 10\],
/// : ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
/// is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
/// is set to true; The "header1" header is not present. The match rule will
/// treat the "header1" as an empty header. The empty header does not match the range,
/// so it will match when inverted.
///
///
/// *
/// The header match rule specified header "header2" to range match of \[0, 10\],
/// : ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
/// is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
/// is set to false; The "header2" header is not present and the header
/// matcher rule for "header2" will be ignored so it will not match.
///
///
/// *
/// The header match rule specified header "header3" to a string regex match
/// `^$` which means an empty string, and
/// : ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
/// is set to true; The "header3" header is not present.
/// The match rule will treat the "header3" header as an empty header so it will match.
///
///
/// *
/// The header match rule specified header "header4" to a string regex match
/// `^$` which means an empty string, and
/// : ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
/// is set to false; The "header4" header is not present.
/// The match rule for "header4" will be ignored so it will not match.
///
#[prost(bool, tag = "14")]
pub treat_missing_header_as_empty: bool,
/// Specifies how the header match will be performed to route the request.
#[prost(
oneof = "header_matcher::HeaderMatchSpecifier",
tags = "4, 11, 6, 7, 9, 10, 12, 13"
)]
pub header_match_specifier: ::core::option::Option<
header_matcher::HeaderMatchSpecifier,
>,
}
/// Nested message and enum types in `HeaderMatcher`.
pub mod header_matcher {
/// Specifies how the header match will be performed to route the request.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum HeaderMatchSpecifier {
/// If specified, header match will be performed based on the value of the header.
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
#[deprecated]
#[prost(string, tag = "4")]
ExactMatch(::prost::alloc::string::String),
/// If specified, this regex string is a regular expression rule which implies the entire request
/// header value must match the regex. The rule will not match if only a subsequence of the
/// request header value matches the regex.
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
#[deprecated]
#[prost(message, tag = "11")]
SafeRegexMatch(super::super::super::super::r#type::matcher::v3::RegexMatcher),
/// If specified, header match will be performed based on range.
/// The rule will match if the request header value is within this range.
/// The entire request header value must represent an integer in base 10 notation: consisting of
/// an optional plus or minus sign followed by a sequence of digits. The rule will not match if
/// the header value does not represent an integer. Match will fail for empty values, floating
/// point numbers or if only a subsequence of the header value is an integer.
///
/// Examples:
///
/// * For range \[-10,0), route will match for header value -1, but not for 0, `somestring`, 10.9,
/// `-1somestring`
#[prost(message, tag = "6")]
RangeMatch(super::super::super::super::r#type::v3::Int64Range),
/// If specified as true, header match will be performed based on whether the header is in the
/// request. If specified as false, header match will be performed based on whether the header is absent.
#[prost(bool, tag = "7")]
PresentMatch(bool),
/// If specified, header match will be performed based on the prefix of the header value.
///
/// .. note::
///
/// Empty prefix is not allowed. Please use `present_match` instead.
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
///
/// Examples:
///
/// * The prefix `abcd` matches the value `abcdxyz`, but not for `abcxyz`.
#[deprecated]
#[prost(string, tag = "9")]
PrefixMatch(::prost::alloc::string::String),
/// If specified, header match will be performed based on the suffix of the header value.
///
/// .. note::
///
/// Empty suffix is not allowed. Please use `present_match` instead.
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
///
/// Examples:
///
/// * The suffix `abcd` matches the value `xyzabcd`, but not for `xyzbcd`.
#[deprecated]
#[prost(string, tag = "10")]
SuffixMatch(::prost::alloc::string::String),
/// If specified, header match will be performed based on whether the header value contains
/// the given value or not.
///
/// .. note::
///
/// Empty contains match is not allowed. Please use `present_match` instead.
///
/// .. attention::
///
/// This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
///
/// Examples:
///
/// * The value `abcd` matches the value `xyzabcdpqr`, but not for `xyzbcdpqr`.
#[deprecated]
#[prost(string, tag = "12")]
ContainsMatch(::prost::alloc::string::String),
/// If specified, header match will be performed based on the string match of the header value.
#[prost(message, tag = "13")]
StringMatch(super::super::super::super::r#type::matcher::v3::StringMatcher),
}
}
impl ::prost::Name for HeaderMatcher {
const NAME: &'static str = "HeaderMatcher";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.HeaderMatcher".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.HeaderMatcher".into()
}
}
/// Query parameter matching treats the query string of a request's :path header
/// as an ampersand-separated list of keys and/or key=value elements.
/// \[\#next-free-field: 7\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryParameterMatcher {
/// Specifies the name of a key that must be present in the requested
/// `path`'s query string.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(
oneof = "query_parameter_matcher::QueryParameterMatchSpecifier",
tags = "5, 6"
)]
pub query_parameter_match_specifier: ::core::option::Option<
query_parameter_matcher::QueryParameterMatchSpecifier,
>,
}
/// Nested message and enum types in `QueryParameterMatcher`.
pub mod query_parameter_matcher {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum QueryParameterMatchSpecifier {
/// Specifies whether a query parameter value should match against a string.
#[prost(message, tag = "5")]
StringMatch(super::super::super::super::r#type::matcher::v3::StringMatcher),
/// Specifies whether a query parameter should be present.
#[prost(bool, tag = "6")]
PresentMatch(bool),
}
}
impl ::prost::Name for QueryParameterMatcher {
const NAME: &'static str = "QueryParameterMatcher";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.QueryParameterMatcher".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.QueryParameterMatcher".into()
}
}
/// Cookie matching inspects individual name/value pairs parsed from the `Cookie` header.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CookieMatcher {
/// Specifies the cookie name to evaluate.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Match the cookie value using :ref:`StringMatcher <envoy_v3_api_msg_type.matcher.v3.StringMatcher>` semantics.
#[prost(message, optional, tag = "2")]
pub string_match: ::core::option::Option<
super::super::super::r#type::matcher::v3::StringMatcher,
>,
/// Invert the match result. If the cookie is not present, the match result is false, so
/// `invert_match` will cause the matcher to succeed when the cookie is absent.
#[prost(bool, tag = "3")]
pub invert_match: bool,
}
impl ::prost::Name for CookieMatcher {
const NAME: &'static str = "CookieMatcher";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.CookieMatcher".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.CookieMatcher".into()
}
}
/// HTTP Internal Redirect :ref:`architecture overview <arch_overview_internal_redirects>`.
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InternalRedirectPolicy {
/// An internal redirect is not handled, unless the number of previous internal redirects that a
/// downstream request has encountered is lower than this value.
/// In the case where a downstream request is bounced among multiple routes by internal redirect,
/// the first route that hits this threshold, or does not set :ref:`internal_redirect_policy <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_policy>`
/// will pass the redirect back to downstream.
///
/// If not specified, at most one redirect will be followed.
#[prost(message, optional, tag = "1")]
pub max_internal_redirects: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
/// Defines what upstream response codes are allowed to trigger internal redirect. If unspecified,
/// only 302 will be treated as internal redirect.
/// Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored.
#[prost(uint32, repeated, packed = "false", tag = "2")]
pub redirect_response_codes: ::prost::alloc::vec::Vec<u32>,
/// Specifies a list of predicates that are queried when an upstream response is deemed
/// to trigger an internal redirect by all other criteria. Any predicate in the list can reject
/// the redirect, causing the response to be proxied to downstream.
/// \[\#extension-category: envoy.internal_redirect_predicates\]
#[prost(message, repeated, tag = "3")]
pub predicates: ::prost::alloc::vec::Vec<
super::super::core::v3::TypedExtensionConfig,
>,
/// Allow internal redirect to follow a target URI with a different scheme than the value of
/// x-forwarded-proto. The default is `false`.
#[prost(bool, tag = "4")]
pub allow_cross_scheme_redirect: bool,
/// Specifies a list of headers, by name, to copy from the internal redirect into the subsequent
/// request. If a header is specified here but not present in the redirect, it will be cleared in
/// the subsequent request.
#[prost(string, repeated, tag = "5")]
pub response_headers_to_copy: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
impl ::prost::Name for InternalRedirectPolicy {
const NAME: &'static str = "InternalRedirectPolicy";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.InternalRedirectPolicy".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.InternalRedirectPolicy".into()
}
}
///
/// A simple wrapper for an HTTP filter config. This is intended to be used as a wrapper for the
/// map value in
/// : ref:`VirtualHost.typed_per_filter_config<envoy_v3_api_field_config.route.v3.VirtualHost.typed_per_filter_config>`,
/// : ref:`Route.typed_per_filter_config<envoy_v3_api_field_config.route.v3.Route.typed_per_filter_config>`,
/// or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config<envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.typed_per_filter_config>`
/// to add additional flags to the filter.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilterConfig {
/// The filter config.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<
super::super::super::super::google::protobuf::Any,
>,
/// If true, the filter is optional, meaning that if the client does
/// not support the specified filter, it may ignore the map entry rather
/// than rejecting the config.
#[prost(bool, tag = "2")]
pub is_optional: bool,
/// If true, the filter is disabled in the route or virtual host and the `config` field is ignored.
/// See :ref:`route based filter chain <arch_overview_http_filters_route_based_filter_chain>`
/// for more details.
///
/// .. note::
///
/// This field will take effect when the request arrive and filter chain is created for the request.
/// If initial route is selected for the request and a filter is disabled in the initial route, then
/// the filter will not be added to the filter chain.
/// And if the request is mutated later and re-match to another route, the disabled filter by the
/// initial route will not be added back to the filter chain because the filter chain is already
/// created and it is too late to change the chain.
#[prost(bool, tag = "3")]
pub disabled: bool,
}
impl ::prost::Name for FilterConfig {
const NAME: &'static str = "FilterConfig";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.FilterConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.FilterConfig".into()
}
}
/// \[\#next-free-field: 19\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteConfiguration {
///
/// The name of the route configuration. For example, it might match
/// : ref:`route_config_name <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.Rds.route_config_name>` in
/// : ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// An array of virtual hosts that make up the route table.
#[prost(message, repeated, tag = "2")]
pub virtual_hosts: ::prost::alloc::vec::Vec<VirtualHost>,
/// An array of virtual hosts will be dynamically loaded via the VHDS API.
/// Both `virtual_hosts` and `vhds` fields will be used when present. `virtual_hosts` can be used
/// for a base routing table or for infrequently changing virtual hosts. `vhds` is used for
/// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
/// generate a routing table for a given RouteConfiguration, with `vhds` derived configuration
/// taking precedence.
#[prost(message, optional, tag = "9")]
pub vhds: ::core::option::Option<Vhds>,
/// Optionally specifies a list of HTTP headers that the connection manager
/// will consider to be internal only. If they are found on external requests they will be cleaned
/// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
/// information.
#[prost(string, repeated, tag = "3")]
pub internal_only_headers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
///
/// Specifies a list of HTTP headers that should be added to each response that
/// the connection manager encodes. Headers specified at this level are applied
/// after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
/// header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "4")]
pub response_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each response
/// that the connection manager encodes.
#[prost(string, repeated, tag = "5")]
pub response_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
///
/// Specifies a list of HTTP headers that should be added to each request
/// routed by the HTTP connection manager. Headers specified at this level are
/// applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
/// header value syntax, see the documentation on :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
#[prost(message, repeated, tag = "6")]
pub request_headers_to_add: ::prost::alloc::vec::Vec<
super::super::core::v3::HeaderValueOption,
>,
/// Specifies a list of HTTP headers that should be removed from each request
/// routed by the HTTP connection manager.
#[prost(string, repeated, tag = "8")]
pub request_headers_to_remove: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
/// Headers mutations at all levels are evaluated, if specified. By default, the order is from most
/// specific (i.e. route entry level) to least specific (i.e. route configuration level). Later header
/// mutations may override earlier mutations.
/// This order can be reversed by setting this field to true. In other words, most specific level mutation
/// is evaluated last.
#[prost(bool, tag = "10")]
pub most_specific_header_mutations_wins: bool,
///
/// An optional boolean that specifies whether the clusters that the route
/// table refers to will be validated by the cluster manager. If set to true
/// and a route refers to a non-existent cluster, the route table will not
/// load. If set to false and a route refers to a non-existent cluster, the
/// route table will load and the router filter will return a 404 if the route
/// is selected at runtime. This setting defaults to true if the route table
/// is statically defined via the :ref:`route_config <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config>`
/// option. This setting default to false if the route table is loaded dynamically via the
/// : ref:`rds <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds>`
/// option. Users may wish to override the default behavior in certain cases (for example when
/// using CDS with a static route table).
#[prost(message, optional, tag = "7")]
pub validate_clusters: ::core::option::Option<
super::super::super::super::google::protobuf::BoolValue,
>,
/// The maximum bytes of the response :ref:`direct response body <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` size. If not specified the default
/// is 4096.
///
/// .. warning::
///
/// Envoy currently holds the content of :ref:`direct response body <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` in memory. Be careful setting
/// this to be larger than the default 4KB, since the allocated memory for direct response body
/// is not subject to data plane buffering controls.
#[prost(message, optional, tag = "11")]
pub max_direct_response_body_size_bytes: ::core::option::Option<
super::super::super::super::google::protobuf::UInt32Value,
>,
///
/// A list of plugins and their configurations which may be used by a
/// : ref:`cluster specifier plugin name <envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin>`
/// within the route. All `extension.name` fields in this list must be unique.
#[prost(message, repeated, tag = "12")]
pub cluster_specifier_plugins: ::prost::alloc::vec::Vec<ClusterSpecifierPlugin>,
/// Specify a set of default request mirroring policies which apply to all routes under its virtual hosts.
/// Note that policies are not merged, the most specific non-empty one becomes the mirror policies.
#[prost(message, repeated, tag = "13")]
pub request_mirror_policies: ::prost::alloc::vec::Vec<
route_action::RequestMirrorPolicy,
>,
/// By default, port in :authority header (if any) is used in host matching.
/// With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost.
///
/// .. note::
/// This option will not strip the port number (if any) contained in route config
/// :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field.
#[prost(bool, tag = "14")]
pub ignore_port_in_host_matching: bool,
/// Normally, virtual host matching is done using the :authority (or
/// Host: in HTTP \< 2) HTTP header. Setting this will instead, use a
/// different HTTP header for this purpose.
#[prost(string, tag = "18")]
pub vhost_header: ::prost::alloc::string::String,
/// Ignore path-parameters in path-matching.
/// Before RFC3986, URI were like(RFC1808): <scheme>://\<net_loc>/<path>;<params>?<query>\#<fragment>
/// Envoy by default takes ":path" as "<path>;<params>".
/// For users who want to only match path on the "<path>" portion, this option should be true.
#[prost(bool, tag = "15")]
pub ignore_path_parameters_in_path_matching: bool,
///
/// This field can be used to provide RouteConfiguration level per filter config. The key should match the
/// : ref:`filter config name <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpFilter.name>`.
/// See :ref:`Http filter route specific config <arch_overview_http_filters_per_filter_config>`
/// for details.
/// \[\#comment: An entry's value may be wrapped in a
/// : ref:`FilterConfig<envoy_v3_api_msg_config.route.v3.FilterConfig>`
/// message to specify additional options.\]
#[prost(map = "string, message", tag = "16")]
pub typed_per_filter_config: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::super::super::google::protobuf::Any,
>,
/// The metadata field can be used to provide additional information
/// about the route configuration. It can be used for configuration, stats, and logging.
/// The metadata should go under the filter namespace that will need it.
/// For instance, if the metadata is intended for the Router filter,
/// the filter name should be specified as `envoy.filters.http.router`.
#[prost(message, optional, tag = "17")]
pub metadata: ::core::option::Option<super::super::core::v3::Metadata>,
}
impl ::prost::Name for RouteConfiguration {
const NAME: &'static str = "RouteConfiguration";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.RouteConfiguration".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.RouteConfiguration".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vhds {
/// Configuration source specifier for VHDS.
#[prost(message, optional, tag = "1")]
pub config_source: ::core::option::Option<super::super::core::v3::ConfigSource>,
}
impl ::prost::Name for Vhds {
const NAME: &'static str = "Vhds";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.Vhds".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.Vhds".into()
}
}
///
/// Specifies a routing scope, which associates a
/// : ref:`Key<envoy_v3_api_msg_config.route.v3.ScopedRouteConfiguration.Key>` to a
/// : ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`.
/// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically
/// via RDS (:ref:`route_configuration_name<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration_name>`)
/// or specified inline (:ref:`route_configuration<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration>`).
///
/// The HTTP connection manager builds up a table consisting of these Key to
/// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
/// request according to the algorithm specified in the
/// : ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
/// assigned to the HttpConnectionManager.
///
///
/// For example, with the following configurations (in YAML):
///
/// HttpConnectionManager config:
///
/// .. code::
///
/// ...
/// scoped_routes:
/// name: foo-scoped-routes
/// scope_key_builder:
/// fragments:
/// - header_value_extractor:
/// name: X-Route-Selector
/// element_separator: ","
/// element:
/// separator: =
/// key: vip
///
///
/// ScopedRouteConfiguration resources (specified statically via
/// : ref:`scoped_route_configurations_list<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list>`
/// or obtained dynamically via SRDS):
///
///
/// .. code::
///
/// (1)
/// name: route-scope1
/// route_configuration_name: route-config1
/// key:
/// fragments:
/// - string_key: 172.10.10.20
///
/// (2)
/// name: route-scope2
/// route_configuration_name: route-config2
/// key:
/// fragments:
/// - string_key: 172.20.20.30
///
/// A request from a client such as:
///
/// .. code::
///
/// ```text
/// GET / HTTP/1.1
/// Host: foo.com
/// X-Route-Selector: vip=172.10.10.20
/// ```
///
/// would result in the routing table defined by the `route-config1`
/// RouteConfiguration being assigned to the HTTP request/stream.
///
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScopedRouteConfiguration {
/// Whether the RouteConfiguration should be loaded on demand.
#[prost(bool, tag = "4")]
pub on_demand: bool,
/// The name assigned to the routing scope.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
/// RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
/// with this scope.
#[prost(string, tag = "2")]
pub route_configuration_name: ::prost::alloc::string::String,
/// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope.
#[prost(message, optional, tag = "5")]
pub route_configuration: ::core::option::Option<RouteConfiguration>,
/// The key to match against.
#[prost(message, optional, tag = "3")]
pub key: ::core::option::Option<scoped_route_configuration::Key>,
}
/// Nested message and enum types in `ScopedRouteConfiguration`.
pub mod scoped_route_configuration {
///
/// Specifies a key which is matched against the output of the
/// : ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
/// specified in the HttpConnectionManager. The matching is done per HTTP
/// request and is dependent on the order of the fragments contained in the
/// Key.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Key {
///
/// The ordered set of fragments to match against. The order must match the
/// fragments in the corresponding
/// : ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
#[prost(message, repeated, tag = "1")]
pub fragments: ::prost::alloc::vec::Vec<key::Fragment>,
}
/// Nested message and enum types in `Key`.
pub mod key {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Fragment {
#[prost(oneof = "fragment::Type", tags = "1")]
pub r#type: ::core::option::Option<fragment::Type>,
}
/// Nested message and enum types in `Fragment`.
pub mod fragment {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Type {
/// A string to match against.
#[prost(string, tag = "1")]
StringKey(::prost::alloc::string::String),
}
}
impl ::prost::Name for Fragment {
const NAME: &'static str = "Fragment";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment"
.into()
}
}
}
impl ::prost::Name for Key {
const NAME: &'static str = "Key";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.ScopedRouteConfiguration.Key".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.ScopedRouteConfiguration.Key"
.into()
}
}
}
impl ::prost::Name for ScopedRouteConfiguration {
const NAME: &'static str = "ScopedRouteConfiguration";
const PACKAGE: &'static str = "envoy.config.route.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.route.v3.ScopedRouteConfiguration".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.route.v3.ScopedRouteConfiguration".into()
}
}