quilkin_proto/generated/envoy/config/route/
v3.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct VirtualHost {
4    #[prost(string, tag = "1")]
5    pub name: ::prost::alloc::string::String,
6    #[prost(string, repeated, tag = "2")]
7    pub domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
8    #[prost(message, repeated, tag = "3")]
9    pub routes: ::prost::alloc::vec::Vec<Route>,
10    #[prost(message, optional, tag = "21")]
11    pub matcher:
12        ::core::option::Option<super::super::super::super::xds::kind::matcher::v3::Matcher>,
13    #[prost(enumeration = "virtual_host::TlsRequirementType", tag = "4")]
14    pub require_tls: i32,
15    #[prost(message, repeated, tag = "5")]
16    pub virtual_clusters: ::prost::alloc::vec::Vec<VirtualCluster>,
17    #[prost(message, repeated, tag = "6")]
18    pub rate_limits: ::prost::alloc::vec::Vec<RateLimit>,
19    #[prost(message, repeated, tag = "7")]
20    pub request_headers_to_add: ::prost::alloc::vec::Vec<super::super::core::v3::HeaderValueOption>,
21    #[prost(string, repeated, tag = "13")]
22    pub request_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
23    #[prost(message, repeated, tag = "10")]
24    pub response_headers_to_add:
25        ::prost::alloc::vec::Vec<super::super::core::v3::HeaderValueOption>,
26    #[prost(string, repeated, tag = "11")]
27    pub response_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
28    #[prost(message, optional, tag = "8")]
29    pub cors: ::core::option::Option<CorsPolicy>,
30    #[prost(map = "string, message", tag = "15")]
31    pub typed_per_filter_config:
32        ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Any>,
33    #[prost(bool, tag = "14")]
34    pub include_request_attempt_count: bool,
35    #[prost(bool, tag = "19")]
36    pub include_attempt_count_in_response: bool,
37    #[prost(message, optional, tag = "16")]
38    pub retry_policy: ::core::option::Option<RetryPolicy>,
39    #[prost(message, optional, tag = "20")]
40    pub retry_policy_typed_config: ::core::option::Option<::prost_types::Any>,
41    #[prost(message, optional, tag = "17")]
42    pub hedge_policy: ::core::option::Option<HedgePolicy>,
43    #[prost(message, optional, tag = "18")]
44    pub per_request_buffer_limit_bytes: ::core::option::Option<u32>,
45}
46/// Nested message and enum types in `VirtualHost`.
47pub mod virtual_host {
48    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
49    #[repr(i32)]
50    pub enum TlsRequirementType {
51        None = 0,
52        ExternalOnly = 1,
53        All = 2,
54    }
55    impl TlsRequirementType {
56        /// String value of the enum field names used in the ProtoBuf definition.
57        ///
58        /// The values are not transformed in any way and thus are considered stable
59        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
60        pub fn as_str_name(&self) -> &'static str {
61            match self {
62                Self::None => "NONE",
63                Self::ExternalOnly => "EXTERNAL_ONLY",
64                Self::All => "ALL",
65            }
66        }
67        /// Creates an enum from field names used in the ProtoBuf definition.
68        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
69            match value {
70                "NONE" => Some(Self::None),
71                "EXTERNAL_ONLY" => Some(Self::ExternalOnly),
72                "ALL" => Some(Self::All),
73                _ => None,
74            }
75        }
76    }
77}
78#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
79pub struct FilterAction {
80    #[prost(message, optional, tag = "1")]
81    pub action: ::core::option::Option<::prost_types::Any>,
82}
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct Route {
85    #[prost(string, tag = "14")]
86    pub name: ::prost::alloc::string::String,
87    #[prost(message, optional, tag = "1")]
88    pub r#match: ::core::option::Option<RouteMatch>,
89    #[prost(message, optional, tag = "4")]
90    pub metadata: ::core::option::Option<super::super::core::v3::Metadata>,
91    #[prost(message, optional, tag = "5")]
92    pub decorator: ::core::option::Option<Decorator>,
93    #[prost(map = "string, message", tag = "13")]
94    pub typed_per_filter_config:
95        ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Any>,
96    #[prost(message, repeated, tag = "9")]
97    pub request_headers_to_add: ::prost::alloc::vec::Vec<super::super::core::v3::HeaderValueOption>,
98    #[prost(string, repeated, tag = "12")]
99    pub request_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
100    #[prost(message, repeated, tag = "10")]
101    pub response_headers_to_add:
102        ::prost::alloc::vec::Vec<super::super::core::v3::HeaderValueOption>,
103    #[prost(string, repeated, tag = "11")]
104    pub response_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
105    #[prost(message, optional, tag = "15")]
106    pub tracing: ::core::option::Option<Tracing>,
107    #[prost(message, optional, tag = "16")]
108    pub per_request_buffer_limit_bytes: ::core::option::Option<u32>,
109    #[prost(oneof = "route::Action", tags = "2, 3, 7, 17, 18")]
110    pub action: ::core::option::Option<route::Action>,
111}
112/// Nested message and enum types in `Route`.
113pub mod route {
114    #[derive(Clone, PartialEq, ::prost::Oneof)]
115    pub enum Action {
116        #[prost(message, tag = "2")]
117        Route(super::RouteAction),
118        #[prost(message, tag = "3")]
119        Redirect(super::RedirectAction),
120        #[prost(message, tag = "7")]
121        DirectResponse(super::DirectResponseAction),
122        #[prost(message, tag = "17")]
123        FilterAction(super::FilterAction),
124        #[prost(message, tag = "18")]
125        NonForwardingAction(super::NonForwardingAction),
126    }
127}
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct WeightedCluster {
130    #[prost(message, repeated, tag = "1")]
131    pub clusters: ::prost::alloc::vec::Vec<weighted_cluster::ClusterWeight>,
132    #[prost(message, optional, tag = "3")]
133    pub total_weight: ::core::option::Option<u32>,
134    #[prost(string, tag = "2")]
135    pub runtime_key_prefix: ::prost::alloc::string::String,
136    #[prost(oneof = "weighted_cluster::RandomValueSpecifier", tags = "4")]
137    pub random_value_specifier: ::core::option::Option<weighted_cluster::RandomValueSpecifier>,
138}
139/// Nested message and enum types in `WeightedCluster`.
140pub mod weighted_cluster {
141    #[derive(Clone, PartialEq, ::prost::Message)]
142    pub struct ClusterWeight {
143        #[prost(string, tag = "1")]
144        pub name: ::prost::alloc::string::String,
145        #[prost(string, tag = "12")]
146        pub cluster_header: ::prost::alloc::string::String,
147        #[prost(message, optional, tag = "2")]
148        pub weight: ::core::option::Option<u32>,
149        #[prost(message, optional, tag = "3")]
150        pub metadata_match: ::core::option::Option<super::super::super::core::v3::Metadata>,
151        #[prost(message, repeated, tag = "4")]
152        pub request_headers_to_add:
153            ::prost::alloc::vec::Vec<super::super::super::core::v3::HeaderValueOption>,
154        #[prost(string, repeated, tag = "9")]
155        pub request_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
156        #[prost(message, repeated, tag = "5")]
157        pub response_headers_to_add:
158            ::prost::alloc::vec::Vec<super::super::super::core::v3::HeaderValueOption>,
159        #[prost(string, repeated, tag = "6")]
160        pub response_headers_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
161        #[prost(map = "string, message", tag = "10")]
162        pub typed_per_filter_config:
163            ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::Any>,
164        #[prost(oneof = "cluster_weight::HostRewriteSpecifier", tags = "11")]
165        pub host_rewrite_specifier: ::core::option::Option<cluster_weight::HostRewriteSpecifier>,
166    }
167    /// Nested message and enum types in `ClusterWeight`.
168    pub mod cluster_weight {
169        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
170        pub enum HostRewriteSpecifier {
171            #[prost(string, tag = "11")]
172            HostRewriteLiteral(::prost::alloc::string::String),
173        }
174    }
175    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
176    pub enum RandomValueSpecifier {
177        #[prost(string, tag = "4")]
178        HeaderName(::prost::alloc::string::String),
179    }
180}
181#[derive(Clone, PartialEq, ::prost::Message)]
182pub struct RouteMatch {
183    #[prost(message, optional, tag = "4")]
184    pub case_sensitive: ::core::option::Option<bool>,
185    #[prost(message, optional, tag = "9")]
186    pub runtime_fraction: ::core::option::Option<super::super::core::v3::RuntimeFractionalPercent>,
187    #[prost(message, repeated, tag = "6")]
188    pub headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
189    #[prost(message, repeated, tag = "7")]
190    pub query_parameters: ::prost::alloc::vec::Vec<QueryParameterMatcher>,
191    #[prost(message, optional, tag = "8")]
192    pub grpc: ::core::option::Option<route_match::GrpcRouteMatchOptions>,
193    #[prost(message, optional, tag = "11")]
194    pub tls_context: ::core::option::Option<route_match::TlsContextMatchOptions>,
195    #[prost(message, repeated, tag = "13")]
196    pub dynamic_metadata:
197        ::prost::alloc::vec::Vec<super::super::super::kind::matcher::v3::MetadataMatcher>,
198    #[prost(oneof = "route_match::PathSpecifier", tags = "1, 2, 10, 12")]
199    pub path_specifier: ::core::option::Option<route_match::PathSpecifier>,
200}
201/// Nested message and enum types in `RouteMatch`.
202pub mod route_match {
203    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
204    pub struct GrpcRouteMatchOptions {}
205    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
206    pub struct TlsContextMatchOptions {
207        #[prost(message, optional, tag = "1")]
208        pub presented: ::core::option::Option<bool>,
209        #[prost(message, optional, tag = "2")]
210        pub validated: ::core::option::Option<bool>,
211    }
212    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
213    pub struct ConnectMatcher {}
214    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
215    pub enum PathSpecifier {
216        #[prost(string, tag = "1")]
217        Prefix(::prost::alloc::string::String),
218        #[prost(string, tag = "2")]
219        Path(::prost::alloc::string::String),
220        #[prost(message, tag = "10")]
221        SafeRegex(super::super::super::super::kind::matcher::v3::RegexMatcher),
222        #[prost(message, tag = "12")]
223        ConnectMatcher(ConnectMatcher),
224    }
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
227pub struct CorsPolicy {
228    #[prost(message, repeated, tag = "11")]
229    pub allow_origin_string_match:
230        ::prost::alloc::vec::Vec<super::super::super::kind::matcher::v3::StringMatcher>,
231    #[prost(string, tag = "2")]
232    pub allow_methods: ::prost::alloc::string::String,
233    #[prost(string, tag = "3")]
234    pub allow_headers: ::prost::alloc::string::String,
235    #[prost(string, tag = "4")]
236    pub expose_headers: ::prost::alloc::string::String,
237    #[prost(string, tag = "5")]
238    pub max_age: ::prost::alloc::string::String,
239    #[prost(message, optional, tag = "6")]
240    pub allow_credentials: ::core::option::Option<bool>,
241    #[prost(message, optional, tag = "10")]
242    pub shadow_enabled: ::core::option::Option<super::super::core::v3::RuntimeFractionalPercent>,
243    #[prost(oneof = "cors_policy::EnabledSpecifier", tags = "9")]
244    pub enabled_specifier: ::core::option::Option<cors_policy::EnabledSpecifier>,
245}
246/// Nested message and enum types in `CorsPolicy`.
247pub mod cors_policy {
248    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
249    pub enum EnabledSpecifier {
250        #[prost(message, tag = "9")]
251        FilterEnabled(super::super::super::core::v3::RuntimeFractionalPercent),
252    }
253}
254#[derive(Clone, PartialEq, ::prost::Message)]
255pub struct RouteAction {
256    #[prost(enumeration = "route_action::ClusterNotFoundResponseCode", tag = "20")]
257    pub cluster_not_found_response_code: i32,
258    #[prost(message, optional, tag = "4")]
259    pub metadata_match: ::core::option::Option<super::super::core::v3::Metadata>,
260    #[prost(string, tag = "5")]
261    pub prefix_rewrite: ::prost::alloc::string::String,
262    #[prost(message, optional, tag = "32")]
263    pub regex_rewrite:
264        ::core::option::Option<super::super::super::kind::matcher::v3::RegexMatchAndSubstitute>,
265    #[prost(bool, tag = "38")]
266    pub append_x_forwarded_host: bool,
267    #[prost(message, optional, tag = "8")]
268    pub timeout: ::core::option::Option<::prost_types::Duration>,
269    #[prost(message, optional, tag = "24")]
270    pub idle_timeout: ::core::option::Option<::prost_types::Duration>,
271    #[prost(message, optional, tag = "9")]
272    pub retry_policy: ::core::option::Option<RetryPolicy>,
273    #[prost(message, optional, tag = "33")]
274    pub retry_policy_typed_config: ::core::option::Option<::prost_types::Any>,
275    #[prost(message, repeated, tag = "30")]
276    pub request_mirror_policies: ::prost::alloc::vec::Vec<route_action::RequestMirrorPolicy>,
277    #[prost(enumeration = "super::super::core::v3::RoutingPriority", tag = "11")]
278    pub priority: i32,
279    #[prost(message, repeated, tag = "13")]
280    pub rate_limits: ::prost::alloc::vec::Vec<RateLimit>,
281    #[deprecated]
282    #[prost(message, optional, tag = "14")]
283    pub include_vh_rate_limits: ::core::option::Option<bool>,
284    #[prost(message, repeated, tag = "15")]
285    pub hash_policy: ::prost::alloc::vec::Vec<route_action::HashPolicy>,
286    #[prost(message, optional, tag = "17")]
287    pub cors: ::core::option::Option<CorsPolicy>,
288    #[deprecated]
289    #[prost(message, optional, tag = "23")]
290    pub max_grpc_timeout: ::core::option::Option<::prost_types::Duration>,
291    #[deprecated]
292    #[prost(message, optional, tag = "28")]
293    pub grpc_timeout_offset: ::core::option::Option<::prost_types::Duration>,
294    #[prost(message, repeated, tag = "25")]
295    pub upgrade_configs: ::prost::alloc::vec::Vec<route_action::UpgradeConfig>,
296    #[prost(message, optional, tag = "34")]
297    pub internal_redirect_policy: ::core::option::Option<InternalRedirectPolicy>,
298    #[deprecated]
299    #[prost(enumeration = "route_action::InternalRedirectAction", tag = "26")]
300    pub internal_redirect_action: i32,
301    #[deprecated]
302    #[prost(message, optional, tag = "31")]
303    pub max_internal_redirects: ::core::option::Option<u32>,
304    #[prost(message, optional, tag = "27")]
305    pub hedge_policy: ::core::option::Option<HedgePolicy>,
306    #[prost(message, optional, tag = "36")]
307    pub max_stream_duration: ::core::option::Option<route_action::MaxStreamDuration>,
308    #[prost(oneof = "route_action::ClusterSpecifier", tags = "1, 2, 3, 37")]
309    pub cluster_specifier: ::core::option::Option<route_action::ClusterSpecifier>,
310    #[prost(oneof = "route_action::HostRewriteSpecifier", tags = "6, 7, 29, 35")]
311    pub host_rewrite_specifier: ::core::option::Option<route_action::HostRewriteSpecifier>,
312}
313/// Nested message and enum types in `RouteAction`.
314pub mod route_action {
315    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
316    pub struct RequestMirrorPolicy {
317        #[prost(string, tag = "1")]
318        pub cluster: ::prost::alloc::string::String,
319        #[prost(message, optional, tag = "3")]
320        pub runtime_fraction:
321            ::core::option::Option<super::super::super::core::v3::RuntimeFractionalPercent>,
322        #[prost(message, optional, tag = "4")]
323        pub trace_sampled: ::core::option::Option<bool>,
324    }
325    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
326    pub struct HashPolicy {
327        #[prost(bool, tag = "4")]
328        pub terminal: bool,
329        #[prost(oneof = "hash_policy::PolicySpecifier", tags = "1, 2, 3, 5, 6")]
330        pub policy_specifier: ::core::option::Option<hash_policy::PolicySpecifier>,
331    }
332    /// Nested message and enum types in `HashPolicy`.
333    pub mod hash_policy {
334        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
335        pub struct Header {
336            #[prost(string, tag = "1")]
337            pub header_name: ::prost::alloc::string::String,
338            #[prost(message, optional, tag = "2")]
339            pub regex_rewrite: ::core::option::Option<
340                super::super::super::super::super::kind::matcher::v3::RegexMatchAndSubstitute,
341            >,
342        }
343        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
344        pub struct Cookie {
345            #[prost(string, tag = "1")]
346            pub name: ::prost::alloc::string::String,
347            #[prost(message, optional, tag = "2")]
348            pub ttl: ::core::option::Option<::prost_types::Duration>,
349            #[prost(string, tag = "3")]
350            pub path: ::prost::alloc::string::String,
351        }
352        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
353        pub struct ConnectionProperties {
354            #[prost(bool, tag = "1")]
355            pub source_ip: bool,
356        }
357        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
358        pub struct QueryParameter {
359            #[prost(string, tag = "1")]
360            pub name: ::prost::alloc::string::String,
361        }
362        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
363        pub struct FilterState {
364            #[prost(string, tag = "1")]
365            pub key: ::prost::alloc::string::String,
366        }
367        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
368        pub enum PolicySpecifier {
369            #[prost(message, tag = "1")]
370            Header(Header),
371            #[prost(message, tag = "2")]
372            Cookie(Cookie),
373            #[prost(message, tag = "3")]
374            ConnectionProperties(ConnectionProperties),
375            #[prost(message, tag = "5")]
376            QueryParameter(QueryParameter),
377            #[prost(message, tag = "6")]
378            FilterState(FilterState),
379        }
380    }
381    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
382    pub struct UpgradeConfig {
383        #[prost(string, tag = "1")]
384        pub upgrade_type: ::prost::alloc::string::String,
385        #[prost(message, optional, tag = "2")]
386        pub enabled: ::core::option::Option<bool>,
387        #[prost(message, optional, tag = "3")]
388        pub connect_config: ::core::option::Option<upgrade_config::ConnectConfig>,
389    }
390    /// Nested message and enum types in `UpgradeConfig`.
391    pub mod upgrade_config {
392        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
393        pub struct ConnectConfig {
394            #[prost(message, optional, tag = "1")]
395            pub proxy_protocol_config:
396                ::core::option::Option<super::super::super::super::core::v3::ProxyProtocolConfig>,
397            #[prost(bool, tag = "2")]
398            pub allow_post: bool,
399        }
400    }
401    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
402    pub struct MaxStreamDuration {
403        #[prost(message, optional, tag = "1")]
404        pub max_stream_duration: ::core::option::Option<::prost_types::Duration>,
405        #[prost(message, optional, tag = "2")]
406        pub grpc_timeout_header_max: ::core::option::Option<::prost_types::Duration>,
407        #[prost(message, optional, tag = "3")]
408        pub grpc_timeout_header_offset: ::core::option::Option<::prost_types::Duration>,
409    }
410    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
411    #[repr(i32)]
412    pub enum ClusterNotFoundResponseCode {
413        ServiceUnavailable = 0,
414        NotFound = 1,
415    }
416    impl ClusterNotFoundResponseCode {
417        /// String value of the enum field names used in the ProtoBuf definition.
418        ///
419        /// The values are not transformed in any way and thus are considered stable
420        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
421        pub fn as_str_name(&self) -> &'static str {
422            match self {
423                Self::ServiceUnavailable => "SERVICE_UNAVAILABLE",
424                Self::NotFound => "NOT_FOUND",
425            }
426        }
427        /// Creates an enum from field names used in the ProtoBuf definition.
428        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
429            match value {
430                "SERVICE_UNAVAILABLE" => Some(Self::ServiceUnavailable),
431                "NOT_FOUND" => Some(Self::NotFound),
432                _ => None,
433            }
434        }
435    }
436    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
437    #[repr(i32)]
438    pub enum InternalRedirectAction {
439        PassThroughInternalRedirect = 0,
440        HandleInternalRedirect = 1,
441    }
442    impl InternalRedirectAction {
443        /// String value of the enum field names used in the ProtoBuf definition.
444        ///
445        /// The values are not transformed in any way and thus are considered stable
446        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
447        pub fn as_str_name(&self) -> &'static str {
448            match self {
449                Self::PassThroughInternalRedirect => "PASS_THROUGH_INTERNAL_REDIRECT",
450                Self::HandleInternalRedirect => "HANDLE_INTERNAL_REDIRECT",
451            }
452        }
453        /// Creates an enum from field names used in the ProtoBuf definition.
454        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
455            match value {
456                "PASS_THROUGH_INTERNAL_REDIRECT" => Some(Self::PassThroughInternalRedirect),
457                "HANDLE_INTERNAL_REDIRECT" => Some(Self::HandleInternalRedirect),
458                _ => None,
459            }
460        }
461    }
462    #[derive(Clone, PartialEq, ::prost::Oneof)]
463    pub enum ClusterSpecifier {
464        #[prost(string, tag = "1")]
465        Cluster(::prost::alloc::string::String),
466        #[prost(string, tag = "2")]
467        ClusterHeader(::prost::alloc::string::String),
468        #[prost(message, tag = "3")]
469        WeightedClusters(super::WeightedCluster),
470        #[prost(string, tag = "37")]
471        ClusterSpecifierPlugin(::prost::alloc::string::String),
472    }
473    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
474    pub enum HostRewriteSpecifier {
475        #[prost(string, tag = "6")]
476        HostRewriteLiteral(::prost::alloc::string::String),
477        #[prost(message, tag = "7")]
478        AutoHostRewrite(bool),
479        #[prost(string, tag = "29")]
480        HostRewriteHeader(::prost::alloc::string::String),
481        #[prost(message, tag = "35")]
482        HostRewritePathRegex(
483            super::super::super::super::kind::matcher::v3::RegexMatchAndSubstitute,
484        ),
485    }
486}
487#[derive(Clone, PartialEq, ::prost::Message)]
488pub struct RetryPolicy {
489    #[prost(string, tag = "1")]
490    pub retry_on: ::prost::alloc::string::String,
491    #[prost(message, optional, tag = "2")]
492    pub num_retries: ::core::option::Option<u32>,
493    #[prost(message, optional, tag = "3")]
494    pub per_try_timeout: ::core::option::Option<::prost_types::Duration>,
495    #[prost(message, optional, tag = "13")]
496    pub per_try_idle_timeout: ::core::option::Option<::prost_types::Duration>,
497    #[prost(message, optional, tag = "4")]
498    pub retry_priority: ::core::option::Option<retry_policy::RetryPriority>,
499    #[prost(message, repeated, tag = "5")]
500    pub retry_host_predicate: ::prost::alloc::vec::Vec<retry_policy::RetryHostPredicate>,
501    #[prost(message, repeated, tag = "12")]
502    pub retry_options_predicates:
503        ::prost::alloc::vec::Vec<super::super::core::v3::TypedExtensionConfig>,
504    #[prost(int64, tag = "6")]
505    pub host_selection_retry_max_attempts: i64,
506    #[prost(uint32, repeated, tag = "7")]
507    pub retriable_status_codes: ::prost::alloc::vec::Vec<u32>,
508    #[prost(message, optional, tag = "8")]
509    pub retry_back_off: ::core::option::Option<retry_policy::RetryBackOff>,
510    #[prost(message, optional, tag = "11")]
511    pub rate_limited_retry_back_off: ::core::option::Option<retry_policy::RateLimitedRetryBackOff>,
512    #[prost(message, repeated, tag = "9")]
513    pub retriable_headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
514    #[prost(message, repeated, tag = "10")]
515    pub retriable_request_headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
516}
517/// Nested message and enum types in `RetryPolicy`.
518pub mod retry_policy {
519    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
520    pub struct RetryPriority {
521        #[prost(string, tag = "1")]
522        pub name: ::prost::alloc::string::String,
523        #[prost(oneof = "retry_priority::ConfigType", tags = "3")]
524        pub config_type: ::core::option::Option<retry_priority::ConfigType>,
525    }
526    /// Nested message and enum types in `RetryPriority`.
527    pub mod retry_priority {
528        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
529        pub enum ConfigType {
530            #[prost(message, tag = "3")]
531            TypedConfig(::prost_types::Any),
532        }
533    }
534    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
535    pub struct RetryHostPredicate {
536        #[prost(string, tag = "1")]
537        pub name: ::prost::alloc::string::String,
538        #[prost(oneof = "retry_host_predicate::ConfigType", tags = "3")]
539        pub config_type: ::core::option::Option<retry_host_predicate::ConfigType>,
540    }
541    /// Nested message and enum types in `RetryHostPredicate`.
542    pub mod retry_host_predicate {
543        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
544        pub enum ConfigType {
545            #[prost(message, tag = "3")]
546            TypedConfig(::prost_types::Any),
547        }
548    }
549    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
550    pub struct RetryBackOff {
551        #[prost(message, optional, tag = "1")]
552        pub base_interval: ::core::option::Option<::prost_types::Duration>,
553        #[prost(message, optional, tag = "2")]
554        pub max_interval: ::core::option::Option<::prost_types::Duration>,
555    }
556    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
557    pub struct ResetHeader {
558        #[prost(string, tag = "1")]
559        pub name: ::prost::alloc::string::String,
560        #[prost(enumeration = "ResetHeaderFormat", tag = "2")]
561        pub format: i32,
562    }
563    #[derive(Clone, PartialEq, ::prost::Message)]
564    pub struct RateLimitedRetryBackOff {
565        #[prost(message, repeated, tag = "1")]
566        pub reset_headers: ::prost::alloc::vec::Vec<ResetHeader>,
567        #[prost(message, optional, tag = "2")]
568        pub max_interval: ::core::option::Option<::prost_types::Duration>,
569    }
570    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
571    #[repr(i32)]
572    pub enum ResetHeaderFormat {
573        Seconds = 0,
574        UnixTimestamp = 1,
575    }
576    impl ResetHeaderFormat {
577        /// String value of the enum field names used in the ProtoBuf definition.
578        ///
579        /// The values are not transformed in any way and thus are considered stable
580        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
581        pub fn as_str_name(&self) -> &'static str {
582            match self {
583                Self::Seconds => "SECONDS",
584                Self::UnixTimestamp => "UNIX_TIMESTAMP",
585            }
586        }
587        /// Creates an enum from field names used in the ProtoBuf definition.
588        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
589            match value {
590                "SECONDS" => Some(Self::Seconds),
591                "UNIX_TIMESTAMP" => Some(Self::UnixTimestamp),
592                _ => None,
593            }
594        }
595    }
596}
597#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
598pub struct HedgePolicy {
599    #[prost(message, optional, tag = "1")]
600    pub initial_requests: ::core::option::Option<u32>,
601    #[prost(message, optional, tag = "2")]
602    pub additional_request_chance:
603        ::core::option::Option<super::super::super::kind::v3::FractionalPercent>,
604    #[prost(bool, tag = "3")]
605    pub hedge_on_per_try_timeout: bool,
606}
607#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
608pub struct RedirectAction {
609    #[prost(string, tag = "1")]
610    pub host_redirect: ::prost::alloc::string::String,
611    #[prost(uint32, tag = "8")]
612    pub port_redirect: u32,
613    #[prost(enumeration = "redirect_action::RedirectResponseCode", tag = "3")]
614    pub response_code: i32,
615    #[prost(bool, tag = "6")]
616    pub strip_query: bool,
617    #[prost(oneof = "redirect_action::SchemeRewriteSpecifier", tags = "4, 7")]
618    pub scheme_rewrite_specifier: ::core::option::Option<redirect_action::SchemeRewriteSpecifier>,
619    #[prost(oneof = "redirect_action::PathRewriteSpecifier", tags = "2, 5, 9")]
620    pub path_rewrite_specifier: ::core::option::Option<redirect_action::PathRewriteSpecifier>,
621}
622/// Nested message and enum types in `RedirectAction`.
623pub mod redirect_action {
624    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
625    #[repr(i32)]
626    pub enum RedirectResponseCode {
627        MovedPermanently = 0,
628        Found = 1,
629        SeeOther = 2,
630        TemporaryRedirect = 3,
631        PermanentRedirect = 4,
632    }
633    impl RedirectResponseCode {
634        /// String value of the enum field names used in the ProtoBuf definition.
635        ///
636        /// The values are not transformed in any way and thus are considered stable
637        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
638        pub fn as_str_name(&self) -> &'static str {
639            match self {
640                Self::MovedPermanently => "MOVED_PERMANENTLY",
641                Self::Found => "FOUND",
642                Self::SeeOther => "SEE_OTHER",
643                Self::TemporaryRedirect => "TEMPORARY_REDIRECT",
644                Self::PermanentRedirect => "PERMANENT_REDIRECT",
645            }
646        }
647        /// Creates an enum from field names used in the ProtoBuf definition.
648        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
649            match value {
650                "MOVED_PERMANENTLY" => Some(Self::MovedPermanently),
651                "FOUND" => Some(Self::Found),
652                "SEE_OTHER" => Some(Self::SeeOther),
653                "TEMPORARY_REDIRECT" => Some(Self::TemporaryRedirect),
654                "PERMANENT_REDIRECT" => Some(Self::PermanentRedirect),
655                _ => None,
656            }
657        }
658    }
659    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
660    pub enum SchemeRewriteSpecifier {
661        #[prost(bool, tag = "4")]
662        HttpsRedirect(bool),
663        #[prost(string, tag = "7")]
664        SchemeRedirect(::prost::alloc::string::String),
665    }
666    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
667    pub enum PathRewriteSpecifier {
668        #[prost(string, tag = "2")]
669        PathRedirect(::prost::alloc::string::String),
670        #[prost(string, tag = "5")]
671        PrefixRewrite(::prost::alloc::string::String),
672        #[prost(message, tag = "9")]
673        RegexRewrite(super::super::super::super::kind::matcher::v3::RegexMatchAndSubstitute),
674    }
675}
676#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
677pub struct DirectResponseAction {
678    #[prost(uint32, tag = "1")]
679    pub status: u32,
680    #[prost(message, optional, tag = "2")]
681    pub body: ::core::option::Option<super::super::core::v3::DataSource>,
682}
683#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
684pub struct NonForwardingAction {}
685#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
686pub struct Decorator {
687    #[prost(string, tag = "1")]
688    pub operation: ::prost::alloc::string::String,
689    #[prost(message, optional, tag = "2")]
690    pub propagate: ::core::option::Option<bool>,
691}
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct Tracing {
694    #[prost(message, optional, tag = "1")]
695    pub client_sampling: ::core::option::Option<super::super::super::kind::v3::FractionalPercent>,
696    #[prost(message, optional, tag = "2")]
697    pub random_sampling: ::core::option::Option<super::super::super::kind::v3::FractionalPercent>,
698    #[prost(message, optional, tag = "3")]
699    pub overall_sampling: ::core::option::Option<super::super::super::kind::v3::FractionalPercent>,
700    #[prost(message, repeated, tag = "4")]
701    pub custom_tags: ::prost::alloc::vec::Vec<super::super::super::kind::tracing::v3::CustomTag>,
702}
703#[derive(Clone, PartialEq, ::prost::Message)]
704pub struct VirtualCluster {
705    #[prost(message, repeated, tag = "4")]
706    pub headers: ::prost::alloc::vec::Vec<HeaderMatcher>,
707    #[prost(string, tag = "2")]
708    pub name: ::prost::alloc::string::String,
709}
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct RateLimit {
712    #[prost(message, optional, tag = "1")]
713    pub stage: ::core::option::Option<u32>,
714    #[prost(string, tag = "2")]
715    pub disable_key: ::prost::alloc::string::String,
716    #[prost(message, repeated, tag = "3")]
717    pub actions: ::prost::alloc::vec::Vec<rate_limit::Action>,
718    #[prost(message, optional, tag = "4")]
719    pub limit: ::core::option::Option<rate_limit::Override>,
720}
721/// Nested message and enum types in `RateLimit`.
722pub mod rate_limit {
723    #[derive(Clone, PartialEq, ::prost::Message)]
724    pub struct Action {
725        #[prost(oneof = "action::ActionSpecifier", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
726        pub action_specifier: ::core::option::Option<action::ActionSpecifier>,
727    }
728    /// Nested message and enum types in `Action`.
729    pub mod action {
730        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
731        pub struct SourceCluster {}
732        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
733        pub struct DestinationCluster {}
734        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
735        pub struct RequestHeaders {
736            #[prost(string, tag = "1")]
737            pub header_name: ::prost::alloc::string::String,
738            #[prost(string, tag = "2")]
739            pub descriptor_key: ::prost::alloc::string::String,
740            #[prost(bool, tag = "3")]
741            pub skip_if_absent: bool,
742        }
743        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
744        pub struct RemoteAddress {}
745        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
746        pub struct GenericKey {
747            #[prost(string, tag = "1")]
748            pub descriptor_value: ::prost::alloc::string::String,
749            #[prost(string, tag = "2")]
750            pub descriptor_key: ::prost::alloc::string::String,
751        }
752        #[derive(Clone, PartialEq, ::prost::Message)]
753        pub struct HeaderValueMatch {
754            #[prost(string, tag = "1")]
755            pub descriptor_value: ::prost::alloc::string::String,
756            #[prost(message, optional, tag = "2")]
757            pub expect_match: ::core::option::Option<bool>,
758            #[prost(message, repeated, tag = "3")]
759            pub headers: ::prost::alloc::vec::Vec<super::super::HeaderMatcher>,
760        }
761        #[derive(Clone, PartialEq, ::prost::Message)]
762        pub struct DynamicMetaData {
763            #[prost(string, tag = "1")]
764            pub descriptor_key: ::prost::alloc::string::String,
765            #[prost(message, optional, tag = "2")]
766            pub metadata_key: ::core::option::Option<
767                super::super::super::super::super::kind::metadata::v3::MetadataKey,
768            >,
769            #[prost(string, tag = "3")]
770            pub default_value: ::prost::alloc::string::String,
771        }
772        #[derive(Clone, PartialEq, ::prost::Message)]
773        pub struct MetaData {
774            #[prost(string, tag = "1")]
775            pub descriptor_key: ::prost::alloc::string::String,
776            #[prost(message, optional, tag = "2")]
777            pub metadata_key: ::core::option::Option<
778                super::super::super::super::super::kind::metadata::v3::MetadataKey,
779            >,
780            #[prost(string, tag = "3")]
781            pub default_value: ::prost::alloc::string::String,
782            #[prost(enumeration = "meta_data::Source", tag = "4")]
783            pub source: i32,
784        }
785        /// Nested message and enum types in `MetaData`.
786        pub mod meta_data {
787            #[derive(
788                Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration,
789            )]
790            #[repr(i32)]
791            pub enum Source {
792                Dynamic = 0,
793                RouteEntry = 1,
794            }
795            impl Source {
796                /// String value of the enum field names used in the ProtoBuf definition.
797                ///
798                /// The values are not transformed in any way and thus are considered stable
799                /// (if the ProtoBuf definition does not change) and safe for programmatic use.
800                pub fn as_str_name(&self) -> &'static str {
801                    match self {
802                        Self::Dynamic => "DYNAMIC",
803                        Self::RouteEntry => "ROUTE_ENTRY",
804                    }
805                }
806                /// Creates an enum from field names used in the ProtoBuf definition.
807                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
808                    match value {
809                        "DYNAMIC" => Some(Self::Dynamic),
810                        "ROUTE_ENTRY" => Some(Self::RouteEntry),
811                        _ => None,
812                    }
813                }
814            }
815        }
816        #[derive(Clone, PartialEq, ::prost::Oneof)]
817        pub enum ActionSpecifier {
818            #[prost(message, tag = "1")]
819            SourceCluster(SourceCluster),
820            #[prost(message, tag = "2")]
821            DestinationCluster(DestinationCluster),
822            #[prost(message, tag = "3")]
823            RequestHeaders(RequestHeaders),
824            #[prost(message, tag = "4")]
825            RemoteAddress(RemoteAddress),
826            #[prost(message, tag = "5")]
827            GenericKey(GenericKey),
828            #[prost(message, tag = "6")]
829            HeaderValueMatch(HeaderValueMatch),
830            #[prost(message, tag = "7")]
831            DynamicMetadata(DynamicMetaData),
832            #[prost(message, tag = "8")]
833            Metadata(MetaData),
834            #[prost(message, tag = "9")]
835            Extension(super::super::super::super::core::v3::TypedExtensionConfig),
836        }
837    }
838    #[derive(Clone, PartialEq, ::prost::Message)]
839    pub struct Override {
840        #[prost(oneof = "r#override::OverrideSpecifier", tags = "1")]
841        pub override_specifier: ::core::option::Option<r#override::OverrideSpecifier>,
842    }
843    /// Nested message and enum types in `Override`.
844    pub mod r#override {
845        #[derive(Clone, PartialEq, ::prost::Message)]
846        pub struct DynamicMetadata {
847            #[prost(message, optional, tag = "1")]
848            pub metadata_key: ::core::option::Option<
849                super::super::super::super::super::kind::metadata::v3::MetadataKey,
850            >,
851        }
852        #[derive(Clone, PartialEq, ::prost::Oneof)]
853        pub enum OverrideSpecifier {
854            #[prost(message, tag = "1")]
855            DynamicMetadata(DynamicMetadata),
856        }
857    }
858}
859#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
860pub struct HeaderMatcher {
861    #[prost(string, tag = "1")]
862    pub name: ::prost::alloc::string::String,
863    #[prost(bool, tag = "8")]
864    pub invert_match: bool,
865    #[prost(
866        oneof = "header_matcher::HeaderMatchSpecifier",
867        tags = "4, 11, 6, 7, 9, 10, 12, 13"
868    )]
869    pub header_match_specifier: ::core::option::Option<header_matcher::HeaderMatchSpecifier>,
870}
871/// Nested message and enum types in `HeaderMatcher`.
872pub mod header_matcher {
873    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
874    pub enum HeaderMatchSpecifier {
875        #[prost(string, tag = "4")]
876        ExactMatch(::prost::alloc::string::String),
877        #[prost(message, tag = "11")]
878        SafeRegexMatch(super::super::super::super::kind::matcher::v3::RegexMatcher),
879        #[prost(message, tag = "6")]
880        RangeMatch(super::super::super::super::kind::v3::Int64Range),
881        #[prost(bool, tag = "7")]
882        PresentMatch(bool),
883        #[prost(string, tag = "9")]
884        PrefixMatch(::prost::alloc::string::String),
885        #[prost(string, tag = "10")]
886        SuffixMatch(::prost::alloc::string::String),
887        #[prost(string, tag = "12")]
888        ContainsMatch(::prost::alloc::string::String),
889        #[prost(message, tag = "13")]
890        StringMatch(super::super::super::super::kind::matcher::v3::StringMatcher),
891    }
892}
893#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
894pub struct QueryParameterMatcher {
895    #[prost(string, tag = "1")]
896    pub name: ::prost::alloc::string::String,
897    #[prost(
898        oneof = "query_parameter_matcher::QueryParameterMatchSpecifier",
899        tags = "5, 6"
900    )]
901    pub query_parameter_match_specifier:
902        ::core::option::Option<query_parameter_matcher::QueryParameterMatchSpecifier>,
903}
904/// Nested message and enum types in `QueryParameterMatcher`.
905pub mod query_parameter_matcher {
906    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
907    pub enum QueryParameterMatchSpecifier {
908        #[prost(message, tag = "5")]
909        StringMatch(super::super::super::super::kind::matcher::v3::StringMatcher),
910        #[prost(bool, tag = "6")]
911        PresentMatch(bool),
912    }
913}
914#[derive(Clone, PartialEq, ::prost::Message)]
915pub struct InternalRedirectPolicy {
916    #[prost(message, optional, tag = "1")]
917    pub max_internal_redirects: ::core::option::Option<u32>,
918    #[prost(uint32, repeated, packed = "false", tag = "2")]
919    pub redirect_response_codes: ::prost::alloc::vec::Vec<u32>,
920    #[prost(message, repeated, tag = "3")]
921    pub predicates: ::prost::alloc::vec::Vec<super::super::core::v3::TypedExtensionConfig>,
922    #[prost(bool, tag = "4")]
923    pub allow_cross_scheme_redirect: bool,
924}
925#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
926pub struct FilterConfig {
927    #[prost(message, optional, tag = "1")]
928    pub config: ::core::option::Option<::prost_types::Any>,
929    #[prost(bool, tag = "2")]
930    pub is_optional: bool,
931}