@@ -10,18 +10,7 @@ mod prelude {
1010}
1111use self :: prelude:: * ;
1212#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
13- pub struct HeaderModifierRules {
14- pub name : String ,
15- pub value : String ,
16- }
17- #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
18- pub struct Kind {
19- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
20- pub group : Option < String > ,
21- pub kind : String ,
22- }
23- #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
24- pub struct MirrorBackendRef {
13+ pub struct RouteRef {
2514 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
2615 pub group : Option < String > ,
2716 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
@@ -31,9 +20,11 @@ pub struct MirrorBackendRef {
3120 pub namespace : Option < String > ,
3221 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
3322 pub port : Option < i32 > ,
23+ #[ serde( default , skip_serializing_if = "Option::is_none" , rename = "sectionName" ) ]
24+ pub section_name : Option < String > ,
3425}
3526#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
36- pub struct RouteRef {
27+ pub struct MirrorBackendRef {
3728 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
3829 pub group : Option < String > ,
3930 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
@@ -43,8 +34,18 @@ pub struct RouteRef {
4334 pub namespace : Option < String > ,
4435 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
4536 pub port : Option < i32 > ,
46- #[ serde( default , skip_serializing_if = "Option::is_none" , rename = "sectionName" ) ]
47- pub section_name : Option < String > ,
37+ }
38+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
39+ pub struct Kind {
40+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
41+ pub group : Option < String > ,
42+ pub kind : String ,
43+ }
44+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
45+ pub struct ExtensionBackendRef {
46+ pub group : String ,
47+ pub kind : String ,
48+ pub name : String ,
4849}
4950#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
5051pub struct GatewayAddress {
@@ -53,10 +54,77 @@ pub struct GatewayAddress {
5354 pub value : String ,
5455}
5556#[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , Default , PartialEq ) ]
56- pub struct ExtensionBackendRef {
57- pub group : String ,
58- pub kind : String ,
57+ pub struct HeaderModifierRules {
5958 pub name : String ,
59+ pub value : String ,
60+ }
61+ /// RequestRedirect defines a schema for a filter that responds to the
62+ /// request with an HTTP redirection.
63+ ///
64+ /// Support: Core
65+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
66+ pub enum FiltersHTTPRedirectRequestRouteRulesScheme {
67+ #[ serde( rename = "http" ) ]
68+ Http ,
69+ #[ serde( rename = "https" ) ]
70+ Https ,
71+ }
72+ /// RequestRedirect defines a schema for a filter that responds to the
73+ /// request with an HTTP redirection.
74+ ///
75+ /// Support: Core
76+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
77+ pub enum CodeFiltersHTTPRedirectRequestRouteRulesStatus {
78+ #[ serde( rename = "301" ) ]
79+ r#_301,
80+ #[ serde( rename = "302" ) ]
81+ r#_302,
82+ }
83+ /// GRPCRouteFilter defines processing steps that must be completed during the
84+ /// request or response lifecycle. GRPCRouteFilters are meant as an extension
85+ /// point to express processing that may be done in Gateway implementations. Some
86+ /// examples include request or response modification, implementing
87+ /// authentication strategies, rate-limiting, and traffic shaping. API
88+ /// guarantee/conformance is defined based on the type of the filter.
89+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
90+ pub enum FiltersGRPCRouteRulesType {
91+ ResponseHeaderModifier ,
92+ RequestHeaderModifier ,
93+ RequestMirror ,
94+ ExtensionRef ,
95+ }
96+ /// GRPCHeaderMatch describes how to select a gRPC route by matching gRPC request
97+ /// headers.
98+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
99+ pub enum MatchesRouteRulesType {
100+ Exact ,
101+ RegularExpression ,
102+ }
103+ /// Path defines parameters used to modify the path of the incoming request.
104+ /// The modified path is then used to construct the `Location` header. When
105+ /// empty, the request path is used as-is.
106+ ///
107+ /// Support: Extended
108+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
109+ pub enum FiltersHTTPPathRouteRulesType {
110+ ReplaceFullPath ,
111+ ReplacePrefixMatch ,
112+ }
113+ /// HTTPRouteFilter defines processing steps that must be completed during the
114+ /// request or response lifecycle. HTTPRouteFilters are meant as an extension
115+ /// point to express processing that may be done in Gateway implementations. Some
116+ /// examples include request or response modification, implementing
117+ /// authentication strategies, rate-limiting, and traffic shaping. API
118+ /// guarantee/conformance is defined based on the type of the filter.
119+ #[ derive( Serialize , Deserialize , Clone , Debug , JsonSchema , PartialEq ) ]
120+ pub enum FiltersHTTPRouteRulesType {
121+ RequestHeaderModifier ,
122+ ResponseHeaderModifier ,
123+ RequestMirror ,
124+ RequestRedirect ,
125+ #[ serde( rename = "URLRewrite" ) ]
126+ UrlRewrite ,
127+ ExtensionRef ,
60128}
61129
62130
0 commit comments